GO TO A SECTION

↑ ↓ to navigate · Enter to openExplore all sections →
FDEInterviews logo
← 🧠 Foundations of LLMs & GenAI
Core

RoPE and Positional Encodings

Self-attention has no built-in sense of word order, so transformers inject position information into the token vectors. Rotary position embeddings (RoPE) rotate query and key vectors by a position-dependent angle so relative position falls out of the dot product, which is why RoPE underpins almost every long-context model and why extending a context window means rescaling RoPE.

a free account unlocks the core curriculum tier · no card

Related concepts

Practise this in questions