Paper notes

InstructGPT: Training Language Models to Follow Instructions with Human Feedback

OpenAI's 2022 InstructGPT paper: supervised fine-tuning on about 13,000 human demonstrations, a reward model trained on human rankings of about 33,000 prompts, then PPO. A 1.3B InstructGPT beat the 175B GPT-3 in labeler evaluations. This breakdown checks the data, loss and results, and their limits.

Published Updated 29 min read

On this page
  1. Why this paper matters
  2. Background: predicting the next token is not following instructions
  3. Overview: three steps and the data size of each
  4. Prompts and labelers: where the data comes from
  5. Step 1: supervised fine-tuning on demonstrations
  6. Step 2: training a reward model from rankings
  7. The loss: one ranking gives several pairwise comparisons
  8. Step 3: PPO and PPO-ptx
  9. What the KL penalty does
  10. Results
  11. Labelers prefer InstructGPT
  12. Truthfulness, toxicity and bias
  13. The alignment tax and PPO-ptx
  14. Generalization and failure cases
  15. Cost: alignment is much cheaper than pretraining
  16. Limits and what came after
  17. What to take from this paper
  18. Further reading
  19. FAQ

Why this paper matters

InstructGPT answers a very practical question: does making a model bigger make it follow instructions better? Ouyang et al. (2022) say no. Pretrained models such as GPT-3 make up facts, write toxic text, or simply ignore the instruction, because their training objective (predict the next token of a web page) is not the same thing as “follow the user’s instructions helpfully and safely”. Their remedy has three steps: supervised fine-tuning (SFT) on about 13,000 human demonstrations; training a reward model (RM) on labelers’ rankings of model outputs; and optimizing the model against the reward model’s scores with PPO. The result is called InstructGPT.

Two results stand out. First, on the authors’ API prompt distribution, labelers preferred the 1.3B-parameter InstructGPT to the 175B GPT-3, which has over 100 times as many parameters. Second, the price is small: the paper reports that the 175B SFT run takes 4.9 petaflop/s-days and PPO-ptx takes 60, against 3,640 for GPT-3 pretraining, so the two together are under 2% of pretraining.

The table puts the paper’s main conclusions, the evidence for each, and the caveats to carry with them side by side. The rest of the article goes through them one by one:

ConclusionEvidence in the paperCaveat
Labelers prefer InstructGPT175B InstructGPT is preferred to 175B GPT-3 in 85 ± 3% of comparisons and to few-shot-prompted GPT-3 in 71 ± 4%; even 1.3B InstructGPT beats 175B GPT-3The judges are about 40 labelers hired for the project, following criteria the researchers wrote
More controllable, fewer fabricationsOn closed-domain tasks (summarization, closed-domain QA) the hallucination rate is 21% against 41% for GPT-3; explicit constraints in the instruction are followed more often”Closed-domain” means the output should not contain information outside the input
More truthfulHuman evaluation on TruthfulQA shows a “small but significant” gainThe introduction says “about twice as often”, the body says “small but significant”, and the acknowledgments say automatic metrics overstated the gain
Slightly less toxic, no less biasedAbout 25% fewer toxic outputs when prompted to be respectful; no significant improvement on Winogender or CrowS-PairsThe advantage disappears without the “respectful” prompt; when asked to write toxic text it is more toxic than GPT-3
Alignment has a “tax”, which can be paid backPlain PPO regresses on SQuAD, DROP, HellaSwag and French-to-English translation; PPO-ptx shrinks the regressions a lotDROP, SQuADv2 and translation stay behind GPT-3
Public NLP instruction data is not enoughPreferred over a FLAN-tuned model in 78 ± 4% of comparisons and over a T0-tuned model in 79 ± 4%The paper’s prompts are mostly open-ended generation; classification and QA together are only about 18%

Background: predicting the next token is not following instructions

Pretraining maximizes the likelihood of web text, so a model gets good at “continuing the text” without necessarily knowing what the user wants done. The paper borrows the framework of Askell et al. (2021) and splits “alignment” into three goals:

  • Helpful: follows instructions, and can also infer intent from few-shot examples or from a pattern such as Q: ...\nA:.
  • Honest: does not fabricate or mislead. A generative model has no readable “belief”, so the paper measures truthfulness instead: how often the model invents information on closed-domain tasks, and its results on TruthfulQA. The paper says this covers only a small part of honesty.
  • Harmless: does not harm people or the environment. The paper uses more concrete proxies: whether a reply is appropriate in a customer-assistant setting, whether it denigrates a protected class, whether it contains sexual or violent content, plus two public benchmarks, RealToxicityPrompts and CrowS-Pairs.

