LESSON 9.06 · 5 STAGES · 2 CONTROLS · 3 CHECKSPRO · PREVIEW
Attention complexity
Watch the score grid grow fourfold each time the token count doubles.
Pro lesson. Stage 1 is free to watch. Pro opens all 5 stages, 2 controls and 3 checks, in this lesson and every other.
Go Pro · $8.25/moEXPLAINER · 9.06 · ATTENTION BAY16 TOKENS · 256 SCORES · 2,048 FLOPS
01
Stage 1 of 5 · Score grid
Each query scores every key. 16 tokens make 16 × 16 = 256 attention scores.
Explain it simply
The panel shows the last token's top score: the full stop meets "warm". Repeated words, like "the", share one vector and no position, so their rows and columns match. One score costs 4 multiply-adds: 8 FLOPs. This head reads every key, like an encoder. A decoder keeps the causal half: 136 scores.
A 16 by 16 grid of scores, one row per query and one column per key. The grid costs 2,048 FLOPs.
tokens, Q, K, Vweight matrices, tilesscores, outputnegative score, too big
Toy: 1 head · the first n tokens of the 9.C2 text · one vector per word · random, untrained weights
MATH · STAGE 1HOVER A SYMBOL OR A SHAPE
Each score is one query dot one key, scaled by one over root d.
PRO LESSON · YOU WATCHED STAGE 1 OF 5
Unlock the full explainer
- 4 more stages and 2 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.