LESSON 10.04 · 6 STAGES · 3 CONTROLS · 3 CHECKSPRO · PREVIEW
Sinusoidal positional encoding
Watch sine and cosine waves give every position its own vector.
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.04 · POSITION BAY8 TOKENS · “THE” ×2 · SAME COLUMNS
01
Stage 1 of 6 · No order
Each token gets its embedding column. The two columns for “the” are equal, so attention cannot tell them apart.
Explain it simply
Each column of boxes is one word's list of 8 numbers, its embedding. Look at the framed columns for the word the. They hold the same numbers. Attention compares only these numbers, so it can't tell the first the from the second.
8 token columns of 8 numbers. The columns for “the” at positions 0 and 4 hold equal numbers.
tokenswaves, shiftbelow 0above 0, dot
Toy: 8 or 16 positions, width 8, seeded embeddings (not trained)
MATH · STAGE 1HOVER A SYMBOL OR A SHAPE
The vector at position p is only its token's embedding.
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.