The Lab
Work the mechanism instead of only reading the explanation.
Investigations rather than lessons. Some stations seal a prediction before revealing a calculation; other surfaces ask you to inspect, manipulate, complete, compare, reproduce, or explain. Each interface states what it retains.
Try the worked exampleWhat an investigation looks like
Before the list, one direct formula exploration. The numbers inside the sentences are controls, and the results update immediately as they move. This example is not saved; named stations below say when they retain a bounded route note in this browser. There is no score.
A transformer serving one sequence keeps a key and a value for every token it has already read, at every layer. Take a model of with , serving in . If every query head keeps its own key and value, that cache is 4.0 GiB — for one user.
Now share one key/value pair across . The model still runs 32 query heads, but it now stores only 8 key/value heads per layer, and the cache falls to 1.0 GiB — 75% less.
8 key/value heads per layer.
2 bytes per stored value.
bytes = 2 × layers × kv_heads × head_dim × tokens × bytes_per_value head_dim = d_model / query_heads (4096 / 32 = 128) kv_heads = query_heads / group_size (32 / 4 = 8) the 2 = one key and one value per token
Transformer systems
One track, worked in order. It starts at a single gradient update and ends with you making a defensible claim about a serving tradeoff. Each station is self-contained enough to open on its own, but the sequence is the argument.
Guided paths
Longer routes that thread the atlas and the stations together, for when you want the whole territory rather than one mechanism.
Single-sitting checks
Small, complete, and stateless. Useful when you have ten minutes and want to find out whether you actually understand something you believe you understand.