QUESTION 15 OF 15

How does RoPE encode position in attention?

Reveal the answer and explore the explanation.

15
MediumHigh priority

How does RoPE encode position in attention?

Answer
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 ↗

Last 30 min revisionHigh-yield interview Q&As