TL;DR
Chain-of-thought prompting made language models reason better, but it relied on human-written reasoning examples. DeepSeek-R1-Zero drops those examples: it runs reinforcement learning on a base model with one reward, whether the final answer is correct, and the model learns to think at length, check its work and revise. DeepSeek-R1 adds a short cold-start supervised stage, reasoning RL, rejection-sampled supervised data and a final RL stage, which keeps the output readable and makes the model useful outside math and code.
Where you'll see it: post-training of reasoning models, where a verifier (a unit test, an exact-answer check) can score outputs and the reward is cheap to compute.
The problem
Reasoning in LLMs had two known routes. Pre-training at large scale can produce reasoning abilities, but it is expensive. Chain-of-thought (CoT) prompting, with few-shot examples or a plain "think step by step", reliably helps on hard problems. Its limit, in the paper's words, is that performance is capped by the human-written reasoning traces. Supervised post-training on such traces has the same cap and costs annotation effort. The paper asks whether a model can develop reasoning by itself, using reinforcement learning with little human labelling.
Key idea
Give the model a question, let it write a reasoning trace and an answer, and score only the answer against a known correct value. If the signal is only "right or wrong", the model is free to choose its own way of thinking. The authors do not tell the model how to reason. They report that under this pressure the model writes longer traces, and that it learns to verify and revise on its own. In their words, reasoning patterns "emerge"; they are not taught.
The paper also states a second idea. Reasoning learned by one large model can be copied into smaller models by supervised fine-tuning on the large model's outputs. That is distillation, and it is cheaper than running RL on each small model.
The method
GRPO
The RL algorithm is Group Relative Policy Optimization (GRPO), from the authors' earlier DeepSeekMath paper. For each question , sample a group of outputs from the old policy . Each output gets a reward , and the advantage is that reward normalised within the group:
The policy is updated with a clipped ratio objective like PPO's, using as the advantage and a KL penalty toward a reference policy. The group mean replaces the learned value function that PPO would need. Appendix A.3 compares GRPO and PPO. A reader who has not seen policy gradients should read Policy Gradient and Group Relative Policy Optimization (GRPO) first.
The settings for R1-Zero are a learning rate of , a KL coefficient of 0.001, rollout temperature 1, 16 outputs per question, a maximum length of 32,768 tokens (later raised to 65,536), a batch of 512 responses per step, and 10,400 steps (about 1.6 epochs). The reference model is refreshed every 400 steps.
Rewards
R1-Zero uses only rules. The accuracy reward checks the final answer: for maths, the answer must be in a fixed box
so it can be matched exactly; for code, a compiler runs test cases. The format reward checks that the reasoning sits
between <think> and </think> tags. The two are added with equal weight. The authors deliberately avoid neural reward
models for reasoning, because they found that a learned reward is easy to exploit as RL runs longer.
The prompt template asks for reasoning first and then the answer, and it places no other constraint on content. That is the "minimal structure" the authors use so that the natural behaviour can show.
What RL produced
On AIME 2024, pass@1 rises during RL from 15.6% to 77.9%. With self-consistency over 16 samples it reaches 86.7%. The average response length grows steadily. The authors describe a mid-training "aha moment" in which the model writes "Wait" and rechecks its own algebra mid-solution. These are reported observations from training logs, not separately measured effects.
The four-stage pipeline (R1)
R1-Zero's outputs mix English and Chinese inside one chain of thought and are hard to read. R1 fixes this with a pipeline (Figure 2):
- Cold start: thousands of conversational reasoning examples to fine-tune the base model before RL.
- Reasoning RL: the R1-Zero recipe plus a language-consistency reward, equal to the fraction of target-language words in the chain of thought. The authors report a small loss in benchmark performance in exchange for readability.
- Rejection sampling and SFT: sample from the RL checkpoint, keep the correct outputs, and mix them with reasoning and non-reasoning supervised data.
- Second RL stage: rule-based rewards for reasoning, plus learned reward models for helpfulness (scored on the final summary) and harmlessness (scored on the whole response). This stage uses temperature 0.7 and 1,700 steps, and the general reward appears only in the last 400.
The reward models are trained on preference pairs (66,000 helpfulness pairs; 106,000 safety prompts with safe or unsafe labels). The paper notes that long training with the model-based reward invites reward hacking, which is why that reward is used only briefly.
Results
- Stage by stage (Table 3): on AIME 2024 pass@1, R1-Zero scores 77.9, R1-Dev1 59.0, R1-Dev2 74.0, R1-Dev3 78.1 and R1 79.8. Dev1 drops on reasoning, which the authors attribute to the small cold-start set.
- Final R1 headline numbers: MATH-500 97.3, Codeforces rating 2029, AlpacaEval 2.0 length-controlled win rate 87.6 (up from 24.7 for R1-Zero), ArenaHard 92.3, MMLU-Pro 84.0, GPQA Diamond 71.5.
- Where R1 does not beat R1-Zero: GPQA Diamond (75.8 for R1-Zero) and CNMO 2024 (88.1 for R1-Zero) are higher in R1-Zero.
- Distillation (Appendix F): DeepSeek-R1-Distill-Qwen-32B scores 72.6 on AIME 2024, and the 1.5B version scores 28.9. In the appendix's comparison, distilling R1's outputs into a 32B base beats running large-scale RL on the same base (Qwen2.5-32B-Zero scores 47.0 on AIME 2024 in that table).
- Compute: total training cost is in Appendix B.4.4, which this lesson does not cover.
Why it mattered
The paper's central claim is that a verifier, a hard set of questions and enough compute can elicit long chain-of-thought reasoning without human-written traces. It also released distilled smaller models and reported that distilling R1's outputs beat large-scale RL on a 32B base in its comparison. The authors list the limits themselves: pure RL needs a reliable reward, and that is hard for writing and other open-ended tasks. For those, R1 uses human-labelled supervised data and only a few hundred RL steps.
Reading guide
- Section 1 (introduction): the problem with CoT and human traces. Needs Chain-of-Thought Prompting.
- Section 2.1 (GRPO): the objective and advantage. Needs Reinforcement Learning, Policy Gradient and Group Relative Policy Optimization (GRPO). The clipped ratio and KL term are the PPO parts; see the Transformer lesson only if the language-model setting is new.
- Section 2.2 (rewards): rule-based accuracy and format rewards, and why neural rewards were rejected. Needs Reward Model for the contrast.
- Section 2.3 (self-evolution): the training curves and the "aha moment". No new prerequisites beyond section 2.1.
- Section 3 (R1 pipeline): cold start, language reward, rejection sampling and the second RL stage. Needs Rejection Sampling for stage 3 and Reward Model for stage 4.
- Section 4 and Appendix F (results and distillation): needs Knowledge Distillation for the distillation comparison.
Check yourself
QuestionWhy does GRPO compute advantages within a group of outputs, not with a learned value function?Show answer
A learned value function is a second network that predicts expected reward, and it costs memory and training time. GRPO samples outputs for the same question and uses their mean and standard deviation as the baseline. Outputs that score above their group's average get positive advantage. That removes the value network with little loss of signal, because the group already holds a sample of the reward distribution for that question.
QuestionA group of four outputs gets rewards 1, 0, 0, 1. Compute the advantages, using the population standard deviation.Show answer
- Mean = .
- Deviations from the mean: .
- Population variance = , so std = .
- Advantages: .
- Correct outputs are pushed up and incorrect ones down, with equal size. A group where every output is correct gives std = 0 and divides by zero, so implementations typically add a small constant to the denominator. The paper does not state that detail, so treat it as an implementation choice.
QuestionWhy did the authors avoid a learned reward model for R1-Zero's reasoning tasks?Show answer
The paper says learned reward models are susceptible to reward hacking during large-scale RL, since the policy can find outputs the model scores highly without being correct. Retraining such models also costs compute and adds pipeline complexity. Rule-based rewards for maths and code cannot be gamed in the same way, because the answer is either right or wrong. The paper does still use learned reward models in stage 4 for helpfulness and harmlessness, and says more steps of model-based RL there invite reward hacking.
QuestionApplied: you want a 7B model to reason like a large reasoning model, and you have a budget for one large run of outputs but not for RL on the 7B model. Which route does the paper suggest, and what is the main risk?Show answer
The paper's route is distillation: sample reasoning traces from the large model and fine-tune the 7B base on them with ordinary supervised learning. The authors report that this beats RL on a 32B base in their comparison. The main risk is that the small model copies the traces without the verification behaviour generalising, and the paper's own numbers show a gap: even the 32B distilled model scores 72.6 on AIME 2024 against 79.8 for R1. Measure your model on held-out tasks, not just the benchmarks the traces came from.
Sources
- DeepSeek-AI et al. DeepSeek-R1: Incentivizing Reasoning Capability in LLMs via Reinforcement Learning, 2025. arXiv:2501.12948
- Shao et al. DeepSeekMath, 2024. arXiv:2402.03300
- Wei et al. Chain-of-Thought Prompting Elicits Reasoning in Large Language Models, 2022. arXiv:2201.11903