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.
-
Step 10
Long context
Watch a prompt outgrow the model twice — positions run out, then memory does — and a rotation trick plus a ring of devices open both doors. 8 steps, about 30 seconds.
✓ — next up, Part II continues: RAII beyond memory.
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 tokenslive
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.
-
Step 3
CDN
Watch an edge cache miss once to the origin, then serve its region's hits — while a second region stays cold until its own first ask. 8 steps, about 30 seconds.
-
Step 4
Database replication
Watch a write stream from the primary to the replicas, reads spread out — and one quick read arrive before the copy does. 8 steps, about 30 seconds.
-
Step 5
Sharding
Watch one database split into three slices by key, writes and reads route to their own shard — and one celebrity key defeat the whole split. 8 steps, about 30 seconds.
-
Step 6
Message queues
Watch a slow request become a job, a burst turn into a backlog instead of an outage, a crashed worker's job come back — and the duplicate get caught. 8 steps, about 30 seconds.
-
Step 7
Consistent hashing
Watch mod-N scatter every key when a server dies, then a hash ring move only one slice — and virtual nodes even the slices out. 8 steps, about 30 seconds.
✓ — next up, Part II continues: RAII beyond memory.
The full path — 7 chapters
- 1Load balancerlive
- 2Caching — the answer before the databaselive
- 3CDN — move the answer closerlive
- 4Database replication — one writer, many readerslive
- 5Sharding — split the data, not just the loadlive
- 6Message queues — don't make them waitlive
- 7Consistent hashing — add servers without moving everythinglive
Later: Part IV — The C++ machine · Part V — Agents that act.