← All post-training blogs

Post-training / Blog 01

LLM post-training: what it is, why it matters, and when to use it.

A research-engineering guide to demonstrations, preferences, rewards, verified outcomes, evaluation—and the real resources each method requires.

POST-TRAINING / BLOG 01

01
FROM MODEL TO POLICYSHAPE THE BEHAVIOR

DEFINE → TRAIN → EVALUATE

  • SFT
  • Preferences
  • RL

Pre-training produces a powerful next-token predictor; post-training turns that predictor into a policy for a target behavior. The hard part is not naming an optimizer. It is choosing evidence that represents the behavior, paying for the right feedback loop, and proving that the resulting model improved without quietly getting worse elsewhere.

LLM POST-TRAININGMETHODS, COSTS, AND EVIDENCE

Post-training begins where the base-model objective stops.

A base language model is optimized to predict the next token over a broad corpus. That objective is unusually effective at acquiring representations, factual associations, linguistic patterns, and latent task capabilities. It does not, however, fully specify what the model should do when a user asks a question, when two plausible answers differ in usefulness, or when an agent has permission to act in an external system.

In this blog, LLM post-training means weight-changing training performed after base pre-training to shape a model’s behavior for a target distribution. The training signal may be a demonstration, a chosen-versus-rejected pair, a learned preference score, an AI-generated critique, a unit test, or the terminal state of an environment. The updated object is usually the policy model, although some pipelines also train a reward model, value model, verifier, or safety cost model.

The base objective LPT(θ) = − Ex Σt log πθ(xt | x<t)

Pre-training rewards accurate token prediction. It does not directly reward helpfulness, safe tool use, completion of a workflow, or satisfying a particular user preference.

LayerPrimary questionTypical mechanism
Pre-training

What statistical structure exists in the corpus?

Large-scale next-token prediction

Post-training

Which behaviors should become more probable?

Demonstrations, preferences, rewards, and verified outcomes

System time

What context, data, and actions are available now?

Prompting, retrieval, tools, constrained decoding, and guardrails

This boundary prevents a common category error. Retrieval, tool orchestration, and prompting can change system behavior without changing model weights. They are often cheaper and more reversible than training. This article intentionally focuses on behavioral post-training and leaves continued pre-training, distillation, and parameter-efficient update mechanisms outside its taxonomy.

The research evidence supports a useful but bounded claim. Wei et al. (2021) showed that instruction tuning across many tasks improved zero-shot performance on held-out task types. Zhou et al. (2023) showed in LIMA that a model fine-tuned on only 1,000 carefully curated examples could produce strong assistant behavior in their evaluations. These results suggest that useful capabilities can already be latent in a base model and that post-training can make them accessible. They do not imply that a small dataset can manufacture every capability the base model lacks.

Knowing is not the same as behaving reliably.

A pretrained model can know the relevant concept and still ignore an instruction, choose an unusable format, fail to ask for missing information, call the wrong tool, or optimize for a fluent explanation instead of a correct outcome. Scaling the same pre-training objective does not automatically resolve this objective mismatch.

Ouyang et al. (2022) made the mismatch concrete in InstructGPT. Their pipeline used supervised demonstrations, a reward model trained from ranked outputs, and PPO. On prompts drawn from the authors’ API distribution, human labelers preferred outputs from the 1.3B InstructGPT model to outputs from the 175B GPT-3 base model. The scope matters: this was a human-preference result on a specific prompt distribution, not evidence that the smaller model was universally more capable.

Post-training is important because it can address several different gaps: instruction following, response style, safety boundaries, specialized procedures, reasoning strategies, tool syntax, and long-horizon actions. It can also make a model easier to evaluate because the desired behavior is written down as demonstrations, comparisons, reward rules, and held-out tests.

But post-training is not free capability. InstructGPT still made simple mistakes, and its authors observed regressions on some public NLP benchmarks before adding pre-training-data mixing to the PPO objective. DeepSeek-R1-Zero developed useful reasoning patterns under reinforcement learning but also developed readability and language-mixing problems. The consistent lesson is that an optimization signal makes selected behavior more likely; it does not guarantee a complete, balanced product.

Pre-training determines much of what a model can express. Post-training changes what it tends to express under the conditions we care about.

Use post-training for a stable, measured behavior gap.

The strongest justification is not that a training method is popular. It is that a representative evaluation exposes a repeated failure, the base model sometimes demonstrates the underlying capability, and a trustworthy signal can distinguish improvement from regression.

ConditionEvidence required
measured_gap

A held-out evaluation repeatedly reproduces the behavior failure.

latent_capability

Strong prompting, examples, sampling, or a larger teacher shows that the task is feasible.

