Papers · 2024 · Reading: 25 min, plus 4 in closed details.
Paper · arXiv preprint (technical report) · arXiv 2402.03300

DeepSeekMath: Pushing the Limits of Mathematical Reasoning in Open Language Models (DeepSeekMath, GRPO)

Zhihong Shao*, Peiyi Wang*, Qihao Zhu*, Runxin Xu, Junxiao Song, Xiao Bi, Haowei Zhang, Mingchuan Zhang, Y.K. Li, Y. Wu, Daya Guo* (* core contributors; Shao, Wang and Zhu as interns at DeepSeek-AI)
DeepSeek-AI, with Tsinghua University and Peking University · February 2024 (arXiv v1); v2 adds SeaLLM-v2 and corrects MAmmoTH's row in Table 5; v3 April 2024 adds two authors

In one line: GRPO replaces PPO's critic with a group-mean reward baseline (advantage = z-scored reward across G samples per question, KL moved into the loss), taking a 7B math model to 51.7% MATH and becoming the default RLVR algorithm.

51.7 % MATH
DeepSeekMath-RL 7B, top-1, chain-of-thought, no tools: the first open model over 50% without tools
+4.9 points over the Instruct model (46.8%), about 5 standard errors on 5,000 problems · Table 5
120.2B tokens
the DeepSeekMath Corpus: 35.5M math pages mined from Common Crawl in four fastText rounds
8.8 times OpenWebMath, 6.9 times Minerva's math web pages · Table 1
0 PPO runs
GRPO is never trained against PPO here; the saving is argued from the diagram (Figure 4), not measured
the first published head-to-head came with DeepSeek-R1, a year later · Figure 4

How far to trust it: Believe the data pipeline and the headline scores: the gains are large against the noise. Treat GRPO's superiority as an argument, not a result: the paper never trains PPO, its memory saving is asserted rather than measured, and GRPO's lead over Online RFT in its own ablation is within one standard error. GRPO's standing rests on cost and on what later work found. The evidence, judged.

The idea in one sentence: a 7B open model reaches 51.7% on competition maths (MATH) from two things: a 120B-token maths corpus mined from Common Crawl with a fastText classifier that keeps widening its own seed, and GRPO, PPO with the value model deleted, where each answer's advantage is its reward against the mean of a group of answers to the same question.

You need: PPO's clipped objective and GAE in general are taught on Policy gradients and actor-critic; GRPO as it is used today, with its later fixes and real rollouts, on RL for LLMs. This page is the 2024 paper. New terms: GRPO (Group Relative Policy Optimization); outcome and process supervision (one reward per answer, or one per reasoning step); RFT (rejection-sampling fine-tuning: train only on sampled answers that are right; online when sampled from the current policy); k3 (Schulman's per-token KL estimator); gradient coefficient (how hard a method pushes each token up or down); Pass@K, Maj@K (any of K samples right; the most common of K right).

Data lifts the base model, GRPO adds the last five points, and needs one model fewer than PPO

Left: MATH accuracy with chain-of-thought and no tools: Base 7B few-shot (Table 2), Instruct and RL 7B top-1 (Table 5); GPT-4 and the best earlier open model (InternLM2-Math 20B) from Table 5. Right: the models each algorithm keeps in memory, filled when trained (§4.1, Figure 4); the group of eight rewards is illustrative (the paper samples G = 64). The 3D stage in GRPO (Fig. 2) runs both on one question.

Problem

§1, Table 5

At the start of 2024 the best mathematical reasoners were closed. On MATH, the competition-level benchmark, GPT-4 scored 52.9% and Gemini Ultra 53.2% with step-by-step reasoning and no tools; the best open models in the paper's own comparison were InternLM2-Math 20B at 37.7% and Qwen 72B at 35.2%, and the best open base model, Llemma 34B, was at 25.3% (Table 5, Table 2). The paper names two bottlenecks:

  • Data. There was no public math pretraining corpus of the right scale and quality. Minerva's math web data was closed; the open OpenWebMath had 13.6B tokens (§2.2).
  • Reinforcement learning. PPO, the RLHF default, trains a value model (the critic) about as large as the policy, which costs memory and compute; and in a language model the reward usually arrives only at the last token, so a critic that must value every token is hard to train (§4.1.1).

