What is pretraining? Explained with a cook's library and kitchen
Pretraining is the big first stage where an AI model reads huge amounts of text and learns by guessing the next word; post-training then teaches it to help. Explained with a cook who reads a library, then trains in a kitchen.
- Author
Umair Mateen- Published
- Reading time
- 5 min
- Category
- AI
Our story on Anthropic delaying the training of its next model turns on one word: pretraining. Here is what it means, and what comes after it.
In one sentence: Pretraining is the first and largest stage of building an AI language model, where it reads a huge amount of text and learns by guessing the next word, and post-training is the later stage that teaches that well-read model to follow instructions, help people and behave safely.
The everyday picture
Imagine a new cook who spends a very long time in an enormous library of cookbooks. They read recipe after recipe, millions of them. Cover a recipe halfway and they can guess how it carries on.
That cook now knows a great deal about food. But they have never served a guest. Ask them for a light lunch and they might simply recite the next page of a cookbook. Knowing recipes is not the same as running a kitchen.
So the cook moves to a restaurant kitchen. A head chef shows them good dishes, tastes their attempts and says which plate is better. The chef also teaches the house rules, such as what never leaves the kitchen. Only then does the cook serve customers.
The model first reads a library of text (pretraining) and becomes a well-read base model. Coaching in the kitchen (post-training) turns it into an assistant you can use.
How it works, step by step
- Training data (the cookbooks) is collected: large amounts of text from the public web and from public and private datasets. Anthropic says its newest models were pretrained on "large, diverse datasets".
- Pretraining (the long stay in the library) runs that text through the model. Hugging Face notes that most language models learn with a simple next-word-prediction goal. Each wrong guess nudges the model's internal settings a little.
- The base model (the well-read cook) is the result. It holds broad knowledge and language skill, but on its own it does not reliably do what a user asks.
- Post-training (the head chef's coaching) shapes how the model behaves. A common recipe has three parts: people write example answers to copy, people rank the model's answers from best to worst, and the model is then trained to produce more of what people ranked higher. That last part is called reinforcement learning from human feedback, or RLHF.
- Release (opening to customers) comes after testing. Each question you type is the model using what it learned. It does not keep training while it answers.
Try it · Put it in order
Put the making of an AI assistant in order
Tap the steps in the order they happen.
Where the picture stops
- A cook can tell you which book a recipe came from. A model mostly stores patterns, not copies of pages, and usually cannot point to where it learned something.
- The cook's coaching is a short course. For leading AI models, post-training is a large stage of its own. Anthropic describes "substantial post-training" after pretraining.
- A cook keeps learning from every shift. A finished model does not. What it knows from pretraining stops at a date, called its knowledge cutoff.
Why it matters for your business
- Timing: a new model cannot be released before its pretraining run is done. When a company delays pretraining, as Anthropic did for at least six weeks, its next model is likely to arrive later too. Plan around the models you can use today.
- Behaviour, not just size: how helpful and careful a model is comes largely from post-training. In OpenAI's InstructGPT research, people preferred answers from a post-trained model with 1.3 billion parameters over the original 175 billion parameter GPT-3, on the researchers' set of prompts. So test models on your own tasks rather than choosing by size alone.
- Cost and effort: almost no business pretrains its own model. When you customise one, you are doing a small piece of post-training, usually fine-tuning on your own examples.
An example
Imagine a 30-person travel agency choosing an AI model to draft replies to customers. Two models score close on general tests. The agency tries both on 50 real (anonymised) emails. One gives friendlier, clearer replies and declines to promise refunds it cannot confirm. Differences like this come largely from post-training, which is why trying both on real work told the agency more than their size did.
Frequently asked questions
Is pretraining the same as training?
Pretraining is one part of training. Training covers everything that builds the model: pretraining first, then post-training. "Pre" simply means it comes before the stage that shapes the model into an assistant.
What is a base model?
A base model is the result of pretraining alone. It can continue text well but is not yet tuned to follow instructions or to refuse harmful requests. Most people only ever use post-trained models.
What is RLHF?
RLHF stands for reinforcement learning from human feedback. People compare a model's answers and say which is better, and the model is trained to give answers people prefer. It is one of the main post-training methods.
Does my chat with an AI change its pretraining?
No. A finished model does not change while you use it. Some providers may use conversations to train future models, depending on your plan and settings, so check them.
Related explainers
Sources
Could you explain this to a colleague now?
Mark it and posts that mention it will show a tick. Saved in this browser only.