AI/TLDR

PPO vs DPO: Two Ways to Align an LLM to Preferences

See exactly where PPO and DPO diverge so you can choose the simpler pipeline without giving up alignment quality.

INTERMEDIATE10 MIN READUPDATED 2026-06-13

In plain English

Once a base model can write fluent text, you still have to teach it which answers people actually prefer — the helpful one over the rambling one, the honest one over the confident-but-wrong one. PPO and DPO are two recipes for doing exactly that from human preference data. They aim for the same target; they take very different roads to get there.

PPO vs DPO — illustration
PPO vs DPO — images.bannerbear.com

Picture training a new chef. PPO is the version where a food critic tastes every dish the chef cooks, scores it, and the chef adjusts based on those live scores — over thousands of rounds of cook, taste, react. DPO skips the live critic entirely: you hand the chef a stack of paired photos — "diners liked this plate more than that one" — and the chef studies the pairs directly until they internalize the preference. Same goal, far less moving machinery.

PPO is short for Proximal Policy Optimization, a reinforcement-learning algorithm borrowed from robotics and games. It's the engine inside classic RLHF. DPO is Direct Preference Optimization: a 2023 method that proved you can get the same alignment effect with a single supervised-style loss — no reward model, no reinforcement learning loop. See the standalone DPO explainer for the full derivation; this page is the head-to-head.

Why it matters

If you're aligning a model, picking between PPO and DPO is one of the first big forks in the road. It decides how much infrastructure you build, how much compute you burn, how likely your training run is to blow up, and — sometimes — how good the final model gets on the hardest cases. Getting it wrong costs weeks.

  • Cost and complexity. PPO keeps up to four models in play at once and runs an unstable RL loop; DPO trains one model with a loss that looks almost like ordinary fine-tuning. For most teams, DPO is dramatically cheaper to stand up and run.
  • Stability. PPO is famous for being finicky — a slightly wrong learning rate or KL setting and the model collapses into gibberish or game-the-reward nonsense. DPO has far fewer knobs and rarely explodes, which matters a lot when you can't babysit every run.
  • Ceiling on quality. The trade-off cuts back the other way: because PPO can explore new answers and get fresh feedback on them, a well-tuned PPO pipeline can sometimes push past what DPO reaches on subtle, hard-to-specify alignment goals.

Who cares in practice? Anyone past basic supervised fine-tuning who wants the model to follow preferences rather than just imitate examples. The honest summary the field has converged on: start with DPO because it's simpler and usually good enough, and reach for PPO only when you've hit DPO's ceiling and can afford the extra machinery. The rest of this page makes that recommendation concrete.

How it works

The cleanest way to see the difference is to walk each pipeline end to end. They start from the same place — a model that's already been supervised-fine-tuned (the SFT model) — and the same preference dataset. From there they diverge completely.

PPO: an online reinforcement-learning loop

PPO treats alignment as a learning-by-doing problem. First you train a separate reward model — a network that reads a prompt and a candidate answer and outputs a single number, a learned stand-in for "how much a human would like this." Then the real loop begins. The model being trained (the policy) generates fresh answers to prompts, the reward model scores them, and PPO nudges the policy to produce higher-scoring answers next time. This repeats over and over.

Two extra pieces keep it from going off the rails. A value head (a critic) estimates how good a partially-written answer is, which makes the reward signal less noisy. And a KL penalty measures how far the policy has drifted from the original SFT model and pushes back if it strays too far — without it, the policy learns to exploit the reward model, churning out weird text that scores high but reads like nonsense ("reward hacking").

Notice the cost hiding in that loop: at any moment PPO juggles up to four models — the policy being trained, a frozen reference copy (for the KL penalty), the reward model, and the value/critic head. The policy also has to generate text on every step, which is slow. This is the price of being online: the model learns from its own new outputs, not a fixed dataset.

DPO: one offline loss, no RL

DPO's key insight is mathematical: the optimal policy that RLHF is trying to reach can be written in closed form, so you can skip the whole loop and optimize for it directly. There's no reward model, no generating new text, no critic. You take your fixed preference pairs and train with a single loss that says, in effect: make the chosen answer more likely than the rejected one, relative to where the reference model started — while a built-in term plays the same role the KL penalty did in PPO.

Because nothing is generated and the data never changes, DPO is offline: it looks and runs almost exactly like supervised fine-tuning. You hold two models in memory (the policy and a frozen reference) and stream batches of pairs through a loss. That simplicity is the whole reason DPO took off.

PPO vs DPO, head to head

Side by side, the trade-off is easy to read. PPO buys quality with complexity; DPO buys simplicity by giving up some exploration.

DimensionPPO (RLHF)DPO
ParadigmOnline reinforcement learningOffline, supervised-style
Reward modelYes — trained separatelyNone — implicit in the loss
Models in memoryUp to 4 (policy, ref, reward, critic)2 (policy + frozen reference)
Generates during trainingYes — slow rollouts each stepNo — fixed dataset
StabilityFinicky; can collapse / reward-hackRobust; few failure modes
Hyperparameters to tuneMany (KL, clip, value loss, lr…)Few (mainly beta and lr)
Compute costHighLow
Quality ceilingHigher on hard cases when tuned wellStrong, but can plateau