The paper answers both: a 120B-token math corpus mined from Common Crawl, which lets a 7B model reach 51.7% on MATH; and GRPO (Group Relative Policy Optimization), which deletes the critic and uses the average reward of a group of answers to the same question as the baseline. It also offers a unified view of SFT, rejection sampling, DPO, PPO and GRPO as one gradient with three knobs.

The corpus: mining Common Crawl for math

§2.1, Figure 2

An iterative loop over Common Crawl, starting from a small high-quality seed (§2.1, Figure 2):

  1. Train a classifier. fastText, with 500,000 OpenWebMath pages as positives and 500,000 random Common Crawl pages as negatives.
  2. Recall and rank. Common Crawl after URL deduplication and near-deduplication is 40B HTML pages. Score them all, rank by score, keep the top. How much to keep was chosen by pretraining on the top 40B, 80B, 120B and 160B tokens; the first round keeps 40B tokens.
  3. Find math domains. Many math pages are still missed, "mainly because the fastText model is trained on a set of positive examples that lacks sufficient diversity". So Common Crawl is split into domains (pages sharing a base URL), and any domain with over 10% of its pages collected is called math-related (for example mathoverflow.net).
  4. Annotate URLs, grow the seed. People mark the math URL patterns inside those domains (mathoverflow.net/questions); pages under them that were not collected become new positives. Retrain and repeat.

After four rounds: 35.5M pages, 120B tokens (about 3,400 tokens a page, derived). In the fourth round nearly 98% of what was collected had already been collected in the third, so they stopped. The stage (Fig. 1) runs the same loop on a synthetic web, with and without step 3.

  1. A web to mine. 48 domains of 30 pages, one tile each. A tile's column is its math pages (288 of 1,440), tinted by the style they are written in; a general domain holds one stray math page. Twelve domains are mostly math, each written mostly in one style.
  2. Seed and first classifier. Only the seed style is known: the bars in front are the classifier's positives by style, 40 OpenWebMath-like pages in blue. The classifier (the glass plate) recognises a style once it has seen at least 12 positives in it (the dashed line), so it knows one style of math.
  3. Round 1: recall and rank. The classifier finds the seed-style pages everywhere, including stray pages in general domains, and misses every other style: found pages fill their columns solid, missed ones stay glass. The paper kept the top 40B tokens at this point.
  4. Find math domains. Any domain with over 10% of its pages collected is flagged as math-related (its tile lights up). People mark its math URL patterns; the uncollected pages under them become new positives, in new styles, and flow into the seed bars.
  5. Round 2. Retrained on the richer seed, the classifier now recognises the styles it was shown enough of. More domains cross 10% and are flagged in turn, and their pages feed the seed again.
  6. Round 3. The cascade reaches every style. Almost every math page is found.
  7. Round 4: time to stop. Nothing new to recognise: almost everything collected was already collected in round 3. The paper stopped here, at 98% overlap, with 35.5M pages and 120B tokens.

illustrative A synthetic web of 48 domains and 1,440 pages, each math page written in one of six styles; the "classifier" recognises a style once it has seen enough positives in it. Only the mechanism is the paper's (a classifier that recalls pages like its seed, and domains with over 10% recalled); the counts are not. The paper's own numbers: 40B tokens kept in round one, 120B after four, 98% overlap between rounds three and four.

Classifier settings and decontamination (§2.1)

The fastText classifier: vector dimension 256, learning rate 0.1, word n-grams up to 3, minimum word count 3, 3 epochs. Decontamination (§2.1): any text segment containing a 10-gram that exactly matches a substring of GSM8K, MATH, CMATH or AGIEval is removed; benchmark texts shorter than 10 grams but at least 3 grams are matched exactly. The method is from DeepSeek-Coder (Guo et al., 2024).

Is it any good? A controlled test at 1.3B

§2.2, Table 1, Figure 3

The same 1.3B model (DeepSeek-LLM 1.3B) was trained for 150B tokens on each corpus (§2.2.1; settings in the closed block below). The rivals: MathPile (8.9B tokens from textbooks, Wikipedia, ProofWiki, Common Crawl, StackExchange and arXiv, over 85% arXiv), OpenWebMath (13.6B, Common Crawl filtered for math) and Proof-Pile-2 (51.9B: OpenWebMath, AlgebraicStack with 10.3B tokens of math code, and 28.0B of arXiv, mixed arXiv:Web:Code 2:4:1). Sizes are counted with DeepSeek's 100K-vocabulary tokenizer.

