Download code/work/smoke_cross_run.py from bryan7264/lorapop: direct link, hf CLI and curl.
- Browser
- Download file 654 Bytes
-
https://huggingface.co/datasets/bryan7264/lorapop/resolve/main/code/work/smoke_cross_run.py
- Command line
-
hf download hf://datasets/bryan7264/lorapop/code/work/smoke_cross_run.py
-
curl -L -o smoke_cross_run.py https://huggingface.co/datasets/bryan7264/lorapop/resolve/main/code/work/smoke_cross_run.py
654 Bytes
| # MIT License, Bryan Cheng, 2026. CPU smoke of cross.py run inside the 8 GB agent allocation: identical code path, except | |
| # ref_nll (reference perplexity QC) uses batch 2 instead of 16 (fp32 logits of 16 x 256 x 151,936 do not fit on CPU). | |
| import argparse | |
| import sys | |
| sys.path.insert(0, ".") | |
| import src.run.cross as C # noqa: E402 | |
| _orig = C.ref_nll | |
| C.ref_nll = lambda *a, **k: _orig(*a, **{**k, "bs": 2}) | |
| a = argparse.Namespace(cmd="run", design="work/smoke_cross/design.json", shard=0, nshards=1, group=2, sizes="tiny", | |
| device="cpu", bs=128, gbs=256, claim=True, stale=14400.0) | |
| try: | |
| C.cmd_run(a) | |
| finally: | |
| C.unlock(C.HELD) | |