Skip to content

[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

Closed

Description

@Qubitium

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.

2. #4393 is still unsolved with default settings

The flag is opt-in (defaults are bit-identical to def6e61), so these Llama-3.2-1B configs are still worse than RTN (24.30, asym 23.41):

config PPL
GPTQ sym, GAR off 33.81
GPTQ asym 30.52
3-bit 76.3
GSQ 34.08
FOEM 32.29
QQQ 35.28 / reloaded 36.97

GPTAQ, FOEM and QQQ reject the flag, so FOEM and QQQ have no remedy at all.

3. Partial coverage


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.

Activity

  1. added
    bug
    on Nov 16, 2026
  2. Qubitium commented on Nov 16, 2026

    @Qubitium
    CollaboratorAuthor

    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.

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

    bug

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions