arXiv 论文:注意力温度校准会混淆零样本上下文扩展评测结论
Attention Temperature Confounds Zero-Shot Context Extension
做长上下文实验的朋友建议看看这篇。它用三组 365M 孪生模型证明块稀疏、ALiBi 这些方法的优势,在温度校准后可能直接消失。自己跑对比实验的人能避开一个很容易踩的坑。
一篇 arXiv 论文(2611.31113v1)指出,评估训练时注意力改动对零样本上下文扩展的效果时,结果取决于基线模型在超出训练长度处温度失准的程度。论文用三个种子配对的 365M 孪生模型做了实验:按标准配方(fp32 主权重)训练的 8k 长度基线,在 30k 处失准 8-15%,其中一个模型这让块稀疏训练的孪生模型看起来好 7%,而校准温度后这一优势消失。
在纯 bf16 训练(无主权重)下失准程度大得多:当学习率低于 1.7×10⁻³ 时,AdamW 步长(β₂=0.95)对初始化为 1.0 的增益的更新量小于 bf16 的最小间隔的一半,导致 22 个检查点中增益始终不动,基线失准达 37-58%,使块稀疏预训练、注意力 dropout 和 ALiBi 看起来好 6-35%。为每个模型和长度校准温度后,三种优势全部消除,ALiBi 仍落后 RoPE 5%,而阳性对照 NTK-aware scaling 的部分增益得以保留。
作者建议:报告上下文扩展结果时应使用校准后的温度,并检查归一化增益是否确实发生了移动。对开发者而言,这类对比实验的结论可能在温度校准后反转。
Attention Temperature Confounds Zero-Shot Context Extension
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, $τ= 1$. 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 ($β_2 = 0.95$) on a gain initialised at 1.0 is below half the bf16 spacing at peak learning rates under $1.7\times10^{-3}$, 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.
本条情报归属 AITOP「论文」核心追踪栏目。涉及核心实体与技术议题包括:RoPE、ALiBi、长上下文、上下文扩展,读者可通过下方标签进入对应专题页查阅历史脉络与关联对比。
信源核验说明:本文原始线索采编自「arXiv cs.AI」(@Ruben Navasardyan),经 AITOP 多维评分管线结构化提炼。