Skip to content

test(llama3_2): exclude attention sinks and refresh slow baselines (#4393) - #4444

Merged
Qubitium merged 1 commit into
mainfrom
test/llama3_2-attention-sinks
Nov 16, 2026
Merged

Qubitium merged 1 commit into
mainfrom
test/llama3_2-attention-sinks

Conversation

@Qubitium

Copy link
Copy Markdown
Collaborator

Enables the attention-sink exclusion from #4440 in tests/models/test_llama3_2.py, and refreshes its slow-mode baselines for the current eval setup (#4393).

Why: Llama-3.2-1B-Instruct's BOS row is an attention sink holding ~99% of the calibration Hessian. On current main, the slow test fails with sinks kept: ARC acc is 0.3038, which is 93.9% of the stored 0.3234 and 95.4% of the native model, below the 96% floor. The stored baselines also no longer match this eval stack, since the unquantized model itself scores 0.3183 / 0.3456 on ARC.

slow mode, GPTQ 4-bit g128 native bf16 sinks kept sinks excluded
gsm8k_platinum_cot acc,num 0.4797 0.4078 0.4127
arc_challenge acc 0.3183 0.3038 0.3063
arc_challenge acc_norm 0.3456 0.3456 0.3456

The runs are deterministic: the sinks-kept numbers reproduced to all digits on 2daaae4 and 978c7c1.

Changes

  • tests/models/model_test.py: a new EXCLUDE_ATTENTION_SINKS = False class switch. It's forwarded to the quantize config only when True, so other methods never receive the field.
  • tests/models/test_llama3_2.py: EXCLUDE_ATTENTION_SINKS = True. The slow baselines are set to the measured sink-excluded quantized scores; comments record the native and sinks-kept numbers.

Validation (RTX 4090, base 5fbd636):

  • GPTQMODEL_MODEL_TEST_MODE=slow pytest tests/models/test_llama3_2.py: 1 passed. gsm8k 100.01%, ARC acc 100.00%, acc_norm 99.99% of the new baselines, with no native-baseline fallback.
  • GPTQMODEL_MODEL_TEST_MODE=fast pytest tests/models/test_llama3_2.py: 1 passed against the unchanged fast baselines (99.6% / 101.9% / 100.7%).
  • ruff check on both files: clean.

Note: a follow-up will move exclude_attention_sinks from GPTQConfig to the calibration config (applied in the shared capture stage, for all calibration-based methods). That change will update this switch to the new API.

🤖 Generated with Claude Code

…4393)

Llama-3.2-1B-Instruct's BOS row is an attention sink that holds ~99% of the
calibration Hessian (#4393). With the opt-in from #4440 enabled, the slow
model test improves on both metrics and passes against its own baselines
instead of failing or relying on the stale-baseline native fallback:

  slow mode, GPTQ 4-bit g128     native bf16  sinks kept  sinks excluded
  gsm8k_platinum_cot acc,num     0.4797       0.4078      0.4127
  arc_challenge acc              0.3183       0.3038      0.3063
  arc_challenge acc_norm         0.3456       0.3456      0.3456

The previous slow baselines (0.3987 / 0.3234 / 0.3643) no longer matched this
eval setup: even the native model scores 0.3183 / 0.3456 on ARC. With sinks
kept, arc acc was 93.9% of the stored value (fail) and 95.4% of native.

- model_test: add EXCLUDE_ATTENTION_SINKS (default False); forwarded to the
  quantize config only when True, so other methods never see the field.
- test_llama3_2: enable it and set the slow baselines to the measured
  sink-excluded quantized scores.

Co-Authored-By: Claude Opus 5.5 <[email protected]>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant