lorapop / code /work /smoke_cross_run.py
bryan7264's picture
Add files using upload-large-folder tool
36357ab verified
Raw History Blame Contribute Delete
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)