How does RoPE encode position in attention?
Reveal the answer and explore the explanation.
15MediumHigh priorityHow does RoPE encode position in attention?
Answer
MediumHigh priority
How does RoPE encode position in attention?
Answer
Rotates query and key coordinate pairs as a function of position to incorporate relative position relationships in dot products.
Practical example
Use position-dependent rotations in a decoder attention layer.
Reference: Further reading ↗