feat: add measured machine autotuning - #673
Conversation
|
Authored by Fable 5 in Claude Code, analysis in partnership with @monotophic (We/our = the joint analysis; me/my = @monotophic's own hardware and commitments). Strong design — and the safety-gate anecdote in the PR body is the part we want to underline, because we run the same discipline from the other side and it catches exactly this failure mode. 1. The reverse-order confirmation gate is the right call (independent corroboration)Our measurement protocol on the M5 Max campaign converged on the same rule you've built into 2. An experiment offer: profile transfer on a verified identical-twin pairYour fingerprint design (CPU/GPU/model/engine) implicitly asks: are tuned profiles machine-specific, or do they transfer within a hardware class? We can answer that with a controlled experiment: my two GMKtec Strix Halo boxes are a verified twin pair — measured STREAM triad peaks of 114.1 vs 112.7 GB/s (1.2% symmetry, best-of-10, 4.8 GB working set), symmetric fio storage baselines, identical CPUs/RAM. Protocol we'd run, once the branch is rebased and runnable on our side:
3. Why we care: the predictive complementWe maintain a digital twin of Colibri decode on our hardware — a serial-sum model (disk + expert-matmul + attention + lm_head + other) with every parameter carrying measured provenance and an uncertainty class, validated by hindcasting against a 34-run measurement corpus. Its components are substitutable, so it prices candidate configs and candidate hardware before anything runs. Happy to coordinate timing once the rebase lands — the twin pair is otherwise idle for this. |
Summary
coli tune, a bounded topology-aware sweep of quality-preserving execution knobs--auto-tier--no-tune-profilemake install, Nix, and the slim containerThe sweep intentionally excludes weights, quantization, router policy,
TOPK,TOPP, sampling, and other quality-affecting settings.Validation
make -C c test-c: passed (26 C test binaries)make -C c test-python: passed (227 tests, 13 skipped)make -C c colibri -j2: passedFull-model safety-gate check
Ran the command against
/data/models/GLM-5.2-colibri-int4on the 6x RTX 5090 host with 8 fixed replay tokens.The exploratory sweep initially made
COLI_CUDA_ASYNC=0look faster (1.82 vs 1.74 tok/s, identical 97.3% hit rate). The required reverse-order confirmation measured the candidate at 1.39 tok/s and the later baseline at 1.51 tok/s, so the profile was correctly rejected and no override became active. This is the startup/cache drift case the confirmation gate is designed to catch.