Repository navigation
fix(gptq,qqq): exact OOM block retry, static_groups CPU fallback, release QQQ Hessian (#4464, #4463) - #4492
Merged
Conversation
…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]>
This was referenced Nov 16, 2026
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Summary
Wthat had already been error-propagated ([BUG] GPTQ/QQQ OOM CPU fallbacks (#4400 item 3/4, 5fbd636): block-pass retry restarts from an already error-propagated W (silently worse quantization, +12–35% proxy loss);static_groups=Truefallback crashes with device mismatch #4464 item 1).W[:, i2:]in place. After a CUDA OOM partway through the pass, the retry applied the earlier blocks' error a second time. That gave +12% / +35% proxy loss with no warning.Won the host from the module weight, which is never modified. It does this by clone → natural-orderfind_params→ dead-column mask → activation order. Every step is exact, so the no-OOM path keeps no extra copy._neutralize_dead_columnsnow returns its mask for this.static_groups=TrueCPU fallbacks crashed with a device mismatch ([BUG] GPTQ/QQQ OOM CPU fallbacks (#4400 item 3/4, 5fbd636): block-pass retry restarts from an already error-propagated W (silently worse quantization, +12–35% proxy loss);static_groups=Truefallback crashes with device mismatch #4464 item 2). These paths now move the static-group quantizers along withW/H(_move_static_groups):embed_tokensinto host RAM (+1 GiB RSS spike, 978c7c1), QQQ keeps the damped Hessian alive through the block pass (+C²·4 B VRAM, 5fbd636), sibling-share TLS cache pins activations after quantize (9626f50) #4463 item 2).max_allocated.Validation
static_groupsfallbacks (GPTQ inverse and permutation, QQQ): the result is now bitwise equal to a CPU run. Before, they raised aRuntimeError.tests/test_gptq_post_inverse_fallback_4400.py: 21 passed. 19 of them are new, and all 19 fail on main.ruffpasses.Fixes #4464
Refs #4463 (item 2 only; items 1 and 3 are handled separately)
🤖 Generated with Claude Code