Training
The process that sets a model's weights. It shows the model examples, measures how wrong it is with the loss, and nudges every weight to make the loss smaller. Repeated millions of times.
Each step runs a batch through the model (the forward pass), computes the loss, works out how the loss changes with each weight (backpropagation, section 2.5), and moves every weight a small step downhill. The step size is the learning rate .
Using a trained model without changing it is called inference. Sections 10.2 and 21.5 cover how large models are trained.
Example
One weight, one step. The loss would rise if w grew, so w shrinks.
Where the course uses it
- 0.1 From a Prompt to a Next-Token Probability · Module 0, Start Here: What an LLM Doesfirst use
- 1.5 Embeddings: From a Token to a Vector · Module 1, Shapes and Linear Algebra
- 10.5 Scaling Laws: How Big, and on How Much Text · Module 10, Pretraining
- 14.1 The Residual Stream as Shared Memory · Module 14, What the Model Learns
- 20.3 LoRA and QLoRA · Module 20, Adaptation: Fine-Tuning, LoRA, Distillation
- 22.1 Chain-of-Thought · Module 22, Reasoning Models
Related terms
- Weights (parameters)The numbers a model learns in training: the entries of its weight matrices and vectors. A model's size is counted in weights, such as 124 million for GPT-2 Small.
- 𝓛 — the lossRead "L" or "the loss". The curly L is the single number that measures how wrong the model is. Training adjusts the weights to make it small.
- ∇ — gradientRead "nabla" or "the gradient of". It is the list of every partial derivative at once, and it points in the direction that increases the function fastest.
- η — the learning rateRead "eta". The learning rate: how big a step gradient descent takes against the gradient on each update.
- Batch — examples processed togetherA group of examples processed at the same time. It adds one axis, of size B, at the front of every tensor. Every example in the batch goes through the same computation.