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] exclude_attention_sinks (8d6ebb0, #4393) drops position 0 unconditionally: on BOS-less tokenizers (Qwen2.5/Qwen3) it removes a real token and makes GPTQ worse than RTN; #4393 is still unsolved with defaults #4459
Severity: low-medium. Kind: incomplete fix of #4393. Confirmed at 489aed6 on an RTX 5090.
Setup: 4-bit g128, 128×512 wikitext-2-train calibration with seed 0, batch_size 4. PPL is on wikitext-2 test, 80 windows.
1. Masking position 0 without checking for BOS
gptqmodel/quantization/gptq.py:1088 sets keep[:, 0] = False unconditionally. Nothing checks that the row starts with bos_token_id. Qwen tokenizers add no BOS, so the flag drops the first real text token of every row, and quality gets worse:
model (fp16)
config
without
with exclude_attention_sinks
Llama-3.2-1B-Instruct (18.94)
GPTQ sym, GAR off
33.81
21.77
default (GAR on)
23.24
21.30
desc_act
22.87
21.71
3-bit
76.3
37.3
GSQ
34.08
21.74
Qwen2.5-0.5B-Instruct (18.55)
GPTQ sym
20.49
20.99
default
20.22
21.57
desc_act
20.29
21.19
Qwen3-0.6B (27.57)
GPTQ sym
31.13
36.29
default
30.69
37.89 (RTN: 36.84)
On Llama the flag works and every config ends up below RTN (24.30). On Qwen3 it makes the default config worse than RTN.
Expected: mask only positions that are actually sinks: the BOS token, or tokens whose activation norm is an outlier. Alternatively, warn or skip when the tokenizer has no BOS.
Found during an AI-assisted review (Claude Code, round 13) of 489aed6; repros were run at that commit (A/B against def6e61 where noted) on RTX 4090/5090 (CUDA 13) and/or Radeon AI PRO R9700 (ROCm) unless marked static/suspected.
Claimed by an AI agent. Will gate position-0 masking on an actual BOS token (and warn/skip when the tokenizer has none), then re-check the Llama/Qwen3 quality matrix.
Activity
Qubitium commentedon Nov 16, 2026
Claimed by an AI agent. Will gate position-0 masking on an actual BOS token (and warn/skip when the tokenizer has none), then re-check the Llama/Qwen3 quality matrix.
fix(gptq): mask attention-sink position only for a real BOS token (#4459
fix(gptq): capture attention-sink BOS flags before dataset release (#…
feat(calibration): exclude attention sinks in the shared calibration …
feat(calibration): exclude attention sinks in the shared calibration …