These three goals are prioritized differently in training and in evaluation: during training, labelers put helpfulness to the user first; in the final evaluations, they put truthfulness and harmlessness ahead of helpfulness. Many of the results below should be read with that in mind.

Overview: three steps and the data size of each

The figure puts the three steps and the data sizes the paper reports together:

The three InstructGPT steps and their data sizes Starting from pretrained GPT-3, step 1 fine-tunes on human demonstrations for 12,725 training prompts; step 2 trains a 6B reward model on human rankings of 4 to 9 completions for each of 33,207 training prompts; step 3 uses PPO on 31,144 prompts with no human labels, with the reward model's score minus a KL penalty against the SFT model as the return. The SFT model is both the starting point of the PPO policy and the reference for the KL penalty. The three InstructGPT steps and the data size of each Pretrained GPT-3 1.3B / 6B / 175B three sizes ① Fine-tuning (SFT) Human demonstrations 12,725 training prompts 88.8% written by labelers 16 epochs, cosine LR decay Checkpoint chosen by RM score, not validation loss ② Reward model (RM) Human rankings 33,207 training prompts K = 4–9 answers per prompt Ranking gives C(K,2) pairs Only the 6B RM, 1 epoch (175B RM was unstable) ③ RL with PPO No human labels 31,144 training prompts Reward = RM score − β·KL β=0.02, 256k episodes PPO-ptx adds pretraining gradients, γ=27.8 SFT model: PPO's starting point and the KL reference Prompt counts from Table 6; K, β, γ and epochs from Section 3 and Appendix C.
The three steps and their data sizes. The SFT model from step 1 generated most of the completions that labelers ranked (a smaller share came from PPO policies), and steps 2 and 3 can be iterated: collect new comparison data with the current best policy, then train a new reward model and policy.

The prompt counts come from Table 6 of the paper. The code below adds up the table and checks several statements in the paper’s text (“about 13k”, “about 33k”, “about 31k”, and at most 2,304 comparisons per reward-model batch). Environment: Python 3.14, standard library only:

from math import comb

# Table 6 of the paper: number of prompts per split and prompt source
data = {
    "SFT": {"train": {"labeler": 11295, "customer": 1430},
            "valid": {"labeler": 1550, "customer": 103}},
    "RM": {"train": {"labeler": 6623, "customer": 26584},
           "valid": {"labeler": 3488, "customer": 14399}},
    "PPO": {"train": {"customer": 31144}, "valid": {"customer": 16185}},
}
for name, d in data.items():
    train, valid = sum(d["train"].values()), sum(d["valid"].values())
    share = d["train"].get("labeler", 0) / train
    print(f"{name:3s} train {train:>6,d} (labeler-written {share:5.1%})"
          f"  valid {valid:>6,d}")

# The reward model sees K = 4..9 ranked completions per prompt
for k in (4, 9):
    print(f"K={k}: {comb(k, 2):>2d} comparisons from {k} completions")
n_rm = sum(data["RM"]["train"].values())
print(f"RM comparisons per epoch: {n_rm * comb(4, 2):,d} to "
      f"{n_rm * comb(9, 2):,d}")
print(f"largest batch: 64 prompts x C(9,2) = {64 * comb(9, 2):,d} comparisons")

# Compute from Section 5.1, in petaflop/s-days (1 PF-day = 1e15 x 86,400 FLOPs)
pf_day = 1e15 * 86400
sft_175b, ppo_ptx_175b, gpt3 = 4.9, 60, 3640
print(f"GPT-3 pretraining: {gpt3 * pf_day:.2e} FLOPs; "
      f"175B PPO-ptx: {ppo_ptx_175b * pf_day:.2e} FLOPs")
print(f"PPO-ptx / GPT-3: {ppo_ptx_175b / gpt3:.1%}; "
      f"(SFT + PPO-ptx) / GPT-3: {(sft_175b + ppo_ptx_175b) / gpt3:.1%}")

Output:

SFT train 12,725 (labeler-written 88.8%)  valid  1,653
RM  train 33,207 (labeler-written 19.9%)  valid 17,887
PPO train 31,144 (labeler-written  0.0%)  valid 16,185
K=4:  6 comparisons from 4 completions
K=9: 36 comparisons from 9 completions
RM comparisons per epoch: 199,242 to 1,195,452
largest batch: 64 prompts x C(9,2) = 2,304 comparisons
GPT-3 pretraining: 3.14e+23 FLOPs; 175B PPO-ptx: 5.18e+21 FLOPs
PPO-ptx / GPT-3: 1.6%; (SFT + PPO-ptx) / GPT-3: 1.8%

