LESSON 9.09 · 6 STAGES · 2 CONTROLS · 3 CHECKSPRO · PREVIEW
Sparse and block-sparse attention
Watch a fixed pattern skip most attention scores, then run in whole tiles.
Pro lesson. Stage 1 is free to watch. Pro opens all 6 stages, 2 controls and 3 checks, in this lesson and every other.
Go Pro · $8.25/moEXPLAINER · 9.09 · ATTENTION BAY16 TOKENS · 136 SCORES
01
Stage 1 of 6 · Full attention
In causal attention, each query scores every earlier key. 16 tokens need 136 scores.
Explain it simply
Each row is one token asking a question, called the query. Each column is a token it may read, called a key. Every filled cell is one score the model must compute. Double the tokens and you get about four times the cells.
A 16 by 16 grid of query rows and key columns. The 136 cells on and below the diagonal are filled. Bars on the right show 1 to 16 keys per row.
computed score, weightskipped scoretile, 1-layer readlost weightskipped tile
Toy: 16 tokens, head width 4, causal
MATH · STAGE 1HOVER A SYMBOL OR A SHAPE
Each score is a query times a key, scaled, for earlier keys only.
PRO LESSON · YOU WATCHED STAGE 1 OF 6
Unlock the full explainer
- 5 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.