Base of RoPE Bounds Context Length
Mingyu Xu, Xin Men, Bingning Wang, Qingyu Zhang, Hongyu Lin, Xianpei Han, Weipeng Chen
摘要
Position embedding is a core component of current Large Language Models (LLMs). Rotary position embedding (RoPE), a technique that encodes the position information with a rotation matrix, has been the de facto choice for position embedding in many LLMs, such as the Llama series. RoPE has been further utilized to extend long context capability, which is roughly based on adjusting the base parameter of RoPE to mitigate out-of-distribution (OOD) problems in position embedding. However, in this paper, we find that LLMs may obtain a superficial long-context ability based on the OOD theory. We revisit the role of RoPE in LLMs and propose a novel property of long-term decay, we derive that the base of RoPE bounds context length: there is an absolute lower bound for the base value to obtain certain context length capability. Our work reveals the relationship between context length and RoPE base both theoretically and empirically, which may shed light on future long context training.
问 Lune
几分钟读透这篇 Paper,不用再花一下午。
Lune 能读完全文,也能读引用它的顶会 Paper,讲清它的结论、证据和局限,每一点都注明出自哪篇 Paper。不用硬啃,也不靠猜。
已有 21 篇顶会 Paper 引用了它。别等审稿人问起,先弄清它们发现了什么。
脉络
- Rope to Nope and Back Again: A New Hybrid Attention Strategy 引用了 FlashAttention: Fast and Memory-Efficient Exact Attention with IO-Awareness
- Rope to Nope and Back Again: A New Hybrid Attention Strategy 引用了 YaRN: Efficient Context Window Extension of Large Language Models
- Rope to Nope and Back Again: A New Hybrid Attention Strategy 引用了 The Impact of Positional Encoding on Length Generalization in Transformers
- FlashAttention: Fast and Memory-Efficient Exact Attention with IO-Awareness 引用了 Compressive Transformers for Long-Range Sequence Modelling
- YaRN: Efficient Context Window Extension of Large Language Models 引用了 The Impact of Positional Encoding on Length Generalization in Transformers
- YaRN: Efficient Context Window Extension of Large Language Models 引用了 Compressive Transformers for Long-Range Sequence Modelling
- SkyLadder: Better and Faster Pretraining via Context Window Scheduling 引用了 YaRN: Efficient Context Window Extension of Large Language Models
- SkyLadder: Better and Faster Pretraining via Context Window Scheduling 引用了 The Impact of Positional Encoding on Length Generalization in Transformers
- Test-Time Training Done Right 引用了 FlashAttention: Fast and Memory-Efficient Exact Attention with IO-Awareness
- Untie the Knots: An Efficient Data Augmentation Strategy for Long-Context Pre-Training in Language Models 引用了 FlashAttention: Fast and Memory-Efficient Exact Attention with IO-Awareness
- Untie the Knots: An Efficient Data Augmentation Strategy for Long-Context Pre-Training in Language Models 引用了 YaRN: Efficient Context Window Extension of Large Language Models
- LongLLaDA: Unlocking Long Context Capabilities in Diffusion LLMs 引用了 YaRN: Efficient Context Window Extension of Large Language Models
引用它的顶会 Paper21
- Test-Time Training Done RightTianyuan Zhang, Sai Bi, Yicong Hong, Kai Zhang 等ICLR 2026 · 127 次引用
- Rope to Nope and Back Again: A New Hybrid Attention StrategyBowen Yang, Bharat Venkitesh, Dwaraknath Gnaneshwar, Hangyu Lin 等NeurIPS 2025 · 51 次引用
- LongLLaDA: Unlocking Long Context Capabilities in Diffusion LLMsXiaoran Liu, Yuerong Song, Zhigeng Liu, Zengfeng Huang 等AAAI 2026 · 30 次引用
- Untie the Knots: An Efficient Data Augmentation Strategy for Long-Context Pre-Training in Language ModelsJunfeng Tian, Da Zheng, Yang Chen, Rui Wang 等ACL 2025 · 8 次引用
- SkyLadder: Better and Faster Pretraining via Context Window SchedulingTongyao Zhu, Qian Liu, Haonan Wang, Shiqi Chen 等NeurIPS 2025 · 6 次引用
它引用的 Paper14
- FlashAttention: Fast and Memory-Efficient Exact Attention with IO-AwarenessTri Dao, Daniel Y. Fu, Stefano Ermon, Atri Rudra 等NeurIPS 2022 · 5,493 次引用
- Compressive Transformers for Long-Range Sequence ModellingJack W. Rae, Anna Potapenko, Siddhant M. Jayakumar, Chloe Hillier 等ICLR 2020 · 833 次引用
- YaRN: Efficient Context Window Extension of Large Language ModelsBowen Peng, Jeffrey Quesnelle, Honglu Fan, Enrico ShippoleICLR 2024 · 508 次引用
- The Impact of Positional Encoding on Length Generalization in TransformersAmirhossein Kazemnejad, Inkit Padhi, Karthikeyan Natesan Ramamurthy, Payel Das 等NeurIPS 2023 · 444 次引用
- RWKV: Reinventing RNNs for the Transformer EraBo Peng, Eric Alcaide, Quentin Anthony, Alon Albalak 等EMNLP Findings 2023 · 391 次引用
相关 Paper
- Scaling Laws of RoPE-based ExtrapolationXiaoran Liu, Hang Yan, Chenxin An, Xipeng Qiu 等ICLR 2024 · 130 次引用
- The Rotary Position Embedding May Cause Dimension Inefficiency in Attention Heads for Long-Distance RetrievalTing-Rui Chiang, Dani YogatamaACL Findings 2025 · 1 次引用
- Frequency Bands in RoPE: Base Frequency and Context Length Shape the Interpolation-Extrapolation Trade-offYui Oka, Itsumi Saito, Kyosuke Nishida, Kuniko SaitoICLR 2026
- LaMPE: Length-aware Multi-grained Positional Encoding for Adaptive Long-context Scaling Without TrainingSikui Zhang, Guangze Gao, Ziyun Gan, Chunfeng Yuan 等ACL Findings 2026
- HoPE: A Novel Positional Encoding Without Long-Term Decay for Enhanced Context Awareness and ExtrapolationYuhan Chen, Ang Lv, Jian Luan, Bin Wang 等ACL 2025