Three things in these lines are easy to miss behind the summary “13k, 33k, 31k prompts”:

  • 88.8% of the SFT prompts were written by labelers themselves; only 1,430 are customer prompts. Appendix A.3 explains why: at the start of the project, labelers wrote a single instruction plus several few-shot examples, and different combinations of those examples were used to synthesize several training samples from one instruction, so the SFT “count” is larger than the number of independent tasks.
  • The RM and PPO data come mostly from real customer prompts. 80.1% (26,584) of the RM training prompts are customer prompts; all PPO prompts are customer prompts with no human labels, since only the reward model needs to score them.
  • The RM has an order of magnitude more “comparisons” than “prompts”. A prompt with K completions yields (K2)\binom{K}{2} comparisons, so 33,207 prompts correspond to about 200,000 to 1.2 million comparisons (depending on how K is distributed between 4 and 9, which the paper does not give).

Prompts and labelers: where the data comes from

Prompts. The training prompts come mainly from text that users submitted in the OpenAI API Playground to an early InstructGPT model (one fine-tuned only on demonstrations). Playground users were shown a notice that their data could be used for training every time they used it; data from API customers in production was not used. The authors deduplicated heuristically by checking for prompts that share a long common prefix, kept at most 200 prompts per user ID, and split the training, validation and test sets by user ID so that the validation and test sets contain no data from training-set users; the training set was also filtered for personally identifiable information (PII). At the start of the project there were not enough instruction-like prompts, so labelers first wrote three kinds themselves: arbitrary tasks (plain), an instruction with several examples (few-shot), and prompts based on use cases stated in API waitlist applications (user-based). More than 96% of the dataset is English.

Task distribution. Table 1 of the paper gives the share of each use case in the RM data:

Use caseShareUse caseShare
Generation45.6%Rewrite6.6%
Open QA12.4%Summarization4.2%
Brainstorming11.2%Classification3.5%
Chat8.4%Closed QA2.6%
Other3.5%Extract1.9%

Classification and question answering (open QA, closed QA and classification) together are about 18%, and generation and brainstorming together are about 57%. The paper uses these numbers to explain a result that comes later: instruction tuning on public NLP datasets (FLAN, T0) does worse than InstructGPT on this distribution.

Labelers. The paper hired about 40 contractors through Upwork and Scale AI and screened them with a test on four things: agreement with the researchers on flagging sensitive content, agreement with the researchers on ranking outputs, writing demonstrations for sensitive prompts, and self-assessed ability to identify sensitive content for different topics or cultural groups; the soft cutoffs were 75% agreement on the first two and a 6/7 demonstration score. Labelers agree with each other 72.6 ± 1.5% of the time; a separate group of “held-out” labelers, who did not produce any of the production training data and were not screened, agree with each other 77.3 ± 1.3% of the time. For reference, in the summarization work of Stiennon et al. (2020), researchers agreed with each other 73 ± 4% of the time. The paper also notes that, to save cost, most comparisons were labeled by a single contractor.

Step 1: supervised fine-tuning on demonstrations

SFT fine-tunes GPT-3 on the labelers’ demonstrations. The paper’s setup: 16 epochs, cosine learning-rate decay to 10% of the initial value, no warmup, residual dropout 0.2; the 1.3B and 6B models use a learning rate of 9.65e-6 and batch size 32, and the 175B model uses 5.03e-6 and batch size 8.

The part to remember is how the model is selected. As Wu et al. (2021) found, the SFT model overfits on validation loss after 1 epoch, yet training longer improves both the reward-model score and human preference ratings. So the final SFT model is chosen by the reward-model score on the validation set, not by validation loss. Training and validation loss are language-modeling metrics, while SFT is after “what people prefer”, and the two can disagree.

Step 2: training a reward model from rankings

The reward model starts from a model with the final unembedding layer removed; it takes a prompt and a response and outputs a scalar score. The paper uses only a 6B reward model: the 175B RM was unstable to train, which made it a poor initialization for the value function in PPO, and it was also expensive, while the 6B RM was stable over a wide range of learning rates and led to equally strong PPO models. The final RM was initialized from a 6B GPT-3 that had first been fine-tuned on public NLP datasets (ARC, BoolQ, CoQA, DROP, MultiNLI, OpenBookQA, QuAC, RACE, Winogrande); the paper says this was mostly for historical reasons, and that initializing from GPT-3 or from the SFT model gave similar results.

The loss: one ranking gives several pairwise comparisons

