HuggingFace Daily Papers·· 6 天前AI 评分40
长上下文混合模型机制 Part 1.1:从混合注意力到混合位置编码
Mechanics of Long-Context Hybrid Models Part 1.1: From Hybrid Attention to Hybrid Position
AI 导读
一篇名为《Mechanics of Long-Context Hybrid Models》的论文揭示,混合注意力模型存在"跷跷板效应":线性注意力混合模型(如 GLA、GDN)在长上下文持续预训练中获益更多,而滑动窗口注意力(SWA)混合模型在长度外推下表现更好。
正文
Abstract:The architectural design of Large Language Models (LLMs) is shifting from traditional full-attention-only models to hybrid models, which combine different attention modules to improve long-context efficiency and performance in length extrapolation and context extension. To explain why hybrid models work and how to design them better, we propose Mechanics of Long-Context Hybrid Models. As Part 1.1 of this series, we begin with hybrids of full attention and either sliding-window attention (SWA) or gated variants of linear attention (LA), represented by GLA and GDN. We first observe a Seesaw Effect in Context Extension: LA hybrids benefit more from long-context continual pretraining, whereas SWA hybrids perform better under length extrapolation. We attribute this behavior to differences in the positional inductive biases induced by these attention mechanisms. We find that SWA hybrids suffer from a Short-Context Learning Trap, Short-Window Weariness, and Long-Window Laziness, and require extended windows to enhance performance in continual long-context pretraining. For LA hybrids, we summarize the Matthew Effect of Hybrid Position Extrapolation and propose Sliding-Window Linear Attention, achieving 16$\times$ training-free length extrapolation while maintaining 100\% accuracy on NIAH-SK1 in 64k context length.
| Comments: | 60 pages, 36 figures, 25 tables, under review |
| Subjects: | Computation and Language (cs.CL) |
| Cite as: | arXiv:2610.10114 [cs.CL] |
| (or arXiv:2610.10114v1 [cs.CL] for this version) | |
| https://doi.org/10.48550/arXiv.2610.10114 arXiv-issued DOI via DataCite (pending registration) |
Submission history
From: Xiaoran Liu [view email]
[v1]
Wed, 7 Oct 2026 14:02:35 UTC (4,805 KB)
来源:HuggingFace Daily Papers · arxiv.org