← Sprout Your own LLM from scratch Glossary Code RU

Free interactive course · 18 chapters

Sprouta language model grown from scratch

Meet Sprout-2: 125 million parameters, code and the command line, thinking before it answers, and Python. Talk to it, then learn from the course how it works and how to grow a model like it yourself.

  • 125Mparameters in Sprout-2
  • 9Btokens read
  • 30transformer layers
  • 0sign-ups or fees

Interactive course · 18 chapters

Let's grow our own language model

Sprout is a small language model we grow from scratch. Over fourteen chapters we will work from a table of frequencies to a transformer with 17 million parameters, using explanations, Python code and browser experiments. Then we grow it into Sprout-2: 125 million parameters, code and the command line, thinking before it answers and running Python.

How Sprout grew

Compare the course models on the same held-out text, from random character guesses to the trained transformer. The chart shows how their prediction accuracy changes.

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 browser for reading and experiments. For your own training runs, a computer with Python and PyTorch; a supported GPU or an Apple silicon Mac makes training considerably faster.