Finished this one? 0 / 61 Labs done
Explore the topic
See this alongside everything else on the same subject — handbooks, system designs, challenges and tools, in one place.
More Labs
- The TokenizerA language model can't read words — it reads tokens. Watch your text shatter into sub-word chunks, race character vs word vs sub-word tokenizers head-to-head, then build Byte-Pair Encoding by hand: merge the most frequent pair over and over to grow a vocabulary and shrink the sequence. Five acts — shatter it, race three tokenizers, build BPE, tune the vocab size, and feel why 'strawberry' trips up an LLM.Read →
- The Meaning Map: EmbeddingsDon't read about embeddings — explore the map. Every word becomes a point in space, placed so that closeness means similar meaning. Click a word to rank its nearest neighbours by cosine similarity, then run the famous vector arithmetic — king − man + woman lands right on queen, paris − france + japan lands on tokyo. Word embeddings and cosine similarity, made playable, with theory and a quiz.Read →
- The Spotlight: AttentionDon't read about attention — shine the spotlight yourself. In a Transformer, every word looks at every other word and weights how much to listen to each. Click a word to see where its attention goes — the verb leaning on its subject, the determiner pointing at its noun — as glowing links and a heatmap whose weights sum to one. Self-attention (the softmax(QKᵀ) heart of every LLM), made playable, with theory and a quiz.Read →
- The Memory Tax: KV-Cache VisualizerDon't read about the KV cache — fill it. A model generating text pays a hidden rent: for every token, in every layer, it stores a key and a value so it never recomputes the past. Watch the cache stack up as it decodes, collapse it with grouped-query attention, then slam into the VRAM wall that decides how many users a GPU can serve — and quantize the cache to claw the memory back. Four acts — fill it, collapse it with GQA, hit the wall, quantize it.Read →
- The Rounding Room: QuantizationDon't read about quantization — round some weights yourself. A model is billions of 16-bit numbers, but do you need all 16? Snap each weight to a coarser grid — 8 bits, 4, even 2 — and watch the memory collapse while precision blurs. Discover why weights bunch near zero, why NF4 places its levels at the quantiles of a bell curve to beat plain INT4, and where quality finally breaks. Three acts — round one weight, quantize the whole bell curve, trade memory against quality at scale.Read →
- The Switchboard: Mixture of ExpertsDon't read about mixture-of-experts — route the tokens yourself. How does a trillion-parameter model run like a small one? A router sends each token to just a few of many experts, so the model stores a giant and pays for a sliver. Watch tokens light up their chosen experts, slide expert count and top-k to pull total and active parameters apart, then send a burst with load-balancing off to watch one expert overload — and on to fix it. Three acts — route a token, store big pay small, balance the load.Read →