stable_target

The behavior is durable enough to encode in a model version rather than supply as changing context.

trusted_signal

Experts, preference labels, tests, or environment state can distinguish better behavior.

regression_control

The candidate can be compared with the base and production policies on capabilities, safety, and cost.

Common cases include turning a base model into an instruction-following assistant; teaching durable domain procedures; improving code or mathematics against executable tests; shaping refusal and safe-completion behavior; and improving an agent that must act across a stable tool interface. The data and evaluation distribution should resemble the intended deployment distribution. If a model is trained on neat single-turn examples but deployed in messy, multi-turn workflows, the post-training signal is solving a different problem.

Post-training is particularly attractive at high request volume: a behavior learned once may reduce repeated prompt tokens or dependence on a more expensive teacher. That economic benefit must be compared with data creation, training, evaluation, model hosting, and ongoing regression costs. A smaller inference bill does not automatically repay an expensive or brittle training pipeline.

Different signals require different post-training methods.

The phrase “post-training” hides four decisions: what evidence is available, what objective consumes that evidence, whether the current policy must generate new samples, and how improvement will be verified. The resource cost follows from those decisions. “Cheap” and “expensive” below are relative: the actual bill depends on model size, token length, number of candidates, hardware utilization, and whether labels come from scarce experts.

Supervised fine-tuning / instruction tuning

SFT learns from prompt-response demonstrations using teacher-forced next-token prediction. It is the natural first method for formats, procedures, tool-call syntax, and behaviors an expert can demonstrate directly.

Cost and resources

Compute: low to medium. One training model and no rollout service are required. Data: potentially expensive. Expert-written, reviewed answers often dominate cost. Long responses increase tokens and memory. Evaluation remains necessary because low training loss does not prove behavioral improvement.

SFT objective LSFT(θ) = − E(x,y*) Σt log πθ(y*t | x, y*<t)

The model imitates the provided answer token by token. It receives no direct signal about plausible alternatives that were not demonstrated.

Wei et al. (2021) found that instruction tuning across tasks improved generalization to unseen task types. LIMA suggests data quality and coverage can matter more than raw example count for some alignment behavior. The limitation is equally important: SFT concentrates probability on demonstrated trajectories, so it cannot explore and score alternative solutions the dataset never contains.

Synthetic demonstrations and rejection sampling

A capable model generates instructions, solutions, critiques, or several candidate responses. Rules, verifiers, reward models, or reviewers filter those candidates; accepted samples become SFT data.

Cost and resources

Compute: medium and inference-heavy. Cost scales with candidates per prompt and response length. Human cost: lower, not zero. Seed tasks, filters, audits, and difficult examples still need review. Hidden cost: generation bias and weak filters can replicate a teacher’s errors at scale.

Wang et al. (2022) used Self-Instruct to generate, filter, and train on synthetic instruction data, reporting a 33-point absolute improvement over vanilla GPT-3 on their Super-NaturalInstructions evaluation. The Llama 3 technical report also describes synthetic data and rejection-sampling stages inside a larger post-training recipe. These examples support synthetic data as a multiplier for a well-specified task—not as a substitute for independent quality control.

Direct preference optimization

DPO consumes prompts with a chosen and rejected response. It increases the chosen response’s likelihood relative to the rejected one while staying anchored to a reference policy, without fitting an explicit reward model or running an online RL loop.

Cost and resources

Compute: medium. Training evaluates chosen and rejected sequences and needs reference-policy log probabilities, but avoids a separate reward model, critic, and rollout cluster. Data: medium to high. Pairwise labels are often easier than writing ideal answers, yet expert disagreement and label policy still require investment.

DPO objective LDPO = −E log σ(β[(log πθ(y+|x) − log πref(y+|x)) − (log πθ(y−|x) − log πref(y−|x))])

The loss learns a preference margin relative to a frozen reference policy.

Rafailov et al. (2023) derived DPO from the KL-regularized preference-learning objective and reported results competitive with or better than PPO-based RLHF on their studied tasks. DPO’s simplicity is operationally valuable. Its central limitation is that offline pairs describe failures already present in the dataset; they do not automatically expose new failures produced by the updated policy.

Reward modeling and RLHF

People compare outputs; a reward model learns those comparisons; the current policy samples new outputs and is optimized against the learned reward, usually with a constraint that limits drift from a reference model.

Cost and resources

Compute: high. PPO-style systems may hold policy, reference, reward, and value models while repeatedly generating completions. Rollout inference and orchestration can dominate. People: high. Preference collection, adjudication, reward-model validation, and post-training evaluations are recurring costs.

