Papers · 2022 · Reading: 26 min, plus 8 in closed details.
Paper · NeurIPS 2022 · arXiv 2203.02155

Training language models to follow instructions with human feedback (InstructGPT)

Long Ouyang, Jeff Wu, Xu Jiang, Diogo Almeida, Carroll L. Wainwright, Pamela Mishkin, Chong Zhang, Sandhini Agarwal, Katarina Slama, Alex Ray, John Schulman, Jacob Hilton, Fraser Kelton, Luke Miller, Maddie Simens, Amanda Askell, Peter Welinder, Paul Christiano, Jan Leike, Ryan Lowe
OpenAI (a joint project of the Alignment team; Ryan Lowe and Jan Leike team leads) · March 2022 (arXiv v1, 4 March 2022, the only version)

In one line: Took the 3-stage RLHF recipe of earlier summarization work (SFT -> reward model -> PPO with KL penalty) to general instruction following, adding PPO-ptx to cut the alignment tax; labelers preferred the 1.3B model's outputs over 175B GPT-3's on the API prompt distribution, and the recipe became the ChatGPT-era industry standard.

52.7% against 24.0%
1.3B InstructGPT and 175B GPT-3, each against 175B SFT
the smallest InstructGPT beats GPT-3 with 135 times its parameters · Figure 1
85 ± 3% of the time
175B InstructGPT preferred to 175B GPT-3, head to head
71 ± 4% against GPT-3 given a well-chosen few-shot prompt · §4.1
60 petaflop/s-days
to train 175B PPO-ptx, against 3,640 to pretrain GPT-3
1.6% of the pretraining compute (SFT adds 4.9) · §5.1

How far to trust it: Believe the recipe and the ordering it produced (PPO above SFT above prompted GPT-3 above GPT-3, with tight intervals, held-out labelers agreeing, and the head-to-head numbers consistent with Figure 1). Read the 1.3B-over-175B headline as true for this prompt distribution judged by these 40 labelers, and the truthfulness and toxicity gains as smaller than the text states: about 1.4 to 1.5 times on TruthfulQA by human labels, not twice, and 16 to 20% less toxicity, not 25%. The evidence, point by point.

The idea in one sentence: fine-tune GPT-3 on what people prefer instead of on more internet text, in three steps: imitate labelers' written answers (SFT), learn a reward model from their rankings of model answers, then optimise the model against that reward with PPO while a KL penalty keeps it near the SFT model and mixed-in pretraining gradients (PPO-ptx) keep its benchmark skills; labelers then prefer a 1.3B InstructGPT to the 175B GPT-3 it started from.

Fig. 1, step by step: two kinds of human label, then reinforcement learning against a learned judge

  1. Three training sets, to scale. The training prompts of Table 6 as slabs of 2,000: 12,725 for SFT, 33,207 for the reward model, 31,144 for PPO. Green slabs were written by labelers, blue ones sent by API customers: 89% of the SFT prompts are labeler-written, 20% of the RM prompts, none of PPO's.
  2. Step 1: imitate demonstrations (SFT). Step 1 needs a written answer per prompt: labelers write the response they want, and GPT-3 fine-tuned on these demonstrations for 16 epochs becomes the SFT model. A model fine-tuned on the demonstrations is the starting point and the KL reference of step 3.
  3. Step 2: rank answers, fit a reward model. Step 2 needs only an ordering of 4 to 9 model answers, which is quicker to give and yields up to C(9,2) = 36 comparisons per prompt. A 6B model with a one-number head learns to score the preferred answer higher (Eq. 1); one ranking taken pair by pair is drawn on Alignment, section 3.
  4. Step 3: PPO against the reward model. Step 3 needs no labels at all, only prompts, because the 6B reward model scores every sample: a copy of the SFT model (the policy) answers, the RM scores, PPO raises what scores well. A per-token KL penalty to the SFT model, β = 0.02, pulls the policy back so it cannot drift into answers the RM has never seen.
  5. PPO-ptx: keep the pretraining skills. Every update also takes gradients on GPT-3's own pretraining text, 8 examples per RL episode with weight γ = 27.8, 2,048,000 examples over the 256k episodes. This variant is what the paper calls InstructGPT.
  6. The result. Labelers prefer the 1.3B InstructGPT to 175B SFT 52.7% of the time, but 175B GPT-3 only 24.0%: the model 135 times smaller wins, both measured against the same baseline (Figure 1).

The paper's Figure 2 redrawn as a 3D stage at the paper's scale: one slab is 2,000 training prompts of Table 6; the answer blocks of step 2 (four drawn, up to nine dashed) and the pretraining stack are schematic. The numbers are the paper's: Table 6, §C.4 and Figure 1.