The 1.3B training settings (§2.2.1)

AdamW with β1 = 0.9, β2 = 0.95 and weight decay 0.1; 2,000 warm-up steps to a peak learning rate of 5.3e-4, cut to 31.6% of peak after 80% of training and to 10.0% after 90%; batches of 4M tokens with a 4K context; trained with DeepSeek's HAI-LLM framework (§2.2.1).

The paper's three claims for it (§2.2.2): quality, since at 50B tokens, one full pass of Proof-Pile-2, the DeepSeekMath model is already ahead (Figure 3); multilingual, mostly English and Chinese, so it lifts Chinese benchmarks where the English-centric corpora barely help or even hurt (MathPile drops CMATH from 12.3% to 1.2%); and scale, so its curve keeps climbing while the smaller corpora, repeated several times over 150B tokens, plateau. Figure 3 is a raster image in the paper, so this page does not redraw its curves.

Table 1 as printed, few-shot chain-of-thought. The DeepSeekMath Corpus leads on all eight, by 0.8 (Gaokao-MathCloze) to 21.6 points (CMATH) over the next best.

DeepSeekMath-Base 7B, and two lessons about data

§2.3, Tables 2 to 4

The base model starts from DeepSeek-Coder-Base-v1.5 7B, a code model (specifically the checkpoint just before its learning-rate decay, Table 4), and continues pretraining for 500B tokens at a peak learning rate of 4.2e-4 and 10M-token batches, otherwise as at 1.3B (§2.3), on the data mix drawn to scale in the figure.

Results with few-shot chain-of-thought (Table 2): 64.2% GSM8K and 36.2% MATH, ahead of every open base model on all eight benchmarks and 10.9 points above Llemma 34B on MATH. Against the closed Minerva 540B, 77 times larger, it is ahead on GSM8K (64.2 against 58.8) and MATH (36.2 against 33.6) but behind on OCW Courses (15.4 against 17.6) and MMLU-STEM (56.5 against 63.9); "comparable", the paper's word in §1.1, is fairer than "outperforms".

With tools, formal proofs, and general ability (Tables 3 and 4)

With tools (program-of-thought, Python with math and sympy) it reaches 66.9% on GSM8K and 31.4% on MATH, and on informal-to-formal proving in Isabelle (proof sketches finished by the Sledgehammer prover) 25.8% on miniF2F-valid and 24.6% on miniF2F-test, all above Llemma 34B (Table 3). Math training also lifted MMLU from 49.1% to 54.9% and BBH from 55.2% to 59.5% over the released Coder model; code held up against the checkpoint it started from (HumanEval 40.9% against 40.2%, MBPP 52.6% against 52.6%), though not against the released Coder (43.2%, 60.4%) (Table 4).

The data mix of §2.3, to scale: DeepSeekMath Corpus 56%, GitHub code 20%, arXiv 10%, Common Crawl natural language (English and Chinese) 10%, AlgebraicStack 4%. Derived: 56% of 500B is 280B tokens drawn from a 120.2B-token corpus, about 2.3 passes over it.

Lesson 1: code first helps math (§5.1.1, Tables 6 and 7). At 1.3B, with the 89B-token second-round corpus: 400B tokens of code then 150B of math beats 400B general then 150B math, without tools (GSM8K 21.9% against 19.1%, MATH 15.3% against 14.4%) and with tools (17.4% against 14.3%, 9.4% against 6.7%). Mixing code and math in one stage keeps coding (HumanEval 29.3%, MBPP 39.4%, where two-stage math training falls back to 12.2% and 17.0%) and is best with tools, but is worse without tools (17.6% GSM8K); the authors' conjecture is that a 1.3B model lacks the capacity for both at once. "A partial answer": it holds for math, at 1.3B, in one run per setting.