KL-regularized RLHF objective maximizeθ Ex,y∼πθ[rφ(x,y)] − β KL(πθ(·|x) || πref(·|x))

The policy seeks reward while the KL term discourages uncontrolled drift. The reward is a learned proxy, not ground truth.

Stiennon et al. (2020) trained a reward model from human comparisons and improved human-rated summarization with RL. InstructGPT extended the pattern to a wider prompt distribution. This approach is appropriate when quality is subjective and on-policy sampling matters, but its extra infrastructure is justified only when validated reward-guided exploration beats simpler offline preference training.

RLAIF and Constitutional AI

An AI judge supplies critiques, revisions, preferences, or direct rewards according to written principles. The resulting data can support supervised learning, preference optimization, or RL.

Cost and resources

Compute: medium to high. Human labeling is replaced by repeated judge-model inference and often multiple candidates. Human governance: still high. People must write principles, audit judge bias, sample disagreements, red-team the system, and decide when human labels override the judge.

Bai et al. (2022) combined AI-generated critiques and revisions with reinforcement learning from AI feedback to train a less evasive harmless assistant. Lee et al. (2023) reported RLAIF performance comparable to RLHF across summarization, helpful dialogue, and harmless dialogue in their experiments. The cost shifts from labeling every pair to governing and auditing a scalable—but imperfect—judge.

Reinforcement learning with verifiable rewards

RLVR scores outputs with a checkable signal: an exact mathematical answer, passing tests, a valid proof step, successful tool state, or a completed environment task. It is most attractive when many solution paths are valid but success is unambiguous.

Cost and resources

Compute: high and rollout-heavy. Many attempts may be sampled for each problem. Labels: comparatively cheap. A verifier can score at scale. Infrastructure: potentially high. Sandboxed code, deterministic environments, state reset, observability, and anti-cheating tests can cost more to build than the optimizer.

Lambert et al. (2024) used RLVR in Tülu 3 alongside SFT and DPO. Shao et al. (2024) introduced GRPO while training DeepSeekMath, and DeepSeek-AI (2025) showed that large-scale RL could elicit reasoning patterns on verifiable mathematics, coding, and STEM tasks. A verifier reduces ambiguity, but it is safe to optimize only when it represents the real task and resists shortcuts.

Safety-focused post-training

Safety training uses demonstrations, preference pairs, constitutions, adversarial prompts, or constrained RL to increase helpful behavior while limiting harmful behavior. It is an objective and data program that can use several algorithms above.

Cost and resources

Data and evaluation: high. Harm taxonomies, specialist review, adversarial testing, policy updates, and multilingual or domain-specific coverage are continuous costs. Separate helpfulness rewards and safety costs add models and tuning work but expose trade-offs that one combined score may hide.

Dai et al. (2023) formulated Safe RLHF as reward maximization subject to a learned safety-cost constraint, separating helpfulness and harmlessness feedback. Constitutional AI provides a different mechanism for scalable safety feedback. Neither removes the need for deployment-specific red teaming or runtime controls.

MethodLargest resource driverRelative training system cost
SFT

Expert demonstrations and review

Low–medium; one training policy, no rollouts

Synthetic + rejection

Candidate-generation tokens and filters

Medium; inference-heavy before training

DPO

Preference pairs and paired-sequence training

Medium; offline and operationally simpler

Reward model + RLHF

Rollouts, multiple models, preference operations

High; distributed online training

RLAIF / CAI

Judge inference, principles, and audits

Medium–high; depends on final optimizer

RLVR

Rollouts and reliable environments

High; labels scale cheaply, execution may not

Safety program

Specialist data, red teaming, regression coverage

Medium–high and recurring

RL learns from consequences, not only demonstrations.

Reinforcement learning is one branch of post-training. The policy is the LLM. The state is the prompt plus generated tokens, tool results, and environment history. An action may be a token, a whole completion, or a tool call. A trajectory is the full response or multi-step interaction, and reward measures its quality or outcome.

RL conceptLanguage-model interpretation
policy πθ

The LLM distribution over the next token or action.

state st

Prompt, generated history, observations, and tool results available at step t.

action at

A token, response, structured decision, or external tool call.

trajectory τ

The complete response or interaction until a termination condition.

reward r

A human preference proxy, AI judge, verifier, process score, or environment outcome.

SFT can reproduce a successful trajectory already present in the dataset. RL can sample several trajectories from the current policy and shift probability toward the ones that score better. That difference matters when an expert cannot write the best reasoning path, many solutions are valid, or the decisive signal appears only after several actions.

