Primer

Volume V · 00 · The fit

Volume V · Learning

The model is a fitted function. Loss, a slope, a step, then the ways that fails.

A language model is not a mind. It is a function with a lot of knobs, fitted so next-token surprise is small. This volume is those knobs moving.

In English

A model is a function with knobs. Training turns the knobs so the function is less wrong on examples. This volume is the score, the slope, the step, and the ways that fails.

Try this
Start at Loss. If “gradient” is a blank, stay in order.
Keep this
Learning is: measure wrongness, see the slope, step downhill.

The stack · click a layer

  1. 06Landscape
  2. 05Overfit
  3. 04The chain
  4. 03The step
  5. 02Gradient
  6. 01Loss

What this is

A one-weight bowl, a two-weight chain, a polynomial that memorizes, a saddle. Enough to see what “training” is before you trust a 400B-parameter slide.

What this is not

Not PyTorch and not a full backprop engine. Squared error and a ReLU chain are the toys. The LLM objective is cross-entropy, in Volume VI.

  1. 01 · The scoreLossMiss the target. Watch the score.Loss is a score of wrongness. Training is making it smaller.
  2. 02 · The slopeGradientSlide a weight. Read the slope.Gradient = steepest increase. We step the opposite way.
  3. 03 · DescentThe stepPick a step size. Fall downhill.w ← w − η × slope. η is a taste, not a law.
  4. 04 · DescentThe chainTwo weights. See who gets the gradient.Backprop is the chain rule assigning blame to each knob.
  5. 05 · CapacityOverfitRaise the degree. Fit the noise.Fitting the points is not the same as fitting the function.
  6. 06 · CapacityLandscapeWalk a saddle. Walk a well.Real loss is not a bowl. SGD wanders saddles anyway.