Weights · 13 min read · Updated 2026-07-24
The post-training pipeline
How continued pretraining, supervised fine-tuning, preference optimization, and reward-driven training turn a base model into a usable release.
Key idea
Post-training is not one algorithm; it is a sequence of data and optimization decisions that changes what a pretrained model does.
What happens after pretraining
Pretraining teaches a model to predict tokens across a broad corpus. That objective can produce strong language and world representations, but it does not by itself define how the model should answer instructions, refuse unsafe requests, call tools, expose reasoning, or follow a conversation template.
Post-training is the collection of training stages used to shape those behaviors after the foundation checkpoint exists. The stages can include continued pretraining, supervised fine-tuning, preference optimization, reward modeling, online reinforcement learning, distillation, safety tuning, and targeted capability training.
Not every release uses every stage, and the order can vary. The important discipline is to record which checkpoint entered each stage, what data or reward signal was used, and which evaluations guarded the transition to the next stage.
Training input
Raw domain text or code
Learning objective
Next-token prediction
What it changes
Changes the model's domain distribution and knowledge before instruction behavior is added.
Continued pretraining changes the domain distribution
Continued pretraining uses the original next-token objective on additional raw text, code, or multimodal data. It can add domain vocabulary and patterns before instruction behavior is introduced. Code, mathematics, medicine, law, and additional languages are common targets.
This stage is not the same as instruction tuning. The examples do not need to be conversations or demonstrations; they can resemble the unstructured data used during foundation training. A model can become more knowledgeable about a domain without becoming better at following a user's request.
Data balance matters because a narrow continuation can shift or forget capabilities learned earlier. Teams often mix replay data from the original distribution with new domain data and evaluate general capabilities throughout the run.
Supervised fine-tuning teaches demonstrations
Supervised fine-tuning, usually shortened to SFT, trains the model to imitate target completions. Each example pairs an input or conversation with the response the model should produce. This is where a base model commonly learns instruction following, response structure, chat roles, tool-call syntax, and domain-specific workflows.
The model learns every token included in the target unless the loss mask says otherwise. Dataset formatting is therefore part of the objective. Training on boilerplate, hidden metadata, malformed tool schemas, or inconsistent assistant styles can make those patterns part of the model's behavior.
Quality is not simply the number of examples. A smaller, coherent set of accurate demonstrations can outperform a large mixture with conflicting instructions. Coverage, diversity, duplication, answer quality, and the ratio between easy and difficult examples all affect the result.
Preference optimization changes relative behavior
Preference data compares candidate responses rather than supplying one canonical answer. A record may contain a prompt, a preferred completion, and a rejected completion. Offline methods such as DPO optimize the policy using those comparisons without running a separate reward model during deployment.
Preference optimization can improve helpfulness, style, safety, and instruction adherence, but the preference source defines the direction. Human labels, synthetic judges, and rule-based comparisons have different biases. If the data rewards verbosity, confident tone, or a particular answer format, the model can optimize those proxies.
Preference training usually starts from an SFT checkpoint because a model needs a reasonable response distribution before fine distinctions become useful. Treat it as refinement, not a replacement for foundational demonstrations.
Online reward training learns from generated rollouts
Online methods generate responses from the current policy during training, score those rollouts, and update the model toward higher reward. The reward may come from a learned model, a human, a compiler, a mathematical verifier, an environment, or a combination of signals.
Verifiable tasks are attractive because the reward can be grounded in whether code runs, a proof checks, or an answer matches a known solution. Even then, reward design is not neutral. A model can exploit incomplete tests, formatting shortcuts, or weaknesses in the evaluator.
Algorithms such as GRPO organize and normalize rewards differently from classic PPO-style RLHF, but the operational questions remain: how completions are sampled, how reward is computed, how far the policy may move, and how regressions are detected.
Evaluation is part of training, not a final ceremony
Every post-training stage can trade one capability for another. SFT can narrow the response distribution, preference optimization can overfit style, and reward training can exploit the scorer. Held-out evaluations should therefore run between stages, not only after the final checkpoint.
Use separate datasets for training, development, and final evaluation. Check contamination and near-duplicates. Evaluate the base checkpoint and each major intermediate so a regression can be attributed to the stage that introduced it.
A release should document the full lineage: base model, intermediate checkpoints, data categories, chat template, optimization method, evaluation settings, and final artifact conversions. Benchmark scores from the base model or teacher do not automatically apply to the post-trained result.
- Capability: did the target skill improve?
- Retention: which general abilities regressed?
- Behavior: are format, tone, and tool calls correct?
- Safety: did refusal and misuse behavior change?
- Operations: does the checkpoint still load and serve reliably?
- Provenance: can the release be traced to exact inputs and revisions?