The environment is therefore part of the training specification. It defines observations, actions, transitions, termination, and reward. Zhou et al. (2023) built WebArena as a reproducible environment for realistic web tasks. Their strongest GPT-4-based baseline achieved 14.41% end-to-end success versus 78.24% for humans, illustrating both the difficulty of long-horizon interaction and the value of evaluating terminal task state instead of merely judging fluent text.

Outcome reward scores the final answer or terminal state. Process reward scores intermediate steps. Lightman et al. (2023) found process supervision outperformed outcome supervision in their MATH setting and released 800,000 step-level labels. That is evidence for one mathematical-reasoning setup, not a universal law: process labels are expensive, may constrain valid alternative reasoning, and require a definition of a correct intermediate step.

AlgorithmCore ideaResource implication
PPO

Clip or constrain policy updates using an advantage estimate.

Common and flexible, but a value model and sensitive distributed orchestration increase memory and tuning cost.

RLOO

Use leave-one-out baselines across sampled responses instead of a learned critic.

Removes the value model and can simplify RLHF while retaining online sampling.

GRPO

Normalize rewards within a group of responses to estimate relative advantage.

Avoids a separate critic but requires multiple generations per prompt and remains rollout-heavy.

Schulman et al. (2017) introduced PPO as a general policy-gradient method. Ahmadian et al. (2024) revisited REINFORCE-style optimization for LLM feedback and found simpler variants could outperform PPO and offline preference baselines in their experiments. DeepSeekMath introduced GRPO as a critic-free PPO variant. Algorithm choice changes memory and stability, but it does not remove the two dominant requirements: useful sampled trajectories and a trustworthy reward.

Choose from the evidence you can trust—not the optimizer you want to use.

A method-selection decision should start with the cheapest signal that directly represents the acceptance criterion. The comparison must include data production, accelerator time, rollout inference, environment engineering, evaluation, and the operational burden of reproducing a run.

Available evidenceStart withEscalate only when
Reviewed ideal answers

SFT

Imitation plateaus and meaningful alternatives must be explored.

Several generated candidates + a reliable filter

Rejection sampling, then SFT

The filter is validated and more candidates continue to expose better behavior.

Chosen / rejected pairs

DPO

Offline pairs miss failures created by the current policy.

Subjective quality requiring fresh samples

Reward model + RLHF or RLAIF

The reward model predicts independent human judgments and online exploration adds measurable value.

Machine-checkable outcomes

RLVR

The verifier represents real success, survives adversarial tests, and rollout gains exceed environment cost.

Safety constraints

Safety SFT/preferences plus separate safety evaluation

Constrained RL is needed to expose and manage a measured helpfulness–safety trade-off.

For a specialist enterprise agent, a conservative sequence is usually best: build executable workflow evaluations; establish a prompt-and-tool baseline; collect reviewed successful trajectories; use SFT for the stable procedure; add preference learning for qualitative distinctions; and use RLVR only where the environment can prove success. Long-horizon agent RL becomes rational when sequential exploration or delayed credit assignment—not retrieval, permissions, or tool reliability—is the demonstrated bottleneck.

Every post-training signal is a lossy specification.

Capability regressions. Training on a narrow distribution can reduce broad performance or over-specialize the model. InstructGPT called this an “alignment tax” and mixed pre-training data into PPO to mitigate regressions on public NLP tasks. Every checkpoint therefore needs both target-task evaluation and a general-capability regression suite.

Reward overoptimization. A learned reward is an imperfect proxy for human judgment. Gao et al. (2022) measured how optimizing a proxy reward eventually harmed a synthetic gold reward under both RL and best-of-n sampling. More optimization is not monotonically better when the objective is misspecified.

Preference and judge bias. Labels may encode annotator population, rubric, presentation order, and verbosity preferences. Zheng et al. (2023) documented position, verbosity, self-enhancement, and reasoning limitations in LLM-as-a-judge evaluation. The same family of bias can enter RLAIF data or reward models.

Reward-model blind spots. Lambert et al. (2024) introduced RewardBench to test reward models on chat, reasoning, safety, and out-of-distribution comparisons, finding meaningful differences in refusal behavior, reasoning, and instruction following. Reward accuracy on an easy validation split is insufficient evidence for safe policy optimization.

Mode narrowing. A strong preference signal may concentrate the policy on a narrow style—longer answers, familiar phrasing, or one reasoning pattern—even when several outputs are valid. Measure response length, lexical and semantic diversity, calibration, and task-specific utility rather than treating a single preference win rate as the objective.

Verifier exploitation and benchmark overfitting. A model can learn formatting shortcuts, exploit weak tests, memorize benchmark structure, or manipulate environment state without completing the intended task. Verifiers need hidden cases, adversarial probes, state invariants, contamination checks, and periodic replacement.

