Skip to content

A seven-book series

How language models work

Book 01 is the original guide: the next-word loop and . Books 02–07 continue from there — how a reply is chosen, how meaning is stored, how the model is trained, and how annotator labels change what it prefers.

About 2–3 hours for the books that are out now. More books are on the way.

The series

Books 01–04 are ready. 05–07 are coming soon. Start at 01.

  1. 01How language models workSee the next-word loop and attention.9 chapters · 45 min
  2. 02How a reply is chosenSay why two runs differ.7 chapters · 40 min
  3. 03How meaning is storedTreat a word as a pin on a map.7 chapters · 35 min
  4. 04How the model is trainedName the melting pot, the examples, then the flashlight.7 chapters · 40 min
  5. 05How preferences steer itSee what an A-vs-B pick actually moves.8 chapters · 45 min
  6. 06Why it looks like reasoningSeparate extra tokens from a new mind.8 chapters · 40 min
  7. 07How it looks things up and uses toolsComing soon.Not published yet

Architecture

What is, how // work, and why several run in parallel.

Generation

The model writes by predicting the , again and again, from the so far.

Annotator labels

Example replies, scores, and A-versus-B picks decide what the model prefers next time.

Try first

Below is a simple sentence. Click each “” (here, we’re calling each word a , even though often are not complete words) to see what other words’ “” (their relative importance to that word) is. Try changing the last word from “meowed” to “barked” and back again to show how a single word change (changing the “” for the sentence from “meowed” to “barked”) can create a massive effect on .

  • cat47%
  • dog15%
  • meowed13%
  • chased7%

Here, 'it' assigns the largest share to cat (about half). Meowing is what the cat does.