Repository navigation
Description
Proposal, not an open numerical bug. Two fixes in the Nov 19–21 UTC window needed a second patch in GPTAQ/FOEM. Both are fixed on audited main.
| Invariant | First fix | Why the follow-up mattered |
|---|---|---|
| A never-activated column cannot set the live columns’ grid. | GPTQ/QQQ #5664 | GPTAQ/FOEM #5766: each separate block pass still fit scales before neutralization. |
| Replay uses the source dtype; export must recover the solver’s intended integer codes. | GPTQ/RTN #5794 | GPTAQ/FOEM #5872: rounding the reconstruction to BF16 first packed 206 instead of 207 in the asymmetric 8-bit fixture. |
Why tests alone are insufficient. The numerical primitives are already shared. What is not shared is when to call them. The GPTAQ and FOEM overrides own preparation order. The processor discovers the exact pack payload by an optional attribute: a missing handoff and a legitimately lossless replay look identical.
Proposed contract. Put two boundaries around the method-specific block update, without merging the algorithms:
- One preparation step owns dead-column neutralization of the working weight, Hessian and any method-specific correction matrix before the applicable grid is fitted. A grouped solver still fits the groups it needs; Hessian-free paths do not invent dead columns.
- One finalization step returns a replay tensor in the source dtype and an explicit pack source: reuse replay when code recovery is lossless, otherwise retain the exact reconstruction. The processor consumes the exact source once, only after the last source forward. A required but absent source fails before writing. No new persistent dense cache, checkpoint field, or live module cast; retain the forward dtype contract.
Bounded migration and acceptance. Start with GPTQ, GPTAQ and FOEM, wrapping the existing neutralization and reconstruction helpers and preserving hooks for native corrections. Reuse only the applicable boundary for QQQ (grid) and RTN (pack). Keep the public quantize result and checkpoint bytes compatible via an internal adapter. Verify:
- Vary only a dead column from zero to a signed outlier; live weights, scales and zeros stay unchanged in each supported solver. With corrections disabled, the GPTAQ/FOEM fixture also agrees with the GPTQ grid.
- Run the asymmetric BF16 fixture through process, replay and final pack: unpack code 207, not the replay-only 206. Keep the lossless FP16 control and verify no extra pack buffer survives success or failure.
- Exercise nonzero corrections and supported grouped/routed cases through their real paths; shared preparation must not turn the variant into plain GPTQ.
Activity