To collect data faster, a labeler sees K=4K=4 to 99 completions at once and ranks them, so each prompt yields (K2)\binom{K}{2} pairwise comparisons. The paper follows Stiennon et al.: treat the difference in rewards as the log odds that one response is preferred, and train with cross-entropy (the Bradley–Terry model; see preference optimization). The loss is

loss(θ)=−1(K2) E(x, yw, yl)∼D[log⁡σ(rθ(x,yw)−rθ(x,yl))]\mathrm{loss}(\theta) = -\frac{1}{\binom{K}{2}}\,\mathbb{E}_{(x,\,y_w,\,y_l)\sim D}\Big[\log \sigma\big(r_\theta(x, y_w) - r_\theta(x, y_l)\big)\Big]

where rθ(x,y)r_\theta(x, y) is the reward model’s scalar output for prompt xx and completion yy, ywy_w is the preferred one in a pair, and DD is the human comparison data. There is an easily overlooked engineering detail: the (K2)\binom{K}{2} comparisons from one prompt are highly correlated, and if they are shuffled into independent samples, each completion takes part in K−1K-1 gradient updates and the reward model overfits within a single pass over the data. The paper’s fix is to treat all comparisons from one prompt as a single batch element: each completion goes through the network once, and validation accuracy and log loss are also clearly better. The reward model trains for just 1 epoch, with learning rate 9e-6, cosine decay to 10%, and a batch of 64 prompts (so at most 64×(92)=2,30464\times\binom{9}{2}=2{,}304 comparisons); changing the learning rate by up to 50% made little difference, but more epochs overfit quickly.

The code below works the loss out for a K=4 example with scores I made up. Environment: Python 3.14, PyTorch 2.15 (CPU):

import itertools

import torch
import torch.nn.functional as F


def rm_loss(r):
    """Equation (1) for one prompt. `r` holds the reward model's scores for
    K completions, ordered from best to worst by the labeler."""
    k = len(r)
    diff = r[:, None] - r[None, :]                 # diff[i, j] = r_i - r_j
    winner_first = torch.triu(torch.ones(k, k, dtype=torch.bool), diagonal=1)
    pair_loss = -F.logsigmoid(diff[winner_first])  # C(K, 2) terms
    return pair_loss.mean(), pair_loss


# One prompt, K = 4 completions ranked A > B > C > D (made-up scores).
r = torch.tensor([1.2, 0.4, 0.1, -0.9])
loss, per_pair = rm_loss(r)
pairs = itertools.combinations("ABCD", 2)
for (w, l), v in zip(pairs, per_pair):
    print(f"{w} > {l}: loss {v:.4f}")
print(f"pairs: {len(per_pair)} (= C(4, 2)), prompt loss {loss:.4f}")

# The loss depends only on differences, so a constant shift changes nothing.
print(f"shift all scores by +5: {rm_loss(r + 5)[0]:.4f}")
# Scores that contradict the ranking cost much more.
print(f"reversed ranking: {rm_loss(r.flip(0))[0]:.4f}")
# A model that cannot tell the completions apart pays log 2 per pair.
print(f"all scores equal: {rm_loss(torch.zeros(4))[0]:.4f}"
      f"  (log 2 = {torch.log(torch.tensor(2.0)):.4f})")

# Each completion sits in K - 1 pairs. Scoring pair by pair runs the reward
# model 2 x C(K, 2) times; scoring the K completions once needs only K runs.
k = len(r)
print(f"each completion is in {k - 1} pairs; reward-model runs: "
      f"{k} vs {2 * len(per_pair)}")

Output:

A > B: loss 0.3711
A > C: loss 0.2873
A > D: loss 0.1155
B > C: loss 0.5544
B > D: loss 0.2410
C > D: loss 0.3133
pairs: 6 (= C(4, 2)), prompt loss 0.3138
shift all scores by +5: 0.3138
reversed ranking: 1.4138
all scores equal: 0.6931  (log 2 = 0.6931)
each completion is in 3 pairs; reward-model runs: 4 vs 12

Reading the output:

  • Only differences matter. Adding 5 to every score leaves the loss unchanged, so the absolute value of a reward model’s output means nothing. That is why the paper adds a bias after training so that the labelers’ demonstrations have a mean RM score of 0 before RL starts.
  • A wrong ranking is expensive. With the ranking and the scores in agreement the prompt loss is 0.3138; with the order fully reversed it is 1.4138; with all scores equal it is log⁡2≈0.6931\log 2\approx 0.6931, the “no discrimination at all” baseline.
  • The batch-element trick saves forward passes. Four completions need only four forward passes, against 12 when scoring pair by pair; for K=9 it is 9 against 72.

