Scale and post-training
Reinforcement learning basics
MDPs, returns, policy gradients, advantages and PPO. The minimum RL needed to read modern LLM post-training papers. Start here for the map.
Supervised learning needs labeled answers. Reinforcement learning (RL) learns from rewards: scalar feedback that may arrive only at the end of a long sequence of decisions. That is the shape of LLM post-training. A whole completion is scored as more or less preferred, correct or safe, and the vocabulary of policies, returns and advantages shows up in every RLHF and reasoning paper.
You do not need a whole textbook to read a PPO or GRPO objective without freezing. You need the core ideas, and this section gives them with language models in mind. Deeper classical RL, such as Atari and robotics, is left to the further reading at the end.
In one sentence: the policy is what you train, the reward is what you measure, and the advantage tells you which samples to reinforce.
Why RL for language models
Preference data and verifiers do not give a correct answer to copy. They give a score for a whole reply. A method that can learn from scores, and assign credit across many tokens, is the only way to optimize that score directly. The concepts below build that method one piece at a time.
Concepts in this section
Read them in order. Each one builds on the one before.
| Step | Concept | What it answers |
|---|---|---|
| 1 | MDPs, returns and values | What are states, actions, rewards and returns? |
| 2 | Policy gradients and advantages | How do you raise the probability of good actions, and why is it noisy? |
| 3 | PPO and the KL leash | How do you keep each update from going too far? |
| 4 | RL for language models | How do the terms map onto tokens and completions? |
Common mistakes
- Reading reward as ground truth. A reward is a proxy. The policy will find the gaps in it. This is reward hacking, the central failure of RL. Examples include verbose waffle that fools a preference model, or sycophantic agreement. Stronger optimizers make hacking more likely, so inspect samples as reward rises.
- Watching reward alone. Plot reward, KL to the reference, entropy and sample length together. Reward alone can hide a collapsing policy.
- Skipping the baseline. Without one, the gradient is noisy and learning is slow.
Key takeaways
- RL learns from rewards in a loop of state, action, next state and reward.
- A return is the discounted sum of future rewards. Advantages compare an action with the average.
- Policy gradients raise the probability of actions in proportion to their advantage. Baselines cut the noise.
- PPO clips the probability ratio, and a KL penalty keeps the policy close to a reference model.
- For LLMs, the policy is the model, tokens are actions and a completion is the episode.
Further learning
David Silver's first lecture is the classic conceptual intro, covering agent, reward and value:

Related
RLHF and preference optimization
How language models learn from human and AI preferences. Supervised fine-tuning, a reward model, a KL-leashed RL step, and DPO as a single-loss alternative. Start here for the map.
RL for reasoning models
How reasoning models learn to think before they answer, using verifiable rewards, GRPO and test-time compute. Start here for the map.
Optimization and gradient descent
How models learn, from loss landscapes and gradient descent to learning rates, mini-batches, momentum and Adam.