MrRoPE: Mixed-radix Rotary Position Embedding
Qingyuan Tian, Wenhong Zhu, Xiaoran Liu, Xiaofeng Wang, Rui Wang
摘要
Rotary Position Embedding (RoPE)-extension refers to modifying or generalizing the Rotary Position Embedding scheme to handle longer sequences than those encountered during pre-training. However, current extension strategies are highly diverse and lack a unified theoretical foundation. In this paper, we propose , a generalized encoding formulation based on a radix system conversion perspective, which elegantly unifies various RoPE-extension approaches as distinct radix conversion strategies. Based on this theory, we introduce two training-free extensions, and , which leverage uniform and progressive radix conversion strategies, respectively, to achieve “train short, test long” generalization. Without fine-tuning, MrRoPE-Pro sustains over 85% recall in the 128K-context Needle-in-a-Haystack test and achieves more than double YaRN’s accuracy on Infinite-Bench retrieval and dialogue subsets. Theoretical analysis confirms that MrRoPE-Pro effectively raises the upper bound of RoPE's attainable encoding length, which further validates the reliability and utility of our theory and methodology.
问 Lune
几分钟读透这篇 Paper,不用再花一下午。
Lune 能读完全文,也能读引用它的顶会 Paper,讲清它的结论、证据和局限,每一点都注明出自哪篇 Paper。不用硬啃,也不靠猜。
脉络
- 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 引用了 Fourier Features Let Networks Learn High Frequency Functions in Low Dimensional Domains
- The Impact of Positional Encoding on Length Generalization in Transformers 引用了 Train Short, Test Long: Attention with Linear Biases Enables Input Length Extrapolation
- LongRoPE: Extending LLM Context Window Beyond 2 Million Tokens 引用了 YaRN: Efficient Context Window Extension of Large Language Models
- LongRoPE: Extending LLM Context Window Beyond 2 Million Tokens 引用了 Fourier Features Let Networks Learn High Frequency Functions in Low Dimensional Domains
它引用的 Paper12
- Fourier Features Let Networks Learn High Frequency Functions in Low Dimensional DomainsMatthew Tancik, Pratul P. Srinivasan, Ben Mildenhall, Sara Fridovich-Keil 等NeurIPS 2020 · 4,036 次引用
- Train Short, Test Long: Attention with Linear Biases Enables Input Length ExtrapolationOfir Press, Noah A. Smith, Mike LewisICLR 2022 · 1,168 次引用
- 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 次引用
- LongRoPE: Extending LLM Context Window Beyond 2 Million TokensYiran Ding, Li Lyna Zhang, Chengruidong Zhang, Yuanyuan Xu 等ICML 2024 · 316 次引用
相关 Paper
- Extending LLM Context Window with Adaptive Grouped Positional Encoding: A Training-Free MethodXinhao Xu, Jiaxin Li, Hui Chen, Zijia Lin 等ACL 2025 · 1 次引用
- LongEmbed: Extending Embedding Models for Long Context RetrievalDawei Zhu, Liang Wang, Nan Yang, Yifan Song 等EMNLP 2024 · 7 次引用
- AdaRoPE: Not All Attention Heads Should Rotate and Scale EquallyShaowen Wang, Yuke Zheng, Tansheng Zhu, Shuang Chen 等ICML 2026
- UltraLLaDA: Scaling the Context Length to 128K for Diffusion Large Language ModelsGuangxin He, Shen Nie, Fengqi Zhu, Yuankang Zhao 等ICLR 2026 · 13 次引用
- LongLLaDA: Unlocking Long Context Capabilities in Diffusion LLMsXiaoran Liu, Yuerong Song, Zhigeng Liu, Zengfeng Huang 等AAAI 2026 · 30 次引用
