Rotary Positional Encodings (RoPE)

RoPE acts on the two dissatisfactions with sinusoidal encoding: it injects position inside attention by rotating the query and key vectors, with an angle set by position. Magnitudes are preserved, embeddings stay pure, and relative distance falls out for free.

Large Language Models: From Transformers to Frontier Models

Sign up free to read the rest of this lesson