How RoPE's Rotations Inherently Encode Relative Positions

RoPE applies position-dependent rotations to query and key vectors in the self-attention mechanism, a mathematical approach where their dot product (attention score) naturally depends only on the *relative* distance between tokens, not their absolute positions.

Sources

Open the full topic