LESSON 9.10 · 6 STAGES · 3 CONTROLS · 3 CHECKSPRO · PREVIEW
Linear attention
Watch attention trade its 16 × 16 weight grid for one small running state.
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 · 9.10 · ATTENTION BAYROW 10 · SOFTMAX PEAK 0.32
01
Stage 1 of 6 · Softmax weights
Softmax attention fills a 16 × 16 grid of weights. Row 10 peaks at 0.32 on “warm”.
Explain it simply
Each row is one token looking back at the tokens before it. A strong shade means a large weight. Softmax raises e to the power of each score, so large scores get much more weight. The grid has a cell for every pair of tokens, so twice the length means four times the cells.
A grid of softmax weights, 16 rows by 16 columns, with the future masked. Row 10 gives 0.32 to token 10, warm.
above 0: weights, state, outputbelow 0q, k, v, KV cachedecay γmasked future
Toy: the 16 tokens of 9.C2, one causal head, random untrained weights
MATH · STAGE 1HOVER A SYMBOL OR A SHAPE
The output mixes the values with softmax weights of scaled dot products.
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.