How well does the reward model learn? The paper ran 5-fold cross-validation: labelers were split into 5 groups, and each time the RM was trained on 4 groups and tested on the held-out group, with 3 random seeds. The reward model predicts the held-out labelers’ preferences with 69.6 ± 0.9% accuracy, only slightly below the 72.4 ± 0.4% it gets on the training labelers’ preferences. Both numbers are at the level of the roughly 73% agreement between labelers, which suggests the reward model can learn about as much as labelers can agree on among themselves; keep this in mind when reading the “preference” results below (this comparison is mine; the paper does not phrase it that way).

Step 3: PPO and PPO-ptx

The RL stage sets up the environment as a “bandit”: a random customer prompt is presented, the policy produces a response, the reward model scores it, and the episode ends. Following Stiennon et al., the paper fine-tunes the SFT model with PPO and adds two design choices:

  1. A per-token KL penalty. At every token, the policy is penalized for drifting from the SFT model, which stops it from exploiting the reward model’s blind spots to score high.
  2. A value function initialized from the reward model. All policy sizes use the same 6B RM and 6B value function, which makes it easier to compare the effect of policy size.

Adding the pretraining gradients gives what the paper calls the PPO-ptx objective:

objective(ϕ)=E(x,y)∼DπϕRL[rθ(x,y)−βlog⁡πϕRL(y∣x)πSFT(y∣x)]+γ Ex∼Dpretrain[log⁡πϕRL(x)]\mathrm{objective}(\phi) = \mathbb{E}_{(x,y)\sim D_{\pi_\phi^{\mathrm{RL}}}}\Big[r_\theta(x,y) - \beta \log\frac{\pi_\phi^{\mathrm{RL}}(y\mid x)}{\pi^{\mathrm{SFT}}(y\mid x)}\Big] + \gamma\,\mathbb{E}_{x\sim D_{\mathrm{pretrain}}}\Big[\log \pi_\phi^{\mathrm{RL}}(x)\Big]

πϕRL\pi_\phi^{\mathrm{RL}} is the policy being learned, πSFT\pi^{\mathrm{SFT}} is the SFT model, and DpretrainD_{\mathrm{pretrain}} is the pretraining distribution; β\beta sets the strength of the KL penalty and γ\gamma the strength of the pretraining term. Plain PPO has γ=0\gamma=0; “InstructGPT” in the paper by default means PPO-ptx. The paper’s hyperparameters: β=0.02\beta=0.02, γ=27.8\gamma=27.8, 256k episodes (about 31k distinct prompts), a batch size of 512 per iteration split into 8 minibatches with one update each, a PPO clip ratio of 0.2, sampling temperature 1, and a value-function learning rate of 9e-6 for the 1.3B and 6B policies and 5e-6 for the 175B policy. The number of pretraining examples is 8 times the number of RL episodes; in each minibatch the PPO gradient and the pretraining gradient are computed one after the other, and the latter is multiplied by γ\gamma and accumulated into the same gradient buffer.

One detail the formula hides: Appendices C.3 and C.4 say that the initial PPO policy, and the reference model used for the KL term, is GPT-3 fine-tuned on the demonstrations for only 2 epochs with 10% pretraining data mixed in, not the 16-epoch SFT baseline of the previous section. The πSFT\pi^{\mathrm{SFT}} in the formula refers to the former.

What the KL penalty does

β\beta controls how far the policy may move from the reference model. For a single prompt, the objective Ey∼π[r(y)]−β KL(π ∥ πSFT)\mathbb{E}_{y\sim\pi}[r(y)] - \beta\,\mathrm{KL}(\pi\,\|\,\pi^{\mathrm{SFT}}) has a closed-form optimum π∗(y)∝πSFT(y) er(y)/β\pi^*(y)\propto \pi^{\mathrm{SFT}}(y)\,e^{r(y)/\beta} (derived as the first step of DPO in preference optimization). The code below works it out on a toy problem with five candidate answers. The numbers are invented and only show the mechanism: the reward model likes the “padded, flattering” answer (the third) more than its true quality deserves.

import numpy as np

# A toy "prompt" with five candidate answers (invented numbers).
names = ["short, correct", "correct, detailed", "padded, flattering",
         "wrong, confident", "refusal"]
p_sft = np.array([0.30, 0.15, 0.05, 0.35, 0.15])   # SFT model probabilities
true = np.array([0.8, 1.0, 0.1, -1.0, -0.5])       # what a careful reader wants
rm = np.array([0.7, 1.0, 1.6, -0.6, -0.9])         # reward model: likes padding

