LESSON 10.C3 · 6 STAGES · 3 CONTROLS · 3 CHECKSPRO · PREVIEW
The full transformer forward pass
Follow a 6-token prompt through 2 blocks to the next token.
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.C3 · FORWARD PASS BAY6 TOKENS · ROWS OF THE 8 × 4 TABLE E
01
Stage 1 of 6 · Embed the prompt
Each token picks its row of the table E. The 6 rows start the residual stream.
Explain it simply
Each word has an ID, and the ID picks one row of the table E below, as in 5.17. That row of 4 numbers is where the word starts. The more solid a square, the further its number is from 0. Training this whole model moved the rows of cat and dog apart, to a cosine of 0.39.
The prompt “the cat sat on the mat” on the left. Each token takes its row of the table E, shown below with its 8 rows. The 6 rows start the stream.
token rows, the stream, hidden numbersthe table E, RoPE turnsattention weights, probabilities, written tokensblocked by the causal mask; the tied head
Toy: 6 tokens, width 4, 2 blocks of 2 heads, 8-token vocabulary
MATH · STAGE 1HOVER A SYMBOL OR A SHAPE
Token i starts as the row of E that its ID picks.
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.