Pre-Training Foundation Models
Post-training starts from a pre-trained model and addresses two issues: self-supervision optimizes for text completion rather than conversation, and indiscriminately scraped data can yield racist, sexist, rude, or wrong outputs.
Where Post-Training Begins
Building a language-based foundation model usually happens in stages. The first stage is pre-training, which uses self-supervision to produce a model that is capable in a broad sense. That model is a raw starting point, not a finished product. It is not yet ready to act as a helpful conversational partner. Post-training is the set of steps that takes this raw model and reshapes it so that it behaves the way people actually want it to behave.
A common assumption is that post-training is where a model learns almost everything it knows, and that pre-training only lays a rough foundation. The reasoning is that post-training is the step that makes the model useful, so it must supply most of its ability. This belief is understandable, but it describes the relationship backwards. Pre-training is the expensive stage that builds the model's broad knowledge. Post-training unlocks capabilities the pre-trained model already has, capabilities that are hard for users to reach through prompting alone.
What do you think happens?
Before reading the answer, guess how a team's total compute budget splits between pre-training and post-training. Roughly what share do you think post-training consumes?
Reveal answer
About 2 percent of the budget. InstructGPT used about 2 percent of its compute on post-training.
Post-training is a small share of total compute, even though it is the stage that makes the model behave as a useful assistant. Most of the compute goes into pre-training, which is why pre-training is described as the expensive stage.
A Model That Only Continues Text
Consider what a pre-trained model does with a prompt. Its training objective is text completion: it has learned to continue a piece of text in a plausible way. Given the start of a passage, it produces more text that fits. A model trained this way is good at continuing text, but continuing text is not the same task as holding a helpful exchange with a person. A plausible continuation of a question may be more questions, or a paragraph in the same style, rather than an answer.
Two Problems with a Pre-Trained Model
Post-training starts from a pre-trained model and addresses two issues. The first is that self-supervision optimizes for text completion rather than conversation. The second is that indiscriminately scraped data can yield racist, sexist, rude, or wrong outputs. Both issues motivate the same overarching purpose: moving the model from raw text continuation toward responses that people find appropriate and useful.
The two problems are different in kind. One is about the training objective, meaning what the model is rewarded for during training. The other is about the data the model learns from. Treating them separately makes it easier to see which post-training step addresses which problem.
What Each Stage Optimizes
Pre-training and post-training optimize different things. For language-based foundation models, pre-training optimizes token-level quality. The model is trained to predict the next token accurately. A token is a small piece of text, so getting each next piece right is a local measure of quality.
Users do not judge a model one token at a time. They care about the quality of the entire response. A reply can be built from individually plausible pieces and still fail as an answer. Post-training therefore optimizes the model to generate whole responses that users prefer. The target moves from the small unit, the token, to the whole reply.
The source offers a compact analogy. Pre-training is like reading to acquire knowledge, and post-training is like learning how to use that knowledge. Reading builds what you know. Learning to use it shapes how you apply it to the person in front of you. The analogy makes the division of labor clear: the knowledge comes from the first stage, and the appropriate application comes from the second.
The Two Post-Training Steps
In general, post-training consists of two steps, applied in a fixed order. The first is supervised finetuning, usually abbreviated SFT. The second is preference finetuning. The order matters because preference finetuning builds on a model that has already been supervised finetuned.
The pre-trained model passes through supervised finetuning first, and then through preference finetuning.
Supervised finetuning trains the model on higher-quality data. This addresses the data-quality problem: the model is pushed toward the kind of text that is more appropriate than what indiscriminate scraping provided. Preference finetuning then shapes the model toward responses that suit customers, which addresses the goal of producing replies people prefer rather than merely plausible text.
The full workflow includes pre-training, supervised finetuning, and preference finetuning. The source describes a combination of these as the popular approach for building foundation models today. It is not the only approach, and some steps can be skipped. Because of this, you can approximate how well a model aligns with human preference by checking which of these steps its creators took.
Following One Model Through Each Stage
Tracing a Model Through Post-Training
A pre-trained model is trained only on indiscriminately scraped web text. Trace how its behavior changes as it passes through supervised finetuning and then preference finetuning, and name the problem each step addresses.
- 1Start with the pre-trained model
The model is capable in a broad sense. Its objective was text completion, and its data was unfiltered, so it can produce racist, sexist, rude, or wrong outputs as well as useful text.
- 2Apply supervised finetuning
The model is trained on higher-quality data. This tames the model: its outputs become more socially acceptable, and the data-quality problem is addressed.
- 3Apply preference finetuning
The tamed model is polished so that it suits customers. This addresses the other goal of post-training: producing whole responses that people prefer, rather than plausible continuations.
- 4Check the mapping to the two problems
Supervised finetuning handles the problem of unfiltered data and inappropriate outputs. Preference finetuning handles the problem of text completion instead of conversation, by shaping whole replies toward what users want.
The model moves from an untamed text continuer to a customer-appropriate conversational model. Each post-training step fixes a different part of the two-problem picture, and the steps must be applied in order.
A helpful picture for these stages is a monster and its training. Self-supervised pre-training produces a rogue model, an untamed monster, because it learns from indiscriminate internet data. Supervised finetuning on higher-quality data tames the monster and makes it more socially acceptable. Preference finetuning then polishes the tamed model so it suits customers, which the picture describes as giving it a smiley face.
Mistakes When Reading About Post-Training
Common mistake Believing post-training supplies most of the model's knowledge
What it looks likeAssuming that because post-training makes the model useful, pre-training only lays a rough foundation.
Why it failsPre-training is the expensive stage that builds broad knowledge. Post-training unlocks capabilities the pre-trained model already has.
Do this insteadTreat pre-training as the source of broad capability and post-training as the stage that makes that capability accessible in conversation.
Common mistake Saying pre-training optimizes whole responses
What it looks likeDescribing pre-training as the stage that teaches the model to produce replies users prefer.
Why it failsPre-training optimizes token-level quality by predicting the next token. Whole-response preference is what post-training optimizes.
Do this insteadKeep the unit straight: pre-training scores the next token, and post-training scores the complete response.
Common mistake Reversing the order of the two post-training steps
What it looks likeApplying preference finetuning to the raw pre-trained model before any supervised finetuning.
Why it failsPreference finetuning builds on a model that has already been supervised finetuned.
Do this insteadApply supervised finetuning first, then preference finetuning.
Common mistake Assuming every model goes through every step: the combined approach is popular, but it is not the only approach, and some steps can be skipped
Why the Term Instruction Finetuning Causes Confusion
Several related terms appear in discussions of post-training, and they do not always mean the same thing. Post-training is the broad stage that starts from a pre-trained model. Supervised finetuning is one of the two steps inside that stage. Preference finetuning is the other step. The term instruction finetuning is used loosely, and a reader can encounter it meaning different things in different materials. Some uses point to the whole post-training stage, while others point to the supervised step that trains on higher-quality data.
Checking Your Understanding
A team has a pre-trained model that continues text plausibly but sometimes produces rude replies. Name the two post-training steps they should apply, in order, and state which of the two problems each step is meant to address.
Hints
- Start with the data problem: which step trains on higher-quality data?
- Preference finetuning builds on the output of the first step.
- The data-quality problem and the goal of producing preferred replies are the two targets.
Summary of the Two Stages
- 1A pre-trained model is capable in a broad sense but is not yet a helpful conversational partner, so post-training reshapes it.
- 2The two problems are that self-supervision optimizes for text completion rather than conversation, and that indiscriminately scraped data can produce racist, sexist, rude, or wrong outputs.
- 3Pre-training optimizes token-level quality by predicting the next token, while post-training optimizes whole responses that users prefer.
- 4Post-training has two steps in order: supervised finetuning on higher-quality data, then preference finetuning to make the model customer-appropriate.
At a glance
- A pre-trained model is capable in a broad sense but is not yet a helpful conversational partner, so post-training reshapes it.
- The two problems are that self-supervision optimizes for text completion rather than conversation, and that indiscriminately scraped data can produce racist, sexist, rude, or wrong outputs.
- Pre-training optimizes token-level quality by predicting the next token, while post-training optimizes whole responses that users prefer.
- Post-training has two steps in order: supervised finetuning on higher-quality data, then preference finetuning to make the model customer-appropriate.
- The term instruction finetuning is used loosely, so check whether a writer means the whole post-training stage or the supervised step.