LeRoPE Improves Language Models with Learnable Positional Encodings

Petros Karypis, Sean O'Brien, Shreyas Kadekodi, Rui Zhu, Julian McAuley· July 14, 2026 View original

Summary

LeRoPE (Learnable RoPE) enhances Rotary Positional Encodings (RoPE) by making the position-wise rotation rates learnable parameters instead of fixed hyperparameters. This modification consistently improves language model performance across various scales, requiring less compute to achieve similar results.

Rotary Positional Encodings (RoPE) are a cornerstone of modern language models, responsible for encoding the relative positional information between tokens. Typically, the rotation rates within RoPE follow a fixed geometric sequence, controlled by a single hyperparameter. While previous work has explored adjusting this parameter or applying RoPE selectively, this research introduces a more fundamental enhancement. The proposed method, LeRoPE (Learnable RoPE), transforms these fixed rotation rates into learnable scalar parameters, allowing the model to dynamically optimize how positional information is encoded. The researchers trained a series of language models, ranging from 52 million to 2.5 billion parameters, to validate this approach. Across all scales, LeRoPE consistently outperformed standard RoPE and partial RoPE implementations. Notably, the largest models using RoPE required 3.4% more computational resources (FLOPs) to match LeRoPE's performance. The study also observed the emergence of a distinct, high-norm positional band within LeRoPE, indicating its unique learning behavior. This suggests that allowing the model to learn its positional frequencies leads to more efficient and effective language understanding.

Why it matters

AI engineers and researchers can leverage LeRoPE to build more performant and computationally efficient large language models, leading to better natural language understanding, generation, and reduced training costs.

How to implement this in your domain

  1. 1Integrate LeRoPE into your custom language model architectures to potentially improve performance and efficiency.
  2. 2Experiment with making other traditionally fixed hyperparameters learnable within your neural networks.
  3. 3Benchmark LeRoPE against standard RoPE implementations on your specific NLP tasks.
  4. 4Consider the implications of learnable positional encodings for fine-tuning and transfer learning scenarios.

Who benefits

AI/ML DevelopmentSoftware DevelopmentContent CreationCustomer ServiceResearch

Key takeaways

  • LeRoPE makes Rotary Positional Encodings (RoPE) frequencies learnable parameters.
  • This modification consistently improves language model performance across scales.
  • LeRoPE achieves better results with less computational overhead compared to standard RoPE.
  • The approach suggests a path towards more adaptive and efficient positional encoding in LLMs.

Original post by Petros Karypis, Sean O'Brien, Shreyas Kadekodi, Rui Zhu, Julian McAuley

"arXiv:2607.10134v1 Announce Type: new Abstract: Rotary Positional Encodings (RoPE) are currently the most popular positional encodings used in modern language models. RoPE rotates two-dimensional chunks of query and key vectors, operating as a function of their relative positiona…"

View on X

Originally posted by Petros Karypis, Sean O'Brien, Shreyas Kadekodi, Rui Zhu, Julian McAuley on X · view source

Want to go deeper?

Turn these trends into skills with Learnijoy's hands-on AI & tech courses.

Explore courses