Most math pretraining corpora lean on arXiv papers (MathPile is over 85% arXiv). DeepSeek-Coder-Base-v1.5 7B was trained for 40B tokens on arXiv alone (MathPile, or ArXiv-RedPajama's 28.0B tokens of LaTeX). What happened to its MATH score, from 12.5%?
Training on arXiv alone lowered maths scores

At 1.3B the picture is the same (Table 8, Table 9). The authors hedge it themselves (§5.1.2): not studied are tasks such as informalising theorems, arXiv mixed with other data, and larger models. "Seem ineffective", in their words; one run per cell.

Instruction tuning: DeepSeekMath-Instruct 7B

§3

776K examples in English and Chinese, with solutions in three formats: chain-of-thought, program-of-thought, and tool-integrated reasoning (natural language interleaved with code) (§3.1).

What the 776K examples are, and the training settings (§3)

English: GSM8K and MATH annotated with tool-integrated solutions, a subset of MathInstruct, and the Lila-OOD training set (chain-of-thought or program-of-thought). Chinese: K-12 problems over 76 sub-topics such as linear equations, annotated in chain-of-thought and tool-integrated formats. Training: examples packed to 4K tokens, 500 steps at batch 256, constant learning rate 5e-5 (§3.2).

The result, 46.8% on MATH without tools, is above every open model in the comparison and above Inflection-2 (34.8%) and Gemini Pro (32.6%) by 12 and 14 points, and 9.1 points above the best other open model; it trails GPT-4 and Gemini Ultra and roughly matches the Chinese closed models GLM-4 (47.9%) and Baichuan-3 (49.2%). With tools it reaches 57.4%, "approaching 60%", above every open model (Table 5).

GRPO: PPO without the critic

§4.1, Eq. 1 to 4, Figure 4

PPO maximises a clipped surrogate: per token, the ratio of the new policy's probability to the old one's, times an advantage At, clipped so one update cannot move the policy far (Eq. 1):

𝒥PPO(θ) = 𝔼q, o∼πold (1/|o|) Σt min[ ρt At, clip(ρt, 1 − ε, 1 + ε) At ],   ρt = πθ(ot | q, o<t) / πold(ot | q, o<t)
At comes from Generalized Advantage Estimation (GAE), which needs a learned value function Vψ (the clip and GAE in general: Policy gradients and actor-critic). To stop the policy exploiting the reward model, a per-token KL penalty is folded into the reward (Eq. 2): rt = rφ(q, o≤t) − β log[πθ(ot|·) / πref(ot|·)], with πref usually the SFT model.

GRPO samples a group of G outputs for each question and maximises (Eq. 3):

𝒥GRPO(θ) = 𝔼 (1/G) Σi (1/|oi|) Σt { min[ ρi,t Âi,t, clip(ρi,t, 1 − ε, 1 + ε) Âi,t ] − β 𝔻KL[πθ ‖ πref] }
Two changes. The advantage Âi,t is relative within the group, which "aligns well with the comparative nature of rewards models", trained as they are on comparisons between answers to the same question. And the KL moves out of the reward into the loss, "avoiding complicating the calculation of Â", estimated per token with Schulman's k3 estimator (Eq. 4): 𝔻KL = πref/πθ − log(πref/πθ) − 1, "guaranteed to be positive".

Outcome supervision (§4.1.2), the variant everyone now means by GRPO: the reward model scores each whole output, the G rewards are normalised, and every token of output i gets the same advantage Âi,t = (ri − mean(r)) / std(r). Process supervision (§4.1.3): a process reward model scores each reasoning step; all step rewards of all G outputs are normalised together, and a token's advantage is the sum of the normalised rewards of the steps ending at or after it.

PPO against GRPO on one question

The stage (Fig. 2) runs one question of this page's toy (Train all six methods: two-digit addition, three output tokens, a rule verifier as the reward) through both algorithms, with the toy's real probabilities: the four models PPO keeps are the glass plates at the back; switch to GRPO and the value model's plate is gone.

  1. Sample an output. The question 7 + 8 goes into the policy, which writes three tokens: a scratch digit, then the answer as two digits. Under each token, its probability. (The toy gives PPO the same 8 samples per question as GRPO; one is followed here.)
  2. Score the end. The reward model, the plate on the right, scores the whole answer, and the reward arrives only at the last token: 1 if the answer is 15, else 0. In the paper a reward model gives the score; the toy uses the rule.
  3. KL penalty in the reward. The reference model compares every token with the policy, and each token is charged −β log(π/πref) inside the reward (Eq. 2), so the KL changes the per-token rewards rt that GAE will add up. Here they are close to zero.
  4. The value model guesses. A second network, as large as the policy, predicts at each token the reward still to come (the bars Vt). From a half-written answer it must guess whether the final answer will be right; this one expects about 0.8 and the answer is wrong.
  5. GAE: per-token advantages. δt = rt + Vt+1 − Vt, and At = Σ (γλ)k δt+k: the rewards and the values flow into the advantages, which hang below the plinth. Early tokens see the final reward only through λ and the critic; a wrong critic means a wrong advantage.
  6. Update two networks. The policy moves by At ∇log π on each token, and the value model is trained towards the returns: two networks trained, two frozen (reference and reward model).

Question 7 + 8 from the toy's base ("Instruct") model, which answers it correctly only about one time in four (three of its four demonstrations forgot the carry). The value model is the toy PPO's critic after 100 training steps (λ = 0.95, β = 0.04), computed in your browser. For the group arithmetic with any G, and the share of groups that teach nothing, see the GRPO calculator in section 8 of Test-time compute and reasoning.

Why the critic is the hard part. With γ = 1, GAE gives the final reward a weight of λL−1−t in the advantage of token t; the rest must come from the value model. At the paper's length limit of 1,024 tokens and the common λ = 0.95, the first token's share is 1.6 × 10−23 (derived): early tokens learn only what the critic has learned. DeepSeek-R1's supplement later measured exactly this: PPO with λ = 0.95 "performs considerably worse than GRPO", and with λ = 1.0 comes close (DeepSeek-R1, Supplementary A.3).

See the reach of the final reward, token by token (GAE with γ = 1)

Derived from GAE with γ = 1: weight of the final reward in each token's advantage, λL−1−t, log scale. GRPO gives every token the whole normalised reward, weight 1, whatever the length. The toy's outputs are 3 tokens long, so it cannot show this (see the toy).

What dropping the critic saves. The paper says "significantly reducing training resources" and gives no number. A derived estimate for a 7B policy (6.91B parameters from the released config), counting only weights and optimiser state, is in the figure.

Derived: 16 bytes per trained parameter (bf16 weights and gradients, fp32 Adam states and master weights, as in the ZeRO paper §3.1), 2 bytes per frozen parameter, every model the policy's size (the paper's reward model starts from the 7B base; a PPO critic usually starts from the reward model or the policy). Activations, the rollout engine's KV cache and sharding are left out, so this is the saving's shape, not a measurement.

