LESSON 10.06 · 6 STAGES · 3 CONTROLS · 3 CHECKSPRO · PREVIEW
RoPE
Watch RoPE turn queries and keys so their scores see only the offset.
Pro lesson. Stage 1 is free to watch. Pro opens all 6 stages, 3 controls and 3 checks, in this lesson and every other.
Go Pro · $8.25/moEXPLAINER · 10.06 · ROTARY BAYQ “ON” AT 3 · K “SAT” AT 2 · Q·K −0.18
01
Stage 1 of 6 · Query and key
The query “on” and the key “sat” hold 8 numbers each. RoPE reads them as 4 pairs, one arrow per circle.
Explain it simply
The top row is the query of the word on: what it looks for. The row below is the key of the word sat: what it offers. RoPE groups the 8 numbers two by two. Each pair becomes an arrow in its own circle, like a clock hand.
Two rows of 8 numbers: the query of “on” and the key of “sat”. Below, 4 circles hold one query arrow and one key arrow each.
query, keyturnscell below 0cell above 0; parts, score
Toy: 16 positions, width 8, seeded W_Q and W_K (not trained)
MATH · STAGE 1HOVER A SYMBOL OR A SHAPE
The query and the key come from the token embeddings, with no position.
PRO LESSON · YOU WATCHED STAGE 1 OF 6
Unlock the full explainer
- 5 more stages and 3 live controls
- 2 mix-up cards and 3 predict-then-reveal checks
- Watch it as a narrated video, in three voices
- Every Pro lesson and capstone · 656 in total
$99 a year, or $15 a month. Cancel any time.