M11 · Fine-tuning, LoRA, and RLHF11-0629 min read
Lesson 80 of 106 · Module 12 of 14 · Week 6
Threads:The measurement threadThe weights threadThe efficiency thread
RLHF: Reinforcement Learning from Human Feedback Explained
RLHF runs in three stages in a strict order: supervised fine-tuning on demonstrations, then a reward model trained from human preference labels, then policy optimization of the language model against that reward model — classically with PPO. It exists because the qualities we want from a model (helpfulness, calibration, tone) are easy for humans to compare and nearly impossible for humans to write targets for. DPO reaches a similar destination without a separate reward model or an RL loop, and NVIDIA's SteerLM is an alternative alignment approach that conditions generation on labeled attributes.
What RLHF (reinforcement learning from human feedback) is
RLHF is a three-stage training procedure that aligns a language model with human preferences by learning a model of those preferences and then optimising the language model against it.
Stage 1 — Supervised fine-tuning (SFT). Start from a pretrained base model and fine-tune it on high-quality instruction-response demonstrations. The output is a policy: a model that follows instructions well enough that its outputs are worth comparing. This stage is 11-02 in full.
Stage 2 — Reward model (RM) training. Collect human preference labels: show annotators a prompt and two or more candidate responses from the SFT model, and have them rank or pick a winner. Train a separate model — usually initialised from the same family — to take a (prompt, response) pair and output a scalar score that agrees with the human rankings. The reward model is a learned proxy for human preference.
Stage 3 — Policy optimization. Fine-tune the language model with reinforcement learning to produce responses the reward model scores highly. The classical algorithm is PPO (proximal policy optimization). A penalty term keeps the optimised policy from drifting too far from the SFT policy, because unconstrained optimisation against a proxy reliably breaks the proxy.
Three framings to hold on to:
- The supervision signal is comparative, not demonstrative. In SFT a human writes the answer. In RLHF a human judges answers. Judging is cheaper per item and more consistent across annotators than authoring, which is exactly why the method scales.
- The reward model is a proxy and every proxy can be gamed. This is not an incidental risk; it is the central pathology of the method, and it has a name — reward hacking — and its own lesson,
11-07. - Alignment is not capability. RLHF changes which of the responses a model could produce it actually reaches for. It does not teach the model anything it could not already do. A model that cannot reason through a problem will not learn to by being told which of two failed attempts was nicer.
How the RLHF pipeline works
L1 — The intuition: a taste teacher, then practice
Imagine coaching a writer. The demonstration approach is to hand them a hundred finished essays to imitate — that is SFT. It works, and it is limited by your ability to produce finished essays and by the fact that imitation caps out at the exemplars' quality.
The preference approach is different. You cannot write a hundred perfect essays, but you can look at any two drafts and say which is better. So you do that a few thousand times, and from your judgements you train an assistant editor who has learned your taste and can score a draft without you — that is the reward model. Then you have the writer produce drafts, the assistant editor score them, and the writer adjust toward higher-scoring drafts — that is policy optimization.
Two consequences follow from the analogy and both are real. The assistant editor is only as good as your judgements, so bad labels produce bad taste, faithfully learned. And a writer optimising hard against an assistant editor will eventually discover what the editor over-rewards — flattery, length, confident phrasing — and exploit it. Hence the constraint that keeps the writer near their original voice.
L2 — The mechanics, stage by stage
Stage 1 mechanics — SFT. Standard supervised fine-tuning as covered in 11-02: instruction-response pairs, next-token cross-entropy over the response tokens, chat template applied consistently. Increasingly this stage is run with LoRA rather than full-parameter training (11-05). Its output is called the SFT policy or the reference policy, and it plays two roles later: it is the model that generates candidates for preference labelling, and it is the anchor the optimised policy is penalised for drifting away from.
Stage 2 mechanics — the reward model.
- Data collection: sample a prompt, generate two or more responses from the SFT policy, present them to a human annotator, record which is preferred. The output is a set of records of the form
(prompt, response_chosen, response_rejected). - Architecture: take a language model and replace the token-prediction head with a scalar head, so it outputs a single number per (prompt, response) pair.
- Objective: a pairwise ranking loss. The model is trained so the score of the chosen response exceeds the score of the rejected one. Note carefully what this means — the reward model learns a relative ordering, not an absolute quality scale. Its outputs are only meaningful in comparison.
- Evaluation: the reward model's own accuracy is measured as agreement with held-out human preferences. A reward model that agrees with humans barely better than chance will produce an alignment stage that does nothing useful, so this is a checkpoint you cannot skip.
Stage 3 mechanics — policy optimization with PPO. This is the reinforcement-learning loop, and mapping RL vocabulary onto language modelling is what makes it comprehensible:
| RL concept | In language-model RLHF |
|---|---|
| Policy | The language model being optimised; it "acts" by emitting tokens |
| Action | Emitting the next token |
| State | The prompt plus tokens generated so far |
| Episode | One complete response to one prompt |
| Reward | The reward model's scalar score for the finished response |
| Reference policy | The frozen SFT model, used to measure and penalise drift |
The loop: sample a prompt, have the policy generate a response, score it with the reward model, compute the KL divergence between the policy's token distribution and the reference policy's, subtract a penalty proportional to that divergence, and take a policy-gradient step that raises the probability of high-scoring behaviour.
objective ≈ E[ reward_model(prompt, response) ]
− β · KL( policy ‖ reference_policy )
The KL penalty term is doing essential work. Without it, the policy will wander far from the SFT model in pursuit of reward-model score and will discover degenerate outputs that score highly and read terribly. The coefficient β trades alignment strength against fidelity to the reference: too small and the policy drifts into reward hacking, too large and nothing changes.
The word "proximal" in PPO refers to the same instinct implemented differently — PPO constrains how much the policy may change per update step, which is what makes policy-gradient training stable enough to run on a model this large.
What is resident during stage 3, and why RLHF is expensive. This is the operational fact that decides whether a team can do RLHF at all:
1. the policy being trained — weights + gradients + optimizer state
2. the frozen reference policy — weights only (for the KL term)
3. the reward model — weights only (for scoring)
4. optionally a value/critic model — weights + gradients + optimizer state
Three to four models in memory simultaneously, plus a generation loop inside the training loop, because every step requires the policy to actually produce text before it can be scored. Apply the memory arithmetic from 11-04 and it is obvious why RLHF is mostly run by well-resourced organisations and why simpler alternatives were sought.
L3 — DPO, SteerLM, RLAIF, and why the alternatives exist
The complexity of stage 3 is the motivation for everything in this section.
DPO (Direct Preference Optimization) takes the same preference dataset and optimises the policy on it directly, with a supervised-style loss, skipping both the separate reward model and the RL loop. Instead of learning an explicit reward function and then maximising it, DPO uses a loss derived so that minimising it moves the policy toward preferring the chosen responses over the rejected ones, with a reference-policy term playing a role analogous to the KL penalty.
| RLHF with PPO | DPO | |
|---|---|---|
| Separate reward model | Yes, trained explicitly | No |
| RL loop with online generation | Yes | No — offline, supervised-style |
| Models resident during training | 3–4 | 2 (policy + reference) |
| Implementation complexity | High | Substantially lower |
| Preference data required | Yes | Yes — the same kind |
| Reward hacking surface | An explicit proxy to exploit | Reduced, but preference-data flaws still propagate |
| Uses new on-policy samples | Yes, generated during training | No, fixed dataset |
DPO's practical appeal is that it turns alignment back into something that looks like SFT — a dataset, a loss, a training loop — which brings it within reach of teams that could never stand up a PPO pipeline. What you give up is the online element: PPO scores fresh samples from the current policy, whereas DPO learns from a fixed set of comparisons collected earlier. The exam framing to remember is simply: DPO is a simpler alternative to RLHF that achieves preference alignment without a separate reward model or an RL loop.
SteerLM [NVIDIA-DOC] is NVIDIA's alignment technique and appears in NVIDIA's own trustworthy-AI materials as a method for aligning models with human feedback. Its distinguishing idea is attribute conditioning: rather than collapsing human preference into a single scalar reward, responses are labelled along multiple named attributes — helpfulness, quality, toxicity, humour, creativity and similar — and the model is trained to condition its generation on requested attribute values. The practical consequence is steerability at inference time: instead of one globally-aligned model, you get a model whose behaviour can be requested per call. Know SteerLM by name, know it is NVIDIA's, know it is an alignment approach using labeled attributes rather than a single preference score, and know it avoids the full RL machinery. Its appearance in the NVIDIA stack alongside NeMo Guardrails and the Model Card Generator is 13-02 territory.
RLAIF (reinforcement learning from AI feedback) replaces some or all human labelling with judgements from a strong model given a written constitution or rubric. Its appeal is cost and throughput — preference labelling is the bottleneck in RLHF and human annotators are slow and expensive. Its risk is that you are now aligning to a model's judgement, inheriting that model's biases wholesale, and the biases of LLM judges are well documented enough to take seriously (09-10).
Why the third stage cannot simply be dropped. A reasonable question: if preference data exists, why not just SFT on the chosen responses and ignore the rejected ones? Because doing so discards the contrast, which is where the information is. "A is better than B" tells you something that "A is good" does not — it tells you what to move away from. Preference optimisation, whether by PPO or DPO, uses both sides. SFT on the winners only uses half the dataset and cannot express dispreference at all. That is the cleanest statement of why alignment is a different stage rather than more SFT.
RLHF vs SFT vs DPO vs SteerLM vs prompting
| Dimension | Prompting | SFT | RLHF (PPO) | DPO | SteerLM |
|---|---|---|---|---|---|
| Changes weights | No | Yes | Yes | Yes | Yes |
| Human input required | A written instruction | Written target responses | Pairwise preference labels | Pairwise preference labels | Attribute-labeled responses |
| Cost per labeled item | None | Highest — authoring is slow | Lower — judging is faster than writing | Same as RLHF | Moderate — multi-attribute labelling |
| Separate reward model | No | No | Yes | No | No |
| RL loop | No | No | Yes | No | No |
| Models resident in training | 0 | 1 | 3–4 | 2 | 1–2 |
| Optimises for | Nothing — it instructs | Imitation of a demonstration | Maximising a learned preference score | Preferring chosen over rejected directly | Generating conditioned on requested attributes |
| Inference-time steerability | Full — edit the prompt | None | None | None | Yes — request attribute values |
| Characteristic failure | Inconsistency | Overfitting, artifact inheritance | Reward hacking | Preference-data flaws propagate | Attribute-label quality limits it |
| Prerequisite | A model | A pretrained model | An SFT'd model | An SFT'd model | A model plus attribute-labeled data |
| Position on the ladder | Rung 1 | Above PEFT | Top rung | Top rung, simpler | Top rung, NVIDIA's approach |
The two rows that matter most for exam questions are "separate reward model" and "prerequisite." RLHF has a reward model; DPO does not. Both need an SFT'd policy first. A question that offers "skip SFT and train the reward model directly on base-model outputs" is testing exactly that dependency.
And the confusable inside the confusable: alignment versus capability. These are orthogonal and the exam can test the distinction directly.
| Capability | Alignment | |
|---|---|---|
| Question it answers | Can the model do this? | Will the model do this the way we want? |
| Set by | Pretraining, mostly; model choice | SFT and the alignment stage |
| Raised by | A bigger or better-trained base model | RLHF, DPO, SteerLM |
| Failure looks like | The task is beyond the model at any prompt | The model can do it but is unhelpful, verbose, evasive, or unsafe |
| RLHF's effect | None | This is its entire job |
Worked example: costing a preference-labelling pipeline
A team wants to align a support assistant so it hedges appropriately and refuses out-of-scope legal questions cleanly. They compare authoring demonstrations against collecting preferences. All figures are a constructed scenario, not measurements.
Assumptions:
Annotator loaded cost $40 / hour
Time to author one good response 12 min = 0.20 h
Time to judge one A/B comparison 1.5 min = 0.025 h
Target: 4,000 labeled items either way
Inter-annotator agreement checks: 10% double-labeled
Step 1 — cost of the SFT-only route (authoring).
4,000 items × 0.20 h = 800 annotator-hours
+ 10% double-labeling = 880 hours
880 h × $40/h = $35,200
Step 2 — cost of the preference route (judging).
4,000 comparisons × 0.025 h = 100 annotator-hours
+ 10% double-labeling = 110 hours
110 h × $40/h = $4,400
Step 3 — the per-item ratio.
authoring : judging = 0.20 h : 0.025 h = 8 : 1
cost ratio = $35,200 : $4,400 = 8 : 1
Eight-to-one is the number that explains why preference-based alignment exists at all. For the same annotation budget you get eight times the labeled items — or the same number of items at one-eighth the cost. That is the economic engine of the whole method, and it follows only from the assumption that judging is faster than authoring, which is the assumption the field is built on.
Step 4 — but you still need SFT. The preference route does not replace stage 1; it follows it. So the honest comparison is not "authoring versus judging" but "authoring only" versus "some authoring plus much more judging":
Route A — SFT only:
4,000 authored demonstrations $35,200
Route B — SFT then preference alignment:
1,000 authored demonstrations (0.20 h each)
1,000 × 0.20 × 1.1 × $40 = $8,800
6,000 preference comparisons (0.025 h each)
6,000 × 0.025 × 1.1 × $40 = $6,600
─────────────────────────────────────────────────────────
total $15,400
Route B buys a smaller SFT set and 6,000 preference comparisons for 44% of Route A's annotation cost. Whether that is the better model is an empirical question for the eval set — this arithmetic establishes only that it is affordable, which is the precondition for asking.
Step 5 — add the compute cost asymmetry, which runs the other way. Annotation is not the only budget. Using the memory arithmetic from 11-04, for a 7B model at bf16:
Route A (SFT with LoRA):
1 model resident, adapter training ≈ 14 GB → single GPU
Route B stage 3 with PPO:
policy (trainable, LoRA) ≈ 14 GB
frozen reference policy ≈ 14 GB
reward model (7B, inference only) ≈ 14 GB
value/critic model (if separate) ≈ 14 GB
────────────────────────────────────────────────
total ≈ 56 GB → multi-GPU
plus generation inside the training loop → far slower per step
Step 6 — read the trade honestly. Route B saves annotation money and spends compute and engineering complexity. That is precisely the trade DPO was designed to improve:
Route C — SFT then DPO:
annotation: same as Route B $15,400
training: policy + reference only ≈ 28 GB
no reward model, no RL loop, no generation-in-the-loop
Route C keeps the annotation saving and removes most of the compute and complexity premium. For a team without a dedicated RL infrastructure group, that is usually the defensible plan — and "DPO as a simpler alternative to RLHF" is exactly how the exam frames it.
Step 7 — the number that gates everything. Before spending any of this, check the reward model's agreement with held-out human preferences (Route B) or the internal consistency of the preference set (Route C). If annotators only agree with each other 60% of the time, the preference signal is close to noise and no amount of optimisation extracts a real preference from it. Inter-annotator agreement is 09-03, and it is the gate, not a formality.
Decision table: when RLHF is the right tool
| Situation | Approach | Why |
|---|---|---|
| Output format is wrong | Prompting, then SFT | A demonstration expresses it directly; preference data is overkill |
| Facts are wrong or stale | RAG | No alignment stage touches knowledge freshness — 11-08 |
| The model can do the task but chooses badly among good options | Preference alignment | Exactly what a comparative signal expresses and a demonstration cannot |
| You need better calibrated hedging and refusals | Preference alignment, plus external guardrails | "Better calibrated" is comparative by nature |
| You have preference data and no RL infrastructure | DPO | Same data, no reward model, no RL loop |
| You want behaviour requestable per call | SteerLM-style attribute conditioning | Multi-attribute labels give inference-time steerability [NVIDIA-DOC] |
| You have no SFT'd policy yet | SFT first | The pipeline order is strict; alignment needs a policy worth ranking |
| Annotator agreement is low | Fix the guidelines first | A noisy preference signal aligns the model to noise — 09-03 |
| Human labelling cost is prohibitive | Consider RLAIF, with eyes open | You inherit the judge model's biases — 09-10 |
| The capability is simply absent | A stronger base model | Alignment is orthogonal to capability |
| You need a hard safety boundary | External guardrails, not only alignment | A rail outside the weights survives weight changes — 13-02 |
| Your eval set does not measure the quality in question | Build that measurement first | You cannot align toward an unmeasured target |
The last row is the one most teams skip. RLHF optimises toward a proxy for a preference; if you cannot measure the preference independently, you cannot tell whether the optimisation worked or whether it found a shortcut. The proxy-decoupling problem that 09-02 and 09-06 introduced with perplexity and ROUGE reappears here in its most consequential form, and 11-07 takes it apart.
Why RLHF is on the NCA-GENL exam
RLHF is named directly in the Experimentation domain's own scope statement, which describes that domain as covering how to perform, evaluate, and interpret experiments, including AI model evaluation and the use of human subjects in labeling or reinforcement learning from human feedback. That is as explicit as blueprint coverage gets. The domain is 22% of the exam. Candidate reports independently place RLHF basics in the second tier of reported topic frequency, which means it appears regularly without being the exam's centre of gravity.
The examinable content is narrow and specific, and it favours structure over mechanism:
Question phrasings to expect:
- "Place the stages of RLHF in the correct order." — SFT, reward model, policy optimization. This is the single highest-probability RLHF question form.
- "What is the role of the reward model in RLHF?" — to score responses as a learned proxy for human preference, providing the signal the policy optimises against.
- "What kind of human input does RLHF require?" — comparative preference labels, not written target responses.
- "Which algorithm is classically used for the policy-optimization stage?" — PPO, proximal policy optimization.
- "What is DPO and how does it differ from RLHF?" — direct preference optimization; no separate reward model and no RL loop.
- "Which NVIDIA technique aligns a model using labeled attributes rather than a single reward score?" — SteerLM.
- "What is the purpose of the KL penalty during policy optimization?" — to keep the policy near the SFT reference and limit reward hacking.
- "Does RLHF improve a model's capability?" — no; it aligns behaviour with preferences. Capability is set by pretraining.
Distractor families:
| Distractor | Why it attracts | Why it is wrong |
|---|---|---|
| "Reward model → SFT → PPO" | Puts the distinctive stage first | The reward model needs an SFT policy's outputs to rank; the order is strict |
| "RLHF requires humans to write ideal responses" | Confuses it with SFT | RLHF's supervision is comparative; authoring is stage 1's job, not stage 3's |
| "RLHF teaches the model new facts" | It is a training stage that changes weights | It aligns among achievable outputs; freshness and facts are retrieval's domain |
| "RLHF makes the model more capable" | Aligned models feel much better to use | Alignment ≠ capability; the ceiling is set at pretraining |
| "DPO requires a reward model" | Both use preference data | DPO's whole point is to skip the explicit reward model |
| "The reward model outputs absolute quality on a fixed scale" | It emits a number | It is trained on pairwise ranking; only relative comparisons are meaningful |
| "The KL penalty speeds up training" | It sounds like a regulariser for efficiency | Its purpose is fidelity to the reference policy, limiting drift and hacking |
| "RLHF eliminates hallucination" | Aligned models hedge more | Alignment can encourage abstention behaviour; it is not a grounding mechanism — 09-12 |
| "SteerLM is a guardrails product" | Both are NVIDIA and both concern safe behaviour | SteerLM is an alignment technique using attribute labels; NeMo Guardrails is a runtime rail — 13-02 |
| "RLHF is cheaper than SFT" | Per-label it genuinely is | Per label yes; in total no — three to four models resident plus generation in the loop |
One calibration note. This exam favours NVIDIA-stack answers when two options are technically defensible, and SteerLM is the NVIDIA-branded alignment answer. If a question asks how to align a model with human feedback using NVIDIA technology, SteerLM is the name being fished for.
Common mistakes with RLHF
| Mistake | Symptom | Cause | Fix |
|---|---|---|---|
| Getting the stage order wrong | Wrong on the highest-frequency RLHF question | Memorising the parts without the dependency | SFT → reward model → policy optimization. The RM ranks the SFT policy's outputs |
| Confusing preference labels with demonstrations | Wrong data collected; annotators asked to write when they should compare | The two stages both involve "human data" | Stage 1 authors; stage 2 judges |
| Skipping SFT | Reward model has nothing coherent to rank; optimisation degenerates | Treating RLHF as a standalone method | Always run SFT first |
| Ignoring inter-annotator agreement | Reward model barely beats chance; alignment does nothing | Preference signal is noise | Measure agreement, fix guidelines, re-label — 09-03 |
| Omitting or under-weighting the KL penalty | Policy drifts, output degenerates, reward score climbs | Nothing anchors the policy to the reference | Tune β; monitor KL divergence as a first-class metric |
| Trusting the reward score as the outcome metric | Reward goes up, users unhappy | The reward model is a proxy, and proxies get gamed | Evaluate with independent human or held-out metrics — 11-07 |
| Expecting RLHF to fix knowledge | Confidently wrong answers, now politely phrased | Alignment does not touch facts or freshness | RAG for knowledge — 11-08 |
| Expecting RLHF to raise capability | Costly run, no gain on the hard task | Capability ceiling is pretraining's | Re-baseline on a stronger model |
| Underestimating stage-3 memory | OOM immediately; project stalls | Three to four models resident, plus generation | Compute it first (11-04); consider DPO |
| Treating alignment as a substitute for guardrails | A safety incident survives the alignment stage | Weights-level behaviour is probabilistic, not a boundary | Add runtime rails — 13-02 |
| No baseline eval before alignment | Cannot tell what the stage changed | Same failure as any weight change | Run the pre-change baseline — 11-03 |
| Assuming RLAIF is a free substitute for humans | Model aligns to the judge model's biases | AI feedback carries the judge's prejudices | Sample-audit AI labels against human ones — 09-10 |
What are the three stages of RLHF, in order?
Supervised fine-tuning, then reward model training from human preference labels, then policy optimization. Memorise it in that direction and be able to justify each dependency, because the justification is what distinguishes a memorised answer from an understood one:
| Stage | Input | Output | Why it must come before the next |
|---|---|---|---|
| 1. Supervised fine-tuning | Pretrained model + demonstrations | An SFT policy that follows instructions | Its outputs are the candidates humans will compare; a base model's continuations are not worth ranking |
| 2. Reward model training | Prompts + candidate responses + human preferences | A scalar scorer that predicts human preference | Stage 3 needs a reward signal, and no human can be in the loop at every optimisation step |
| 3. Policy optimization (PPO) | The SFT policy + the reward model | An aligned policy | Terminal stage — it is what actually changes the deployed model's preferences |
The most common wrong ordering puts the reward model first, presumably because it is the stage that sounds most distinctive. Reject it on mechanism: the reward model is trained on comparisons between responses, and the responses come from the SFT policy. Without stage 1 there is nothing to compare.
Also note the two roles the SFT policy plays in stage 3 — it is both the starting point that gets optimised and, as a frozen copy, the reference the KL penalty measures drift against. That dual role is a nice detail to have ready.
What is the difference between RLHF and DPO?
RLHF trains an explicit reward model and then optimises the policy against it with reinforcement learning. DPO optimises the policy directly on the preference pairs with a supervised-style loss, with no reward model and no RL loop. Both consume the same kind of data — pairwise human preferences — and both require an SFT'd model first.
What that buys, concretely:
- Fewer models in memory. PPO keeps the policy, a frozen reference, a reward model, and often a value model. DPO keeps the policy and a reference. Applying the arithmetic from
11-04, that is roughly half the resident footprint for a same-size model. - No generation inside the training loop. PPO must have the policy produce text at every step so the reward model can score it. DPO trains on a fixed dataset, so each step is an ordinary forward and backward pass. This is a large difference in both wall-clock time and implementation surface.
- No explicit proxy to hack. With no reward model, there is no scalar function for the policy to exploit. Preference-data flaws still propagate — if annotators systematically preferred longer answers, DPO will learn that too — so the pathology is reduced, not eliminated.
What you give up: PPO is on-policy, scoring fresh samples from the current policy, so it can respond to the policy's evolving behaviour. DPO learns from comparisons collected earlier against an earlier policy. Whether that matters depends on how far the policy moves.
For the exam, the compact statement is the one the study index uses: the pipeline is SFT → reward model → PPO, and DPO is a simpler alternative that skips the reward model and the RL loop.
Does RLHF make a model more truthful?
Not directly, and treating it as a truthfulness mechanism is a category error worth naming. RLHF optimises for what annotators preferred, and annotators prefer responses that seem correct, well-written, confident, and helpful. Seeming correct and being correct are different properties, and where they diverge the preference signal follows the appearance.
That said, alignment can install two behaviours that reduce visible falsehood, and both are behaviours rather than knowledge:
- Calibrated hedging — expressing uncertainty when uncertain, if annotators consistently preferred hedged answers over confidently wrong ones.
- Abstention — saying "I do not have that information," if annotators preferred honest declines over invented answers.
Both are genuinely valuable and both are exactly the kind of thing preference data expresses well and demonstrations express poorly. Neither makes the model know more.
There is a specific risk running the other way. If annotators reward agreeable, confident, pleasant answers — and humans reliably do — the optimisation can produce a model that is more prone to telling you what you want to hear. That failure has a name, sycophancy, and it is a preference-data problem rather than an optimisation problem, which means the fix is in the annotation guidelines. The hallucination mitigation ladder — grounding via retrieval, citation, constrained decoding, guardrails, human review — is 09-12, and none of its rungs is an alignment stage.
Can a small team run RLHF?
Rarely the full PPO pipeline, and usually they should not try. The blockers are not conceptual, they are logistical, and they come in three kinds.
The data blocker. You need a preference-labelling operation: written guidelines, trained annotators, agreement measurement, adjudication of disagreements, and a pipeline that keeps feeding the process as the policy changes. This is an ongoing programme with people in it, not a dataset you buy once. 09-03 is what good rubric design looks like and it is a serious undertaking.
The compute blocker. Three to four models resident, plus text generation inside the training loop. From the section 4 arithmetic, a 7B alignment run lands around 56 GB before activations, against 14 GB for a LoRA SFT run — and it is far slower per step because of the generation.
The engineering blocker. PPO has more moving parts than any other stage in this module: reward normalisation, advantage estimation, KL coefficient scheduling, and a stability profile that punishes misconfiguration with silent degeneration rather than a clean error.
What a small team can realistically do, in escalating order:
| Option | Feasibility | What it gets you |
|---|---|---|
| Better prompting and a system prompt that encodes preferences | Trivial | Much of the perceived benefit, instantly, reversibly |
| SFT (with LoRA) on curated high-quality demonstrations | Very feasible | Behaviour, format, tone, refusal style — 11-05 |
| DPO on a modest preference set | Feasible | Genuine preference alignment without the RL machinery |
| Use an already-aligned instruct model and adapt lightly | Always available | Someone else's alignment budget, for free |
| Full PPO RLHF | Rarely | The strongest control, at a cost most teams cannot justify |
The fourth row deserves emphasis because it is the answer most teams should take: modern instruct models arrive already aligned, and adapting one with a LoRA SFT run inherits that alignment work for nothing. The blueprint's framing of the associate role — contributing under senior supervision — is consistent with understanding RLHF thoroughly and running the pipeline rarely. Know it cold for the exam; reach for DPO or inherited alignment in practice.
Glossary recap: the terms this lesson introduced
| Term | Definition |
|---|---|
| RLHF | Reinforcement learning from human feedback: SFT → reward model from human preferences → policy optimization |
| Alignment | Making a model's behaviour match human preferences and intentions, as distinct from making it more capable |
| Policy | The language model being optimised; in RL terms it acts by emitting tokens |
| SFT policy / reference policy | The supervised-fine-tuned model; the starting point for optimisation and, frozen, the anchor for the KL penalty |
| Reward model (RM) | A model trained on human preference comparisons to output a scalar score approximating human preference |
| Preference label | A human judgement that one response is better than another; the supervision signal alignment runs on |
| Pairwise ranking loss | The reward model's objective: score the chosen response above the rejected one |
| PPO (proximal policy optimization) | The classical policy-gradient algorithm for RLHF's third stage; constrains how far the policy moves per update |
| KL penalty | A term penalising divergence between the optimised policy and the frozen reference, limiting drift and reward hacking |
| Value / critic model | An auxiliary model estimating expected return, used by some policy-gradient implementations |
| DPO (Direct Preference Optimization) | Preference alignment directly on preference pairs, with no separate reward model and no RL loop |
| SteerLM | NVIDIA's alignment approach: condition generation on labeled attributes rather than a single reward score [NVIDIA-DOC] |
| RLAIF | Reinforcement learning from AI feedback: preference labels produced by a model rather than a human |
| Sycophancy | A model learning to tell users what they want to hear, because annotators preferred agreeable answers |
| On-policy training | Learning from samples generated by the current policy, as PPO does and DPO does not |
Key takeaways on RLHF
- The order is strict and it is the most examinable fact here: SFT → reward model trained from human preference labels → policy optimization (PPO). The reward model ranks the SFT policy's outputs, so SFT cannot be skipped.
- RLHF's supervision is comparative, not demonstrative. Humans judge which of two responses is better rather than authoring the ideal one — roughly an eight-to-one labour advantage in the constructed example, and the economic reason the method exists.
- The reward model is a learned proxy for human preference, trained with a pairwise ranking loss, so its scores are meaningful only in comparison.
- The KL penalty against the frozen SFT policy is essential, not optional. Without it the policy drifts and discovers degenerate outputs that score well and read badly.
- Alignment is orthogonal to capability. RLHF changes which achievable output the model reaches for; it does not raise the ceiling set at pretraining.
- RLHF is expensive: three to four models resident during stage 3 plus generation inside the training loop, which is why simpler alternatives were sought.
- DPO is the simpler alternative — same preference data, no explicit reward model, no RL loop, roughly half the resident footprint.
- SteerLM is NVIDIA's alignment approach
[NVIDIA-DOC], conditioning generation on labeled attributes and giving inference-time steerability rather than one globally-aligned model. - RLHF does not make a model truthful. It optimises for what annotators preferred, which can mean confident and agreeable. It can install hedging and abstention, which are behaviours.
- Most teams should inherit alignment from an already-aligned instruct model and adapt lightly, rather than standing up a PPO pipeline.
Next: reward models, reward hacking, and preference data
There is a hole in everything above, and it is the hole every proxy metric in this course has had. The reward model is not human preference — it is a model of human preference, trained on a finite set of labels by fallible annotators, and the policy is being optimised as hard as possible against it. You already know from perplexity and ROUGE what happens when you optimise a proxy instead of the thing it stands for. Next: 11-07 takes the reward model apart — how preference data is collected and what corrupts it, what reward hacking looks like when it happens, and why a rising reward curve is not evidence that anything got better.