print(f"{'beta':>6s} {'E[rm]':>7s} {'E[true]':>8s} {'KL':>6s}   top answer")
for beta in (None, 2.0, 1.0, 0.5, 0.3, 0.1, 0.03):
    if beta is None:
        p = p_sft                                   # no RL: the SFT policy
    else:
        w = p_sft * np.exp(rm / beta)               # maximizer of Equation (2)
        p = w / w.sum()                             # pi* ~ pi_sft * exp(r/beta)
    kl = float((p * np.log(p / p_sft)).sum())
    label = "SFT" if beta is None else f"{beta:g}"
    print(f"{label:>6s} {p @ rm:7.3f} {p @ true:8.3f} {kl:6.3f}   "
          f"{names[p.argmax()]} ({p.max():.0%})")

Output:

  beta   E[rm]  E[true]     KL   top answer
   SFT   0.095   -0.030  0.000   wrong, confident (35%)
     2   0.423    0.256  0.081   short, correct (37%)
     1   0.699    0.458  0.285   short, correct (40%)
   0.5   1.042    0.567  0.781   padded, flattering (33%)
   0.3   1.293    0.433  1.437   padded, flattering (58%)
   0.1   1.595    0.107  2.937   padded, flattering (99%)
  0.03   1.600    0.100  2.996   padded, flattering (100%)

The reward model’s expected score (E[rm]) rises steadily as β\beta shrinks, but the true quality (E[true]) first rises and then falls: it peaks at β=0.5\beta=0.5 (0.567), and optimizing further puts almost all the probability on the answer the reward model likes best, so the true quality drops back to 0.10, close to the SFT model without RL (−0.03). That is why the KL term exists, and it is the smallest version of the later “reward over-optimization” problem. Real training has no closed form and PPO only approaches the optimum step by step, and β=0.02\beta=0.02 was chosen for the paper’s reward scale, so it cannot be compared directly with the numbers in this toy.

Results

Labelers prefer InstructGPT

The main metric is the labelers’ preference rate on held-out prompts: how often each model’s output is preferred over that of a baseline policy (the paper picks the 175B SFT model, because its performance is in the middle of the pack). The result holds for different prompt sources, including prompts that users submitted to GPT-3 and that were not designed for instruction-following models (PPO-ptx is slightly worse at larger sizes). Head to head:

  • 175B InstructGPT against 175B GPT-3: preferred in 85 ± 3% of comparisons; against GPT-3 with a few-shot prefix (“GPT-3 prompted”): 71 ± 4%.
  • The gains come in layers: GPT-3 is worst, a well-written few-shot prompt gives one step up, supervised fine-tuning on demonstrations another, and PPO on comparison data yet another; adding pretraining updates to PPO makes no large difference to the preference rate.
  • The few-shot prefix itself was “tuned”: two of the authors (initials RL and DA) each spent an hour interacting with GPT-3 to find their two best prefixes, and the one that gave GPT-3 the highest reward-model score on the validation prompts won (DA’s).

Labelers’ ratings on more specific dimensions also favor InstructGPT: it is more appropriate in the customer-assistant setting, follows explicit constraints in the instruction more often (for example “answer in at most two paragraphs”), fails to attempt the right instruction less often, and makes up information less often on closed-domain tasks (a 21% hallucination rate against 41% for GPT-3). “Closed-domain” means tasks where the output should not contain information beyond the input, such as summarization and closed-domain QA.

Held-out labelers and generalization of the reward model. Held-out labelers, who did not produce any of the production training data, rank the models similarly to the training labelers, and InstructGPT is still well ahead of GPT-3, so the model has not merely overfit the taste of its training labelers; the small drop in reward-model accuracy in the 5-fold cross-validation above points the same way.

Public NLP instruction data is not enough. The paper fine-tunes the 175B GPT-3 on FLAN and on T0 (about 1 million examples each; T0 originally has 96 million and FLAN 1.2 million). Both beat the default GPT-3 and match a well-written few-shot prompt, but are worse than the SFT baseline. Against the SFT baseline, InstructGPT wins 73.4 ± 2% of the time, while T0 and FLAN win 26.8 ± 2% and 29.8 ± 2%; head to head, InstructGPT is preferred to them in 79 ± 4% and 78 ± 4% of comparisons. The paper gives two reasons: public datasets favor tasks that are easy to evaluate automatically (classification and QA, only about 18% of the authors’ customer prompts), and they are unlikely to cover the variety of real user input.

