Skip to main navigation Skip to search Skip to main content

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

  • Meizhi Zhong
  • , Chen Zhang
  • , Yikun Lei
  • , Xikai Liu
  • , Yan Gao
  • , Yao Hu
  • , Kehai Chen*
  • , Min Zhang
  • *Corresponding author for this work
  • Harbin Institute of Technology Shenzhen
  • Xiaohongshu

Research output: Chapter in Book/Report/Conference proceedingConference contributionpeer-review

Abstract

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.

Original languageEnglish
Title of host publicationMain Conference
EditorsOwen Rambow, Leo Wanner, Marianna Apidianaki, Hend Al-Khalifa, Barbara Di Eugenio, Steven Schockaert
PublisherAssociation for Computational Linguistics (ACL)
Pages8955-8962
Number of pages8
ISBN (Electronic)9798891761964
StatePublished - 2025
Externally publishedYes
Event31st International Conference on Computational Linguistics, COLING 2025 - Abu Dhabi, United Arab Emirates
Duration: 19 Jan 202524 Jan 2025

Publication series

NameProceedings - International Conference on Computational Linguistics, COLING
ISSN (Print)2951-2093

Conference

Conference31st International Conference on Computational Linguistics, COLING 2025
Country/TerritoryUnited Arab Emirates
CityAbu Dhabi
Period19/01/2524/01/25

Fingerprint

Dive into the research topics of 'Understanding the RoPE Extensions of Long-Context LLMs: An Attention Perspective'. Together they form a unique fingerprint.

Cite this