The single most important row is "generates during training." Because PPO produces new answers and scores them live, it can discover responses that aren't anywhere in your dataset and learn whether they're good. DPO only ever sees the chosen/rejected pairs you collected; it can sharpen preferences inside that data beautifully, but it can't go looking for better answers on its own. That's the root cause of PPO's higher ceiling — and of why it's so much more expensive.

Which one should you choose?

You don't need to agonize. A short decision flow covers almost every real situation.

Reach for DPO when

  • You want results fast and can't afford to babysit an unstable RL loop.
  • Your compute or engineering budget is limited — DPO runs on roughly the footprint of ordinary fine-tuning.
  • Your preference data already covers the behaviors you care about well; you mainly need to sharpen them, not discover new ones.
  • You're combining it with LoRA or other PEFT to keep the run cheap — DPO pairs naturally with parameter-efficient methods.

Reach for PPO when

  • You've run DPO and it plateaued on the hard, subtle alignment goals you care most about.
  • You can train a good reward model — PPO is only as good as the reward signal it chases.
  • You have the infrastructure and tolerance to tune an RL loop (KL schedules, clipping, rollouts) and watch for reward hacking.
  • Online exploration genuinely helps your task — the model needs to find better answers than the ones in your dataset.

Going deeper

Once the core contrast clicks, a few nuances are worth knowing — they're where most of the real-world confusion lives.

The DPO beta parameter. DPO has one knob that behaves like PPO's KL penalty: beta. Low beta lets the model drift far from the reference (more aggressive, riskier); high beta keeps it close (safer, weaker effect). It's the single most important DPO hyperparameter and the first thing to sweep — see fine-tuning hyperparameters for the broader picture if your subcategory hasn't got a dedicated page yet.

On-policy vs off-policy is the deeper axis. "Online vs offline" is really shorthand for where the training answers come from. PPO is on-policy — it learns from text the current model just generated. DPO is off-policy — it learns from a frozen dataset that may have been written by a different (often weaker) model. Off-policy data can be stale or mismatched, which is a subtle reason DPO sometimes underperforms: it's optimizing over answers the model would no longer produce.

The middle ground is filling in. The field hasn't stayed at two options. Online DPO and iterative DPO periodically generate fresh answers and re-label them, borrowing PPO's exploration while keeping DPO's simpler loss. Variants like IPO, KTO, and ORPO tweak the loss to fix specific DPO weaknesses (overfitting to noisy pairs, needing paired data at all). The clean PPO-vs-DPO binary is increasingly a spectrum from fully offline to fully online.

Reward models didn't disappear. A frequent misconception is that DPO killed reward models. It removed the explicit one from the training loop, but reward models are alive and well elsewhere — for rejection sampling (generate many answers, keep the best-scored), for evaluation, and for the newer RL-from-verifiable-rewards pipelines used in reasoning models. Understanding PPO's reward model is still worth your time even if you only ever run DPO.

Where to go next. If you haven't already, read the full RLHF walkthrough (PPO in its native habitat) and the standalone DPO explainer for the loss derivation. To ground the whole thing in cost and tooling, pretraining vs fine-tuning and full fine-tuning vs PEFT show where preference training sits in the larger pipeline. The durable takeaway: PPO and DPO are points on a single trade-off curve between simplicity and exploratory power — start simple, and only add machinery when the data proves you need it.

FAQ

What is the main difference between PPO and DPO?

PPO runs a full reinforcement-learning loop: it trains a separate reward model, then has the policy generate answers, score them, and improve over many rounds. DPO skips all of that and trains directly on chosen-vs-rejected preference pairs with a single supervised-style loss. PPO is online and complex; DPO is offline and simple.

Is DPO better than PPO?

Not strictly — they trade off. DPO is simpler, cheaper, and far more stable, and it's good enough for most projects. A well-tuned PPO can reach a higher quality ceiling on hard, subtle alignment goals because it explores new answers, but it costs much more and is harder to get right. Most teams start with DPO and only move to PPO if they hit a wall.

Why is PPO so much more expensive than DPO?

PPO keeps up to four models in play at once (the policy, a frozen reference, a reward model, and a value/critic head) and has to generate fresh text on every training step. DPO holds just two models (policy plus frozen reference) and never generates anything — it streams a fixed dataset of pairs through one loss, so it runs at roughly the cost of ordinary fine-tuning.

Do I need a reward model for DPO?

No. That's the whole point of DPO: the reward signal is baked implicitly into the loss, so there's no separately trained reward model. PPO does need one. Reward models are still useful for other things, like ranking generated answers or evaluation, but DPO training doesn't require one.

Can I use both PPO and DPO on the same model?

Yes. A common pipeline is supervised fine-tuning, then DPO to get most of the alignment cheaply, then an optional, carefully tuned PPO stage to squeeze out the last bit of quality. They aren't mutually exclusive — they're stages you can chain.

What does 'online' versus 'offline' mean here?

It refers to where the training answers come from. PPO is online (on-policy): it learns from text the model just generated. DPO is offline (off-policy): it learns from a fixed dataset of preference pairs, possibly written by a different model. Online lets the model explore new answers; offline is simpler but can be stale.

Further reading