Rotary Position Embedding (RoPE)
Also known as: RoPE
Category: Neural Networks & Architectures
A positional encoding method that encodes position by rotating query and key vectors, naturally capturing relative positions.
Full Explanation
Rotary Position Embedding (RoPE), introduced by Su et al. in 2021, encodes positional information by applying rotation matrices to query and key vectors in the attention mechanism. The rotation angle is proportional to the position index and varies across embedding dimensions, encoding both absolute and relative position information. A key advantage of RoPE is that the dot product between two rotated vectors depends only on their relative position, making it naturally suited for capturing relative relationships. RoPE has become the standard positional encoding for most modern large language models, including LLaMA, Mistral, and PaLM. It supports length extrapolation better than fixed absolute positional encodings, especially when combined with techniques like position interpolation or NTK-aware scaling. RoPE is computationally efficient and does not add extra parameters to the model.
Related Terms
More in Neural Networks & Architectures
Explore More
- AI Tools Library — Discover AI tools related to Rotary Position Embedding (RoPE)
- AI Education — Courses to learn about Neural Networks & Architectures
- AI News — Latest news and updates