You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
Repository navigation
[QUALITY] QQQ on Llama 3 with default calibration: wikitext2 PPL 1105 (Llama-3.2-1B) because BOS sink exclusion defaults to GPTQ only #6568
QQQConfig with default calibration on a Llama 3 checkpoint produces an unusable model. Llama-3.2-1B, QQQ 4-bit g128, 128 C4 rows, default CalibrationConfig: wikitext2 perplexity 1105.2 (fp16 9.75). The same run with CalibrationConfig(exclude_attention_sinks=True) gives 11.55.
Root cause
#6498 made BOS attention-sink exclusion a per-model default and Llama 3 opted in for GPTQ only:
QQQ builds the same calibration Hessian (and has no group-aware ordering, see docs/qqq-default-damp.md), so the Llama 3 BOS sink dominates it exactly as in #6498. QQQ resolves exclude_attention_sinks=None to False.
Per-window: the window that starts with BOS scores 8.2, every window without a leading BOS scores 600-2300. Replacing QQQTorchLinear.forward with an FP64 oracle (dequantized weight, no activation quantization) gives the same numbers (8.09, 1134.7, 798.7, ...), so the saved weights are bad, not the kernel.
Repro
qcfg=QQQConfig(bits=4, group_size=128)
model=GPTQModel.load("unsloth/Llama-3.2-1B", qcfg, dtype=torch.float16)
model.quantize(CalibrationConfig(dataset=c4_rows_128, batch_size=1))
model.save(path)
# reload and score wikitext2 test in 2048-token windows
Expected
Llama 3 + QQQ excludes the BOS sink by default, like GPTQ.
Independent confirmation on NVIDIA CUDA (RTX 4090, origin/main c649fcb, documented QQQ recipe QQQConfig(bits=4, group_size=128, sym=True, desc_act=False, mse=2.4), BACKEND.QQQ, 256 C4 rows, wikitext2 test PPL at ctx 2048, 40 windows):
model
fp16
QQQ default
QQQ exclude_attention_sinks=True
Llama-3.2-1B (unsloth mirror, llama3 rope)
9.29
135.14
10.93
Qwen2.5-0.5B-Instruct (no BOS, control)
13.24
15.60
n/a
For comparison, GPTQ 4-bit g128 on the same Llama checkpoint gets 13.48 with the per-model default and 104.49 with an explicit exclude_attention_sinks=False. So the QQQ gap is the same sink mechanism that #6500 fixed for GPTQ only.
Same setup on Llama-3.2-1B-Instruct (NVIDIA RTX 4090): fp16 12.63; QQQ default 98.88; QQQ with exclude_attention_sinks=True 14.94. So the default affects the Instruct checkpoint too, not only the base model.
Activity
Qubitium commentedon Dec 1, 2026
Independent confirmation on NVIDIA CUDA (RTX 4090, origin/main c649fcb, documented QQQ recipe
QQQConfig(bits=4, group_size=128, sym=True, desc_act=False, mse=2.4),BACKEND.QQQ, 256 C4 rows, wikitext2 test PPL at ctx 2048, 40 windows):exclude_attention_sinks=TrueFor comparison, GPTQ 4-bit g128 on the same Llama checkpoint gets 13.48 with the per-model default and 104.49 with an explicit
exclude_attention_sinks=False. So the QQQ gap is the same sink mechanism that #6500 fixed for GPTQ only.Qubitium commentedon Dec 1, 2026
per model defaults should apply to all quant methods,not just gptq
Qubitium commentedon Dec 1, 2026
Same setup on Llama-3.2-1B-Instruct (NVIDIA RTX 4090): fp16 12.63; QQQ default 98.88; QQQ with
exclude_attention_sinks=True14.94. So the default affects the Instruct checkpoint too, not only the base model.