Chip Foundry Services Request Assessment

Rotary Positional Embedding

Rotary positional embedding (RoPE) is the method most modern large language models actually use to tell the Transformer architecture where each specific token sits within the overall input sequence, encoding that same positional information by rotating each token's query and key vectors by a position-dependent angle, rather than by simply adding a separate absolute positional vector directly to the token's own embedding the way the original Transformer's absolute positional encoding instead did. This rotation-based positional encoding approach gives RoPE a particularly useful mathematical property: the resulting dot-product attention score between two tokens' rotated query and key vectors ends up depending only on each token's own relative position difference, rather than on either token's own specific absolute position within the sequence.