Truthfulness, toxicity and bias

  • Truthfulness. The introduction says InstructGPT generates truthful and informative answers on TruthfulQA “about twice as often” as GPT-3, while the body of Section 4.2 says the PPO models are “small but significant” improvements in human evaluations; in the acknowledgments, the authors also thank Owain Evans and Stephanie Lin for pointing out that the automatic TruthfulQA metrics were overstating the gains of the PPO models. Taken together, the safer reading is “an improvement, but not a large one”. The exception is the 1.3B PPO-ptx, which is slightly worse than GPT-3 of the same size. When the prompt tells the model to say “I have no comment” if it is not sure of the answer, the PPO models tend to be “truthful but uninformative” rather than confidently wrong.
  • Toxicity. On RealToxicityPrompts, when explicitly told to be “safe and respectful”, InstructGPT produces about 25% fewer toxic outputs than GPT-3; without that instruction the advantage disappears; when explicitly told to produce toxic output, InstructGPT is more toxic than GPT-3. Human evaluation confirms the pattern. The SFT baseline has the lowest toxicity, but it is the least coherent and the least preferred, and the paper speculates it may be generating very short or degenerate responses.
  • Bias. On modified versions of Winogender and CrowS-Pairs, InstructGPT is not less biased than GPT-3. When told to be respectful, its entropy is lower (that is, it is more biased), meaning it is more certain of its outputs, but the pattern of the bias is not clear.

The alignment tax and PPO-ptx

Default PPO regresses relative to GPT-3 on SQuAD, DROP, HellaSwag and WMT 2015 French-to-English translation, which the paper calls the “alignment tax”: the price of alignment is doing worse on some tasks we still care about. PPO-ptx, with pretraining updates mixed in, reduces the regression on all of these datasets and even beats GPT-3 on HellaSwag, but DROP, SQuADv2 and translation still lag behind. The paper also ran a control: simply raising the KL coefficient lowers the validation reward markedly and never fully recovers performance on DROP and SQuAD, whereas there is a pretraining mix coefficient that reverses the regression on both datasets with only a small drop in validation reward. So PPO-ptx works better than “just turn up the KL coefficient”.

Generalization and failure cases

The paper does not track these behaviors quantitatively and gives only qualitative examples: InstructGPT can summarize code and answer questions about code, and sometimes follows instructions in other languages (though it often replies in English), even though such data is very rare in the fine-tuning distribution; GPT-3 can do these too, but needs more careful prompting and usually does not follow such instructions on its own. The paper therefore suggests the model may have generalized “following instructions” to some extent. It also lists simple mistakes the model still makes: it plays along with instructions that contain a false premise (such as “Why is it important to eat socks after meditating?”), hedges excessively on simple questions, and does worse when an instruction contains several explicit constraints (such as “List 10 movies made in the 1930’s set in France”). The authors suspect the hedging is partly due to their asking labelers to reward “epistemic humility”, which the reward model then learned.

Cost: alignment is much cheaper than pretraining

Section 5.1 gives the compute: 4.9 petaflop/s-days for 175B SFT, 60 for PPO-ptx, and 3,640 for GPT-3 pretraining. The code above converts these to FLOPs: GPT-3 pretraining is about 3.14×10233.14\times10^{23} and 175B PPO-ptx about 5.18×10215.18\times10^{21}, which is 1.6%; SFT plus PPO-ptx is 1.8%. From this the paper concludes that investing more in aligning an existing language model is more cost-effective than training a larger one, at least for its customers’ task distribution. In the paper’s own words, the cost of collecting the data and of the compute for training runs, including experimental runs, is a fraction of what was spent to train GPT-3; the ratios above compare only the training compute of the final 175B models.

Limits and what came after

Who it is aligned to. The paper itself stresses that InstructGPT is aligned to the preferences of a particular group: about 40 contractors, mostly English-speaking and living in the United States or Southeast Asia, whose preferences are shaped by the labeling instructions and by their employment relationship; the instructions written by the researchers; and the uses that OpenAI API customers found valuable. This is not the same as “human values”, and it does not represent all users. Most comparisons have a single labeler, so there is no way to know where the disagreements lie; labelers agree with each other only about 73% of the time.

The model itself. The paper admits the model is neither fully aligned nor fully safe: it still makes up facts, produces biased or toxic output, and produces sexual or violent content when not explicitly asked to. The biggest limitation is that most of the time it follows the user’s instructions even when that would cause real-world harm.

