Short answer: use GRPO when you can score answers automatically (maths, code, JSON, tool results), and PPO when your reward comes from a learned reward model and you can afford a second model the size of your policy. GRPO vs PPO is mostly a question of what each method uses as a baseline. PPO (Proximal Policy Optimization) trains a separate value model, often called the critic, to judge how good each response is expected to be. GRPO (Group Relative Policy Optimization) drops that critic. It samples a group of answers to the same prompt and scores each one against the group's average. That makes GRPO simpler and lighter on memory, which is why it became the default for training reasoning models on tasks with checkable answers, such as maths and code. PPO is still a strong choice when rewards come from a learned reward model and you can afford the extra model. If you are choosing a tool to run either method locally, start with our fine tune an LLM locally guide; Unsloth and TRL both ship GRPO trainers.
GRPO vs PPO at a glance
| Item | PPO | GRPO |
|---|---|---|
| Introduced | 2017, for general reinforcement learning | 2024, in the DeepSeekMath paper |
| Baseline for advantage | A learned value model (critic) | The average reward of a group of sampled answers |
| Models kept in memory | Policy, value model, usually a reference model and a reward model | Policy, plus an optional reference model; rewards can be plain functions |
| Samples per prompt | Often one | Several, eight by default in TRL |
| Best suited to | Learned reward models, dense or subjective rewards | Verifiable rewards: maths, code, formats, tool outcomes |
| Main costs | Memory and tuning of the critic | Generation time, since every prompt needs a group of answers |
How PPO works for language models
PPO was introduced in the 2017 paper Proximal Policy Optimization Algorithms and powered early reinforcement learning from human feedback, including OpenAI's InstructGPT work. The loop looks like this:
- The model, called the policy, writes a response to a prompt.
- A reward model scores the response.
- A value model estimates how much reward the policy should have expected at each token. The difference between what happened and what was expected is the "advantage."
- The policy is nudged toward responses with positive advantage, with a clipping rule that stops any single update from moving it too far.
- A penalty keeps the policy close to a frozen reference copy, so it does not drift into gibberish that happens to score well.
The catch is the value model. The DeepSeekMath paper points out that in PPO the value function is typically another model of comparable size to the policy, which brings a substantial memory and compute burden. A critic is also one more network to tune, and for language the reward usually arrives only at the end of a response.
How GRPO works
GRPO was introduced in DeepSeekMath in February 2024 as a variant of PPO. In the authors' words, it "foregoes the critic model, instead estimating the baseline from group scores." DeepSeek later used it to train its R1 reasoning model; you can find DeepSeek-R1 in our directory.
The TRL documentation breaks each training step into four parts:
- Generate a group. For each prompt, sample several completions.
- Score and compare. Compute a reward for each completion, then subtract the group's mean reward and, by default, divide by the group's standard deviation. A completion that beats its siblings gets a positive advantage; a worse one gets a negative advantage.
- Optionally penalise drift. Estimate the KL divergence from a reference model.
- Update. Increase the probability of tokens in above average completions and decrease it for below average ones.
Because the comparison happens inside the group, GRPO needs no critic at all, and the reward can be a simple Python function: did the final answer match, did the code pass the tests, did the output parse as JSON.
GRPO vs PPO performance: what the papers show
There is no single benchmark that crowns one method, because results depend on the model, the reward and the tuning. Three published data points are worth knowing:
- GRPO's debut. In the DeepSeekMath paper, GRPO on top of DeepSeekMath-Instruct 7B raised GSM8K from 82.9% to 88.2% and MATH from 46.8% to 51.7%, while dropping the critic to cut training resources.
- A GRPO variant at scale. The DAPO team reports 50 points on AIME 2024 from the Qwen2.5-32B base model, ahead of DeepSeek's GRPO run (DeepSeek-R1-Zero-Qwen-32B) on the same base.
- PPO fights back. The VAPO paper, a value based PPO framework, reports 60.4 on AIME 2024 from the Qwen 32B base model and says it beat both DeepSeek-R1-Zero-Qwen-32B and DAPO by more than 10 points under identical settings, with no training crashes across runs.
So a well tuned critic can still win on hard reasoning tasks. GRPO's advantage is practical: less memory, fewer moving parts and good results with simple reward functions. For speed, GRPO usually spends most of its time generating the group of answers, while PPO spends extra time and memory training the critic.
What changed since the original GRPO
Most explainers stop at the 2024 formula, but practice has moved on. TRL's defaults reflect that:
- No KL penalty by default. TRL sets the KL coefficient, called beta, to zero by default, so the reference model is not even loaded, which saves memory. Its docs cite studies such as Open Reasoner Zero finding the KL term is not essential for GRPO, and note that DAPO and Dr. GRPO leave it out too. The DeepSeek-R1 paper used a small value of 0.001.
- Length bias fixes. The original loss averaged per response, which subtly favoured short correct answers and long wrong ones. The DAPO paper switched to token level averaging, and Dr. GRPO went further by dividing by a constant. TRL now uses the DAPO style loss by default and offers Dr. GRPO and others as options.
- Optional reward scaling. The Dr. GRPO authors argue that dividing by the group's standard deviation biases training by question difficulty; TRL lets you turn that scaling off.
- More loss choices. TRL 1.17.1 (October 30, 2026) accepts
grpo,dr_grpo,dapo,bnpo,cispo,sapo,luspoandvespoasloss_type, and its docs advise against plaingrpobecause of the length bias.
Other GRPO defaults in TRL's GRPOConfig, checked November 12, 2026: eight generations per prompt, a learning rate of 1e-6, a clipping range of 0.2, and a maximum completion length of 512 tokens. Check the config source for your installed version, as these evolve.
Where to run PPO and GRPO in 2026
The biggest practical change is on the PPO side. TRL deprecated its PPO trainer, stopped exporting PPOTrainer in version 1.10, and deleted it in version 1.13.0 in September 2026, citing no feature work in over a year and near zero recorded usage. Old tutorials that import it now fail on a current install.
- GRPO: TRL, Unsloth and Axolotl all ship it, with PEFT LoRA support for small GPUs.
- PPO: use a framework that still maintains it. The verl README lists PPO, GRPO, DAPO, Dr. GRPO and RLOO trainers, and OpenRLHF lists PPO, REINFORCE++, GRPO and RLOO. Both target multi GPU clusters rather than a single desktop card.
Where DPO fits
DPO, or Direct Preference Optimization, is not online reinforcement learning at all. It learns directly from a fixed dataset of preferred and rejected answer pairs, with no sampling during training and no reward model. It is cheaper and more stable than either PPO or GRPO, and TRL notes it was used to post train Llama 3. The tradeoff is that the model only learns from the examples you collected, rather than exploring and being graded on its own attempts.
A common recipe is supervised fine tuning first, then DPO for tone and preferences, and GRPO where there is a verifiable target. If you need a preference dataset to start from, our Hugging Face Datasets tutorial shows how to load and filter one.
A minimal GRPO run
The TRL README shows how little code a GRPO run needs:
from datasets import load_dataset
from trl import GRPOTrainer
from trl.rewards import accuracy_reward
dataset = load_dataset("trl-lib/DeepMath-103K", split="train")
trainer = GRPOTrainer(
model="Qwen/Qwen2.5-0.5B-Instruct",
reward_funcs=accuracy_reward,
train_dataset=dataset,
)
trainer.train()
A custom reward function simply takes the completions and returns a list of floats, one per completion. On a single GPU, Unsloth publishes free GRPO notebooks, including ones for Qwen3.5 4B and gpt-oss-20b (see how to run gpt-oss locally for that model), and Axolotl added asynchronous GRPO in 2026. For fast generation during training, TRL can use vLLM in the same process (its default colocate mode) or a separate vLLM server, and RL frameworks such as verl, slime and AReaL use SGLang for rollouts; our SGLang vs vLLM vs llama.cpp comparison explains how those engines differ.
Pros and cons
PPO
- Pros: well studied; works with learned reward models and dense rewards; the critic can give finer grained credit to individual tokens.
- Cons: an extra model of similar size to train and store; more hyperparameters; harder to get stable; no longer in TRL, so you need verl, OpenRLHF or an older pinned TRL.
GRPO
- Pros: no critic, so less memory and simpler code; pairs naturally with programmatic rewards; strong track record on reasoning tasks; widely supported in TRL, Unsloth and Axolotl.
- Cons: each prompt needs several generations, so rollouts often dominate training time; if every answer in a group gets the same reward, that prompt teaches nothing; vulnerable to reward hacking if the reward function has loopholes.
Which should you choose?
- You can check answers automatically, for maths, code, structured output or tool success: use GRPO.
- Your reward comes from a learned reward model of human preferences and you have the compute: PPO remains a solid option.
- You have pairs of good and bad answers but no way to score new ones: use DPO.
- You are just starting: do supervised fine tuning first, then add GRPO on a small model. Our guide on how to fine tune an LLM locally covers the first step, and LoRA vs QLoRA helps you fit it in memory. For the full workflow, from prompt sets to reward functions and reading the logs, see how to fine tune an LLM with reinforcement learning.
Who this is for
ML engineers and researchers moving beyond supervised fine tuning, and anyone trying to understand how reasoning models like DeepSeek-R1 were trained. For the underlying papers, arXiv hosts all of them. If you already have good reasoning traces and want supervised training instead, see how to fine tune a thinking LLM or instruct model.
FAQ
What is the main difference between GRPO and PPO?
PPO uses a learned value model, the critic, to estimate a baseline for each response. GRPO removes the critic and instead compares each response with the average reward of a group of responses to the same prompt, so it needs less memory.
What does GRPO mean?
GRPO stands for Group Relative Policy Optimization. It was introduced in the DeepSeekMath paper in February 2024 as a PPO variant whose advantage is each answer's reward minus the group mean, divided by the group's standard deviation.
Is GRPO better than PPO?
Not universally. GRPO is simpler and worked very well for reasoning with verifiable rewards, but the VAPO paper shows a value based PPO setup beating GRPO style DAPO by more than 10 AIME 2024 points on the same 32B base. Pick by reward type and budget.
GRPO vs PPO vs DPO: what is the difference?
PPO and GRPO are online reinforcement learning: the model generates answers during training and a reward scores them. DPO is offline: it learns from a fixed dataset of preferred and rejected answers, with no generation and no reward model, so it is the cheapest of the three.
Does TRL still support PPO?
No. TRL removed PPOTrainer and PPOConfig in version 1.13.0 (September 2026). GRPO, DPO, RLOO and other trainers remain. For PPO, use verl or OpenRLHF, or pin an older TRL release.
Can I run GRPO on a consumer GPU?
Yes, for small models. Unsloth publishes free notebooks for GRPO on models such as Qwen3.5 4B and gpt-oss-20b, and LoRA keeps memory down. Our LoRA vs QLoRA guide explains the memory tradeoff.



