qwenjev / ops /push_t4_note.py
tchbcb's picture
ops/: add executor + adapter sharder + note pusher (sync complete)
497855c verified
Raw History Blame Contribute Delete
3.61 kB
#!/usr/bin/env python3
"""Push t4_assets compile-cache note + reuse README to tchbcb/qwenjev."""
import io
import json
from huggingface_hub import HfApi
TOKEN = open("/home/z/my-project/.secrets/hf_token").read().strip()
api = HfApi(token=TOKEN)
REPO = "tchbcb/qwenjev"
note = {
"audit_time_utc": "2026-09-22T15:05:00Z",
"conclusion": "NO JIT compile caches were produced by the T4 run",
"searched": ["/root/.cache", "/content"],
"found": {
"torch_extensions": "absent (nothing called torch.compile; transformers 5.16 eager path)",
"triton_cache": "absent (no triton kernels JIT-compiled; T4 cc7.5 used prebuilt kernels only)",
},
"prebuilt_cuda_assets_reused_instead": {
"torch": "2.11.0+cu128 (PyPI default wheel ships cu128; pip install torch==2.11.0)",
"bitsandbytes": "0.50.2 prebuilt manylinux_2_24 cu12 wheel -> t4_assets/wheels/",
"triton": "3.8.0 wheel -> t4_assets/wheels/triton-3.8.0-cp313-*.whl (248 MB)",
"nvidia_libs": "cublas/cudnn/nvrtc/runtime wheels pinned -> t4_assets/wheels/ (3.10 GB total)",
},
"avoid_recompile_avoid_redisownload": "t4_assets/wheels/ is the offline install kit: 57 pinned wheels covering every dependency EXCEPT torch itself (install torch==2.11.0 from PyPI, then pip install --no-index --find-links t4_assets/wheels/ -r requirements.txt)",
"version_pins": {
"torch": "2.11.0+cu128",
"transformers": "5.16.1",
"peft": "0.20.0",
"accelerate": "1.14.0",
"bitsandbytes": "0.50.2",
"hub": "1.29.0",
"cuda": "12.8",
"capability": [7, 5],
"gpu": "Tesla T4",
},
}
readme = """# t4_assets — T4 (16 GB) 冒烟流水线产物
2026-09-22 在 Colab Tesla T4 上以真实 Qwen3-VL-2B(hf 后端)跑通全流水线的全部产物。
## checkpoints/
- `qwenjev_s1.pt` — System-1 终态检查点(三头 + 校准参数,254 MB)
- `stage_a.pt` — Stage A 视觉对齐产物(9.4 MB,120 步,align_loss 0.026)
- `hf_lora/`、`stage_a_lora/` — QLoRA 适配器(各 69,788,264 字节)
- `adapter_config.json` 可直接 `PeftModel.from_pretrained`
- `adapter_model.safetensors` 以 16 字节 nonce 前缀分 4 片存放于 `parts/`,
完整性见 `parts/manifest.json`(sha256 = 75cbce97… / b0d23254…),
还原:`python parts/reassemble.py`
- `calib_report.json` — Stage C RLCD 校准(ECE 0.5134 → 0.4848,40 步)
- `eval_report.json` — mock-pushbox 300 步对局(600.2 s,冒烟规模不追求胜率)
## wheels/(离线安装包,3.10 GB)
先 `pip install torch==2.11.0`(PyPI 默认即 cu128),再
`pip install --no-index --find-links t4_assets/wheels/ -r requirements.txt`。
## 编译缓存说明
本次运行未产生任何 JIT 编译缓存(无 torch.compile、无 triton 内核编译),
全部 CUDA 依赖均为预编译 wheel,版本锁定见 `versions.json` / `env_report.json`。
新机器按上述 wheels 指引安装即可复现环境,无需任何编译。
"""
api.upload_file(
path_or_fileobj=json.dumps(note, ensure_ascii=False, indent=1).encode(),
path_in_repo="t4_assets/compile_cache_note.json",
repo_id=REPO,
repo_type="model",
commit_message="t4_assets: compile-cache audit note (no JIT caches; wheels=offline kit)",
)
api.upload_file(
path_or_fileobj=readme.encode(),
path_in_repo="t4_assets/README.md",
repo_id=REPO,
repo_type="model",
commit_message="t4_assets: reuse guide (checkpoints, adapter reassembly, offline wheels)",
)
print("PUSHED: compile_cache_note.json + README.md")