← Sprout Your own LLM from scratch Glossary Code RU

Interactive course · 15 chapters

Let's grow our own language model

Meet Sprout, a tiny LLM with 17 million parameters. It was trained from scratch on English stories and conversations, and it lives right in your browser. Over fifteen chapters we will build the same model with our own hands: from counting letters to chatting, with the maths, the code and live widgets at every step.

  • 17Mparameters
  • 8,192tokens in the vocabulary
  • ~330Mtraining tokens
  • 0servers: it all runs in your browser

Talk to Sprout

Sprout only understands English and sometimes gets things wrong: it is very small. Everything runs on your device.

How Sprout grew

Every chapter adds one idea to the model, and the loss goes down. Here are all versions of Sprout, from picking letters at random to the full model, on the same text.

The path

Every chapter adds one new idea to the model. At the end of each one you meet Sprout as far as we have grown it.

What you need to know

  • School maths: fractions, powers, graphs. We explain everything else on the way.
  • A little Python, or the patience to read code line by line with us.
  • A computer: a browser is enough for the first chapters; for training the full model, any laptop with a GPU or a Mac with an M chip.