Skip to content

[QUALITY] QQQ on Llama 3 with default calibration: wikitext2 PPL 1105 (Llama-3.2-1B) because BOS sink exclusion defaults to GPTQ only #6568

Done

Description

@Qubitium

Summary

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:

# gptqmodel/models/definitions/llama.py
attention_sink_exclusion_methods = (METHOD.GPTQ,)

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.

Evidence (ROCm 7.16, R9700 gfx1201, origin/main c649fcb)

run wikitext2 PPL (141 x 2048 windows)
fp16 9.75
QQQ default 1105.22
QQQ exclude_attention_sinks=True 11.55
GPTQ default (sinks excluded by default) 14.53

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.

Activity

  1. Qubitium commented on Dec 1, 2026

    @Qubitium
    CollaboratorAuthor

    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.

  2. Qubitium commented on Dec 1, 2026

    @Qubitium
    CollaboratorAuthor

    per model defaults should apply to all quant methods,not just gptq

  3. Qubitium commented on Dec 1, 2026

    @Qubitium
    CollaboratorAuthor

    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.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions