Pretraining and Post-Training
In this article
- Trace one training step in words: the loss follows the probability of the hidden token, the gradient gives a direction, the update shifts the weights.
- Tell pretraining, supervised fine-tuning and preference optimization apart by the signal each one learns from and the behaviour it moves.
- Explain why training changes every later request, while a prompt, retrieved text or tool results change only the request that carries them.
- Decide whether a value that changes, such as a price, belongs in a training run or in the request.
- Terms defined here: pretraining, loss function, post-training, fine-tuning, supervised fine-tuning, preference optimization.
Overview
Send a customer's support ticket to a model fresh from its first round of training and you may get back more of the customer's complaint instead of the label you asked for. Send the same ticket to an assistant built on the same kind of model and billing comes back. The request did not change. The model did.
Every stage of training runs one loop: the model produces output, a signal says how good that output was, and the model's parameters, also called its weights, shift a little toward better. The stages differ above all in the signal: the next token of real text, a reply a person wrote out as the model answer, or a person's mark on the better of two replies. Methods also differ in how that signal reaches the weights. Only this loop changes the weights, so a trained habit shows up on every request, while anything you put into a request lasts for that one request.
The running example is a support-ticket app for an online shop. The shop, its app, its plan and every number below are invented.
Sign in to keep reading
The rest of this article opens with an account. An account also keeps your progress and quiz results on every device, and lets you follow news for up to five topics.
Still to read in this article
- Pretraining: one step of the loop
- What a pretrained model does with a ticket
- Demonstrations: supervised fine-tuning
- Comparisons: preference optimization
- Weights and requests
- Common mistakes
- Sources
- Check yourself, 5 questions