FAQ

LLM training

RLHF datasets: the original recipe and what replaced it

InstructGPT's actual data scale — 13k, 33k, 31k prompts and 40 contractors — and why most teams now use DPO instead of a reward model and PPO.

RLHF is the technique that made instruction-following models usable, and the data scale behind the original result is smaller than most people assume. Understanding that recipe explains why the field moved on from it.

The original three datasets

InstructGPT is the reference implementation, and it used three distinct datasets at three stages. The paper gives the numbers directly: “the SFT dataset contains about 13k training prompts”, “the RM dataset has 33k training prompts”, and “the PPO dataset has 31k training prompts”. The annotation was done by “a team of about 40 contractors”.

That is the whole thing. Roughly seventy-seven thousand prompts across three stages, and a team you could fit in a room. The result was a 175B model preferred to GPT-3 in 85 ± 3% of comparisons, and 71 ± 4% against few-shot GPT-3.

One frequently repeated claim deserves a correction: the famous line that a 1.3B InstructGPT beat the 175B GPT-3 is stated only qualitatively in the paper. No exact win rate is given for that specific comparison — the figure everyone cites plots win rates against the 175B SFT model instead.

A three-step diagram. Step 1: human labelled data plus a pretrained model gives an SFT model. Step 2: pairs of good and bad answers plus a pretrained model gives a reward model (RW). Step 3: PPO, marked 'powered by DeepSpeed', combines a trainable actor model, a frozen reference model, a critic model and a frozen reward model, fed with data generated by the actor, an optional EMA copy of the actor and optional pretraining data.
The InstructGPT recipe as DeepSpeed-Chat implements it. Step 1 needs human-written demonstrations and step 2 needs pairs of good and bad answers; step 3 needs neither, because PPO trains on text the actor model generates itself, scored by the frozen reward model. Human effort goes into the first two datasets. Image: microsoft/DeepSpeed · Apache-2.0 repository · from “DeepSpeed-Chat: Easy, Fast and Affordable RLHF Training of ChatGPT-like Models at All Scales”, arXiv:2308.01320

The three stages, and the data each needs

The pipeline's structure is worth knowing even if you use DPO, because the stages map onto different data-collection problems with different costs.

StageData shapeWho produces it
1. Supervised fine-tuningprompt → demonstration responsehumans write ideal answers — the most expensive per example
2. Reward modelprompt + k ranked completionshumans rank model samples — cheaper, no writing
3. PPO optimisationprompts onlyno new annotation; the reward model scores samples
A grouped bar chart of mean ratings on a 1 to 7 scale on four axes, Overall, Coverage, Coherence and Accuracy, for reference summaries, a human-feedback policy, a supervised-learning policy and a pretrain-only model, with small error bars. The human-feedback bars are the highest on every axis: about 5.8 overall, against about 4.9 for supervised learning and about 5.1 for the reference summaries.
Human ratings of Reddit TL;DR summaries from OpenAI's 2020 summarisation study, the recipe InstructGPT scaled up. The policy trained against a reward model built from human comparisons beats the supervised policy on every axis and is rated above the human-written references overall: ranking data bought something that demonstrations alone did not. Image: openai/summarize-from-feedback · Modified MIT (code and feedback dataset) · from “Learning to summarize from human feedback”, arXiv:2009.01325

Why DPO replaced it for most teams

RLHF as originally formulated has three moving parts you must get right: a reward model that generalises, a PPO loop that is stable, and a KL constraint tuned so the policy does not drift. Each is a source of difficulty, and the reward model is a source of a specific one — reward hacking, where the policy finds inputs the reward model scores highly and humans do not.

Direct Preference Optimisation removes the reward model entirely. The same preference triples optimise the policy directly, with no sampling loop and no learned reward to exploit. The data you collect is identical; the machinery is far simpler.

That is why the current open recipes look the way they do. Tülu 3 runs SFT, then DPO, then RLVR, where the RL reward comes from verifiers rather than a learned preference model. The preference data that would once have trained a reward model now trains the policy directly.

Two panels. Left, RLHF: preference data (a preferred and a rejected response to a prompt about the history of jazz) trains a reward model by maximum likelihood, which labels rewards for an LM policy that samples completions in a reinforcement-learning loop. Right, DPO: the same preference data trains the final LM directly by maximum likelihood.
The same preference data used two ways. RLHF first fits a reward model to the pairs, then runs reinforcement learning against it, sampling and scoring new completions; DPO trains the language model on the pairs directly, as a classification objective. The dataset is identical, which is why switching methods rarely means collecting new data. Image: Figure 1 of the paper · CC BY 4.0 · from Rafailov et al. 2023, “Direct Preference Optimization: Your Language Model is Secretly a Reward Model”, arXiv:2305.18290

