Rotary position embedding (RoPE)
A way to give attention a sense of word order by rotating each query and key vector by an angle that depends on its position. When two tokens are compared, only the distance between them matters.
Introduced by
RoPE, 2021
Used by
- LLaMA, 2023
- Position interpolation, 2023
- Llama 2, 2023
- DeepSeek-V2 / MLA, 2024
- Qwen2, 2024
- DeepSeek-V3, 2024