Systems concepts, slowly enough to follow.
Small interactive simulations, in a guided order. Turn them, pause them, drag through the steps — each chapter builds on the last.
Free. No signup. Nothing to install.
Part I — Making LLMs fast
-
Step 1
FlashAttention
Watch attention drop its biggest memory bill, tile by tile. 8 steps, about 30 seconds.
-
Step 2
The KV cache
Watch one new token meet the whole past, without re-reading it. 8 steps, about 30 seconds.
-
Step 3
Quantization
Watch a model's weights shrink from 16 bits to 4 — and see what it costs. 8 steps, about 30 seconds.
-
Step 4
Continuous batching
Watch the GPU idle between requests, then fill every gap. 8 steps, about 30 seconds.
-
Step 5
Speculative decoding
Watch a small model guess ahead and a big model check four guesses at once. 8 steps, about 30 seconds.
-
Step 6
Attention variants: GQA & MLA
Watch eight heads give up their private copies of the past. 8 steps, about 30 seconds.
-
Step 7
The tokenizer
Watch a sentence merge into tiles, and tiles become the ids a model sees. 8 steps, about 30 seconds.
-
Step 8
Sampling & temperature
Watch raw scores become shares, temperature reshape them, and one drawn number pick the token. 8 steps, about 30 seconds.
-
Step 9
MoE routing
Watch one token visit only the experts it needs — a router scores, a top-2 gate opens, the rest stay dark. 8 steps, about 30 seconds.
10 — attention at a million tokens. up next
The full path — 10 chapters
- 1FlashAttentionlive
- 2The KV cachelive
- 3Quantizationlive
- 4Continuous batchinglive
- 5Speculative decodinglive
- 6Attention variants: GQA & MLAlive
- 7The tokenizerlive
- 8Sampling & temperaturelive
- 9MoE routing — many experts, one tokenlive
- 10Long context — attention at a million tokensup next
Part II — Owning your memory
2 — the scope owns files, locks and sockets too. up next
The full path — 7 chapters
- 1Smart pointerslive
- 2RAII beyond memory — the scope owns files, locks and sockets tooup next
- 3Move semantics — steal the insides, skip the copyplanned
- 4The stack and the heap — two memories, two speedsplanned
- 5Copy elision & RVO — the copies the compiler skipsplanned
- 6Object lifetime & UB — when a variable only looks aliveplanned
- 7Allocators & arenas — own the arena, free it at onceplanned
Part III — System design: one server is never enough
-
Step 1
Load balancer
Watch requests queue behind one server, then spread across three — and route around a failure. 6 steps, about 30 seconds.
-
Step 2
Caching
Watch a miss fill the cache, hits answer in a blink, and a stale copy expire and refetch. 8 steps, about 30 seconds.
3 — move the answer closer. up next
The full path — 7 chapters
- 1Load balancerlive
- 2Caching — the answer before the databaselive
- 3CDN — move the answer closerup next
- 4Database replication — one writer, many readersplanned
- 5Sharding — split the data, not just the loadplanned
- 6Message queues — don't make them waitplanned
- 7Consistent hashing — add servers without moving everythingplanned
Later: Part IV — The C++ machine · Part V — Agents that act.