When a reward model is still the right choice

Reward models have not disappeared, and there are cases where they remain the better tool.

You want to score many samples cheaply. A reward model is a reusable scorer. Best-of-n sampling at inference, rejection sampling to filter generated training data, ranking candidates in a pipeline — all need a score for an arbitrary completion, which DPO does not give you. Llama 3’s rejection sampling with K typically 10 to 30 candidates per prompt depends on being able to score them.

Online training. If you want the model to learn from its own current samples rather than a fixed dataset, you need something to score those samples as they appear. The online variants of these methods exist for this reason.

A reward you can model but not enumerate. Some objectives are easier to learn from examples than to write down, and sit between the learned-reward and programmatic-verifier cases.

If none of these apply — you have preference pairs and you want a better-behaved model — DPO is simpler and is what the field defaults to.

Table 2 from the UltraFeedback paper: reward-model accuracy in per cent on Anthropic Helpful, OpenAI WebGPT, OpenAI Summarization and Stanford SHP for Moss, Ziya, OASST, SteamSHP, LLaMA2 Helpfulness and three UltraRM variants, with backbone model and an 'Open?' column. UltraRM averages 71.0, the highest of the open models; the closed LLaMA2 Helpfulness model leads on Anthropic Helpful, Summarization and SHP.
Reward models scored on four public preference test sets. UltraRM-UF, trained only on UltraFeedback's AI-ranked pairs, averages 66.8; the full UltraRM, which adds samples from the HH-RLHF, SHP and summarisation training data, reaches 71.0. A reward model is a reusable scorer, but its accuracy follows how close its training pairs are to the comparisons it is asked to judge. Image: OpenBMB/UltraFeedback · MIT repository · from “UltraFeedback: Boosting Language Models with Scaled AI Feedback”, arXiv:2310.01377

What to collect, in practice

The useful conclusion is that the data is largely the same whichever method you pick, so collect it in the most flexible form.

Gather prompts that reflect real use, sample multiple completions from the model you intend to improve, and have those completions ranked. From that single collection you can train a reward model, run DPO on the top-versus-bottom pairs, or extract thumbs-up and thumbs-down judgements for KTO. Collecting only binarised pairs keeps all three open but throws away the extra comparisons a full ranking gives.

And sample on-policy where you can — from the model you are actually tuning. Preferences over another model's outputs teach your model about a distribution it does not produce, which is a large part of why Tülu 3's mix deliberately combines on-policy and off-policy sources.

Each stage consumes a different shape of data, usually less of it than the stage before, so the stage your goal belongs to decides what you collect and how much of it.
A preference pair is not good-versus-bad writing. If the two completions differ in length, format and content at once, the model learns the cheapest difference to detect, which is usually length.
A dense multi-series line chart titled 'DeepSpeed-Chat: Sweep across all ZeRO-2 cases w/ separate LoRA learning rate', plotting reward score from -1.5 to 1.5 against training step from 1 to about 470, with seven overlapping noisy traces that all climb from about -1.0 and plateau near 0.5.
Reward-model score over an RLHF run. The climb is fast and then flat: once the policy has learnt what the reward model rewards, more steps buy nothing, and the ceiling is set by the preference data that reward model was trained on. Image: microsoft/DeepSpeed · Apache-2.0 repository

Questions people ask

How many ranked comparisons do I need?

No framework publishes a figure. InstructGPT's reward model used 33k prompts, and Tülu 3's preference mixes run to a few hundred thousand instances. For a narrow behavioural correction, far fewer is plausible — measure against a held-out set rather than aiming at a number.

Is RLHF the same as alignment?

No. RLHF is one technique for shaping model behaviour toward human-judged quality. Alignment is the broader goal, and encompasses data curation, evaluation, red-teaming, safety training and deployment controls. A model can be RLHF-tuned and still badly aligned for a given use.

Can I do RLHF without any human annotators?

You can substitute a strong model as the judge, which is what UltraFeedback does with GPT-4 ratings, and it works well enough to be standard practice. The limits are the judge's own biases and blind spots, and — if you evaluate with the same judge — a benchmark that measures agreement rather than quality. Keep a human-rated evaluation slice.

Does preference tuning make models worse at anything?

It can. Optimising for human-judged helpfulness tends to increase length and hedging, and can trade away capability on tasks the preference data does not cover. Evaluate the things you are not trying to change — a preference run that improves tone while degrading maths is common and easy to miss.

Stop hunting. Start searching.

Tens of thousands of curated datasets, searchable in plain language — with the licence and size checked before you download anything.

Search Dataset Finder →