Iterative RL (§4.1.4, Algorithm 1): a fixed reward model goes stale as the policy improves. So after each round, sample from the current policy, continue training the reward model on the new data with a replay of 10% historical data, reset the reference model to the current policy, and continue.

The recipe for DeepSeekMath-RL 7B (§4.2): start from Instruct 7B; RL only on the chain-of-thought questions about GSM8K and MATH from the SFT data, about 144K questions, leaving out the rest on purpose to see what happens on benchmarks RL never touches. Reward model built following Math-Shepherd (Wang et al.), initialised from the Base 7B, learning rate 2e-5. Policy learning rate 1e-6, KL coefficient β = 0.04, G = 64 samples per question, maximum length 1,024, training batch size 1,024, and "a single update following each exploration stage".

With one policy update per batch of samples, what does the clip in Eq. 3, clip(ρ, 1 − ε, 1 + ε), do in this recipe?
A subtlety in the KL term (beyond the paper): k3's gradient is the other KL's

k3 is an unbiased, always-positive estimate of the value of KL(πθ ‖ πref). But GRPO puts it in the loss and differentiates it, and that does not give the gradient of the KL it estimates: in expectation it gives the gradient of the opposite direction, KL(πref ‖ πθ) (Tang and Munos, 2025, who call such loss-based implementations "generally incorrect"). The paper's own gradient coefficient (Eq. 21, β(πref/π − 1)) is exactly that. On one categorical step, exactly:

Five outcomes; πref fixed, π = softmax(logits of πref + s · d) for a fixed direction d. Bars: the gradient with respect to the five logits, computed exactly (no sampling). The two directions agree near π = πref and part as π moves; both still pull π back towards πref, so in practice it acts as a regulariser of a slightly different kind.

