The mechanics that make PPO fine-tuning work
The clean three-step story of InstructGPT (2022) hides a layer of engineering decisions that had to be gotten right for reinforcement learning to actually work: how a single prompt-response exchange gets framed as an episode, how advantages get estimated, how far the policy is allowed to drift from where it started.
The per-token KL penalty anchors everything else here, the mechanism that keeps these other choices from letting the policy run away from the SFT model it began as.
Beyond the high-level three-step story, InstructGPT's PPO stage depends on a specific set of engineering choices, and this theme collects them. The bandit environment formulation treats each fine-tuning episode as a single prompt-response-reward exchange rather than a multi-step interaction. The value function, a critic network initialized from the trained reward model's own weights, and generalized advantage estimation, applied here without discounting, together supply the advantage signal PPO needs. K-choose-2 batching is a specific reward-model training trick that places all pairwise comparisons from one ranked set of outputs into a single batch element, avoiding the overfitting that treating correlated comparisons as independent shuffled data would cause. PPO without pretraining mix is the ablation variant that maximizes reward-model score plus a KL penalty alone, while PPO-ptx mixes in gradients from the pretraining language-modeling loss to counteract regressions on public NLP tasks, and the KL penalty itself, subtracted per generated token, keeps the policy from drifting too far from the SFT model it started from. These are the load-bearing technical details, not the narrative, of how RLHF was actually made to work.