An interactive field guide

How LLMs actually work,
one picture at a time.

From a single neuron to a trillion-parameter model sharded across thousands of GPUs. Every chapter explains the idea in plain words first, then shows the math, then gives you something to play with: sliders, simulators and calculators.

Adapted and expanded from Alisa Liu’s Book of LLMs. All credit for the original notes goes to her.

How to read thisEach chapter stands alone. If you're new, start with Chapter 1. If you're prepping for interviews, use the Quick check quizzes and the calculators in Chapters 4 and 5.
Legend💡 Intuition boxes are plain English. ◆ boxes are interactive. ▸ Show the math sections fold away the derivations.
Notation$B$ batch · $S/T$ sequence · $D$ hidden · $H$ head dim · $N$ query heads · $K$ KV heads · $F$ MLP width · $L$ layers · $V$ vocab.