Later work. Only the directions are listed here:

  • DPO folds the reward model and online reinforcement learning into a single loss applied directly to preference pairs; see the DPO breakdown.
  • Constitutional AI replaces part of the human harmlessness labeling with a written set of principles and AI feedback (Bai et al., 2022; explainer: Constitutional AI).
  • Gao et al. (2022) measured systematically how true quality changes when a reward model is over-optimized, a phenomenon of the same kind as the toy example above.
  • On tasks whose answers can be verified, such as math and code, the reward can come from rules instead of a reward model; see reasoning RL.

When OpenAI released ChatGPT in November 2022, it wrote (accessed November 2026) that the model was trained with the same methods as InstructGPT (reinforcement learning from human feedback), with slight differences in the data collection setup, and called ChatGPT a “sibling model” to InstructGPT. That is why this paper is often seen as the method prototype for ChatGPT.

What to take from this paper

  1. “Bigger” does not mean “more obedient”. When the objective is wrong, scale does not fix it; with a 100x gap in parameters, the paper shows that alignment training can bring more improvement than scaling up.
  2. Most of the cost is data and people. About 13k demonstrations, rankings of 33k prompts, 31k unlabeled prompts, and about 40 screened labelers with ongoing communication; compute is a small fraction of pretraining.
  3. A reward model is a proxy for human preference, not preference itself. It predicts human preference with about 70% accuracy, which is close to the agreement among labelers (my comparison); the KL penalty, a careful choice of RM size and iterated data collection all put bounds on this proxy.
  4. Evaluate benefits and side effects together. Preference rate, hallucination rate, toxicity and regressions on public benchmarks (the alignment tax) are different dimensions, and the value of PPO-ptx is that it does not sacrifice the latter for the former.
  5. Every number comes with a caveat. The preference rates are labelers’ judgments on a particular prompt distribution, the TruthfulQA gain is small, and the toxicity and bias results are mixed. All of this is written in the paper, so do not remember only “1.3B beats 175B”.

Further reading

FAQ

What are the three steps of RLHF, and how much data did InstructGPT use?
Step 1 is supervised fine-tuning (SFT) on demonstrations written by labelers, with about 13k training prompts (12,725). Step 2 trains a reward model (RM) on labelers' rankings of 4 to 9 completions per prompt, with about 33k training prompts (33,207); all InstructGPT models share a single 6B reward model. Step 3 uses PPO to maximize the reward model's score while adding a per-token KL penalty against the SFT model, with about 31k training prompts (31,144) and 256k episodes. 'InstructGPT' in the paper usually means the PPO-ptx model, which also mixes pretraining gradients into PPO.
What are the premises behind 'a 1.3B InstructGPT beats the 175B GPT-3'?
It means that, on the distribution of prompts submitted by OpenAI API users, about 40 labelers hired for the paper preferred the outputs of the 1.3B PPO-ptx model to those of the 175B GPT-3. Three premises apply. The criteria come from labeling instructions written by the researchers and measure 'follows the instruction better', not knowledge; the prompts are mostly open-ended generation, with classification and QA together only about 18%; and the architectures are the same, the only difference being that InstructGPT was fine-tuned on human data. It does not show that the 1.3B model knows more than the 175B model, and on TruthfulQA the paper finds the 1.3B PPO-ptx slightly worse than GPT-3 of the same size.
What is PPO-ptx and why is it needed?
Optimizing human preference with PPO alone makes the model regress on public datasets such as SQuAD, DROP, HellaSwag and French-to-English translation, which the paper calls the 'alignment tax'. PPO-ptx adds a log-likelihood term on the pretraining distribution to the PPO objective, with coefficient γ = 27.8, and accumulates the PPO gradient and the pretraining gradient in each minibatch. It largely reduces the regressions and even beats GPT-3 on HellaSwag, but DROP, SQuADv2 and translation still lag behind. The paper also found it more effective than simply raising the KL coefficient.
How are InstructGPT and ChatGPT related?
When OpenAI released ChatGPT in November 2022, it said the model was trained with the same methods as InstructGPT (reinforcement learning from human feedback), with slight differences in the data collection setup. InstructGPT can be seen as the method prototype for ChatGPT; the paper studies following single-turn instructions and does not discuss multi-turn dialogue specifically.
What are the known limitations of InstructGPT's method?
The paper lists several. The preferences come from about 40 mostly English-speaking labelers and most comparisons have a single labeler, so the model is aligned to this group, the researchers and the API customers rather than to 'human values' in general; it still makes up facts, goes along with instructions that have false premises, and hedges excessively on simple questions; and when explicitly asked to write harmful content, it follows the instruction more readily than GPT-3. Later work moves on in these directions: DPO removes the reward model and online RL, Constitutional AI uses AI feedback to reduce human labeling, and Gao et al. studied how reward models behave when over-optimized.