Unsafe exploration. Online agent RL can execute undesirable actions while collecting data. Use sandboxes, least-privilege credentials, reversible state, action budgets, deterministic resets, and human approval boundaries before treating an enterprise workflow as a training environment.

Do not put changing product state into model weights.

Observed problemTry firstReason
The task contract is unclear

Prompt and product redesign

Training cannot repair a requirement the team has not specified.

Facts are current, private, or revocable

Retrieval or tools

External state is fresher, attributable, and easier to update.

The base model lacks the foundation

A stronger base model

Behavior shaping cannot reliably create missing representations.

Success cannot be measured

Build evaluation and labeling policy

An untrusted signal makes optimization directionless.

Latency or throughput is the bottleneck

Inference and system optimization

Serving architecture—not behavior—may be the problem.

Requirements change every week

Context, tools, and orchestration

Volatile behavior is costly to encode and redeploy in weights.

Lewis et al. (2020) showed how retrieval-augmented generation combines parametric and updateable non-parametric memory for knowledge-intensive tasks. Yao et al. (2022) showed that prompting a model to interleave reasoning and external actions improved performance in their knowledge and interactive benchmarks. These papers do not make training unnecessary; they demonstrate that some apparent model failures are better addressed by access to evidence and actions.

Do not adopt RL solely because a verifiable score exists. If SFT or DPO already reaches the acceptance threshold, an online rollout loop adds accelerator usage, distributed-systems complexity, hyperparameter sensitivity, and reward-hacking risk without a demonstrated return.

Build the acceptance test before changing the weights.

The baseline should be evaluated before training on exactly the dimensions that will decide deployment. That prevents a team from selecting whichever metric improved after seeing the run. Development graders may guide data and hyperparameters, but the final evaluation should remain outside the optimization loop.

Evaluation dimensionWhat to measure
target_behavior

Held-out task success, instruction following, format validity, and expert preference.

reward_quality

Agreement with independent humans, adversarial examples, calibration, and out-of-distribution behavior.

general_capability

Broad reasoning, knowledge, coding, multilingual, and long-context regressions relevant to deployment.

safety

Harmful compliance, over-refusal, jailbreak robustness, permissions, and safe tool behavior.

distribution

Length, diversity, calibration, consistency, and behavior across user and difficulty slices.

system_cost

Latency, generated tokens, tool calls, retries, human escalation, and serving cost per successful task.

Tülu 3 separates development and unseen evaluations and discusses benchmark decontamination. RewardBench evaluates the reward model rather than assuming it is correct. MT-Bench and Chatbot Arena combine judge-based and human-preference evaluation while documenting judge limitations. Together they suggest a layered approach: deterministic tests where possible, blinded human comparison where judgment is subjective, and explicit audits of the models used as graders.

Evaluation is itself a resource cost. It consumes expert hours, judge tokens, environment executions, storage, and repeated inference across checkpoints. Budget it before training. A cheap training run with an inadequate evaluation program is not a cheap post-training program; it is an unmeasured one.

Escalate the feedback loop only when evidence requires it.

Specify→Evaluate→Baseline→Collect signal→Train→Audit→Canary
  1. Write a behavior contract. Define users, tasks, successful outputs, tool permissions, safety boundaries, latency limits, and the evidence that marks a workflow complete.

  2. Freeze a held-out evaluation. Include the target distribution, difficult edge cases, safety cases, general regressions, and system-cost metrics.

  3. Establish non-training baselines. Test prompting, constrained output, retrieval, and tools. Record the strongest reproducible baseline—not the easiest one to beat.

  4. Collect the minimum trustworthy signal. Use reviewed demonstrations when experts can show success, preference pairs when they can recognize it, and verifiers when the environment can prove it.

  5. Choose the simplest adequate method. Start with SFT, synthetic filtering, or DPO before paying for online RL. Add RL when fresh policy exploration produces a measured benefit.

  6. Checkpoint and audit. Compare the base, SFT, candidate, and production models on the complete evaluation vector. Investigate gains by slice rather than only reporting an average.

  7. Canary, monitor, and retain rollback. Version the model, data, rubric, reward, verifier, prompts, and environment. Monitor real failures and feed only reviewed evidence into the next cycle.

The cheapest successful method is the one whose total evidence, training, evaluation, and operating cost closes the real behavior gap.
References

Empirical results above are attributed to the models, datasets, and evaluation settings reported by their authors. Comparisons and implementation recommendations are Vikram Kharvi’s synthesis.

Further reading

This essay is included as accessible context. Technical and empirical claims in the blog are sourced to the primary papers above.

Back to TrainRL