Cover of Language Models from the Ground Up, edition 2026.10.3, code 1W0R-Q8X3 Language Models from the Ground Up 1W0R-Q8X3 3 editions since Oct 2026 Rolling Edition 2026.10.3

Language Models from the Ground Up

Edition 2026.10.3 Examples passed Oct 25, 2026 86 of 86 examples pass What changed

Written with AI. Verified by people. How we make books

Anyone can check this book or correct it. Report an error · How to fix one

How a language model works, built one part at a time: next-word prediction, tokens, embeddings, a neural model, attention and the transformer, training a small model on a CPU, choosing words, what an open model holds inside, and how instruction tuning changes it.

Who it's for For readers comfortable with Python and NumPy who are new to how language models work: a developer who calls LLM APIs and wants to know what happens inside, or a data scientist moving into language work.

Start reading
Edition history3 editions since October 2026Full changelog
2026.10.12026.10.3
2026.10.3 · Oct 25, 2026Library update, Breaking change59 examples changed

Contents

  1. 1Predicting the next word
  2. 2Tokens
  3. 3Counting further back
  4. 4Words as vectors
  5. 5A neural language model
  6. 6Attention
  7. 7The transformer block
  8. 8Training a small model
  9. 9Choosing the next token
  10. 10Inside an open model
  11. 11From predicting to following instructions

Cite this section

Format

Every format names this edition. Its link opens the current edition, where a section’s heading says when its text last changed. Accessed and retrieved dates are the day you open this.