Repository navigation
test(llama3_2): exclude attention sinks and refresh slow baselines (#4393) - #4444
Merged
Merged
Conversation
…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]>
This was referenced Nov 17, 2026
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
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.
The runs are deterministic: the sinks-kept numbers reproduced to all digits on 2daaae4 and 978c7c1.
Changes
tests/models/model_test.py: a newEXCLUDE_ATTENTION_SINKS = Falseclass 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 checkon both files: clean.Note: a follow-up will move
exclude_attention_sinksfromGPTQConfigto 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