You need: PPO as an algorithm (the clipped ratio, the value function, GAE) is taught on Policy gradients and actor-critic, and PPO for language models with its four models on RL for LLMs; RLHF as practised today, beside DPO and RLVR, is on Alignment: SFT, RLHF, DPO family, RLVR. This page is the paper. New terms: SFT (supervised fine-tuning on demonstrations); RM (reward model: prompt and answer in, one number out); PPO (here, the policy trained against the RM with a per-token KL penalty); PPO-ptx (PPO plus pretraining gradients; what the paper calls InstructGPT); β and γ (the weights of the KL penalty and of the pretraining term); alignment tax (benchmark ability lost by aligning); win rate against 175B SFT (the paper's main metric: how often labelers prefer a model's answer to the 175B SFT model's); held-out labelers (people who produced no training data).

Problem

§1, §2

A language model trained to predict the next token of internet text is trained on the wrong objective for an assistant. The paper's words: "predicting the next token on a webpage from the internet" is different from "follow the user's instructions helpfully and safely", so "the language modeling objective is misaligned" (§1). The symptoms were familiar from GPT-3: it makes up facts, produces biased or toxic text, ignores the instruction, and needs a carefully built few-shot prompt to do a task at all. OpenAI's announcement shows the failure in one line: asked to "Explain the moon landing to a 6 year old in a few sentences", GPT-3 continued with "Explain the theory of gravity to a 6 year old" and three more such instructions, the way a list of exercises on a web page continues; InstructGPT answered (OpenAI blog, archived).

The target is framed, after Askell et al. (2021), as a model that is helpful (helps the user solve their task), honest (does not fabricate or mislead) and harmless (causes no physical, psychological or social harm). Reinforcement learning from human feedback (RLHF) already existed: Christiano et al. (2017) for simulated robots and Atari, then Ziegler et al. (2019) and Stiennon et al. (2020) for stylistic continuation and summarisation (§2). Those were narrow tasks. This paper applies the same method to the open-ended distribution of instructions that real customers sent to the OpenAI API, and asks whether preference fine-tuning can make a model people prefer without losing what the pretrained model could do.

The recipe: three steps

§3.1, Figure 2

The method follows Ziegler et al. and Stiennon et al. step for step and is applied to pretrained GPT-3 at 1.3B, 6B and 175B parameters, all with the GPT-3 architecture (§3.1, Figure 2): the three steps of Fig. 1 at the top, demonstrations, then rankings, then reinforcement learning against the reward model.

Steps 2 and 3 can repeat: compare outputs of the current best policy, train a new RM, train a new policy. In practice "most of our comparison data comes from our supervised policies, with some coming from our PPO policies". Fig. 1 draws the training-set sizes of Table 6 (labeler-written plus customer prompts).

"InstructGPT" in the paper means the third step's best variant, PPO-ptx, which mixes pretraining gradients into the PPO updates (§3.5). Every piece of the recipe can be run, at toy scale, in Run the three steps.

Data and labelers

§3.2 to §3.4, Tables 1, 6, 12; §A, §B

Prompts. Mostly real prompts sent through the OpenAI API Playground to an earlier InstructGPT model (one trained only on demonstrations); customers were told by a recurring notice that their data could train later models, and no production API traffic was used (§3.2). The split into train, validation and test is by customer, so test prompts come from customers absent from training.

How the prompts were cleaned, and how the first ones were written (§3.2, §A.1, §A.2)

Cleaning. The prompts were deduplicated heuristically by long common prefix, capped at 200 per user ID, filtered for personally identifiable information, and split into train, validation and test by user ID (§3.2). The appendix says "roughly 200 per organization" and splits "based on organization IDs" instead (§A.2); the paper does not reconcile the two.

Bootstrapping. The very first InstructGPT model needed instruction-like prompts, which GPT-3's users rarely wrote, so labelers wrote three kinds themselves: plain (any task, kept diverse), few-shot (an instruction plus several query and response pairs; with K pairs they make K training examples, each using the other K - 1 as context) and user-based (prompts matching use cases stated in API waitlist applications, anonymised by a separate labeler) (§A.1). That first model was deployed in beta in early 2021.

Three datasets come from these prompts: about 13k training prompts with demonstrations for SFT (labeler and API), 33k with rankings for the RM (labeler and API), and 31k unlabeled API prompts for PPO (§3.2). The data is over 96% English (§3.3). By the contractors' labels the use cases are mostly generative, not the tasks public NLP benchmarks measure (the Table 1 chart).

The labelers. "About 40 contractors on Upwork and through ScaleAI" (§3.4), chosen by a screening test for sensitivity to "the preferences of different demographic groups" and for spotting potentially harmful output.

The screening test and who the labelers were (§B.1, Table 12)

The screening test measured agreement with the researchers on flagging sensitive speech and on ranking completions, a 1 to 7 rating of their demonstrations on sensitive prompts, and a self-assessment of which groups' sensitive speech they could identify ("for legal reasons, we can't hire contractors based on demographic criteria"), with soft cutoffs of 75% agreement and a 6 of 7 demonstration score (§B.1). They got an onboarding process, detailed per-task instructions (Figure 10 has the evaluation excerpt) and a shared chat room with the researchers. Their demographic survey (Table 12) shows mostly Southeast Asian (52.6%) and white (31.6%) respondents, 22% Filipino, 22% Bangladeshi and 17% American, three quarters under 35.

When the criteria conflict, for example a user asking for something harmful, labelers prioritised helpfulness to the user during training, but in the final evaluations they were asked to prioritise truthfulness and harmlessness, "since this is what we really care about" (§3.4). A separate group of held-out labelers, from the same vendors but not screened, produced no training data and tests whether the models fit only the 40. Agreement is high for such a task: training labelers agree with each other 72.6 ± 1.5% of the time, held-out labelers 77.3 ± 1.3%, against 73 ± 4% between researchers in Stiennon et al.'s summarisation work.

Table 1, RM dataset, as labeled by the contractors. Generation plus brainstorming is 56.8%; classification plus open and closed QA 18.5%; the paper rounds these to 57% and 18% (§4.1). The categories sum to 99.9%.

Step 1: supervised fine-tuning

§3.5, §C.1, Table 11

GPT-3 is fine-tuned on the labeler demonstrations for 16 epochs. The surprising detail: like Wu et al. (2021), "our SFT models overfit on validation loss after 1 epoch; however, we find that training for more epochs helps both the RM score and human preference ratings, despite this overfitting". So the final SFT checkpoint is chosen by reward-model score on the validation prompts, not by loss, because the RM score predicts human preference better (§3.5).

SFT settings (§C.1, Table 11)

Cosine learning-rate decay to 10% of the peak, no warmup, residual dropout 0.2; the learning rate is 9.65e-6 with batch size 32 at 1.3B and 6B, and 5.03e-6 with batch size 8 at 175B, each picked by a geometric search (§C.1). Demonstrations are short: a median of 18 tokens for labeler prompts and 39 for customer prompts (Table 11).

The appendix differs from the main text. The policy that PPO starts from is not this 16-epoch SFT baseline. §C.3 initialises the RLHF models from GPT-3 fine-tuned "for 2 epochs on the demonstration dataset" with "10% pretraining data" mixed in, which E.8 found the only setting that stood out, with learning rates 5e-6, 1.04e-5 and 2.45e-6 for 1.3B, 6B and 175B (§C.3, §E.8). The "SFT" bars in every results figure are the 16-epoch baseline.

Step 2: the reward model

§3.5, Eq. 1, §C.2

The RM takes a prompt and a response and outputs one number. It starts from a language model with the final unembedding layer replaced by a projection to a scalar (§3.5, §C). Following Stiennon et al., it is trained on comparisons with a cross-entropy loss in which the difference in rewards is the log odds that a labeler prefers one response to the other. To collect comparisons faster, labelers rank K = 4 to 9 responses at once, which yields C(K,2) comparisons per prompt:

loss(θ) = -(1 / C(K,2)) · E(x, yw, yl) ~ D [ log σ( rθ(x, yw) - rθ(x, yl) ) ]   (Eq. 1)

with yw the preferred response of the pair. The key implementation detail is how the comparisons are batched. Comparisons from one ranking are highly correlated; shuffled into one dataset as separate examples, each response would take part in K - 1 gradient updates and "a single pass over the dataset caused the reward model to overfit". Instead all C(K,2) comparisons of a prompt go into one batch element, which no longer overfits, improves validation accuracy and log loss, and needs only one RM forward pass per response. One ranking of four answers taken apart into its six pairs, and a reward model fitted to them, is drawn step by step on Alignment, section 3; the widget beside this section runs Eq. 1 on the toy.

Against separate pair examples that is a saving of K - 1 times (K(K - 1) passes against K); the old summary of this page said "K times cheaper". The RM loss does not change if every reward shifts by a constant, so the RM gets a bias that makes the labelers' demonstrations score 0 on average before RL; and only 6B RMs are used, because 175B RM training "could be unstable" and was less suitable as the value function for RL.

RM training details (§C.2; one appendix detail differs from §3.5)
  • One 6B RM serves the PPO runs at every policy size, which also makes the effect of policy size easier to compare (§C.2, §C.4). Larger 175B RMs might reach lower validation loss but trained less stably, and a 175B RM and value function would greatly increase PPO's compute. 6B RMs were stable across a wide range of learning rates and led to equally strong PPO models.
  • Initialisation: §3.5 says the RM starts "from the SFT model"; §C.2 says the final RM "was initialized from a 6B GPT-3 model that was fine-tuned on a variety of public NLP datasets (ARC, BoolQ, CoQA, DROP, MultiNLI, OpenBookQA, QuAC, RACE, and Winogrande)", "mostly for historical reasons", with similar results from GPT-3 or SFT initialisations.
  • A single epoch over the full RM training set at learning rate 9e-6, cosine schedule down to 10%, batch of 64 prompts; changes of up to 50% in the learning rate made little difference, but more epochs "quickly overfit". Ties were dropped, so one batch holds at most 64 × C(9,2) = 2,304 comparisons.
  • Generalisation across labelers (§E.2): the comparison data split into five labeler groups, five RMs trained by five-fold cross validation (with 3 seeds), predict held-out groups' preferences with 69.6 ± 0.9% accuracy against 72.4 ± 0.4% on their own groups.

Preparing the toy models (about a second)...

Live: K answers sampled from the toy SFT model of Run the three steps, ranked by one simulated labeler, scored by the toy RM; every pair's term of Eq. 1 is shown. The cost line counts RM forward passes per prompt.

Step 3: PPO against the reward model, with a KL penalty

§3.5, Eq. 2, §C.4

The environment is a bandit: a random customer prompt, one response, a reward from the RM, and the episode ends. To that reward the paper adds "a per-token KL penalty from the SFT model at each token to mitigate over-optimization of the reward model", and the value function is initialised from the RM. These models are called "PPO". The variant that mixes in pretraining gradients is "PPO-ptx", and it maximises

objective(φ) = E(x,y) ~ πφRL [ rθ(x, y) - β log( πφRL(y | x) / πSFT(y | x) ) ] + γ Ex ~ Dpretrain [ log πφRL(x) ]   (Eq. 2)

β sets the strength of the KL penalty and γ the weight of the pretraining log-likelihood; for PPO, γ = 0. "Unless otherwise specified, in this paper InstructGPT refers to the PPO-ptx models." Fig. 3 follows one episode of the toy through this reward and one update, with and without the pretraining term. What one PPO step does with its four models in general (policy, reference, reward model, value function) is drawn on Alignment, section 4; this figure is what InstructGPT adds to it: the per-token pull towards the SFT model, and the pretraining gradient.

Fig. 3, step by step: one episode of the toy

  1. The policy writes an answer. Prompt "count to three"; the toy PPO policy samples "sure one two three <end>" word by word, with probabilities 0.987 for "sure", then 1.000, 0.997, 1.000 and 0.997 (the coloured bars). This is the best answer the toy labelers' rule allows (true score 3.5).
  2. The SFT model reads the same words: the KL penalty. Green bars: the frozen SFT model gives "sure" only 0.417, the other words 0.961 to 1.000. Each word is charged -β log(π/πSFT) (β = 0.3 in the toy's units): -0.26 for "sure", which the policy now says far more often than SFT did, and almost nothing elsewhere (red bars in front).
  3. The reward model scores the whole answer. Only now does the RM see the response: rθ(x, y) = +1.25. Everything the policy learns about quality comes through this one number.
  4. Total reward, value and advantage. Reward = RM score plus the penalties = +0.97. With no discount each word's return is the reward from it to the end; a value table started from the RM (in the paper a 6B network started from the RM) predicts it, and the advantage is the surprise, whitened over the batch: +0.20, +0.50, +0.51, +0.50, +0.14 (blue bars).
  5. The update, and what PPO has cost. PPO raises words with a positive advantage, clipped so no ratio moves past 0.8 to 1.2 in one batch; one illustrative step on this episode alone barely moves them ("sure" 0.987 to 0.988, dashed). The plinth on the left is the cost: on 40 windows of pretraining text (8 per word) this policy's loss is 4.44 nats per word against the SFT model's 1.57, and PPO's step leaves it at 4.44.

Real numbers from the toy of Run the three steps: the policy is the toy PPO (or PPO-ptx) model after 500 updates, the reference is the toy SFT model, β = 0.3 and γ = 0.1 in the toy's units (the paper's 0.02 and 27.8 are in its own); episode 0 of a fixed seed, one illustrative plain gradient step of size 0.5 (not the toy's Adam). Bars are probabilities, to scale.

Every PPO setting (§C.4)

Training settings (§C.4): policies start from the 2-epoch SFT model with 10% pretraining mix, which also serves as the KL reference, with β = 0.02; 256k episodes over about 31k unique prompts; batches of 512 episodes split into 8 minibatches of 64, one inner epoch; constant learning rate after a 10-iteration warmup from a tenth of the peak; an exponential moving average of the weights with decay 0.992; no discount in the generalised advantage estimate; clip ratio 0.2; sampling temperature 1. The value function's learning rate is 9e-6 for the 1.3B and 6B policies and 5e-6 for 175B. For PPO-ptx, each minibatch computes the PPO gradient and a pretraining gradient in consecutive steps and accumulates both, with γ = 27.8 and 8 times as many pretraining examples as RL episodes, drawn from GPT-3's own pretraining data.

set β = 0, so nothing holds the policy near the SFT model. Training raises the reward model's score. What happens to the score the labelers would actually give?

Answer the prediction first. The toy with no KL penalty: the reward model's score keeps climbing while what the labelers want collapses.

Baselines and evaluation

§3.5 Baselines, §3.6, §C.5

Every model is judged against 175B SFT by labelers, on held-out prompts from customers absent from training, plus Likert ratings, metadata labels and public NLP datasets. Baselines: GPT-3 itself; GPT-3 (prompted), with a few-shot prefix that puts it in an instruction-following mode; SFT; and 175B GPT-3 fine-tuned on FLAN and on T0 (the T0++ variant), public NLP task collections with natural-language instructions, about 1 million examples each (§3.5).

How the baselines were built (§3.5, §C.5)

The few-shot prefix came from a prefix-finding competition: authors RL and DA each spent an hour with GPT-3 on their two best prefixes, and the winner was the one with the highest RM score on the validation prompts, "DA won". The FLAN and T0 checkpoints were again picked by RM score (§3.5). T0's 96M datapoints were subsampled to 1 million to match FLAN's 1.2M; the chosen checkpoints were at 896k examples for both (§C.5).

How the models were evaluated (§3.6)

Evaluation (§3.6). Helpfulness is labeler preference: for each model, how often its output is preferred to the 175B SFT model's on held-out prompts from customers absent from training, plus a 1 to 7 Likert rating and the metadata of Table 3 (fails to follow the instruction, inappropriate for a customer assistant, hallucination, satisfies the constraint, sexual or violent content, and more). Because prompts written for InstructGPT may disadvantage GPT-3, prompts submitted to GPT-3 models are evaluated too. Honesty cannot be measured in a black box, so the paper measures truthfulness: made-up information on closed-domain tasks, and TruthfulQA, which "only captures a small part of what is actually meant by truthfulness". Harm is measured through proxies (inappropriate for a customer assistant, denigrates a protected class, sexual or violent content) after an early "potentially harmful" label was dropped as too speculative, plus RealToxicityPrompts, Winogender and CrowS-Pairs; zero-shot public NLP tasks (question answering, reading comprehension, summarisation) measure capability. Samples on all sampling-based NLP tasks are released.

Results on the API distribution

§4.1, Figures 1, 3 to 5
labelers compare outputs of a 1.3B InstructGPT model and of the 175B GPT-3 it is fine-tuned from (135 times larger). Who wins?

Across sizes the ordering is the same: GPT-3 worst, then a well-crafted few-shot prompt, then SFT, then PPO; "adding updates on the pretraining mix during PPO does not lead to large changes in labeler preference" (§4.1). Directly compared, 175B InstructGPT outputs are preferred to 175B GPT-3 outputs 85 ± 3% of the time and to few-shot GPT-3 71 ± 4%. On prompts submitted to GPT-3 instead, the results "do not change significantly", though PPO-ptx does slightly worse at larger sizes (Figure 3).

Held-out labelers agree (Figure 3, top row): by their judgments every InstructGPT model still greatly outperforms the GPT-3 baselines, so the models are not "simply overfitting to the preferences of our training labelers"; the RM cross-validation above points the same way (§4.1).

Answer the prediction first. Every InstructGPT size sits above every GPT-3 size.

Figure 1 decoded from the paper's vector figure (exact to the SVG's coordinates; error bars are 95% intervals): win rate against 175B SFT on held-out InstructGPT-distribution prompts, training labelers. Hover or tap a point for its value.

More concrete axes (Figure 4, pooled over sizes): compared with GPT-3, InstructGPT outputs are more appropriate for a customer assistant, follow explicit constraints in the instruction more often ("Write your answer in 2 paragraphs or less"), attempt the correct instruction more often and make up facts on closed-domain tasks less often. The other metadata categories were too rare to show significant differences.

Figure 4 decoded: share of outputs with each label, all sizes pooled, 95% intervals. Its hallucination rates (GPT 44.8%, PPO 21.6%, PPO-ptx 15.6%) are not the text's "21% vs. 41%", and the per-size Figure 30 puts GPT at 47 to 62% at every size, above the pooled value; the checks show both.

FLAN and T0 are not enough (Figure 5): fine-tuned on public NLP tasks, 175B GPT-3 does better than plain GPT-3 and about as well as prompted GPT-3, but worse than SFT; head to head, 175B InstructGPT is preferred to the FLAN model 78 ± 4% and to the T0 model 79 ± 4% of the time (§4.1). Two reasons are given: public datasets favour tasks easy to score automatically (classification and QA are about 18% of API use, open-ended generation and brainstorming about 57%), and they lack input diversity. The paper still expects the broadest model to combine both kinds of data.

The same comparison as §1 prints it

In §1 the comparison appears as win rates against "our baseline": 73.4 ± 2% for InstructGPT, 26.8 ± 2% for T0 and 29.8 ± 2% for FLAN. The 73.4% does not match Figure 1's 66.0% for 175B PPO-ptx (see How much to believe).

Results on public NLP datasets

§4.2, Figures 6, 7, 32, 39, Table 14

Truthfulness (Figure 6): on TruthfulQA, judged by humans, the PPO models are "small but significant" improvements in truthful and informative answers, by default, without being told to tell the truth (§4.2). The exception is the 1.3B PPO-ptx model, slightly worse than GPT-3 of the same size. The abstract's "about twice as often" does not match these human-labelled bars: at 175B with the QA prompt, truthful and informative is 29.5% for PPO-ptx against 19.8% for GPT-3, 1.5 times; twice holds only on the automatic metric of Table 14 (0.689 against 0.251), which the acknowledgements say was "overstating the gains of our PPO models" (Acknowledgements).

TruthfulQA: the non-adversarial questions and the "I have no comment" prompt

On the questions not adversarially selected against GPT-3, the PPO models stay significantly better, by a couple of points less. With an "Instruction+QA" prompt that says to answer "I have no comment" when unsure (after Lin et al.), the PPO models "err on the side of being truthful and uninformative rather than confidently saying a falsehood", which GPT-3 does less well (§4.2).

Figure 6 decoded: grey bars truthful, coloured bars truthful and informative, three sizes per model (1.3B, 6B, 175B).

Toxicity, a little; bias, not at all (§4.2). Told to be respectful, InstructGPT is less toxic than GPT-3 on RealToxicityPrompts, by 16% (Perspective API) to 20% (labelers) at 175B (Figure 7), not the "about 25%" of the text; with no instruction the advantage disappears, and told to be toxic it is "much more toxic than those from GPT-3". It is not less biased on Winogender or CrowS-Pairs.

Toxicity and bias, in detail (§4.2, §D, §E.5, §E.10)

The full curves by prompt toxicity are in Figure 39. Prompts were sampled uniformly by prompt toxicity rather than in the dataset's standard way, so absolute toxicity is inflated. Every model is rated less toxic than the prompt would lead one to expect; SFT is the least toxic but also the least continuous and least preferred, which "could indicate that the model generates very short or degenerate responses". By size, Table 14 gives 12 to 16% less toxicity, again below the text's "about 25%". On Winogender and CrowS-Pairs, measured as the entropy of the choice between the two sentences of each pair (maximum entropy means no preference), InstructGPT is not less biased than GPT-3; PPO-ptx is about as biased, and told to be respectful it has lower entropy, so more bias: "the instructed models are more certain of their outputs regardless of whether or not their outputs exhibit stereotypical behavior" (Figure 32).

The alignment tax, and PPO-ptx

§4.2, §E.6, §E.7, Figures 28, 29, 33 to 36

Trained with plain PPO on the API distribution, the model gets worse on several public datasets than GPT-3: SQuAD, DROP, HellaSwag and WMT 2015 French to English. The paper calls this an alignment tax and wants it gone "because it incentivizes the use of models that are unaligned but more capable on these tasks" (§4.2). Adding pretraining updates to PPO (PPO-ptx) mitigates the regressions on all datasets and even surpasses GPT-3 on HellaSwag (175B zero-shot 0.807 against 0.781), while still lagging on DROP, SQuAD v2 and translation (Figure 29, Table 14).

PPO has cost the model points on SQuAD v2 and DROP. Two fixes are on the table: make the KL penalty much stronger, or mix pretraining gradients into PPO. Which one restores the benchmarks without wrecking the reward?
More ablations: KL with the mix, episodes, ratios, batch sizes, learning rates (§E.6 to §E.11)

The KL coefficient still has to be tuned with the mix in: Likert scores are poor at β = 0 and at β = 2, best "around 0.01 and 0.02" (§E.7). Other ablations (§E.6, §E.11): training 512k episodes instead of 256k (three seeds, 1.3B) erodes DROP and SQuAD v2 back below GPT-3; a pretraining ratio of 4 let the pretraining loss rise during training, 32 gave better Likert scores but took a few times longer, and 8 (twice the time of PPO alone) was the middle ground; batch size 512 was best among 64 to 1,024, and minibatch 32 slightly better than the 64 used for GPU utilisation. Learning rates were scanned from 2.55e-6 to 2.55e-5 at 1.3B and 6B, where every PPO run without the mix above 8.05e-6 diverged, and only 2.55e-6 and 3.74e-6 at 175B; the final checkpoints are the ones with the highest Likert scores (§E.9).

Answer the prediction first. Switch between the two sweeps: only one brings DROP and SQuAD v2 back to the dashed GPT-3 lines.

Qualitative results: generalisation, and simple mistakes

§4.3, Figures 8, 9

Non-English languages and code are a tiny minority of the fine-tuning data, yet 175B PPO-ptx follows instructions in other languages and answers questions about code, where GPT-3 needs careful prompting (Figure 8, §4.3); it often answers in English, and none of this is measured quantitatively.

The two examples of Figure 8

In Figure 8, asked in French for a short story about a frog travelling back in time to ancient Greece, GPT-3 writes more French story instructions, InstructGPT writes the story; asked what a list does in a binomial-coefficient function, GPT-3 produces a multiple-choice question and InstructGPT an answer, though one the caption says "isn't quite correct". The prompts are cherry-picked; the outputs are not (§4.3).

It still makes simple mistakes (Figure 9, §4.3): it accepts false premises ("Why is it important to eat socks after meditating?" gets a list of theories); it hedges on simple questions (what happens to a pumpkin hit by a cannonball gets "there is no way to accurately predict"); and it degrades when an instruction has several explicit constraints ("list 10 movies made in the 1930's set in France") or constraints hard for language models (a summary in a given number of sentences). The authors suspect the hedging comes from instructing labelers to reward epistemic humility, which the RM then picks up, and the false premises from how few such prompts were in training; adversarial data collection should reduce both.

Discussion: lessons, and who the model is aligned to

§5.1 to §5.5

The paper draws four lessons (§5.1): alignment is cheap next to pretraining (60 petaflop/s-days for 175B PPO-ptx against 3,640 for GPT-3, and more useful than a 100 times larger model); instruction following generalises to settings nobody supervised; most regressions can be mitigated, and a technique with a high tax "might not see adoption"; and the methods now work on a production system, not only on synthetic domains.

The four lessons in the paper's terms (§5.1)

(§5.1) (1) 175B SFT took 4.9 petaflop/s-days on top of the 60 for PPO-ptx, and the paper concludes "right now increasing investments in alignment of existing language models is more cost-effective than training larger models", at least for this task distribution; (2) generalisation matters because supervising every task is prohibitively expensive; (3) so RLHF looks like a low-tax method. The approach is iterative, aligning today's systems for a clear feedback loop, and does not face problems that arise only with superhuman systems; RLHF is a building block of several proposals for those (and was central to summarising books, Wu et al. 2021).

Who are we aligning to? (§5.2) Not "human values" in the abstract, but a chain of specific people: the training labelers (mostly English-speaking, in the United States or Southeast Asia, hired via Upwork or Scale AI, agreeing with each other on about 73% of comparisons); the researchers, who wrote the instructions and answered edge cases in the chat room; the API customers whose prompts make up the data, who may not have their end users' well-being in mind and whose prompts the labelers see without context; and a customer base drawn from a waitlist seeded with OpenAI employees' networks. The paper says it is "impossible that one can train a system that is aligned to everyone's preferences at once" and floats models conditioned on, or easily fine-tuned to, different groups' preferences.

Limitations, open questions and broader impacts (§5.3 to §5.5)
  • Method (§5.3): about 40 contractors are not representative of everyone affected; most comparisons were labeled by one contractor for cost reasons, so disagreement is invisible; aligning to the average labeler may be wrong when a minority group is most affected.
  • Models (§5.3): neither fully aligned nor safe; the greatest limitation is that they follow the user's instruction even when that could cause harm (told to be maximally biased, more toxic than GPT-3 of the same size).
  • Open questions (§5.4): adversarial data collection; filtering the pretraining data, including the ptx mix (which may reintroduce undesirable behaviours present in pretraining data); WebGPT-style truthfulness; training refusals of harmful instructions (planned); control codes and modified sampling; other algorithms such as expert iteration, behaviour cloning on the best comparisons, constrained optimisation; feedback richer than comparisons (edits, critiques); and principled answers to what to align to (Gabriel, 2020).
  • Broader impacts (§5.5): better instruction following also makes misuse easier; high-stakes domains (medical diagnosis, credit, employment, housing, political advertising, law enforcement) need great care or no deployment; open-sourcing makes harmful uses hard to limit while restriction to a few organisations excludes most people; an API allows use-case restriction, monitoring, revoking access and rate limiting, at the cost of transparency and centralisation.

How much of this to believe

What holds up. The central comparison is large against its noise: 85 ± 3% and 71 ± 4% head to head, and Figure 1's gaps between PPO and GPT-3 are several times the 95% intervals at every size. The numbers are internally consistent where they can be checked: Figure 1's win rates against SFT, combined through Bradley-Terry, reproduce both printed head-to-heads within their intervals, independently. Test prompts come from customers absent from training, held-out labelers who wrote no training data give the same ordering (Figure 3), and the authors evaluate on GPT-3's own prompt distribution as well, a check that counts in their favour. Later pipelines found the same direction with their own labelers and prompts (Bai et al.'s RLHF models, Llama 2's PPO and rejection-sampling stages; beyond the paper, Then and now).

What is weaker than it looks.

  • The judges and the trainers are the same people. The main metric is the preference of the 40 training labelers, the people whose demonstrations and rankings trained the models, using instructions written by the authors; the held-out labelers are from the same vendors. The evaluation prompts are the authors' own distribution, built to suit InstructGPT (§3.6 says so).
  • The 1.3B over 175B headline is a comparison through a common baseline, 52.7% against 24.0% win rates against 175B SFT; no direct comparison is reported.
  • Model selection used the evaluation's own currency. SFT and FLAN/T0 checkpoints were chosen by RM score, and the final PPO checkpoints by highest Likert score (§E.9), without saying on which prompts. The baselines got less tuning: GPT-3's few-shot prefix came from two authors spending an hour each.
  • Single runs. Every main model is one training run; the error bars are over prompts and labels, not over seeds. Only the 512k-episode ablation reports three seeds.
  • Three secondary claims are larger in the text than in the figures: "about twice" as truthful is 1.4 to 1.5 times by human labels (twice only on an automatic metric the authors say overstated the gains); "about 25%" less toxic is 16 to 20% in every printed comparison; "21% vs. 41%" hallucination matches neither Figure 4 (45% against 22% for PPO) nor Figure 30, and the two figures cannot both be right. The 73.4% win rate of §1 does not match Figure 1's 66.0%.
  • The appendix differs from the main text on the RM's initialisation (SFT in §3.5, an NLP-fine-tuned GPT-3 in §C.2), on what PPO starts from (the 2-epoch, 10%-ptx SFT of §C.3, not the SFT baseline) and on the prompt cap (per user in §3.2, per organisation in §A.2). Table 14 prints identical rows for CNN/DM and TLDR, a copy error.
  • Bias and harm. No improvement on Winogender or CrowS-Pairs, and the models are more toxic than GPT-3 when asked to be; the authors say both plainly.

Verdict. Believe the recipe and the ordering: on this distribution, judged by people like the ones who trained it, RLHF beats SFT, which beats prompting, by margins far beyond the noise, and the PPO-ptx trick does remove most of the benchmark regressions. Treat "1.3B beats 175B" as a statement about this prompt distribution and these judges, not about capability, and discount the truthfulness and toxicity headlines to what the figures show.

What it takes to use this

  • Code and data: none released. The repository holds the model card, the models' samples on the public NLP benchmarks and links to the labeling instructions; no licence file, last updated December 2022. Huang et al. list over 20 implementation details needed to reproduce OpenAI's RLHF results at all (arXiv 2403.17031); open implementations are in the dated block below.
  • People: the expensive part. About 13k demonstrations, 33k ranked prompts (4 to 9 answers each), 40 screened contractors in close contact with the researchers for months, and a separate group for evaluation.
  • Compute: small next to pretraining (4.9 and 60 petaflop/s-days at 175B), but PPO runs four models at once (policy, reference, a 6B RM, a 6B value function), and the ptx mix doubles PPO's training time (§E.11).
  • What worked: every policy size, with one 6B RM; β around 0.01 to 0.02; γ = 27.8 at every size; 256k episodes (more hurt). What did not: 175B RMs (unstable), PPO without the mix at learning rates above 8.05e-6 (diverged), raising β to fix the tax.
  • When it pays off: when the target behaviour is easier to judge than to demonstrate and a good reward model can be trained. Today most teams with only preference pairs use DPO or a relative instead, and teams with checkable answers use rule-based rewards (Then and now).
Open implementations (checked 3 October 2026)

TRL keeps its PPOTrainer under trl.experimental.ppo (docs), and OpenRLHF (Apache-2.0) offers PPO, REINFORCE++, GRPO and RLOO. The current framework list (verl, OpenRLHF, TRL and others) is kept on Alignment: SFT, RLHF, DPO family, RLVR.

Why it matters (beyond the paper)

  • It became ChatGPT. OpenAI's announcement of 30 November 2022 calls ChatGPT "a sibling model to InstructGPT", trained with RLHF "using the same methods as InstructGPT, but with slight differences in the data collection setup": dialogue demonstrations, rankings of alternative completions, PPO, several iterations (OpenAI, archived). InstructGPT itself had replaced GPT-3 as "the default language models on our API" in January 2022 (OpenAI blog, archived).
  • SFT, then a reward model, then RL became the default pipeline. GPT-4 "was then fine-tuned using Reinforcement Learning from Human Feedback" (GPT-4 report); Gemini applies an RLHF stage with a trained RM (Gemini report); Anthropic's assistants are trained with RLHF and then RL from AI feedback (Bai et al. 2022, Constitutional AI); Llama 2 uses PPO and rejection sampling against two reward models (Llama 2). A 2023 survey calls RLHF "the central method used to finetune state-of-the-art large language models" (Casper et al.).
  • It made alignment an engineering cost with a name. The "alignment tax", and the argument that a high-tax technique will not be adopted, framed the next years of work; Bai et al. found the tax only below about 10B parameters and "alignment bonuses" above.
  • Its "aligned to whom?" had one later answer in RL from AI feedback, which reduces the dependence on a labeler pool (Constitutional AI).
  • Later work defines itself against this pipeline: DPO removes the RM and RL (DPO); GRPO removes the value function (DeepSeekMath); RLVR and rule-based rewards remove the learned RM for checkable tasks (DeepSeek-R1). The pathologies documented here, over-optimisation held in check by the KL penalty and hedging learned from the RM, grew into the reward-hacking and sycophancy literature (Gao et al. 2022; Sharma et al. 2023). The step-by-step history is in Then and now.

Connections

  • GPT-3 (2020-05): the base models and architecture; InstructGPT is GPT-3 plus human-feedback fine-tuning.
  • Constitutional AI (2022-12): replaces human harmlessness labels with AI feedback (RLAIF) on top of the same RLHF skeleton.
  • DPO (2023-05): collapses the RM and PPO stages of this pipeline into a single classification loss.
  • DeepSeekMath / GRPO (2024-02) and DeepSeek-R1 (2025-01): the modern RL-for-reasoning line; GRPO removes the value function this paper initialised from the RM, and RLVR replaces the learned RM with verifiable rewards.
  • Llama 3 (2024-07), OLMo 2 (2025-01): open production pipelines built on this SFT, preference-tuning and RL template.
  • Topics: llm-training-and-post-training, rl.