Base of RoPE Bounds Context Length

Xin Men, Mingyu Xu, Bingning Wang, Qingyu Zhang, Hongyu Lin +2 more
2/3/2026

No confident code implementation found for this paper. 3 possible matches can be shown below.

Abstract

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 \textit{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 \textit{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.

View on arXivView PDF

Code Implementations

No confident code match yet

We couldn't find an author-owned or strongly-evidenced community implementation for this paper. 3 weaker matches are hidden by default — verify before relying on them.

No code implementations found yet.

Know of an implementation? Let us know in the comments below!

Similar Papers

Cite this paper

@article{men2026base,
  title  = {Base of RoPE Bounds Context Length},
  author = {Xin Men and Mingyu Xu and Bingning Wang and Qingyu Zhang and Hongyu Lin and Xianpei Han and Weipeng Chen},
  year   = {2026},
  eprint = {2405.14591},
  archivePrefix = {arXiv},
  doi    = {10.48550/arXiv.2405.14591},
  url    = {https://arxiv.org/abs/2405.14591},
  journal = {NEURIPS 2024 2024}
}

Add a badge to your README

Shows whether official code is linked for this paper.

Code of Paper badge
[![Code of Paper](https://codeofpaper.com/badge/2405.14591.svg)](https://codeofpaper.com/paper/2405.14591)

Discussion