Lune

ICLR2024顶会

Scaling Laws of RoPE-based Extrapolation

Xiaoran Liu, Hang Yan, Chenxin An, Xipeng Qiu, Dahua Lin

摘要

The extrapolation capability of Large Language Models (LLMs) based on Rotary Position Embedding is currently a topic of considerable interest. The mainstream approach to addressing extrapolation with LLMs involves modifying RoPE by replacing 10000, the rotary base of θn=10000−2n/d\theta_n={10000}^{-2n/d} in the original RoPE, with a larger value and providing longer fine-tuning text. In this work, we first observe that fine-tuning a RoPE-based LLM with either a smaller or larger base in pre-training context length could significantly enhance its extrapolation performance. After that, we propose Scaling Laws of RoPE-based Extrapolation, a unified framework from the periodic perspective, to describe the relationship between the extrapolation performance and base value as well as tuning context length. In this process, we also explain the origin of the RoPE-based extrapolation issue by critical dimension for extrapolation. Besides these observations and analyses, we achieve extrapolation up to 1 million context length within only 16K training length on LLaMA2 7B and 13B.

问 Lune

几分钟读透这篇 Paper,不用再花一下午。

Lune 能读完全文,也能读引用它的顶会 Paper,讲清它的结论、证据和局限,每一点都注明出自哪篇 Paper。不用硬啃,也不靠猜。

已有 57 篇顶会 Paper 引用了它。别等审稿人问起,先弄清它们发现了什么。

可以从这些问题问起

Lune 可以查阅

全文 · 引用它的顶会 Paper · 相关的 Paper

获取答案

免费开始,无需绑卡

脉络

  • Make Your LLM Fully Utilize the Context 引用了 Measuring Massive Multitask Language Understanding
  • Make Your LLM Fully Utilize the Context 引用了 LongRoPE: Extending LLM Context Window Beyond 2 Million Tokens
  • MemAgent: Reshaping Long-Context LLM with Multi-Conv RL-based Memory Agent 引用了 Training-Free Long-Context Scaling of Large Language Models
  • FlashAttention: Fast and Memory-Efficient Exact Attention with IO-Awareness 引用了 Big Bird: Transformers for Longer Sequences
  • TruthfulQA: Measuring How Models Mimic Human Falsehoods 引用了 Measuring Massive Multitask Language Understanding
  • Training-Free Long-Context Scaling of Large Language Models 引用了 FlashAttention: Fast and Memory-Efficient Exact Attention with IO-Awareness
  • LongRoPE: Extending LLM Context Window Beyond 2 Million Tokens 引用了 Measuring Massive Multitask Language Understanding
它引用的引用它的从左到右按年份排列,引用越多,位置越高。

引用它的顶会 Paper57

  1. LongRoPE: Extending LLM Context Window Beyond 2 Million TokensYiran Ding, Li Lyna Zhang, Chengruidong Zhang, Yuanyuan Xu 等ICML 2024 · 316 次引用
  2. MemAgent: Reshaping Long-Context LLM with Multi-Conv RL-based Memory AgentHongli Yu, Tinghong Chen, Jiangtao Feng, Jiangjie Chen 等ICLR 2026 · 231 次引用
  3. Make Your LLM Fully Utilize the ContextShengnan An, Zexiong Ma, Zeqi Lin, Nanning Zheng 等NeurIPS 2024 · 212 次引用
  4. FiT: Flexible Vision Transformer for Diffusion ModelZeyu Lu, Zidong Wang, Di Huang, Chengyue Wu 等ICML 2024 · 83 次引用
  5. Training-Free Long-Context Scaling of Large Language ModelsChenxin An, Fei Huang, Jun Zhang, Shansan Gong 等ICML 2024 · 68 次引用

它引用的 Paper18

  1. Measuring Massive Multitask Language UnderstandingDan Hendrycks, Collin Burns, Steven Basart, Andy Zou 等ICLR 2021 · 7,905 次引用
  2. FlashAttention: Fast and Memory-Efficient Exact Attention with IO-AwarenessTri Dao, Daniel Y. Fu, Stefano Ermon, Atri Rudra 等NeurIPS 2022 · 5,493 次引用
  3. TruthfulQA: Measuring How Models Mimic Human FalsehoodsStephanie Lin, Jacob Hilton, Owain EvansACL 2022 · 3,228 次引用
  4. Big Bird: Transformers for Longer SequencesManzil Zaheer, Guru Guruganesh, Kumar Avinava Dubey, Joshua Ainslie 等NeurIPS 2020 · 3,159 次引用
  5. WinoGrande: An Adversarial Winograd Schema Challenge at ScaleKeisuke Sakaguchi, Ronan Le Bras, Chandra Bhagavatula, Yejin ChoiAAAI 2020 · 3,037 次引用

相关 Paper

  1. Base of RoPE Bounds Context LengthMingyu Xu, Xin Men, Bingning Wang, Qingyu Zhang 等NeurIPS 2024 · 56 次引用
  2. Frequency Bands in RoPE: Base Frequency and Context Length Shape the Interpolation-Extrapolation Trade-offYui Oka, Itsumi Saito, Kyosuke Nishida, Kuniko SaitoICLR 2026
  3. PEPE: Long-context Extension for Large Language Models via Periodic Extrapolation Positional EncodingsJikun Hu, Dongsheng Guo, Yuli Liu, Qingyao Ai 等EMNLP Findings 2025
  4. LaMPE: Length-aware Multi-grained Positional Encoding for Adaptive Long-context Scaling Without TrainingSikui Zhang, Guangze Gao, Ziyun Gan, Chunfeng Yuan 等ACL Findings 2026
  5. YaRN: Efficient Context Window Extension of Large Language ModelsBowen Peng, Jeffrey Quesnelle, Honglu Fan, Enrico ShippoleICLR 2024 · 508 次引用
黄昏的海面,两侧是细线勾勒的悬崖