mlsanityData to 7 Oct 2026

Understanding the RoPE Extensions of Long-Context LLMs: An Attention Perspective

arXiv 2406.13282 ↗First posted 19 Jun 2024cs.CLcited by 13

Not on the map. Why?

Abstract (arXiv)

Enabling LLMs to handle lengthy context is currently a research hotspot. Most LLMs are built upon rotary position embedding (RoPE), a popular position encoding method. Therefore, a prominent path is to extrapolate the RoPE trained on comparably short texts to far longer texts. A heavy bunch of efforts have been dedicated to boosting the extrapolation via extending the formulations of the RoPE, however, few of them have attempted to showcase their inner workings comprehensively. In this paper, we are driven to offer a straightforward yet in-depth understanding of RoPE extensions from an attention perspective and on two benchmarking tasks. A broad array of experiments reveals several valuable findings: 1) Maintaining attention patterns to those at the pretrained length improves extrapolation; 2) Large attention uncertainty leads to retrieval errors; 3) Using longer continual pretraining lengths for RoPE extensions could reduce attention uncertainty and significantly enhance extrapolation.

Key facts. Cited by 13 papers in the map (data through 7 Oct 2026). Builds on 17 of its 30 references that are in the map. First posted on arXiv 19 Jun 2024.

Builds on

17 of 30 references.

References · 17

  1. 2017Attention Is All You Needcited by 59,932
  2. 2020Language Models are Few-Shot Learnerscited by 32,199
  3. 2023Llama 2: Open Foundation and Fine-Tuned Chat Modelscited by 12,865
  4. 2021RoFormer: Enhanced Transformer with Rotary Position Embeddingcited by 4,581
  5. 2023Qwen Technical Reportcited by 3,273
  6. 2023Code Llama: Open Foundation Models for Codecited by 2,105
  7. 2023Extending Context Window of Large Language Models via Positional Interpolationcited by 721
  8. 2024DeepSeek LLM: Scaling Open-Source Language Models with Longtermismcited by 621
  9. 2024Large Language Models: A Surveycited by 506
  10. 2020How Can We Know When Language Models Know? On the Calibration of Language Models for Question Answeringcited by 439
  11. 2024Data Engineering for Scaling Language Models to 128K Contextcited by 183
  12. 2023Scaling Laws of RoPE-based Extrapolationcited by 124
5 more
  1. 2023Evaluating Open-Domain Question Answering in the Era of Large Language Modelscited by 110
  2. 2024Base of RoPE Bounds Context Lengthcited by 49
  3. 2024Can Perplexity Reflect Large Language Model's Ability in Long Text Understanding?cited by 45
  4. 2023Towards the Law of Capacity Gap in Distilling Language Modelscited by 41
  5. 2024Extending LLMs' Context Window with 100 Samplescited by 20

Built on by

Cited by year (2026 to 7 Oct)

Citing papers per year: 2024: 4; 2025: 4; 2026: 5.

13 papers.

Sort:

By area: