Repository navigation
Description
Found on main @ 2b7a0b5 (includes #4751), RTX 4090 (sm_89, CUDA 13.2, torch 2.15, transformers 5.22.1).
What is wrong
#4751 (the fix for #4732) only exempts a block from refuse_last_module_fallback (#4708) when the block and the absent block before it share one :in= tag. The check is sibling_of_absent_block = shared_tag is not None and shared_tag in prev_absent_block_tags, at gptqmodel/models/base.py:5743-5745 and :5864-5866. The Qwen3.5 / MiniCPM-V / Intern-S2 trees declare those tags, so they are fixed.
Hybrid trees whose alternative branches carry no in= tag are still refused their norm source. In each case below, a branch this layer type does not own is "absent":
- Granite-4.0-H:
mambaon an attention layer; - LFM2:
convon an attention layer; - Nemotron-H: the
mixerattention/mamba/MLP alternatives; - Ling 2.0 (
bailing_moe): theself_attnbranch beforeattention, in every layer.
The norm → projection group of the following block is still dropped. This was the comment on #4732, which #4751 did not cover.
Evidence
Real quantize(), AWQConfig(bits=4, group_size=128), 16 C4 rows, batch_size=1, layer-truncated real checkpoints. The groups listed are the (prev_op, #members, first member) x layers that reached _search_best_scale:
| checkpoint | e2a5ff6fa~1 (before #4708) |
main @ 2b7a0b5 (after #4751) |
|---|---|---|
| granite-4.0-h-350m (11 layers; layer 10 = attention) | input_layernorm -> [q,k,v] x1 present |
missing: layer 10 using fallback quantization (no scaling group survived filtering) |
| LFM2.5-1.2B-Instruct (3 layers; layer 2 = full_attention) | operator_norm -> [q,k,v] x1 present |
missing |
| NVIDIA-Nemotron-Nano-9B-v2 (15 layers: 8 Mamba, 6 MLP, 1 attention) | norm -> [mixer.in_proj] x8, norm -> [mixer.up_proj] x6, norm -> [q,k,v] x1 |
only norm -> [q,k,v] x1. Every Mamba/MLP layer logs using fallback quantization (no AWQ scaling groups were generated / no scaling group survived filtering) |
| Ling-mini-2.0 (3 layers) | input_layernorm -> [attention.query_key_value, attention.dense] x3 (the #4677 bug) |
no attention group at all. The correct result would be input_layernorm -> [attention.query_key_value] |
On Nemotron-H this makes "AWQ" plain RTN for every Mamba and MLP layer, which is almost the whole model. On Ling 2.0, the model #4708 was written for, query_key_value has lost its AWQ scale in every layer. The only signal is one INFO/WARN fallback line per layer, or nothing at all (Ling).
Repro
from gptqmodel import GPTQModel
from gptqmodel.quantization.config import AWQConfig, CalibrationConfig
import gptqmodel.looper.awq_processor as AP
from gptqmodel.quantization.awq.utils.module import get_op_name
orig = AP.AWQProcessor._search_best_scale
def spy(self, module, prev_op, layers, *a, **k):
print("GROUP", get_op_name(module, prev_op), [get_op_name(module, l) for l in (k.get("fold_layers") or layers)][:3])
return orig(self, module, prev_op, layers, *a, **k)
AP.AWQProcessor._search_best_scale = spy
m = GPTQModel.load("NVIDIA-Nemotron-Nano-9B-v2 (num_hidden_layers=15)", AWQConfig(bits=4, group_size=128), dtype=torch.bfloat16)
m.quantize(CalibrationConfig(dataset=c4_rows[:16], batch_size=1))
# main: only "GROUP norm ['mixer.q_proj', 'mixer.k_proj', 'mixer.v_proj']"
# e2a5ff6fa~1: also 8x "GROUP norm ['mixer.in_proj']" and 6x "GROUP norm ['mixer.up_proj']"Suggested fix
Do not make the exemption depend on optional in= tags. An absent block can only take away a fold source if it is a data-flow predecessor of the current block. For #4677's Ling MLA case, that predecessor is q_b/kv_b before dense, within the same branch. An absent sibling branch, meaning a different top-level key such as self_attn vs attention, mamba vs self_attn, or conv vs self_attn, never is. Possible approaches:
- Restrict
prev_block_absentto blocks under the same parent key as the current block. - Or derive the exemption from the module plan's parent, not from the tags.
Test that should have caught it
tests/module_tree/test_awq_fold_safety_4175.py covers only the tagged Qwen3.5-style trees. Add the same "the norm still folds" assertion for tiny granitemoehybrid (attention layer), lfm2 (attention layer), nemotron_h (M, - and * layers) and bailing_moe (input_layernorm -> query_key_value without dense).
Severity
High for Nemotron-H (AWQ silently becomes RTN for almost every layer). Medium for Granite-4.0-H / LFM2 attention layers and for Ling 2.0 query_key_value.
🤖 Generated with Claude Code
Activity
Qubitium commentedon Nov 17, 2026
Agent claim released:
agent-53ba17eb4d83finished this issue.Pull request: #4800
AWQ norm group dropped after untagged absent sibling; worktree /root/work-4759
fix(awq): keep the norm fold for an absent sibling branch (#4759) (#4800
fix(awq): clear the prev-op tracker when a present block's last decla…