Results

Table 5, §4.2

From Instruct 7B to DeepSeekMath-RL 7B (Table 5): GSM8K 82.9% to 88.2% and MATH 46.8% to 51.7% in domain; out of domain, MGSM-zh 73.2% to 79.6% and CMATH 84.6% to 88.8%; with tools, 83.7% to 86.7% and 57.4% to 58.8% (RL used only chain-of-thought data). Every number in the row improves, as the paper says. Self-consistency over 64 samples reaches 60.9% on MATH (Figure 7). On MATH without tools it beats every open model from 7B to 70B and every closed one in the table except GPT-4 and Gemini Ultra.

Two qualifiers the headline drops. "Over 50% on MATH for the first time within the open-source community" is true without tools: with tools, InternLM2-Math 20B (54.3%) and DeepSeek-LLM-Chat 67B (51.1%) were already above 50% in the same table. And the gain from RL is evaluated against the paper's own Instruct model, not against a PPO-trained one (How much to believe).

Table 5 as printed. Hatched: Gemini Ultra's and Gemini Pro's GSM8K scores are majority votes over 32 samples, printed in grey in the paper, not top-1 like the rest.

The unified view: one gradient, three knobs

§5.2.1, Eq. 5, Table 10, Appendix A.1

Section 5.2 writes the gradient of every post-training method in one form (Eq. 5):

∇θ𝒥𝒜(θ) = 𝔼(q, o) ∼ 𝒟 [ (1/|o|) Σt GC𝒜(q, o, t, πrf) ∇θ log πθ(ot | q, o<t) ]
Three knobs: the data source 𝒟 (offline: sampled once from the SFT model; online: from the current policy), the reward function πrf ("Rule": is the answer correct; "Model": a trained reward model), and the gradient coefficient GC, how hard each token is pushed up or down (Table 10; derivations in Appendix A.1).

It is still one of the cleanest mental models for why these methods behave differently. The widget in the figure applies each method's coefficient to the same eight outputs, sampled from the toy's base model for one question.

Bars: the coefficient GC on each token of each output (three tokens: scratch digit, tens, units), drawn to one scale across methods. SFT trains on a human demonstration, not on these samples. RFT and Online RFT apply the same rule; they differ in where the samples come from. DPO uses one correct and one wrong output as its pair. PPO's coefficients come from the toy critic after 100 steps. β = 0.04 (DPO: 0.1), as in the toy.

The authors then turn each knob on a 1.3B model (DeepSeekMath-Instruct 1.3B, MATH and GSM8K), decoded here from the figures' vector data (Figure 5 and, below it, Figure 6):

  • Online beats offline, late. Online RFT and RFT start together and Online RFT pulls ahead later, "as in the initial stage, the actor and the SFT model exhibit close resemblance" (§5.2.1). Averaged over the last ten checkpoints: +2.4 points on GSM8K, +1.3 on MATH, about two standard errors.
  • Graded coefficients beat a 0/1 rule. GRPO "uniquely adjusts its gradient coefficient based on the reward value", reinforcing and penalising by degree, where Online RFT never penalises a wrong answer. Over the last ten checkpoints GRPO+OS leads Online RFT by 0.8 points on GSM8K and 0.4 on MATH, inside one standard error of a single evaluation.
  • Process beats outcome. GRPO+PS leads GRPO+OS by 1.7 points on GSM8K and 0.3 on MATH (the old summary said "especially on MATH"; the decoded figure says the reverse).
  • Iterating helps, mostly once. On the 7B model, iteration 1 adds the most; iteration 2 adds on GSM8K and not on MATH (it ends at 51.3% where iteration 1 ends at 51.6%).

Figure 5, every point read from the SVG's coordinates (tick fit residual under 0.002 points). Shaded: ±1 binomial standard error of one evaluation around GRPO+OS, assuming the standard test sets (1,319 GSM8K, 5,000 MATH problems; the paper does not say). Only four methods are plotted: no DPO and no PPO, although Table 10 analyses both.

Figure 6, decoded. Iteration 1 branches from iteration 0 at step 1,100 and iteration 2 from iteration 1 at step 2,700; iteration 0 continues as the single-round control.

Why RL works, and its limit

