Learn / How LLMs Actually Work

Neural-net foundations

History, a trainable neuron, an N-gram model, and the RNN the transformer replaced. A class in How LLMs Actually Work. Free to start, no card.

Start free, no card 10 lessons a month on the free tier.

Curated lessons in this class

The road to the Transformer

python · 1 steps · free

How we got from a single neuron to ChatGPT, in seven steps.

  1. Sixty years in one map

Start this lesson

A neuron from scratch

python · 5 steps · free

Build and train a single artificial neuron with NumPy.

  1. The weighted sum
  2. Fire or not: the activation
  3. Wrap it in a predict()
  4. Learn from one mistake
  5. Train the AND gate

Start this lesson

Predict the next word: an N-gram model

python · 4 steps · free

The simplest language model: count what usually comes next.

  1. Split into words
  2. Count what follows each word
  3. Counts into probabilities
  4. Predict the next word

Start this lesson

An RNN cell, unrolled

python · 3 steps · free

Carry a hidden state across a sequence, the pre-Transformer way.

  1. One time step
  2. Carry the state across a sequence
  3. Read out a prediction

Start this lesson

How CodeTrain teaches this

No videos and no multiple-choice quiz at the end. Each lesson is a handful of small steps in a real editor. You type the code yourself, it runs, and the tutor reviews what you actually wrote. It will not hand you the answer, and the step doesn't advance until your code passes. What you get at the end is a record of which steps you wrote unaided, not a completion percentage.

These curated courses are the starting point, not the product

Everything in this catalog is a curated course we wrote by hand. They exist so there is something to start on. What CodeTrain actually does is build a lesson on demand: name any topic you want to understand and it writes one for you on the spot, or paste any public repository and it teaches you that codebase from the code that is really in it. You are not limited to the list below, and most people stop using it within a session or two.

The rest of How LLMs Actually Work

Tokens & embeddingsThe Transformer blockTraining, generation & fine-tuning
Start this class free Browse every curated course