Fine-Tuning vs RLHF and DPO
Pretraining decides what a model can say. Supervised fine-tuning decides what it usually says. Preference optimisation decides which of two plausible answers it prefers — and, pushed too hard, which one it degenerates into.
Stage 2 — Fine-Tuning
how hard the demonstrations pull
Stage 3 — Preferences
high keeps the model near its SFT self; low lets it chase reward
a real and well-documented flaw, not a hypothetical one
"Explain why the sky is blue to a 10-year-old"
—The Three Stages
Scores
Which Stage Fixes What
Pretraining — knowledge and fluency. Enormously expensive, done once.
SFT — format, task, register. Cheap, needs written examples.
RLHF / DPO — taste between plausible answers. Needs comparisons, not examples.
Retrieval — facts. None of the above.
Overview
Quick Context
A pretrained model is a text predictor. Ask it a question and it gives something a document holding that question might plausibly continue with —. This is not the same as an answer, and certainly not a helpful one.
Two more stages turn that into an assistant. Supervised fine-tuning shows it thousands of written demonstrations of the behaviour you want. Choice optimisation then shows it pairs of answers with a human verdict on which is better, for all the cases where nobody could write the ideal answer but anyone can pick the better of two. The division of labour matters: SFT teaches format and basic cue below. While choice optimisation teaches the subtler qualities. Helpfulness, safety, tone. That humans can spot easily but cannot show perfectly in a single gold-standard case. RLHF was the first choice method: train a reward model on human checks. Then optimise the language model against that reward with PPO while penalising drift from the SFT checkpoint. DPO simplified the pipeline by showing that the same optimum can be reached with a supervised loss right on the choice pairs. This skips the reward model and the reinforcement learning loop fully. Both methods solve the same constrained optimisation problem. Boost reward subject to a KL cost that keeps the model close to its guide. And the temperature parameter beta controls how tight the leash is. This page computes the reward, the KL divergence. And the policy shift for a toy vocabulary so you can see just what the cost does.
Pretraining decides what a model can say.
In this guide
- Quick Context
- The maths both choice methods share
- Three stages, three different jobs
- Why choice learning exists at all
- RLHF, and how DPO simplified it
- The one equation both choice methods share
- Guided tour
- Choosing between them
- Failure modes
- Worth recalling
- What each stage cannot fix
- Practical guidance
- Questions people ask
- Recap in one screen
Fine-Tuning, RLHF and DPO: A Practical Guide
Three techniques that all get called "training", doing three different jobs.
Quick Context
A pretrained model is a text predictor. Ask it a question and it gives something a document holding that question might plausibly continue with —. This is not the same as an answer, and certainly not a helpful one.
Two more stages turn that into an assistant. Supervised fine-tuning shows it thousands of written demonstrations of the behaviour you want. Choice optimisation then shows it pairs of answers with a human verdict on which is better, for all the cases where nobody could write the ideal answer but anyone can pick the better of two. The division of labour matters: SFT teaches format and basic cue below. While choice optimisation teaches the subtler qualities. Helpfulness, safety, tone. That humans can spot easily but cannot show perfectly in a single gold-standard case. RLHF was the first choice method: train a reward model on human checks. Then optimise the language model against that reward with PPO while penalising drift from the SFT checkpoint. DPO simplified the pipeline by showing that the same optimum can be reached with a supervised loss right on the choice pairs. This skips the reward model and the reinforcement learning loop fully. Both methods solve the same constrained optimisation problem. Boost reward subject to a KL cost that keeps the model close to its guide. And the temperature parameter beta controls how tight the leash is. This page computes the reward, the KL divergence. And the policy shift for a toy vocabulary so you can see just what the cost does.
The maths both choice methods share
Each choice method optimises the same objective: get more reward without drifting far from the model you started with. That constraint has a closed form,
π(y) ∝ πref(y) · exp( r(y) / β )
which is just what this page computes. The guide policy is the SFT model, r is the reward, and β is the leash. Large β keeps the tuned model close to its guide, small β lets it chase reward wherever that leads. The drift readout is the KL divergence between the two. This is the quantity the cost is penalising.
RLHF gets r from a reward model trained on human checks. Then optimises against it with PPO. DPO skips the reward model fully: the same optimum can be reached by a supervised-looking loss on the choice pairs themselves. Same target, far less machinery, which is why DPO and its relatives took over so quickly.Three stages, three different jobs
A usable assistant is not gave in one training run. Three stages follow one another, each teaching something the last one cannot.
1. Pretraining — next-token prediction over enormous quantities of text. This is where knowledge and language competence come from. It costs millions of pounds and gives a base model that completes text rather than answering questions.
2. Supervised fine-tuning (SFT) — training on curated cases of cues and good responses. This teaches the format: that a question should be answered, that output should be structured a given way, that a conversation has turns.
3. Choice optimisation — RLHF, DPO or close. Humans compare pairs of responses and the model is tuned towards the preferred one. This teaches the qualities that are easy to spot and hard to show. Helpfulness, right caution, tone, refusing what should be refused.
| Stage | Data needed | Teaches |
|---|---|---|
| Pretraining | Trillions of tokens | Knowledge, language |
| SFT | Thousands of examples | Format, task behaviour |
| Preference | Thousands of comparisons | Quality, tone, safety |
Why choice learning exists at all
The natural question: if SFT can learn from good cases, why add a stage?
Because for many qualities, writing an ideal case is harder than judging between two candidates. Asked to give the perfect response to a sensitive question, most annotators struggle. Shown two responses and asked which is better, they answer quickly and always.
Choice data is so cheaper and more reliable to collect for just the qualities that matter most in an assistant.
There is a second reason, which is about the loss function. SFT boosts the likelihood of one target response, so anything not in the target is implicitly wrong — even if it is equally good. Choice training instead pushes the model's distribution towards a whole region of preferred behaviour. This suits problems with many valid answers.
RLHF, and how DPO simplified it
RLHF has three moving parts:
- Collect human checks of response pairs.
- Train a reward model to predict which response a human would prefer.
- Optimise the language model against that reward with reinforcement learning (PPO), including a KL cost keeping it close to the SFT model.
The KL cost is not optional. Without it the policy drifts into degenerate text that scores highly on the reward model and is useless — reward hacking. And it is the trait failure of the method.
Practically, RLHF is complicated: two models in memory, an RL loop that is sensitive to hyperparameters. And a reward model that can be gamed.
DPO (direct choice optimisation) removes the reward model and the RL loop. It shows that the same objective can be optimised right on the choice pairs with a simple classification-style loss. Increase the likelihood of the preferred response, decrease the likelihood of the rejected one, next to a frozen guide model.
| RLHF (PPO) | DPO | |
|---|---|---|
| Reward model | Required | Not needed |
| Training loop | RL, sensitive | Supervised, stable |
| Memory | Policy + reward + reference | Policy + reference |
| Quality | Strong, well-proven | Comparable in most reports |
| Complexity | High | Low |
DPO's ease is why it became the default for open models. Variants — IPO, KTO, ORPO, SimPO — adjust the loss or remove the guide model; the family is still moving.
The one equation both choice methods share
RLHF and DPO look like fully different machinery, and they optimise the same objective. Writing that objective out is the shortest route to grasp what choice training does. And what neither method can fix.
The next block goes on with the left demonstrations.
The next block goes on with the left demonstrations.
The next block goes on with the left demonstrations.
The next block goes on with the left demonstrations.
Guided tour
- Start at pretraining. With SFT at 0 and no choice method, the dense jargon answer is the most likely one. That is what "most probable follow-up" looks like when the text you trained on is the internet.
- Apply SFT. Raise Supervised Fine-Tuning to 2. The showed answer — short, clear, aimed at a child — takes over. Nothing has been rewarded yet; it is just imitation.
- Add RLHF with a tight leash. Set the method to RLHF with beta at 3. The good answer gains a little, the drift stays small, and human ratings go up.
- Loosen the leash. Drag beta down towards 0.1. The model collapses onto the long, hedging, flattering answer — because the reward model scores it highest. Reward goes up, the human rating goes down, and the drift readout goes through the roof. That is reward hacking, and it is why the KL cost is not optional.
- Fix the reward model instead. Uncheck Reward Model Likes Long Answers and the collapse stops happening, at the same beta. The KL cost was never the real fix; it was a guard rail against a proxy that was wrong.
- Compare DPO. Switch the method to DPO. It moves chance towards the preferred answer and away from the rejected one. And it has no reward model to hack. But it also has no opinion at all about answers nobody compared.
Choosing between them
- Wrong facts? None of these. Use retrieval. Fine-tuning teaches behaviour, and treating it as a way to insert knowledge is the most costly mistake in this area.
- Wrong format, tone or task? SFT, and often LoRA so you are not moving each weight.
- Right content, wrong judgement? Choices. If you can rank two outputs but cannot write the perfect one, that is just the sign these methods consume.
- Nothing but a few cases? Try prompting first. A great deal of what people fine-tune for is a system prompt away.
Failure modes
- Reward hacking. The reward model is a proxy for human judgement, and optimisers find each gap between the two. Length, confidence, flattery, formatting.
- Alignment tax. Heavy choice tuning can make a model more agreeable and less capable, hedging where it used to answer.
- Catastrophic forgetting. Fine-tune hard on a narrow task and unrelated abilities degrade. Low learning rates, adapters and mixed data all exist for this.
- Choice data that disagrees with itself. Two annotators, two answers, no shared rubric. The coming reward model learns the noise.
- Evaluating on the reward model. If the reward model is also your evaluation, you have measured the thing you optimised and learned nothing.
Worth recalling
Pretraining supplies knowledge and fluency, supervised fine-tuning supplies behaviour by imitation, and choice optimisation supplies judgement between answers that are all plausible. RLHF and DPO reach the same optimum. A policy tied to to the guide times the exponentiated reward. With DPO skipping the reward model that RLHF has to train and then defend. The beta term is the leash, and slackening it gives just the failure you would predict. Reward climbs, human ratings fall. And the model drifts into any the proxy overrates. None of these stages is a way to teach a model new facts; that is what retrieval is for.
What each stage cannot fix
This is the practically useful part, because it decides which stage to reach for.
Fine-tuning does not reliably add facts. It can be made to memorise, and doing so is slow, hard to update, and gives confident errors on anything nearby that was not memorised. Facts belong in retrieval.
Choice training does not add power. It shapes which of the model's existing behaviours are expressed. A model that cannot do arithmetic will not learn to from choice data.
Neither fixes a knowledge cut-off. Only retrieval or a tool does.
SFT on a narrow task can cause forgetting. Heavy fine-tuning on one domain degrades general ability. The alignment tax. LoRA reduces it, as does mixing general data into the fine-tuning set.
So the decision table most projects need:
| Goal | Approach |
|---|---|
| Add current or private facts | RAG |
| Enforce an output format | SFT, or a structured-output constraint |
| Teach a specialised task | SFT, usually with LoRA |
| Adjust tone and helpfulness | Preference optimisation |
| Reduce unwanted responses | Preference optimisation plus system prompting |
| Get started quickly | Prompting with few-shot examples |
Practical guidance
Try prompting first. With few-shot cases and a clear system prompt, a strong model handles a great many tasks without any training. Fine-tuning is a commitment to a pipeline, a dataset and a retraining cadence.
If fine-tuning, use LoRA. A few hundred to a few thousand well-curated cases, adapters. Rather than full weights, and evaluation against a held-out set that existed before you started.
Data quality rules quantity. A thousand carefully written cases beat ten thousand scraped ones. The well-known result here is that a small, high-quality cue set can give a surprisingly capable assistant.
Choice optimisation is rarely the first move for an use team. It matters when you are shipping a model whose tone and refusal behaviour you own.
Evaluate on what you care about. Fine-tuning improves the target metric and can degrade others. Keep a general power check alongside the task-set one.
Questions people ask
RAG or fine-tuning? RAG for facts, currency and citations. Fine-tuning for format, style and task behaviour. They are complementary and often used together.
How much data do I need for SFT? A few hundred cases can shift format clearly; a few thousand for a large task change.
Is DPO strictly better than RLHF? Simpler and comparable in most published checks. Well-executed PPO still leads on some benchmarks.
What is the alignment tax? The power lost when tuning for helpfulness and safety. Real, and often small next to the gain.
Can I fine-tune a hosted model? A few providers offer it, often LoRA-based, with your data and their infrastructure.
Does fine-tuning make a model smaller or faster? No — that is distillation or quantisation. Fine-tuning changes behaviour, not size.
Recap in one screen
- Pretraining gives knowledge, SFT gives format, choice optimisation gives quality and tone.
- Choice data exists because judging two responses is easier and more reliable than writing an ideal one.
- RLHF needs a reward model and an RL loop; DPO reaches comparable results with a supervised loss.
- Fine-tuning does not reliably add facts — use retrieval for that.
- Try prompting first, then LoRA on a few thousand carefully curated cases.