LESSON 9.08 · 6 STAGES · 3 CONTROLS · 3 CHECKSPRO · PREVIEW
Sliding-window and local attention
Watch a window slide over 16 tokens and cut attention to a band.
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.08 · WINDOW BAYFULL · 136 SCORES
01
Stage 1 of 6 · Full attention
In full causal attention, each row reads every earlier token. One layer computes 136 scores.
Explain it simply
Each row of the grid is one word, and each column is an earlier word it can look at. The size of a square shows how much weight that word gets. With 16 words there are 136 squares, and that count grows with the square of the length.
A 16 by 16 grid. Row i holds one square for each token from 1 to i, sized by its weight. 136 squares in all.
Weights are random, not trained.
tokensattention weightswindowdropped weightmasked, full cost
Toy: one 16-token sentence, model width 4
MATH · STAGE 1HOVER A SYMBOL OR A SHAPE
Row i spreads its weight over every token up to i.
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.