架构选择如何影响大模型长上下文扩展

Rohan Paul · @rohanpaul_ai · X·2026-08-17 12:49·19天前
AI 导读

一项研究测试了26个7B模型,发现QK归一化、分组查询注意力、滑动窗口注意力和较短预训练上下文等架构选择,单独影响不大,但叠加会严重损害长上下文能力。在HELMET 32K评测中,分数从29.9到56.4不等,而短上下文评测几乎无法区分这些模型。长上下文能力在训练开始前就已部分决定,架构需要早期压力测试。

Rohan Paul@rohanpaul_ai
47AI 编辑部评分,满分 100

架构选择如何影响大模型长上下文扩展

2026-08-17 12:49· 19天前
AI 导读

一项研究测试了26个7B模型,发现QK归一化、分组查询注意力、滑动窗口注意力和较短预训练上下文等架构选择,单独影响不大,但叠加会严重损害长上下文能力。在HELMET 32K评测中,分数从29.9到56.4不等,而短上下文评测几乎无法区分这些模型。长上下文能力在训练开始前就已部分决定,架构需要早期压力测试。

Some architecture choices that make transformers cheaper or more stable also make them harder to extend to long context.

A model can look completely healthy during short-context pretraining and still be a bad candidate for long context later.

This paper tests 26 comparable 7B models while keeping the data, tokenizer, and context-extension recipe fixed.

The only differences are 4 architecture choices already used across Llama, Qwen, and Olmo: QK normalization, grouped-query attention, sliding-window attention, and shorter pretraining context.

Individually, most of them hurt only a little. Stack several together and the damage compounds.

On HELMET at 32K, scores ranged from 29.9 to 56.4, even though standard short-context evaluations barely separated the models.

One example is especially clear: adding sliding-window attention cost just 1.1 points without grouped-query attention, but about 9 points on average when grouped-query attention was already present.

More long-context training did not erase the gap either: the worst architecture after 50B extension tokens still trailed the Llama-like architecture after only 1B.

So long-context capability is partly decided before long-context training even begins. Architecture needs an early long-context stress test, not just good short-context loss.

– arxiv. org/abs/2608.10296

Title: "Cracks in the Foundation: Seemingly Minor Architectural Choices Impact Long Context Extension"