I hereby claim:
- I am googlefan256 on github.
- I am googlefan (https://keybase.io/googlefan) on keybase.
- I have a public key whose fingerprint is AC17 E177 D62B 0257 D178 CE82 F2AA 7332 18A6 1B47
To claim this, I am signing this object:
I hereby claim:
To claim this, I am signing this object:
| #!/usr/bin/env uv run --with openai,transformers,tqdm--script | |
| from openai import AsyncOpenAI | |
| from transformers import AutoTokenizer | |
| from tqdm import tqdm | |
| import argparse | |
| parser = argparse.ArgumentParser(description="RL Memory Agent") | |
| parser.add_argument( | |
| "--api_base", | |
| type=str, |
| from transformers import AutoModel, AutoTokenizer | |
| import torch | |
| torch.backends.cudnn.benchmark = True | |
| device = "cuda:0" | |
| tokenizer = AutoTokenizer.from_pretrained( | |
| "apple/DiffuCoder-7B-cpGRPO", trust_remote_code=True, device_map=device | |
| ) | |
| model = AutoModel.from_pretrained( |
| use std::ffi::c_int; | |
| fn inner() -> anyhow::Result<()> { | |
| use tinygrad_in_rust::backend::cuda; | |
| cuda::cuda_init("/usr/lib/x86_64-linux-gnu/libcuda.so")?; | |
| cuda::nvrtc_init("/usr/local/cuda/lib64/libnvrtc.so")?; | |
| cuda::nvjitlink_init("/usr/local/cuda/lib64/libnvJitLink.so")?; | |
| let res = cuda::CuCompiler::new_default()?.compile( | |
| r#" | |
| extern "C" __global__ void add(int *a, int *b, int *c, int size) { |
| def ai(prompt: str): | |
| from google import genai | |
| client = genai.Client(api_key="") | |
| response = client.models.generate_content( | |
| model="gemini-2.5-flash-lite-preview-06-17", | |
| contents=f"Write a python3 code only, no explanation. {prompt}" | |
| ) | |
| code = response.text | |
| if code.startswith("```python"): | |
| code = code.removeprefix("```python").strip() |
| from tinygrad import Tensor, nn, dtypes, TinyJit, Variable, Context | |
| from tinygrad.dtype import DType | |
| from transformers import AutoTokenizer | |
| from typing import Tuple, Optional, List, Dict, Generator | |
| from huggingface_hub import hf_hub_download | |
| import time | |
| from tqdm import tqdm | |
| Tensor.no_grad = True |
| package commandparser | |
| import ( | |
| "encoding/json" | |
| "errors" | |
| "fmt" | |
| "regexp" | |
| "strings" | |
| ) |
| ใใญใณใใ: | |
| ใใชใใฏๆ็็ช็ตใฎๅธไผ่ ใงใใไปๆฅใฎใใผใใฏใ่ชฐใใ้ฉใ็ฐกๅใง่ฑช่ฏใชใใฃใใผใใ้ใใใ้ฃๆใง็ฐกๅใซไฝใใ่ฑช่ฏใชๆ็ใ็ดนไปใใ่ฆ่ด่ ใซใใใใช็ฐกๅใง็พๅณใใๆ็ใใใใชใใฆ๏ผใใจๆใใใ่ชฌๆใใใพใใใใ ๆ็ใฎ้็จใงใๆๆ่ฆ่ด่ ใซใฏใคใบใๅบใใใใ็ฐกๅใชๆ็ใฎใณใใๆใใใใใใชใฉใใฆใ่ฆ่ด่ ใฎๅๅ ๆ่ญใ้ซใใไธ็ทใซๆ็ใๆฅฝใใใใใใช้ฐๅฒๆฐใ็ใไธใใฆใใ ใใใ ๅ ทไฝ็ใซใฉใใชๆ็ใ็ดนไปใใใใใฏใคใบใฎๅ ๅฎนใๆ็ใฎใณใใชใฉใ่ฉณใใๆใใฆใใ ใใใ | |
| ใใผในใขใใซ: | |
| ๆ็๏ผใใใ้่ใจ้ญ็ฒใฎใฟใ | |
| * ็ฐกๅใซไฝใใๆ ้คๆบ็นใชๆ็ใงใใ | |
| * ๆ้ๅถ้ใฏ็ญใใๅฎถๆใๅไบบใจ็ฐกๅใซไธ็ทใซไฝใใใจใใงใใพใใ | |
| ใฏใคใบ๏ผ |
| FROM gcr.io/distroless/python3 AS distroless | |
| FROM scratch | |
| COPY --from=distroless /lib/x86_64-linux-gnu/libpthread.so.0 /lib/x86_64-linux-gnu/libpthread.so.0 | |
| COPY --from=distroless /lib/x86_64-linux-gnu/libdl.so.2 /lib/x86_64-linux-gnu/libdl.so.2 | |
| COPY --from=distroless /lib/x86_64-linux-gnu/libutil.so.1 /lib/x86_64-linux-gnu/libutil.so.1 | |
| COPY --from=distroless /lib/x86_64-linux-gnu/libm.so.6 /lib/x86_64-linux-gnu/libm.so.6 | |
| COPY --from=distroless /lib/x86_64-linux-gnu/libexpat.so.1 /lib/x86_64-linux-gnu/libexpat.so.1 | |
| COPY --from=distroless /lib/x86_64-linux-gnu/libz.so.1 /lib/x86_64-linux-gnu/libz.so.1 | |
| COPY --from=distroless /lib/x86_64-linux-gnu/libc.so.6 /lib/x86_64-linux-gnu/libc.so.6 | |
| COPY --from=distroless /lib64/ld-linux-x86-64.so.2 /lib64/ld-linux-x86-64.so.2 |
| function translate(text, from = "auto", to) { | |
| try { | |
| const result = UrlFetchApp.fetch( | |
| "https://translate.google.com/_/TranslateWebserverUi/data/batchexecute", | |
| { | |
| payload: | |
| "f.req=" + | |
| encodeURIComponent( | |
| JSON.stringify([ | |
| [ |