§5.2.2, §5.2.3, Figure 7

To ask what RL changed, the authors compare Instruct and RL 7B at temperature 0.7 with two metrics over K samples: Pass@K (any of K is right) and Maj@K (the most common answer among K is right).

RL raised MATH top-1 from 44.6% to 50.9% at this temperature. With 64 samples per problem, how does the RL model's Pass@64 compare with the Instruct model's?

This one figure prefigured the 2025 debate over whether RL with verifiable rewards adds capability or only sharpens the distribution (Yue et al., 2025: base models overtake their RL versions on Pass@K at large K; the evidence since is weighed on RL for LLMs). The paper's own diagnosis (§5.2.3) is the data: RL used only the SFT questions and plain nucleus sampling.

The paper's directions for each knob, and its stated limits (§5.2.3, §6)

Its directions for each knob: data, out-of-distribution questions, tree-search decoding, and fast inference, which sets how much a policy can explore; algorithms robust to noisy rewards, since "all methods now fully TRUST the signal of the reward function" and even PRM800K has about 20% incorrect annotations, pointing to weak-to-strong methods; reward models that generalise to out-of-distribution questions and decoding (otherwise RL "may merely stabilize the distribution"), that express their uncertainty, and process reward models built efficiently. The limitations section adds that geometry and theorem proving remain weaker than in closed models (§6).

RL lifts Maj@K and top-1, not Pass@K

Figure 7, decoded (values exact to 0.1 point). The paper's reading: RL "enhances the model's overall performance by rendering the output distribution more robust", boosting correct answers already in the top K "rather than the enhancement of fundamental capabilities". In this page's toy the same shape appears for Maj@K, and Pass@64 rises slightly, because the toy's few impossible questions share their skill (carrying) with the others (the toy).

How much of this to believe

§3.2, §4.2, §5.2, Tables 1 to 9, Figures 5 to 7

What holds up. The headline gains are large against any plausible noise: RL adds 4.9 points on MATH (46.8% to 51.7%), about five standard errors on 5,000 problems, and improves all eight Table 5 entries. The corpus comparison (Table 1) is a controlled experiment, same model, same 150B tokens, with leads of up to 21.6 points. The released checkpoints let anyone re-evaluate the numbers, and the corpus recipe and GRPO were both reproduced at scale (DeepSeek-R1; open GRPO implementations in TRL, verl and OpenRLHF). The authors flag the limits of the arXiv finding themselves, and the code-helps-math claim is stated as "a partial answer".

What is weaker, concretely:

  • no PPO baseline The paper introduces GRPO as a cheaper PPO and never trains PPO. Figure 5 compares GRPO with RFT and Online RFT only; Table 10 lists PPO and DPO but neither appears in an experiment. The first head-to-head was published with DeepSeek-R1 a year later (Supplementary A.3, on a 16B MoE): GRPO ahead of PPO at λ = 0.95, close at λ = 1.0, with tuning cost as GRPO's main advantage.
  • savings asserted "Significantly reducing training resources" and "less memory consumption" come with no measurement; the arithmetic above (44% less weight and optimiser memory with a 7B reward model) is this page's, not the paper's. GRPO also moves cost into sampling: 64 rollouts of up to 1,024 tokens per question.
  • within the noise GRPO's lead over Online RFT in Figure 5 is 0.8 points (GSM8K) and 0.4 (MATH) over the last ten checkpoints, against a single-evaluation standard error of about 1.3 and 0.6 points, from one run each; PS over OS on MATH is 0.3. The direction is plausible, the margin is not evidence.
  • not like for like In Figure 5's comparison, RFT and Online RFT use the rule reward while GRPO uses a trained reward model (Table 10 and §5.2.1), so "graded coefficients" and "a learned reward" change together. Gemini's GSM8K scores in Table 5 are majority votes over 32 samples beside top-1 scores.
  • single runs No seeds or error bars anywhere; each ablation cell in Tables 6 to 9 is one training run at 1.3B or 7B (40B tokens for the 7B arXiv runs).
  • small slips Eq. 12 (DPO) has o−<t where o−t is meant; Eq. 14 writes DPO's coefficient with per-token log-ratios where Eq. 12 implies the sequence average; Algorithm 1 says "Equation 21" for the objective, which is Eq. 3. No plotted checkpoint in Figure 6 shows both 88.2% and 51.7%, so which checkpoint is DeepSeekMath-RL is unstated. None changes the method (checks).

