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 example
Stations
8, in sequence
State
Surface-specific · browser only
Account
Not required, not offered
Scoring
None

What 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.

0102030405060049K98KGiB
4:1

8 key/value heads per layer.

32
fp16

2 bytes per stored value.

One KV head per query headGrouped, 4:1One KV head for all queries
Cache size grows linearly with context, and the slope is set entirely by how many key/value heads you keep. Sharing changes the slope, not the shape — which is why it buys proportionally more the longer the context gets.
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
The arithmetic, so the numbers above can be checked rather than trusted.

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.