Skip to main content

Envisioning is a research institute that studies how institutions adapt to technological change.

LinkedInInstagramGitHub

Since 2010

research
  • Observatory
  • Adaptive capacity
  • Newsletter
  • Methodology
  • Origins
  • Vocab
  • RSS feeds
services
  • Signals Session
  • Bespoke Projects
  • Build Sessions
  • Pricing
  • Use cases
  • Signals
  • Signal Scan↗free
impact
  • ANBIMAFuture of Brazilian Capital Markets
  • IEEECharting the Energy Transition
  • Horizon 2045Future of Human and Planetary Security
  • WKOTechnology Scanning for Austria
solutions
  • Innovation
  • Strategy
  • Consultants
  • Foresight
  • Associations
  • Governments
  • L&D
resources
  • Partners
  • Coding for Non-Coders
  • How we work
  • Data visualization
  • Multi-Model Convergence
  • FAQ
  • Security and privacy
  • Public sector
about
  • Manifesto
  • Community
  • Events
  • Support
  • Contact
ResearchCapabilityServicesSignalsAbout
ResearchCapabilityServicesSignalsAbout
  1. Home
  2. Vocab
  3. Rotary Position Embedding

Rotary Position Embedding

A way of encoding token position in a transformer by rotating query and key vectors, so relative position falls directly out of the attention dot product.

Year: 2021Generality: 600Added: Sep 15, 2026
Back to Vocab

Rotary Position Embedding (RoPE) injects token position into a transformer's attention by rotating each query and key vector by an angle proportional to its position, rather than adding a separate position vector to the input. Jianlin Su and coauthors introduced it in 2021 (arXiv:2104.09864) in a model they called RoFormer. Each vector is split into 2D pairs, and rotating each pair means the dot product between a query and a key ends up depending only on their relative distance, not their absolute positions. Relative position information falls directly out of the ordinary attention computation.

This gives RoPE two properties that made it the default choice for large language models. It extends to sequence lengths not seen during training more gracefully than learned absolute position embeddings. Dependency between tokens also decays naturally as their distance grows, which matches how language tends to behave. Because it modifies the attention computation itself rather than the token embeddings, it composes cleanly with linear and other efficient attention variants that reformulate the same dot product.

RoPE was adopted by LLaMA, PaLM 2, Mistral, Falcon, Qwen, and Gemma, among others, and is now close to a default for transformer position encoding. Work continues on frequency schedules and interpolation methods to extend it to longer contexts than a model was originally trained on. Its rotation-based formulation has since been reused outside language, including in rotary-positioned variants of linear attention for video diffusion transformers.

Sources

  1. RoFormer: Enhanced Transformer with Rotary Position Embedding

    arXiv · Apr 20, 2021

  2. Rotary Embeddings: A Relative Revolution

    EleutherAI · Apr 20, 2021

Research this in Signals

Scan Rotary Position Embedding for yourself.

Signals turns a topic into a sourced research record you can inspect and rerun. Your first scan is free, and this one starts with Rotary Position Embedding already loaded, so edit it or scan as is.