LESSON 10.02 · 6 STAGES · 3 CONTROLS · 3 CHECKSPRO · PREVIEW
The transformer block and the residual stream
Six tokens flow through 2 blocks, and each sublayer adds to them.
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.02 · BLOCK BAY6 TOKENS · WIDTH 4 · RMS 1.10
01
Stage 1 of 6 · The stream
Each token enters the residual stream as a row of 4 numbers. The stream runs to the right.
Explain it simply
You see the prompt, the cat sat on the mat, as 6 rows of 4 cells. Each row is a token's vector from the embedding table. The teal lines carry each row to the right. That path is the residual stream, the main road that every layer reads from and writes to.
Six token rows of 4 teal cells sit on a band that runs to the right. Their mean RMS is 1.10.
stream rows, xnorms, sublayersattention weights, writesmasked or not yet run
Toy: 6 tokens, width 4, 2 blocks with seeded weights, not trained
MATH · STAGE 1HOVER A SYMBOL OR A SHAPE
Each token's vector is its row of the embedding table.
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.