This page's toy adds one more data point: with every method given the same rule reward and the same sample budget, Online RFT matched or beat GRPO and PPO (three seeds each), and offline RFT came close; GRPO and PPO were indistinguishable (the toy). A three-token toy cannot test long outputs or a learned reward model, so it does not refute the paper; it shows the ranking is not automatic.

Verdict. Believe the corpus recipe, the base, instruct and RL scores, and the unified view as a way to think. Treat "GRPO beats PPO" and "GRPO's graded coefficients beat rejection sampling" as unproven by this paper: the first was never run, the second is within one standard error. GRPO won on cost and simplicity, and on what later work (R1, Dr. GRPO, DAPO) found when it ran the comparisons.

What it takes to use this

§4.2, repository
  • Released: the Base, Instruct and RL 7B checkpoints on Hugging Face (Llama architecture, 30 layers, hidden size 4,096, 4K context) under the DeepSeek Model License, which permits commercial use; MIT-licensed inference and evaluation code (repository; model card). Not released: the corpus, the training code, the reward model and the RL code.
  • Budget: a 7B policy with a 7B reward model needs about 138 GB for weights and optimiser state before activations (derived above), so several 80 GB GPUs with sharding; rollouts dominate time: G samples per question (64 here, 16 in R1, 8 to 16 typical in open recipes), which is why RL stacks embed vLLM or SGLang.
  • Pays off when answers can be checked (math, code, formal tasks) and the model already solves a fair share of the questions: groups where every sample is right or every sample is wrong carry no signal (in the toy at G = 8, 54% of all groups over a 400-step run). Buys little when the base model cannot sample correct answers at all (Pass@K bounds it, Figure 7) or when the reward is a learned model that can be gamed.

Why it matters (beyond the paper)

  • GRPO became the default algorithm for RL with verifiable rewards. DeepSeek-R1 and R1-Zero run GRPO with rule-based rewards instead of a learned reward model, which made large-scale reasoning RL cheap and stable enough to work (DeepSeek-R1). Dropping the critic halves the number of trained models and removes PPO's hardest-to-tune component.
  • Known biases, and the fixes. Later work found two biases in the objective as written, the 1/|oi| length normalisation and the division by std(r) (Dr. GRPO), and added fixes such as Clip-Higher and Dynamic Sampling (DAPO) and sequence-level ratios (GSPO). RL for LLMs teaches them with real rollouts; Then and now steps through them term by term on this paper's objective.
  • The data chapter is still one of the best public recipes for domain-targeted Common Crawl mining (fastText recall, domain discovery, human URL annotation), and the "code pretraining helps reasoning, arXiv does not" ablations shaped later data-mixing decisions.
Where GRPO went next, and where to run it (dated: checked 3 October 2026)
  • In DeepSeek-R1: 16 samples per question, KL coefficient 0.001, learning rate 3e-6, reference reset every 400 steps (DeepSeek-R1). The open ecosystem standardised on it: Hugging Face's open-r1, TRL's GRPOTrainer, verl, and most 2025 reasoning-RL papers.
  • The fixes in detail. Dr. GRPO shows that the 1/|oi| length normalisation favours long wrong answers ("longer responses are penalized less") and that dividing by std(r) gives too-easy and too-hard questions more weight; dropping both leaves an unbiased REINFORCE-style estimator with a group-mean baseline. DAPO adds Clip-Higher (decoupled εlow and εhigh, to keep exploring), Dynamic Sampling (drop groups whose rewards are all equal, since their advantage is zero and they only dilute the batch), a token-level loss, and Overlong Reward Shaping. Much later work drops the KL term entirely when the reward is verifiable; TRL implements most of these as flags. GSPO (Qwen3) moves the ratio and the clip from tokens to whole sequences.
  • GRPO today: use an open implementation rather than the paper's equations: TRL's GRPOTrainer, verl or OpenRLHF. Their defaults already depart from the paper (loss aggregation, KL coefficient often 0, clip-higher); see Then and now.

A dated timeline and the objective's changes, term by term, are in Then and now.

Connections