Commit 14bccfa
ml8: deterministic calibration (default-on) — fixes ~0.6 PPL run-to-run nondeterminism
The GPU Hessian forward had unforced reduction order; GPTQ's sequential error-feedback
amplified the low-bit noise into different discrete weight assignments run-to-run (~0.6 PPL
spread — swamping the ±0.05 levers). Same recipe + same data gave 151/188 differing blobs;
only the deterministic .fp8 tier matched. Y_SNR stayed flat (~20.87) so it never surfaced.
Fix (calibrate_ml8_paged.py, default-on, ML8_NONDETERMINISTIC=1 to opt out):
- env before torch import: CUBLAS_WORKSPACE_CONFIG=:4096:8, HIPBLASLT_DETERMINISTIC=1
- torch.manual_seed/cuda.manual_seed_all, use_deterministic_algorithms(True),
cudnn.deterministic, tf32 off, fp16/bf16 reduced-precision reduction off
Verified gfx1201: warn_only diag flagged zero ops without deterministic impls; two 1-layer
runs -> 6/6 blobs bit-identical; full-scale gate (--max-layers 12, incl self_attn SDPA +
fla fp32 SSM + hipBLAS) -> 21/21 bit-identical. Adds diag_determinism.py (warn_only enumerator).
Unlocks: (1) zero run-to-run noise -> faithful-acts/weights deltas now cleanly measurable;
(2) --rotation-seed becomes a reproducible best-of-N lever (select on held-out, report on wiki).
Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com>1 parent 43ee012 commit 14bccfa
2 files changed
Lines changed: 75 additions & 0 deletions
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
50 | 50 | | |
51 | 51 | | |
52 | 52 | | |
| 53 | + | |
| 54 | + | |
| 55 | + | |
| 56 | + | |
| 57 | + | |
| 58 | + | |
| 59 | + | |
| 60 | + | |
| 61 | + | |
| 62 | + | |
| 63 | + | |
53 | 64 | | |
54 | 65 | | |
55 | 66 | | |
56 | 67 | | |
57 | 68 | | |
| 69 | + | |
| 70 | + | |
| 71 | + | |
| 72 | + | |
| 73 | + | |
| 74 | + | |
| 75 | + | |
| 76 | + | |
| 77 | + | |
| 78 | + | |
| 79 | + | |
| 80 | + | |
| 81 | + | |
| 82 | + | |
| 83 | + | |
| 84 | + | |
| 85 | + | |
| 86 | + | |
| 87 | + | |
58 | 88 | | |
59 | 89 | | |
60 | 90 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
| 1 | + | |
| 2 | + | |
| 3 | + | |
| 4 | + | |
| 5 | + | |
| 6 | + | |
| 7 | + | |
| 8 | + | |
| 9 | + | |
| 10 | + | |
| 11 | + | |
| 12 | + | |
| 13 | + | |
| 14 | + | |
| 15 | + | |
| 16 | + | |
| 17 | + | |
| 18 | + | |
| 19 | + | |
| 20 | + | |
| 21 | + | |
| 22 | + | |
| 23 | + | |
| 24 | + | |
| 25 | + | |
| 26 | + | |
| 27 | + | |
| 28 | + | |
| 29 | + | |
| 30 | + | |
| 31 | + | |
| 32 | + | |
| 33 | + | |
| 34 | + | |
| 35 | + | |
| 36 | + | |
| 37 | + | |
| 38 | + | |
| 39 | + | |
| 40 | + | |
| 41 | + | |
| 42 | + | |
| 43 | + | |
| 44 | + | |
| 45 | + | |
0 commit comments