Attention Temperature Confounds Zero-Shot Context Extension
Abstract
A training-time attention change is usually judged for zero-shot context extension against a dense baseline beyond the training length at the default temperature, . The outcome depends on how miscalibrated the baseline is there: the share of perplexity it recovers when its logits are sharpened by one scalar. Under the standard recipe (fp32 master weights), an 8k-trained baseline is 8-15% miscalibrated at 30k in three seed-paired 365M twins; in one of them this makes the block-sparse-trained twin look 7% better, which calibration removes. In pure-bf16 training without master weights the miscalibration is several times larger: an AdamW step () on a gain initialised at 1.0 is below half the bf16 spacing at peak learning rates under , so gains never move (22 checkpoints), the baseline is 37-58% miscalibrated, and block-sparse pretraining, attention dropout and ALiBi look 6-35% better. Calibrating one temperature per model and length removes all three advantages, leaves ALiBi 5% behind RoPE and keeps part of the gain of a positive control, NTK-aware scaling. Unfreezing the gains reverses the block-sparse advantage at 365M and removes 71-89% of it at 1.2B. We recommend reporting extension results at calibrated temperatures and checking that normalisation gains moved.
Create a lesson
Metadata
- Categories
- cs.LG, cs.AI, cs.CL
- Comments
- 29 pages, 2 figures, 4 tables. Code: https://github.com/rubentium/SparseAtt
Related papers
Near-Far Attention: Region-Aware Sparse Retrieval for Long-Context LLM Decoding
Shared title terminologycs.LGYuanShuo Wang, Jianchao Tan, Lei Gong et al.
Rewirable Circuits in Transformers with Loom Attention
Shared title terminologycs.LGDa Xiao, Qingye Meng, Shengping Li et al.
Why Calibrated BM25 Filtering Barely Reduced Context on LongMemEval
Shared title terminologycs.LGJohn Knight, Erchin Serpedin, Hasan Kurban
Toward a Theoretical Understanding of Transformer Attention: Bayesian Estimation and Predictive Sufficiency
Shared title terminologycs.LGFouad B. Chedid
Beyond Fixed Prompt Configuration: Alternating Policy Learning for Adaptive Topology-Based Prompting in Few-Shot Graph Learning
Shared title terminologycs.LGYizhuo Ma, Yihong Huang, Rongzheng Wang et al.
Attacking Tabular Foundation Models: An Experimental Taxonomy of Context Poisoning and Test-Time Evasion
Shared title terminologycs.LGRamak Nassiri, Sujan Kumar Reddy Challa, Feroz Ahmed et al.