// ◎ Transformers & Attention
Rotary Position Embedding (RoPE)
Encodes position by rotating query/key vectors so attention sees relative distance.
旋转位置编码 RoPE 2021 Intermediate core
IN PLAIN WORDS
Pair up dimensions and rotate them by position-dependent angles; the dot product then depends only on relative offset. Standard in modern LLMs and the base for context extension like YaRN.
Used in: Llama, Qwen, DeepSeek, Mistral and more
TIMELINE · prerequisites → this → what builds on it
01Original paper
RoFormer: Enhanced Transformer with Rotary Position Embedding
Jianlin Su, Yu Lu, Shengfeng Pan, et al. · 2021
arXiv ↗ ✓ Verified · arXiv API
02Where it sits
Learn the left column first; the right column builds on this one.
Learn first
Then you can learn
Related:ALiBi (Attention with Linear Biases)
Left: prerequisites · right: builds on this · dashed: related. Full map →
03Learning resources
Official docs, explainers, courses and reference code. All links checked.
04Where the course teaches it
On learning paths:Understanding an LLM End to End
For AI / data
- Verification: verified, checked 2026-10-21.
- JSON: /api/learn/algorithms.json (id:
rope)