A way to tell an AI model where each word sits in a sentence by mathematically rotating the query and key vectors based on each word's position.
Technically: Rotary Position Embedding encodes position by applying a position-dependent rotation to query and key vectors before the dot-product, so the inner product between two positions depends only on their relative offset. This gives the model native relative-position awareness and strong length generalization when paired with techniques like YaRN or dynamic NTK scaling. RoPE is now the dominant positional scheme in open-weight models including Llama, Qwen, Mistral, and DeepSeek.
Category: Attention Mechanisms