Skip to content

fix(gptq,qqq): exact OOM block retry, static_groups CPU fallback, release QQQ Hessian (#4464, #4463) - #4492

Merged
Qubitium merged 1 commit into
mainfrom
fix/gptq-qqq-oom-fallback-4464
Nov 16, 2026
Merged

Qubitium merged 1 commit into
mainfrom
fix/gptq-qqq-oom-fallback-4464

Conversation

@Qubitium

Copy link
Copy Markdown
Collaborator

Summary

Validation

  • Dense correlated H with an OOM injected at block 2 or 4: the result is now bitwise equal to a clean restart. Before, the proxy loss was 12–35% higher.
  • static_groups fallbacks (GPTQ inverse and permutation, QQQ): the result is now bitwise equal to a CPU run. Before, they raised a RuntimeError.
  • No-OOM path: 38 GPTQ/QQQ unit configs, plus the Qwen2.5-0.5B GPTQ and QQQ checkpoints, are bitwise identical to main.
  • tests/test_gptq_post_inverse_fallback_4400.py: 21 passed. 19 of them are new, and all 19 fail on main.
  • After rebasing on ccae5e5, on an RTX 4090: 183 passed across the fallback, QQQ and static-group suites. ruff passes.

Fixes #4464
Refs #4463 (item 2 only; items 1 and 3 are handled separately)

🤖 Generated with Claude Code

…ease QQQ Hessian (#4464, #4463)

- GPTQ block-pass CPU retry restarted from a W the failed CUDA pass had
  already error-propagated in place, silently applying earlier blocks'
  error twice (+12-35% proxy loss). The retry now rebuilds the pre-pass W
  on the host from the untouched module weight (clone, natural-order
  find_params, dead-column mask, activation order); every step is exact,
  so the no-OOM path keeps no extra copy. `_neutralize_dead_columns`
  returns its mask for this.
- All GPTQ Hessian-side CPU fallbacks (desc_act/act-group permutation,
  inverse) and the QQQ inverse fallback now move static-group quantizers
  with W/H (`_move_static_groups`) instead of crashing with a device
  mismatch.
- QQQ runs its inverse-Cholesky sequence step by step, releasing each
  input as soon as its output exists; a CUDA allocation failure continues
  from the current step on the host, so the input Hessian is no longer
  held through the inverse and block pass (2048x8192: 1088 -> 832 MiB,
  same as def6e61). Quantized outputs are bitwise unchanged.

Fixes #4464
Refs #4463

Co-Authored-By: Claude Opus 5.5 <[email protected]>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

1 participant