Commit 83824f4
ml8: make determinism opt-in (ML8_DETERMINISTIC=1) — full-calib Cholesky regression deferred
The default-on determinism from 14bccfa breaks full-model calibration: from the first
full-self-attention layer onward (layer 3 on 0.8B), torch.use_deterministic_algorithms(True)
makes the SDPA forward yield a degenerate (NaN-suspected) Hessian for that layer's MLP → GPTQ
Cholesky throws "not positive-definite" → the tensor is silently skipped → ~130/151 tensors
fall back to bf16 in convert (1144 MB "model" with a misleading 18.25 PPL that's mostly bf16).
Diagnosis (durable in KG): determinism is the trigger (det-off=151 tensors / det-on=21, same
data); the failing tensors never reach batched_gptq (no diag line), and every Hessian the probe
DID see is solidly PD (eig_min 0.05-0.15) — so it's not a marginal-conditioning issue, it's the
self-attn forward corrupting the downstream Hessian. The "best-of-N + clean ladder" payoff still
stands once this is fixed; reverting to opt-in restores the known-good nondeterministic calibrator
as the default. Adds diag_soft_determinism.py (proved soft determinism = full coverage but NOT
reproducible, so the hard hammer is load-bearing → must fix the SDPA/Cholesky path, not drop it).
Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com>1 parent 14bccfa commit 83824f4
2 files changed
Lines changed: 49 additions & 9 deletions
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
50 | 50 | | |
51 | 51 | | |
52 | 52 | | |
53 | | - | |
54 | | - | |
55 | | - | |
56 | | - | |
57 | | - | |
58 | | - | |
59 | | - | |
| 53 | + | |
| 54 | + | |
| 55 | + | |
| 56 | + | |
| 57 | + | |
| 58 | + | |
| 59 | + | |
| 60 | + | |
| 61 | + | |
| 62 | + | |
60 | 63 | | |
61 | 64 | | |
62 | 65 | | |
| |||
82 | 85 | | |
83 | 86 | | |
84 | 87 | | |
85 | | - | |
86 | | - | |
| 88 | + | |
| 89 | + | |
87 | 90 | | |
88 | 91 | | |
89 | 92 | | |
| |||
| 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 | + | |
0 commit comments