Until late 2024, the public recipe for building a “reasoning model” was to imitate, through SFT, solutions written by people or by a stronger model. The DeepSeek-R1 report asks a single question: if we never teach the solution process and reward only whether the final answer is correct, will the model learn on its own to think at length? The answer was “yes, if the base model is large enough.” R1-Zero, which ran only GRPO on DeepSeek-V3-Base with no SFT, raised AIME 2024 pass@1 from 15.6% to 77.9%, and along the way its responses grew longer and reflective expressions such as “wait” appeared by themselves. R1 is what you get when this is polished into a product people can read, and the R1-Distill series is Qwen and Llama SFT-ed on 800K solutions produced by R1.
This lesson reads a report about a post-training recipe, not an architectural innovation. The derivation of GRPO itself and its variants are in the RLVR and GRPO lesson, so here we focus on what R1 actually did with which settings, and why those settings produced those results. Table and section numbers cited follow arXiv v2 (the January 2026 revision).
At a glance
| Item | DeepSeek-R1 |
|---|---|
| Lab | DeepSeek-AI |
| Release | arXiv v1 2025-01-22, v2 2026-01-04 (appendices greatly expanded) |
| Model size | 671B total / 37B active (the same MoE as V3-Base, report Table 8) |
| Architecture | Same as DeepSeek-V3: MLA + DeepSeekMoE + MTP (report Appendix A.1) |
| Context | RL generation length up to 32,768 tokens (65,536 for R1-Zero from step 8.2k). The model itself has V3’s 128K |
| Pre-training | V3-Base as is (14.8T tokens, V3 report) |
| Post-training | R1-Zero: GRPO only. R1: cold start SFT → reasoning RL → rejection sampling + SFT (about 800K samples) → mixed RL |
| Openness | R1 and R1-Zero weights plus six distilled models (Qwen 1.5B/7B/14B/32B, Llama 8B/70B) released on HuggingFace (Appendix I). The licence is not stated in the report |
| Training cost | On H800: R1-Zero 101K + SFT data 5K + R1 41K = 147K GPU hours (report Table 7) |
What is new
- Large-scale RL without SFT (R1-Zero). Giving a base model only accuracy and format rewards and running GRPO for 10,400 steps, it showed for the first time on a large open model that long chains of thought (long CoT), self-verification and reflection “emerge.”
- Neural reward models excluded from reasoning. Math, code, STEM and logic use only rule-based verifiers. The judgement is that at large-scale RL, neural RMs are vulnerable to reward hacking (§2.2).
- A four-stage pipeline. R1-Zero’s readability problems (language mixing, hard-to-read formatting) are fixed with a small amount of cold start data and a language-consistency reward, and general abilities are added with rejection-sampling SFT and a second RL stage.
- Distillation beats RL on small models. On the same Qwen2.5-32B, R1-distillation SFT scored higher on every reasoning benchmark than more than 10K steps of RL (Table 16).
- Failures on the record. The report includes why PRM and MCTS were tried and dropped (Appendix G.2) and a reward-model reward-hacking curve (Appendix B.5).
Architecture: the model is V3, the new part is the pipeline
R1’s network is identical to DeepSeek-V3: MLA, DeepSeekMoE choosing 8 of 256 routed experts plus 1 shared expert, and even the MTP modules are unchanged. Two things in this report deserve the name “structure.” One is the template that fixes the structure of a response; the other is the structure of the training stages the model passes through.
The R1-Zero template (report Table 1) deliberately contains no instructions about content.
A conversation between User and Assistant. The user asks a question, and the Assistant solves it.
The assistant first thinks about the reasoning process in the mind and then provides the user with the answer.
The reasoning process and answer are enclosed within <think>...</think> and <answer>...</answer> tags, ...
User: {prompt}. Assistant:It enforces only the format “think, then answer,” and says nothing about how to think. The authors explain that this is what lets them observe cleanly what RL changed (§2.3). From R1 on, human-readable, first-person conversational thinking is planted first through cold start data.
The structure of the training stages is shown in the figure below. R1-Zero is a side branch going straight from V3-Base to RL, while R1 passes through four stages: V3-Base → Dev1 → Dev2 → Dev3 → R1. Note that Dev3 is not a continuation of Dev2’s training; it is V3-Base SFT-ed again on data generated by Dev2 (Appendix B.4.2). RL checkpoints serve only as data generators.
2024년 말까지 “추론 모델”을 만드는 공개 레시피는 사람이 쓴 풀이나 더 강한 모델의 풀이를 SFT로 흉내 내는 것이었다. DeepSeek-R1 보고서는 질문을 하나 던진다. 풀이 과정은 전혀 가르치지 않고 최종 답의 정답 여부만 보상으로 주면, 모델이 스스로 길게 생각하는 법을 배울까? 답은 “충분히 큰 base 모델이면 그렇다”였다. DeepSeek-V3-Base에 SFT 없이 GRPO만 돌린 R1-Zero는 AIME 2024 pass@1을 15.6%에서 77.9%로 끌어올렸고, 그 과정에서 응답이 길어지고 “wait” 같은 반성 표현이 저절로 나타났다. 이것을 사람이 읽을 수 있는 제품으로 다듬은 것이 R1이고, R1이 만든 80만 개의 풀이로 Qwen·Llama를 SFT한 것이 R1-Distill 시리즈다.
이 레슨은 아키텍처 혁신이 아니라 사후학습 레시피에 관한 보고서를 읽는다. GRPO 자체의 유도와 변형들은 RLVR과 GRPO 레슨에 있으니, 여기서는 R1이 실제로 무엇을 어떤 설정으로 했는지, 그리고 그 설정이 왜 그런 결과를 냈는지에 집중한다. 인용하는 표·절 번호는 arXiv v2(2026년 1월 개정판) 기준이다.
한눈에
| 항목 | DeepSeek-R1 |
|---|---|
| 연구실 | DeepSeek-AI |
| 공개 | arXiv v1 2025-01-22, v2 2026-01-04 (부록 대폭 추가) |
| 모델 크기 | 671B 총 / 37B 활성 (V3-Base와 같은 MoE, 보고서 Table 8) |
| 아키텍처 | DeepSeek-V3와 동일: MLA + DeepSeekMoE + MTP (보고서 부록 A.1) |
| 컨텍스트 | RL 생성 길이 최대 32,768 토큰(R1-Zero는 8.2k step부터 65,536). 모델 자체는 V3의 128K |
| 사전학습 | V3-Base 그대로 (14.8T 토큰, V3 보고서) |
| 사후학습 | R1-Zero: GRPO만. R1: cold start SFT → 추론 RL → rejection sampling + SFT(약 80만 샘플) → 혼합 RL |
| 공개 | R1, R1-Zero 가중치와 증류 모델 6종(Qwen 1.5B/7B/14B/32B, Llama 8B/70B) HuggingFace 공개 (부록 I). 라이선스는 보고서에 적혀 있지 않다 |
| 학습 비용 | H800 기준 R1-Zero 101K + SFT 데이터 5K + R1 41K = 147K GPU 시간 (보고서 Table 7) |
무엇이 새로운가
- SFT 없는 대규모 RL(R1-Zero). base 모델에 정답·형식 보상만 주고 GRPO를 10,400 step 돌려 긴 사고 사슬(long CoT), 자기 검증, 반성이 “창발”하는 것을 처음으로 대규모 공개 모델에서 보였다.
- 신경망 보상모델을 추론에서 배제. 수학·코드·STEM·논리는 규칙 기반 검증기만 쓴다. 대규모 RL에서 신경망 RM은 reward hacking에 취약하다는 판단이다(§2.2).
- 4단계 파이프라인. R1-Zero의 가독성 문제(언어 혼용, 읽기 어려운 형식)를 소량의 cold start 데이터와 언어 일관성 보상으로 고치고, rejection sampling SFT와 두 번째 RL로 일반 능력을 붙였다.
- 증류가 작은 모델의 RL보다 낫다. 같은 Qwen2.5-32B에서 R1 증류 SFT가 10K step 이상의 RL보다 모든 추론 벤치마크에서 높았다(Table 16).
- 실패 기록 공개. PRM과 MCTS를 시도했다가 접은 이유(부록 G.2), 보상모델 reward hacking 곡선(부록 B.5)을 함께 실었다.
아키텍처: 모델은 V3, 새것은 파이프라인
R1의 네트워크는 DeepSeek-V3와 똑같다. MLA, 공유 expert 1개 + routed expert 256개 중 8개를 고르는 DeepSeekMoE, MTP 모듈까지 그대로다. 이 보고서에서 “구조”라고 부를 만한 것은 두 가지다. 하나는 응답의 구조를 정하는 템플릿이고, 다른 하나는 모델을 거쳐 가는 학습 단계들의 구조다.
R1-Zero의 템플릿(보고서 Table 1)은 의도적으로 내용에 대한 지시를 하나도 넣지 않았다.
A conversation between User and Assistant. The user asks a question, and the Assistant solves it.
The assistant first thinks about the reasoning process in the mind and then provides the user with the answer.
The reasoning process and answer are enclosed within <think>...</think> and <answer>...</answer> tags, ...
User: {prompt}. Assistant:“생각한 뒤 답하라”는 형식만 강제하고 어떻게 생각하라는 말은 없다. 그래야 RL이 무엇을 바꾸었는지를 순수하게 관찰할 수 있다는 것이 저자들의 설명이다(§2.3). R1부터는 사람이 읽기 좋은 1인칭 대화체 사고를 cold start 데이터로 먼저 심는다.
학습 단계의 구조는 아래 그림과 같다. R1-Zero는 V3-Base에서 바로 RL로 가는 곁가지이고, R1은 V3-Base → Dev1 → Dev2 → Dev3 → R1의 네 단계를 거친다. 주의할 점은 Dev3가 Dev2를 이어 학습한 것이 아니라 Dev2가 생성한 데이터로 V3-Base를 다시 SFT한 것이라는 점이다(부록 B.4.2). RL 체크포인트는 데이터 생성기로만 쓰인다.
Read the table stage by stage and the role of each stage becomes clear.
- R1-Zero → Dev1. SFT on just a few thousand cold start examples lifts IF-Eval from 46.6 → 71.7 and AlpacaEval from 24.7 → 50.1, but AIME drops 77.9 → 59.0 and CNMO 88.1 → 58.0. The format became human-like, but reasoning falls short of R1-Zero, which had been through large-scale RL.
- Dev1 → Dev2 (reasoning RL). AIME 74.0, Codeforces rating 1534 → 1687, MMLU-Pro 74.1 → 83.8. Reasoning RL lifts the reasoning benchmarks and has little effect on user-preference metrics (AlpacaEval 50.1 → 55.8).
- Dev2 → Dev3 (rejection sampling + SFT). Non-reasoning data and software-engineering data come in: Aider-Polyglot 25.6 → 44.8, AlpacaEval 55.8 → 62.1.
- Dev3 → R1 (mixed RL). Math and code rise a little, while AlpacaEval 62.1 → 87.6 and ArenaHard 75.6 → 92.3 rise a lot.
On GPQA Diamond (75.8 → 71.5) and CNMO (88.1 → 78.8), the final R1 is lower than R1-Zero. Some reasoning score was given up in exchange for readability and general ability.
RL infrastructure
The RL framework in Appendix B.1 is split into four modules. Rollout samples responses on vLLM workers; for the V3 MoE it uses cross-node expert parallelism and replication of hot experts, and it runs self-speculative decoding with the MTP modules to shorten the completion time of the longest samples. The Inference module runs the forward passes of the reward model and the reference model, and the Rule-based Reward module handles code execution, answer comparison and format checks asynchronously, overlapping with rollout. The Training module sorts by length, then packs into fixed-length chunks with Best-Fit to cut padding, and pipeline-parallelises with DualPipe. When a module finishes, the model is offloaded from VRAM to hand the memory to the next module. It is notable that the MTP built during pre-training is reused as an accelerator for RL rollouts.
Data
RL prompts (report Table 4, Appendix B.3.1)
| Type | Prompts | Form | Reward |
|---|---|---|---|
| Math | 26K | numeric, expression or equation answers (proofs excluded) | 1 if it matches the reference answer, else 0 |
| Code | 17K algorithmic + 8K bug fixing | code | pass hidden tests / unit tests from real GitHub issues |
| STEM | 22K | 4–8-way multiple choice (chemistry 46.5%, biology 30.7%, physics 15.5%) | matches the correct option |
| Logic | 15K | multiple choice and numeric (including puzzles and code-IO transformation problems) | automatic grading |
| General | 66K (+ 12K harmlessness) | helpfulness, harmlessness | helpful RM, safety RM |
Every question is in Chinese or English. Proof problems were excluded because their correctness cannot be judged by rules. This choice itself shows R1’s philosophy: only problems with a trustworthy verifier go into RL.
Cold start data (Appendix B.3.2)
The scale is “thousands.” People rewrote R1-Zero’s thought processes in a natural conversational style, an LLM then used those pairs as examples to rewrite more data in the same style, and people reviewed it once more. The style — understand the problem → detailed reasoning including reflection and verification → first-person narration — was chosen deliberately. The report states plainly that this style is a design for the product experience, that plausible first-person thinking is not evidence that the model thinks like a person, and that it may instead invite excessive trust.
About 800K SFT samples (Appendix B.3.3, Table 5)
| Domain | Samples | Avg. turns | Avg. tokens |
|---|---|---|---|
| Math | 395,285 | 1.0 | 6,094 |
| Code | 211,129 | 1.1 | 7,436 |
| STEM | 10,124 | 1.0 | 4,929 |
| Logic | 10,395 | 1.0 | 2,739 |
| General | 177,812 | 1.1 | 1,420 |
| Total | 804,745 | 1.0 | 5,355 |
The roughly 600k reasoning samples were made by rejection sampling: sample many times from the stage-1 RL checkpoint and keep only correct answers. This time problems that cannot be graded by rules were also included, using V3 as a generative judge, and CoTs with mixed languages, overly long paragraphs or code blocks were filtered out. The roughly 200k non-reasoning samples reuse part of V3’s SFT data and add software-engineering data such as program repair and front-end development. Almost all of it is single-turn, and the report itself notes that this may limit multi-turn conversation ability.
Reward-model data and decontamination
For the helpful RM, V3 was asked to compare two responses in arena-hard format, four times with the A/B positions randomly swapped, and only pairs whose mean score difference exceeded 1 were kept, yielding 66,000 pairs. The length distributions of chosen and rejected responses were also matched. The safety RM was trained point-wise on 106,000 prompts labelled “safe/unsafe” (§3.1). For decontamination, pre-training text sharing a 10-gram with evaluation questions or solutions was removed (about 6 million documents for math alone), and math SFT and RL prompts were taken only from competitions before 2023 (Appendix D.1). The report admits that the n-gram method cannot catch paraphrased problems.
Training
R1-Zero: GRPO alone
Rewriting report Eqs. (1)–(3) in the site’s notation ( question, response, ratio):
The reward is an equally weighted sum (Eq. 4). The accuracy reward compares the boxed answer with the reference answer or runs the code against tests; the format reward checks whether the thinking is inside <think> tags.
Note that the equations are written at the sequence level. The original GRPO of DeepSeekMath computed a ratio for each token and averaged with . The R1 report’s equation is written with , the ratio of whole-response probabilities, with no token average. The report does not say whether this is a simplification of notation or whether the implementation really works that way. Under “Deep dive” below we compute why this difference is decisive for reading the clip setting.
| Hyperparameter (report §2.1) | R1-Zero |
|---|---|
| Learning rate | 3e-6 |
| KL coefficient | 0.001 |
| Rollout temperature | 1.0 |
| Group size | 16 |
| Max generation length | 32,768 (before step 8.2k) → 65,536 (after) |
| Steps | 10,400 (1.6 epochs). One step = one policy update |
| Batch per step | 32 questions × 16 = 512 |
| Rollout | 8,192 generated at once → split into 16 minibatches, 1 inner epoch |
| Reference model | replaced with the latest policy every 400 steps |
Because one rollout (512 questions × 16) is used for 16 policy updates, the later the minibatch, the further and drift apart. Clipping matters in this off-policy stretch.
R1 stage-1 RL: a language-consistency reward
The reasoning RL after the cold start SFT uses almost the same settings as R1-Zero (lr 3e-6, KL 0.001, temperature 1, =16, max 32,768, reference replaced every 400 steps) and adds one more reward.
The share of target-language words in the CoT is added directly to the final reward. In the ablation of Appendix B.6 (R1-Distill-Qwen-7B), without this reward language consistency collapses as training goes on; with it, consistency holds, math scores are similar, and code scores drop slightly. The report gives the GRPO clip ratio for this stage as , adding that “a low value truncates the gradients of many tokens and hurts performance, while a high value makes training unstable” (§3.2.1).
R1 stage-2 RL: a sum of rewards
The helpful RM sees only the final summary, while the safety RM sees the whole response including the thinking. What differs from stage 1 is temperature 0.7 (higher values made generation collapse) and length. Of 1,700 steps in total, general data and preference rewards were added only in the last 400 steps. When added for longer, reward hacking appeared: the reward-model score rose while Codeforces performance fell (Appendix B.5, Figure 6).
SFT and distillation
The cold start SFT and the second SFT trained V3-Base for 2–3 epochs, with a cosine-decayed learning rate 5e-5 → 5e-6, max length 32,768 and batch 128 (Appendix B.4.2). Distillation SFT-ed each base model on the 800K samples for 2–3 epochs, with no RL. Max length 32,768, batch 64, and the learning rate cosine-decays to 1/10 of its initial value (Appendix B.4.3, Table 6).
| Distilled model | Base model | Initial learning rate |
|---|---|---|
| R1-Distill-Qwen-1.5B | Qwen2.5-Math-1.5B | 1e-4 |
| R1-Distill-Qwen-7B | Qwen2.5-Math-7B | 8e-5 |
| R1-Distill-Qwen-14B | Qwen2.5-14B | 7e-5 |
| R1-Distill-Qwen-32B | Qwen2.5-32B | 6e-5 |
| R1-Distill-Llama-8B | Llama-3.1-8B | 5e-5 |
| R1-Distill-Llama-70B | Llama-3.3-70B-Instruct | 2e-5 |
Why GRPO rather than PPO (Appendix A.3)
The report gives three reasons. No value model the size of the policy is needed, and predicting the value of intermediate states is especially hard in a long CoT whose reward comes only at the end (reflection that overturns what was written earlier is common). And PPO adds a per-token KL to the reward, so the accumulated KL grows in proportion to response length, implicitly penalising length; GRPO adds the KL directly to the loss. In a comparison training DeepSeek-Coder-V2-Lite (16B MoE, 2.4B active) on MATH (Figure 4), PPO with GAE (a common default) lags far behind GRPO, and nearly catches up when tuned to . So the accurate conclusion is not “PPO does not work” but “PPO needs more tuning and more memory.”
Training cost (Appendix B.4.4, Table 7)
| R1-Zero | SFT data generation | R1 | Total | |
|---|---|---|---|---|
| H800 GPU hours | 101K | 5K | 41K | 147K |
| Dollars (assuming $2/hour) | $202K | $10K | $82K | $294K |
R1-Zero took about 198 hours on 64×8 H800s, and R1 about 80 hours on the same hardware. That is a little over 5% of pre-training (2,664K GPU hours in the V3 report). Preliminary experiments (such as exploratory runs with a 30B-scale model on A100s) are not included.
Deep dive into the core methods
1. Why responses get longer
In R1-Zero’s Figure 1(b), the mean response length grows steadily throughout training to thousands of tokens, and at step 8.2k, where the max length was raised from 32,768 to 65,536, length and performance jump together. There is no reward for length anywhere, so why does it grow?
Take a simple model. Suppose that for one question the policy chooses only a thinking length ; let the probability of a correct answer be and the max length . A truncated response has no extractable answer, so its reward is 0.
If the length distribution is with mean , the policy gradient becomes a covariance.
For a Gaussian, , so wherever a longer response raises the chance of being correct, this covariance is positive and grows. With no length penalty, there are only two reasons to stop: saturates so that longer brings no gain (easy problems), or the policy reaches the cliff where the reward drops to 0 the moment it passes (hard problems). The lengths for hard problems pile up just before the cliff, and raising pushes the cliff back so they grow again. That is the simplest picture explaining the jump at step 8.2k.
GRPO adds two more factors of its own. If all rewards in a group are equal, and there is no signal, so a question too hard for anyone to solve does not penalise long responses that “got 0 because they were truncated.” And as Dr. GRPO pointed out, in implementations that use the token average , long wrong answers are penalised less. The R1 report’s equation is written at the sequence level, so we cannot check how this bias entered.
KL and reference replacement
Differentiate the k3 estimator as a loss. For a sample ,
and taking the expectation,
So the k3 term pulls to keep probability on responses to which gives probability. This acts as an anchor that protects exploration, but if stays fixed at the short-answering model from early in training, the pull grows as the policy moves away, blocking movement toward thinking longer. R1 replaces with the latest policy every 400 steps, turning this anchor into a trust region that says “stay near the recent policy” (Appendix A.3). Combined with the small value , the KL is effectively a stabiliser and allows the policy to travel far from the base over a long run. It is a choice in the same direction as DAPO dropping the KL term entirely.
The figure below reproduces these two stories as a toy. For each of three kinds of question — easy, medium and hard — the policy has only a distribution over thinking length (a mean and a width), and the reward is correctness alone. It is not a redrawing of the report’s training curves. The report gives only the start (15.6%) and end (77.9%) numbers in the text and does not release the raw curve data.
표를 단계별로 읽으면 각 단계의 역할이 분명해진다.
- R1-Zero → Dev1. 수천 개의 cold start 데이터만으로 SFT하면 IF-Eval이 46.6 → 71.7, AlpacaEval이 24.7 → 50.1로 오르지만 AIME는 77.9 → 59.0, CNMO는 88.1 → 58.0으로 떨어진다. 형식은 사람 같아졌지만 추론력은 대규모 RL을 거친 R1-Zero에 못 미친다.
- Dev1 → Dev2 (추론 RL). AIME 74.0, Codeforces rating 1534 → 1687, MMLU-Pro 74.1 → 83.8. 추론 RL은 추론 벤치마크를 올리고 사용자 선호 지표(AlpacaEval 50.1 → 55.8)에는 영향이 작다.
- Dev2 → Dev3 (rejection sampling + SFT). 비추론 데이터와 소프트웨어 공학 데이터가 들어가며 Aider-Polyglot 25.6 → 44.8, AlpacaEval 55.8 → 62.1.
- Dev3 → R1 (혼합 RL). 수학·코드는 조금 오르고, AlpacaEval 62.1 → 87.6, ArenaHard 75.6 → 92.3이 크게 오른다.
GPQA Diamond(75.8 → 71.5)와 CNMO(88.1 → 78.8)는 최종 R1이 R1-Zero보다 낮다. 가독성과 일반 능력을 사는 대가로 일부 추론 점수를 내준 셈이다.
RL 인프라
부록 B.1의 RL 프레임워크는 네 모듈로 나뉜다. Rollout은 vLLM worker에서 응답을 샘플링하는데, V3 MoE를 위해 노드 간 expert parallelism과 hot expert 복제를 쓰고, MTP 모듈로 self-speculative decoding을 해서 가장 긴 샘플의 완료 시간을 줄인다. Inference 모듈은 보상모델과 reference 모델의 forward를, Rule-based Reward 모듈은 코드 실행·답 비교·형식 검사를 비동기로 처리해 rollout과 겹친다. Training 모듈은 길이로 정렬한 뒤 Best-Fit으로 고정 길이 청크에 패킹해 padding을 줄이고 DualPipe로 파이프라인 병렬화한다. 각 모듈이 끝나면 모델을 VRAM에서 내려 다음 모듈에 메모리를 넘긴다. 사전학습에서 만든 MTP가 RL rollout 가속기로 재활용되는 점이 눈에 띈다.
데이터
RL 프롬프트 (보고서 Table 4, 부록 B.3.1)
| 종류 | 프롬프트 수 | 형태 | 보상 |
|---|---|---|---|
| 수학 | 26K | 수치·식·방정식 답 (증명 제외) | 참조 답과 일치하면 1, 아니면 0 |
| 코드 | 17K 알고리즘 + 8K 버그 수정 | 코드 | 숨은 테스트 통과 / 실제 GitHub issue의 단위 테스트 |
| STEM | 22K | 4–8지 객관식 (화학 46.5%, 생물 30.7%, 물리 15.5%) | 정답 선택지 일치 |
| 논리 | 15K | 객관식·수치 (퍼즐, code-IO 변환 문제 포함) | 자동 채점 |
| 일반 | 66K (+ 무해성 12K) | 도움됨·무해함 | helpful RM, safety RM |
모든 질문은 중국어나 영어다. 증명 문제를 뺀 이유는 정오를 규칙으로 판정할 수 없어서다. 이 선택 자체가 R1의 철학을 보여 준다. 신뢰할 수 있는 검증기가 있는 문제만 RL에 넣는다.
Cold start 데이터 (부록 B.3.2)
“수천 개” 규모다. R1-Zero의 사고 과정을 사람이 자연스러운 대화체로 고쳐 쓰고, 그 쌍을 예시로 LLM이 더 많은 데이터를 같은 스타일로 다시 쓰게 한 뒤, 사람이 한 번 더 검수했다. 문제 이해 → 반성과 검증을 포함한 상세 추론 → 1인칭 서술이라는 스타일을 의도적으로 고른 것이다. 보고서는 이 스타일이 제품 경험을 위한 설계이며, 그럴듯한 1인칭 사고가 모델이 사람처럼 생각한다는 근거가 아니고 오히려 과도한 신뢰를 부를 수 있다고 직접 적었다.
약 80만 SFT 샘플 (부록 B.3.3, Table 5)
| 분야 | 샘플 수 | 평균 턴 | 평균 토큰 |
|---|---|---|---|
| 수학 | 395,285 | 1.0 | 6,094 |
| 코드 | 211,129 | 1.1 | 7,436 |
| STEM | 10,124 | 1.0 | 4,929 |
| 논리 | 10,395 | 1.0 | 2,739 |
| 일반 | 177,812 | 1.1 | 1,420 |
| 합계 | 804,745 | 1.0 | 5,355 |
추론 데이터 약 600k는 1단계 RL 체크포인트에서 여러 번 샘플링해 정답만 남기는 rejection sampling으로 만들었다. 이번에는 규칙으로 채점할 수 없는 문제도 V3를 생성형 판정자로 써서 포함했고, 언어가 섞이거나 문단이 너무 길거나 코드 블록이 든 CoT는 걸렀다. 비추론 데이터 약 200k는 V3의 SFT 데이터 일부를 재사용하고 프로그램 수리·프론트엔드 개발 같은 소프트웨어 공학 데이터를 더했다. 거의 전부가 단일 턴이라 멀티턴 대화 능력이 제한될 수 있다고 보고서가 스스로 적었다.
보상모델 데이터와 오염 제거
helpful RM은 V3에 arena-hard 형식으로 두 응답을 비교하게 하되 A/B 위치를 무작위로 바꿔 가며 네 번 묻고 평균 점수 차가 1을 넘는 쌍만 남겨 66,000쌍을 만들었다. 선택/거절 응답의 길이 분포도 맞췄다. safety RM은 “safe/unsafe”로 라벨링된 106,000개 프롬프트로 point-wise 학습했다(§3.1). 오염 제거는 평가 문제·풀이와 10-gram이 겹치는 사전학습 텍스트를 지웠고(수학에서만 약 600만 건), 수학 SFT·RL 프롬프트는 2023년 이전 대회에서만 가져왔다(부록 D.1). 보고서는 n-gram 방식이 바꿔 쓴(paraphrase) 문제는 막지 못한다고 인정한다.
학습
R1-Zero: GRPO 하나로
보고서 식 (1)–(3)을 사이트 표기( 질문, 응답, ratio)로 옮기면 다음과 같다.
보상은 같은 가중치의 합 이다(식 4). 정답 보상은 상자 안 답을 참조 답과 비교하거나 코드를 테스트에 돌려서, 형식 보상은 사고 과정이 <think> 태그 안에 있는지로 준다.
식이 시퀀스 단위로 쓰여 있다는 점에 주의하자. 원래 DeepSeekMath의 GRPO는 토큰마다 ratio를 구하고 로 평균하는 형태였다. R1 보고서의 식은 , 즉 응답 전체 확률의 비로 적혀 있고 토큰 평균이 없다. 표기를 단순화한 것인지 구현이 실제로 그런지는 보고서가 밝히지 않는다. 이 차이가 clip 설정을 읽는 데 결정적이라는 것을 아래 “깊게 보기”에서 계산한다.
| 하이퍼파라미터 (보고서 §2.1) | R1-Zero |
|---|---|
| 학습률 | 3e-6 |
| KL 계수 | 0.001 |
| rollout 온도 | 1.0 |
| 그룹 크기 | 16 |
| 최대 생성 길이 | 32,768 (8.2k step 이전) → 65,536 (이후) |
| step 수 | 10,400 (1.6 epoch). step = 정책 업데이트 1회 |
| step당 배치 | 질문 32개 × 16 = 512 |
| rollout | 한 번에 8,192개 생성 → 16개 minibatch로 나눠 inner epoch 1회 |
| reference 모델 | 400 step마다 최신 정책으로 교체 |
한 rollout(질문 512개 × 16)으로 정책을 16번 업데이트하므로, 뒤쪽 minibatch일수록 와 가 벌어진다. clip이 의미를 갖는 것은 이 off-policy 구간이다.
R1 1단계 RL: 언어 일관성 보상
cold start SFT 다음의 추론 RL은 R1-Zero와 거의 같은 설정(lr 3e-6, KL 0.001, 온도 1, =16, 최대 32,768, 400 step마다 reference 교체)에 보상 하나를 더한다.
CoT에서 목표 언어 단어가 차지하는 비율을 최종 보상에 그대로 더한다. 부록 B.6의 ablation(R1-Distill-Qwen-7B)에서 이 보상이 없으면 학습이 진행될수록 언어 일관성이 무너지고, 넣으면 유지되며, 수학 점수는 비슷하고 코드 점수는 약간 떨어졌다. 보고서는 이 단계의 GRPO clip 비율을 ****으로 적었고, “낮으면 많은 토큰의 gradient가 잘려 성능이 떨어지고 높으면 불안정해진다”고 덧붙였다(§3.2.1).
R1 2단계 RL: 보상의 합
helpful RM은 최종 요약만 보고, safety RM은 사고 과정을 포함한 응답 전체를 본다. 1단계와 다른 점은 온도 0.7(높으면 생성이 무너졌다)과 길이다. 총 1,700 step 가운데 일반 데이터와 선호 보상은 마지막 400 step에만 넣었다. 더 오래 넣으면 보상모델 점수는 오르는데 Codeforces 성능은 떨어지는 reward hacking이 나타났기 때문이다(부록 B.5, Figure 6).
SFT와 증류
cold start SFT와 2차 SFT는 V3-Base를 2–3 epoch, cosine 감쇠 학습률 5e-5 → 5e-6, 최대 길이 32,768, 배치 128로 학습했다(부록 B.4.2). 증류는 80만 샘플로 각 base 모델을 2–3 epoch SFT하고 RL은 하지 않았다. 최대 길이 32,768, 배치 64, 학습률은 초기값의 1/10까지 cosine 감쇠한다(부록 B.4.3, Table 6).
| 증류 모델 | base 모델 | 초기 학습률 |
|---|---|---|
| R1-Distill-Qwen-1.5B | Qwen2.5-Math-1.5B | 1e-4 |
| R1-Distill-Qwen-7B | Qwen2.5-Math-7B | 8e-5 |
| R1-Distill-Qwen-14B | Qwen2.5-14B | 7e-5 |
| R1-Distill-Qwen-32B | Qwen2.5-32B | 6e-5 |
| R1-Distill-Llama-8B | Llama-3.1-8B | 5e-5 |
| R1-Distill-Llama-70B | Llama-3.3-70B-Instruct | 2e-5 |
왜 PPO가 아니라 GRPO인가 (부록 A.3)
보고서가 드는 이유는 세 가지다. 정책과 같은 크기의 value model이 필요 없고, 보상이 끝에만 있는 긴 CoT에서 중간 상태의 가치를 맞히는 것은 특히 어렵다(앞에서 쓴 내용을 뒤에서 뒤집는 반성이 흔하므로). 그리고 PPO는 토큰마다 KL을 보상에 더하므로 누적 KL이 응답 길이에 비례해 커지고, 그 결과 응답 길이를 암묵적으로 벌한다. GRPO는 KL을 손실에 직접 더한다. DeepSeek-Coder-V2-Lite(16B MoE, 2.4B 활성)로 MATH를 학습한 비교(Figure 4)에서 PPO는 GAE의 (흔한 기본값)일 때 GRPO보다 크게 뒤지고, 으로 조정하면 거의 따라잡았다. 즉 “PPO가 안 된다”가 아니라 “PPO는 튜닝이 더 필요하고 메모리가 더 든다”가 정확한 결론이다.
학습 비용 (부록 B.4.4, Table 7)
| R1-Zero | SFT 데이터 생성 | R1 | 합계 | |
|---|---|---|---|---|
| H800 GPU 시간 | 101K | 5K | 41K | 147K |
| 달러 (시간당 $2 가정) | $202K | $10K | $82K | $294K |
R1-Zero는 64×8 H800에서 약 198시간, R1은 같은 장비에서 약 80시간이었다. 사전학습(V3 보고서의 2,664K GPU 시간)에 비하면 5% 남짓이다. 다만 사전 실험(30B 규모 모델로 A100에서 한 예비 실험 등)은 포함되지 않았다.
핵심 method 깊게 보기
1. 왜 응답이 길어지는가
R1-Zero의 Figure 1(b)에서 평균 응답 길이는 학습 내내 꾸준히 늘어 수천 토큰에 이르고, 최대 길이를 32,768에서 65,536으로 올린 8.2k step에서 길이와 성능이 함께 뛴다. 길이에 대한 보상은 어디에도 없는데 왜 길어질까?
간단한 모형으로 보자. 질문 하나에 대해 정책이 생각 길이 만 고른다고 하고, 정답 확률을 , 최대 길이를 라 하자. 잘린 응답은 답을 추출할 수 없으니 보상이 0이다.
길이 분포를 평균 의 분포 로 두면 policy gradient는 공분산이 된다.
가우시안이면 이므로, 길수록 정답 확률이 오르는 구간에서는 이 공분산이 양수이고 가 커진다. 길이 벌점이 없으니 멈출 이유는 두 가지뿐이다. 이 포화되어 더 길어도 이득이 없거나(쉬운 문제), 를 넘는 순간 보상이 0으로 떨어지는 절벽에 닿는 경우(어려운 문제)다. 어려운 문제의 길이는 절벽 바로 앞에 쌓이고, 를 올리면 절벽이 물러나 다시 길어진다. 8.2k step의 도약을 설명하는 가장 단순한 그림이다.
여기에 GRPO 고유의 요인이 둘 더 있다. 그룹 보상이 모두 같으면 이라 신호가 없는데, 너무 어려워 아무도 못 맞히는 질문은 “잘려서 0점”인 긴 응답에도 벌을 주지 않는다. 그리고 Dr. GRPO가 지적했듯 토큰 평균 을 쓰는 구현에서는 긴 오답이 덜 벌받는다. R1 보고서의 식은 시퀀스 단위로 쓰여 있어 이 편향이 어떻게 들어갔는지 확인할 수 없다.
KL과 reference 교체
k3 추정량을 손실로 미분해 보자. 샘플 에 대해
이고, 기대값을 취하면
다. 즉 k3 항은 가 확률을 주는 응답에 도 확률을 남기도록 당긴다. 이것이 탐색을 지키는 닻이 되지만, 가 학습 초기의 짧게 답하는 모델로 고정되어 있으면 정책이 멀어질수록 당기는 힘이 커져 길게 생각하는 방향으로의 이동을 막는다. R1은 400 step마다 를 최신 정책으로 바꿔 이 닻을 “최근 정책 근처에 머물라”는 신뢰 영역(trust region)으로 바꾸었다(부록 A.3). 이라는 작은 값과 함께 쓰면 KL은 사실상 안정화 장치이고, 긴 학습 동안 정책이 base에서 멀리 가는 것을 허용한다. DAPO가 KL 항을 아예 뺀 것과 같은 방향의 선택이다.
아래 그림이 이 두 이야기를 장난감으로 재현한다. 정책은 쉬움·중간·어려움 세 종류의 질문마다 생각 길이의 분포(평균과 폭)만 가지며, 보상은 정답 여부뿐이다. 보고서의 학습 곡선을 다시 그린 것이 아니다. 보고서는 시작(15.6%)과 끝(77.9%) 숫자만 본문에 적고 곡선의 원자료는 공개하지 않았다.
- At the defaults, the length for hard problems stalls below the 32K cap (around 25K), and the moment the cap is raised to 64K it jumps into the 50Ks while accuracy rises from around 0.65 to nearly 0.9. Set the timing slider to 0 and accuracy stays stuck to the end.
- β=0.3 with no replacement: the anchor is fixed to the initial policy (short answers), and length barely grows. At the same β, change the replacement period to 50 and length and accuracy rise again.
- Cut G to 4 and the groups that are “all wrong” or “all right” grow to around 60% (grey dashed line), so most of the batch produces no gradient and the curve turns jagged. The larger the group, the more likely that even a hard question yields at least one correct sample, and with it a signal. That is why R1 drew 16 per question.
- The easy problems also get longer than at the start. Length costs nothing, so there is no reason to stop short either. It is a toy version of the overthinking the report lists as a limitation.
import numpy as np
# ---- Toy R1-Zero: the policy only chooses "how long to think" ----
LENS = 1.0 + 2.0 * np.arange(40) # thinking-length bins (in K tokens): 1, 3, ..., 79
MID = np.array([0.0, 14.0, 36.0]) # easy/medium/hard: length at which accuracy is half
WID = np.array([3.0, 5.0, 6.0])
PMAX = np.array([0.97, 0.95, 0.90])
P_OK = PMAX[:, None] / (1 + np.exp(-(LENS[None, :] - MID[:, None]) / WID[:, None]))
def length_dist(mu, log_sd): # discretised Gaussian over lengths = policy π(n)
z = -(LENS - mu) ** 2 / (2 * np.exp(2 * log_sd))
e = np.exp(z - z.max()); return e / e.sum()
def grpo_run(steps=300, G=16, beta=0.02, switch=150, ref_every=50, prompts=8, seed=0):
rng = np.random.default_rng(seed)
mu, ls = np.full(3, 8.0), np.full(3, np.log(5.0)) # the "base model" answers briefly
ref = [length_dist(mu[d], ls[d]) for d in range(3)]
log = []
for t in range(steps):
L_max = 64 if (switch and t >= switch) else 32 # report: 32,768 → 65,536 at step 8.2k
acc, mean_len, zero_var = 0.0, np.zeros(3), 0
for d in range(3):
pi = length_dist(mu[d], ls[d]); var = np.exp(2 * ls[d])
n = np.searchsorted(np.cumsum(pi), rng.random((prompts, G))).clip(0, 39).astype(np.intp)
L = LENS[n]
r = ((L <= L_max) & (rng.random((prompts, G)) < P_OK[d, n])).astype(float) # truncated → 0 points
sd = r.std(1, keepdims=True)
A = (r - r.mean(1, keepdims=True)) / (sd + 1e-6) # GRPO advantage
zero_var += int((sd < 1e-8).sum())
w = A - beta * (1.0 - ref[d][n] / pi[n]) # + d(k3 KL)/d(log π)
g_mu = (LENS - mu[d]) / var; g_ls = (LENS - mu[d]) ** 2 / var # the two components of ∇ log π(n)
gm = (w * (g_mu[n] - pi @ g_mu)).mean(); gs = (w * (g_ls[n] - pi @ g_ls)).mean()
mu[d] += 0.3 * var * gm # natural-gradient step
ls[d] = np.clip(ls[d] + 0.05 * gs, np.log(3), np.log(30))
acc += r.mean() / 3; mean_len[d] = np.minimum(L, L_max).mean()
if ref_every and (t + 1) % ref_every == 0: # report: π_ref ← π_θ every 400 steps
ref = [length_dist(mu[d], ls[d]) for d in range(3)]
log.append((acc, *mean_len, zero_var / (3 * prompts)))
return np.array(log)
def show(name, h):
w = lambda a, b: h[a:b].mean(0)
s1, s2, s3 = w(130, 150), w(170, 190), w(280, 300)
print(f"{name:24s} accuracy {s1[0]:.2f} → {s2[0]:.2f} → {s3[0]:.2f} | "
f"hard length {s1[3]:4.1f}K → {s3[3]:4.1f}K | easy length {s3[1]:4.1f}K")
print("window means: steps 130–150 (end of 32K cap) → 170–190 (just after 64K) → 280–300\n")
base = grpo_run()
show("default (G=16, β=0.02)", base)
show("cap never raised", grpo_run(switch=0))
show("β=0.3, π_ref fixed", grpo_run(beta=0.3, ref_every=0))
show("β=0.3, reset every 50", grpo_run(beta=0.3, ref_every=50))
g4 = grpo_run(G=4)
show("G=4", g4)
print(f"\nmean share of no-signal groups (all rewards equal): G=4 {g4[:, 4].mean():.2f} vs G=16 {base[:, 4].mean():.2f}")Four things can be checked. Without raising the cap, accuracy stops around 0.65. A strong KL to a fixed reference almost stalls learning, but with the same β, periodically replacing the reference recovers it. With small groups, more than 70% of groups carry no signal. And the length for easy problems has also grown to more than twice its starting value (about 8K). That the toy’s accuracy curve resembles the real R1-Zero’s 15.6% → 77.9% in shape is no evidence that the cause is the same. This model hard-codes the assumption “length = more attempts.” In the real model, what came with growing length was a change in behaviour — reflection, verification, exploring alternatives — and the report says that the frequency of reflective words (“wait”, “mistake”, “verify”, etc.) rose 5–7× over early training, with “wait” appearing occasionally around steps 4,000–7,000 and surging after step 8,000 (Appendix C.2).
What does the report give as the direct reason that R1-Zero's response length and AIME performance jumped together at step 8.2k?
§2.1 states that “before step 8.2k we sample up to 32,768 tokens, and afterwards up to 65,536, and as a result both performance and response length jump substantially at step 8.2k.” Reference replacement is a routine operation every 400 steps, and the format reward was there from the start. In RL with no length reward, the max generation length is a hidden hyperparameter. Responses that hit the cap get reward 0, so the cap becomes the ceiling on the lengths the policy can explore.
2. The unit of the ratio and
The clip ratio of R1’s stage-1 RL is 50 times the 0.2 common in PPO. To understand this number, first settle what the ratio is a ratio of. If the token ratios carry independent small noise , the sequence ratio is
so it spreads on a log scale in proportion to the square root of the length . On responses tens of thousands of tokens long, even a very small makes swing by factors of tens.
import numpy as np
rng = np.random.default_rng(0)
# If one rollout is split into 16 minibatches updated in turn, later minibatches are scored by an already-changed π_θ.
# Assume that per token, log ρ_t = log π_θ − log π_old is independent N(0, σ²) noise (σ is an assumed value).
sigma = 0.03
N = 20_000
def outside(r, eps):
return ((r < 1 - eps) | (r > 1 + eps)).mean()
tok = np.exp(rng.normal(0, sigma, N)) # token-level ratio ρ_t
print(f"token ρ_t: share outside clip ε=0.2 → {outside(tok, 0.2):.3f}, ε=10 → {outside(tok, 10):.3f}\n")
print(f"{'length T':>8s} | share of sequence ρ = Π ρ_t outside clip (ε=0.2 / ε=10) | central 90% range")
for T in [1_000, 8_000, 32_000]:
# Eq. (1) taken literally: π_θ(y|x)/π_old(y|x) = exp(Σ_t log ρ_t), Σ ~ N(0, T σ²)
seq = np.exp(rng.normal(0, sigma * np.sqrt(T), N))
lo, hi = np.percentile(seq, [5, 95])
print(f"{T:8d} | {outside(seq, 0.2):.3f} / {outside(seq, 10):.3f}"
f"{'':36s}| [{lo:.2g}, {hi:.2g}]")
print("\n→ At the token level, ε=10 is effectively clipping switched off;")
print(" at the sequence level, ε=0.2 clips away most long responses. The same ε means something entirely different depending on the unit of the ratio.")Both readings are possible. If Eq. (1) is read literally as a sequence ratio, ε=0.2 would clip almost every long response and kill its gradient, so a wide range like ε=10 is natural. If instead the implementation is token-level (DeepSeekMath’s original form), ε=10 is almost the same as turning clipping off, and the remaining stabilisers are the single inner epoch, the small learning rate and the KL. The report’s explanation, “a low value truncates the gradients of many tokens,” suggests a token-level implementation, but this cannot be settled. The ambiguity is connected to why GSPO separately defined a length-normalised sequence ratio .
For local comparison, here is a PyTorch loss function that contains both readings.
import torch
def grpo_loss(logp, logp_old, logp_ref, rewards, mask, eps=0.2, beta=1e-3, level="token"):
"""GRPO loss (to be minimised) for G responses to one question.
logp: (G, T) token log-probs under the current policy (with grad)
logp_old: (G, T) log-probs under the sampling policy (detached)
logp_ref: (G, T) log-probs under the reference policy (detached)
rewards: (G,) r_acc + r_format (+ r_language)
mask: (G, T) 1 for response tokens, 0 for padding
"""
A = (rewards - rewards.mean()) / (rewards.std(unbiased=False) + 1e-6) # Eq. (3)
if level == "sequence":
# Eq. (1) taken literally: ρ_i = π_θ(y_i|x) / π_old(y_i|x)
log_ratio = ((logp - logp_old) * mask).sum(-1) # (G,)
ratio = log_ratio.exp() # can explode/vanish on long responses
pg = torch.min(ratio * A, ratio.clamp(1 - eps, 1 + eps) * A)
d = ((logp_ref - logp) * mask).sum(-1) # log π_ref(y)/π_θ(y)
kl = d.exp() - d - 1 # Eq. (2): sequence-level k3
per_seq = pg - beta * kl
else:
# DeepSeekMath-style token level: ρ_{i,t}, per-token k3, 1/|y_i| average per response
ratio = (logp - logp_old).exp()
pg = torch.min(ratio * A[:, None], ratio.clamp(1 - eps, 1 + eps) * A[:, None])
d = logp_ref - logp
kl = d.exp() - d - 1
per_seq = ((pg - beta * kl) * mask).sum(-1) / mask.sum(-1).clamp(min=1)
return -per_seq.mean() # 1/G Σ_i, sign flipped
# R1-Zero settings: G=16, beta=1e-3, lr=3e-6, temperature 1.0, ref replaced every 400 steps
# R1 stage-1 RL: the above + eps=10 (as written in the report), reward += language-consistency ratioExperimental results
R1-Zero’s training curve and test-time compute
R1-Zero’s AIME 2024 pass@1 rose from 15.6% → 77.9% during training, and with a 16-sample majority vote (cons@16) it was 86.7% (§2.3). Evaluation uses a max generation length of 32,768, temperature 0.6 and top-p 0.95, drawing samples per problem (64 for AIME and GPQA, 16 for MATH and Codeforces, 8 for LiveCodeBench) and reporting the mean accuracy as pass@1 (Appendix D.1). Greedy evaluation of long-output reasoning models was not used, the report says, because it increases repetition and makes checkpoint-to-checkpoint variation large.
R1 changes how long it thinks according to problem difficulty. On 2024 competition problems it thought for 8,793 tokens on average and solved 61.8%, using fewer than 7,000 tokens on easy problems and more than 18,000 on the hardest. On the same problems GPT-4o 0513 averaged 711 tokens and scored 24.7% (Appendix E.4).
Stage-by-stage results and comparison with other models (report Table 8)
- 기본값에서 어려운 문제의 길이는 상한 32K 아래(25K 안팎)에서 정체하고, 상한을 64K로 올리는 순간 50K 대로 뛰며 정답률이 0.65 근처에서 0.9 가까이 오른다. 시점 슬라이더를 0으로 두면 정답률은 끝까지 정체한다.
- β=0.3, 교체 안 함: 닻이 초기 정책(짧은 답)에 고정되어 길이가 거의 늘지 않는다. 같은 β로 교체 주기를 50으로 바꾸면 길이와 정답률이 다시 오른다.
- G=4로 줄이면 “모두 오답” 또는 “모두 정답”인 그룹이 60% 안팎으로 늘어(회색 점선) 배치의 대부분이 gradient를 만들지 못하고 곡선이 들쭉날쭉해진다. 그룹이 클수록 어려운 질문에서도 한 번쯤 맞힌 샘플이 나와 신호가 생긴다. R1이 질문당 16개를 뽑은 이유다.
- 쉬운 문제의 길이도 처음보다 길어진다. 길이에 비용이 없으니 짧게 끝낼 이유도 없다. 보고서가 한계로 든 **과잉 사고(overthinking)**의 장난감 판이다.
import numpy as np
# ---- 장난감 R1-Zero: 정책은 "얼마나 길게 생각할지"만 고른다 ----
LENS = 1.0 + 2.0 * np.arange(40) # 생각 길이 구간 (K 토큰 단위): 1, 3, ..., 79
MID = np.array([0.0, 14.0, 36.0]) # 쉬움/중간/어려움: 정답률이 절반이 되는 길이
WID = np.array([3.0, 5.0, 6.0])
PMAX = np.array([0.97, 0.95, 0.90])
P_OK = PMAX[:, None] / (1 + np.exp(-(LENS[None, :] - MID[:, None]) / WID[:, None]))
def length_dist(mu, log_sd): # 길이 위의 이산화된 가우시안 = 정책 π(n)
z = -(LENS - mu) ** 2 / (2 * np.exp(2 * log_sd))
e = np.exp(z - z.max()); return e / e.sum()
def grpo_run(steps=300, G=16, beta=0.02, switch=150, ref_every=50, prompts=8, seed=0):
rng = np.random.default_rng(seed)
mu, ls = np.full(3, 8.0), np.full(3, np.log(5.0)) # "base 모델"은 짧게 답한다
ref = [length_dist(mu[d], ls[d]) for d in range(3)]
log = []
for t in range(steps):
L_max = 64 if (switch and t >= switch) else 32 # 보고서: 8.2k step에서 32,768 → 65,536
acc, mean_len, zero_var = 0.0, np.zeros(3), 0
for d in range(3):
pi = length_dist(mu[d], ls[d]); var = np.exp(2 * ls[d])
n = np.searchsorted(np.cumsum(pi), rng.random((prompts, G))).clip(0, 39).astype(np.intp)
L = LENS[n]
r = ((L <= L_max) & (rng.random((prompts, G)) < P_OK[d, n])).astype(float) # 잘리면 0점
sd = r.std(1, keepdims=True)
A = (r - r.mean(1, keepdims=True)) / (sd + 1e-6) # GRPO advantage
zero_var += int((sd < 1e-8).sum())
w = A - beta * (1.0 - ref[d][n] / pi[n]) # + d(k3 KL)/d(log π)
g_mu = (LENS - mu[d]) / var; g_ls = (LENS - mu[d]) ** 2 / var # ∇ log π(n) 의 두 성분
gm = (w * (g_mu[n] - pi @ g_mu)).mean(); gs = (w * (g_ls[n] - pi @ g_ls)).mean()
mu[d] += 0.3 * var * gm # natural-gradient 스텝
ls[d] = np.clip(ls[d] + 0.05 * gs, np.log(3), np.log(30))
acc += r.mean() / 3; mean_len[d] = np.minimum(L, L_max).mean()
if ref_every and (t + 1) % ref_every == 0: # 보고서: 400 step마다 π_ref ← π_θ
ref = [length_dist(mu[d], ls[d]) for d in range(3)]
log.append((acc, *mean_len, zero_var / (3 * prompts)))
return np.array(log)
def show(name, h):
w = lambda a, b: h[a:b].mean(0)
s1, s2, s3 = w(130, 150), w(170, 190), w(280, 300)
print(f"{name:22s} 정답률 {s1[0]:.2f} → {s2[0]:.2f} → {s3[0]:.2f} | "
f"어려운 문제 길이 {s1[3]:4.1f}K → {s3[3]:4.1f}K | 쉬운 문제 길이 {s3[1]:4.1f}K")
print("구간 평균: step 130–150 (32K 상한 끝) → 170–190 (64K 직후) → 280–300\n")
base = grpo_run()
show("기본 (G=16, β=0.02)", base)
show("상한을 올리지 않음", grpo_run(switch=0))
show("β=0.3, π_ref 고정", grpo_run(beta=0.3, ref_every=0))
show("β=0.3, 50 step마다 교체", grpo_run(beta=0.3, ref_every=50))
g4 = grpo_run(G=4)
show("G=4", g4)
print(f"\n신호 없는(보상이 모두 같은) 그룹 비율 평균: G=4 {g4[:, 4].mean():.2f} vs G=16 {base[:, 4].mean():.2f}")네 가지를 확인할 수 있다. 상한을 올리지 않으면 정답률이 0.65 근처에서 멈춘다. 고정된 reference에 강한 KL을 걸면 학습이 거의 진행되지 않지만 같은 β라도 reference를 주기적으로 바꾸면 회복한다. 그룹이 작으면 신호 없는 그룹이 70%를 넘는다. 그리고 쉬운 문제의 길이도 처음(약 8K)의 두 배 이상으로 늘어 있다. 장난감의 정답률 곡선이 실제 R1-Zero의 15.6% → 77.9%와 모양이 닮았다고 해서 원인이 같다는 증거는 아니다. 이 모형은 “길이 = 더 많은 시도”라는 가정을 박아 넣었다. 실제 모델에서 길이가 늘며 생긴 것은 반성·검증·대안 탐색이라는 행동의 변화였고, 보고서는 반성 단어(“wait”, “mistake”, “verify” 등) 빈도가 학습 초기보다 5–7배 늘었고 “wait”는 4,000–7,000 step에 가끔 나오다 8,000 step 이후 급증했다고 보고한다(부록 C.2).
R1-Zero의 응답 길이와 AIME 성능이 8.2k step에서 함께 뛴 직접적인 이유로 보고서가 적은 것은?
§2.1에 “8.2k step 이전에는 최대 32,768, 이후에는 65,536 토큰으로 샘플링하며, 그 결과 성능과 응답 길이 모두 8.2k step에서 크게 뛴다”고 적혀 있다. reference 교체는 400 step마다 일어나는 정기 작업이고, 형식 보상은 처음부터 있었다. 길이 보상이 없는 RL에서 최대 생성 길이는 숨은 하이퍼파라미터다. 상한에 닿는 응답은 보상 0을 받으므로 상한이 곧 정책이 탐색할 수 있는 길이의 천장이 된다.
2. ratio의 단위와
R1 1단계 RL의 clip 비율 은 PPO에서 흔한 0.2와 50배 차이다. 이 숫자를 이해하려면 ratio가 무엇의 비인지부터 정해야 한다. 토큰 ratio 들이 독립적인 작은 잡음 을 가진다고 하면 시퀀스 ratio는
이므로 길이 의 제곱근에 비례해 로그 스케일로 퍼진다. 수만 토큰짜리 응답에서는 가 아주 작아도 가 수십 배씩 흔들린다.
import numpy as np
rng = np.random.default_rng(0)
# 한 rollout을 16개 minibatch로 나눠 차례로 업데이트하면 뒤쪽 minibatch는 이미 바뀐 π_θ로 평가된다.
# 토큰마다 log ρ_t = log π_θ − log π_old 가 독립 N(0, σ²) 잡음이라고 가정한다(σ는 가정값).
sigma = 0.03
N = 20_000
def outside(r, eps):
return ((r < 1 - eps) | (r > 1 + eps)).mean()
tok = np.exp(rng.normal(0, sigma, N)) # 토큰 단위 ratio ρ_t
print(f"토큰 ρ_t: clip 밖 비율 ε=0.2 → {outside(tok, 0.2):.3f}, ε=10 → {outside(tok, 10):.3f}\n")
print(f"{'길이 T':>7s} | 시퀀스 ρ = Π ρ_t 의 clip 밖 비율 (ε=0.2 / ε=10) | 중앙 90% 구간")
for T in [1_000, 8_000, 32_000]:
# 식 (1)을 문자 그대로: π_θ(y|x)/π_old(y|x) = exp(Σ_t log ρ_t), Σ ~ N(0, T σ²)
seq = np.exp(rng.normal(0, sigma * np.sqrt(T), N))
lo, hi = np.percentile(seq, [5, 95])
print(f"{T:7d} | {outside(seq, 0.2):.3f} / {outside(seq, 10):.3f}"
f"{'':26s}| [{lo:.2g}, {hi:.2g}]")
print("\n→ 토큰 단위라면 ε=10은 clip을 사실상 끈 것과 같고,")
print(" 시퀀스 단위라면 ε=0.2는 긴 응답 대부분을 잘라 낸다. 같은 ε라도 ratio의 단위에 따라 뜻이 완전히 다르다.")두 해석이 모두 가능하다. 식 (1)을 문자 그대로 읽어 시퀀스 ratio라면, ε=0.2로는 긴 응답 거의 전부가 clip되어 gradient가 사라지므로 ε=10처럼 넓은 범위가 자연스럽다. 반대로 구현이 토큰 단위(DeepSeekMath의 원래 형태)라면 ε=10은 clip을 끈 것과 거의 같고, 남는 안정화 장치는 inner epoch 1회와 작은 학습률, KL뿐이다. 보고서의 설명 “낮은 값은 많은 토큰의 gradient를 자른다”는 토큰 단위 구현을 시사하지만 확정할 수는 없다. 이 모호함은 GSPO가 길이로 정규화한 시퀀스 ratio 를 따로 정의한 이유와 맞닿아 있다.
로컬에서 비교해 볼 수 있도록 두 해석을 모두 담은 손실 함수를 PyTorch로 적어 둔다.
import torch
def grpo_loss(logp, logp_old, logp_ref, rewards, mask, eps=0.2, beta=1e-3, level="token"):
"""한 질문에 대한 G개 응답의 GRPO 손실 (최소화할 값).
logp: (G, T) 현재 정책의 토큰 log-prob (grad 있음)
logp_old: (G, T) 샘플링 정책 log-prob (detach)
logp_ref: (G, T) reference 정책 log-prob (detach)
rewards: (G,) r_acc + r_format (+ r_language)
mask: (G, T) 응답 토큰 1, padding 0
"""
A = (rewards - rewards.mean()) / (rewards.std(unbiased=False) + 1e-6) # 식 (3)
if level == "sequence":
# 식 (1)을 문자 그대로: ρ_i = π_θ(y_i|x) / π_old(y_i|x)
log_ratio = ((logp - logp_old) * mask).sum(-1) # (G,)
ratio = log_ratio.exp() # 긴 응답에서 폭발/소멸 가능
pg = torch.min(ratio * A, ratio.clamp(1 - eps, 1 + eps) * A)
d = ((logp_ref - logp) * mask).sum(-1) # log π_ref(y)/π_θ(y)
kl = d.exp() - d - 1 # 식 (2): 시퀀스 단위 k3
per_seq = pg - beta * kl
else:
# DeepSeekMath식 토큰 단위: ρ_{i,t}, 토큰별 k3, 응답마다 1/|y_i| 평균
ratio = (logp - logp_old).exp()
pg = torch.min(ratio * A[:, None], ratio.clamp(1 - eps, 1 + eps) * A[:, None])
d = logp_ref - logp
kl = d.exp() - d - 1
per_seq = ((pg - beta * kl) * mask).sum(-1) / mask.sum(-1).clamp(min=1)
return -per_seq.mean() # 1/G Σ_i, 부호 반전
# R1-Zero 설정: G=16, beta=1e-3, lr=3e-6, 온도 1.0, 400 step마다 ref 교체
# R1 1단계 RL: 위 설정 + eps=10 (보고서 표기), reward += 언어 일관성 비율실험 결과
R1-Zero의 학습 곡선과 테스트 시간 계산
R1-Zero의 AIME 2024 pass@1은 학습 동안 15.6% → 77.9%로 올랐고, 16개 샘플 다수결(cons@16)로 86.7%였다(§2.3). 평가는 최대 생성 길이 32,768, 온도 0.6, top-p 0.95로 문제당 개(AIME·GPQA 64개, MATH·Codeforces 16개, LiveCodeBench 8개)를 뽑아 평균 정답률을 pass@1로 보고한다(부록 D.1). 긴 출력의 추론 모델을 greedy로 평가하면 반복이 늘고 체크포인트 간 변동이 커서 쓰지 않았다고 한다.
R1은 문제 난이도에 따라 생각 길이를 바꾼다. 2024년 대회 문제에서 평균 8,793 토큰을 생각해 61.8%를 풀었고, 쉬운 문제는 7,000 토큰 미만, 가장 어려운 문제는 18,000 토큰 이상을 썼다. 같은 문제에서 GPT-4o 0513은 평균 711 토큰으로 24.7%였다(부록 E.4).
단계별 결과와 다른 모델 비교 (보고서 Table 8)
In math and algorithmic code, R1 is close to the OpenAI-o1-1217 of the time (AIME 79.8 vs 79.2, MATH-500 97.3 vs 96.4, Codeforces rating 2029 vs 2061). In software engineering (SWE Verified 49.2 vs 48.9, Aider 53.3 vs 61.7) it is similar or behind; the report explains that long evaluation times prevented large-scale RL on SWE tasks (§6). IF-Eval (83.3) is lower than V3 (86.1). The results were also checked on problems released after 2024. On AIME 2025, R1 solved 11.3/15 (about 75%), close to o1-1217’s 12.0/15, and on AMC 12 2024 it scored 143.7/150, so that its USAMO index combined with AIME (256.7) exceeded the qualifying cutoff of 251.5 (Appendix E.2, Table 13).
Distillation vs RL on small models (report Tables 15, 16)
수학과 알고리즘 코드에서 R1은 당시 OpenAI-o1-1217과 비슷하다(AIME 79.8 vs 79.2, MATH-500 97.3 vs 96.4, Codeforces rating 2029 vs 2061). 소프트웨어 공학(SWE Verified 49.2 vs 48.9, Aider 53.3 vs 61.7)은 비슷하거나 뒤지는데, 보고서는 평가 시간이 길어 SWE 과제에 대규모 RL을 하지 못했다고 설명한다(§6). IF-Eval(83.3)은 V3(86.1)보다 낮다. 2024년 이후에 나온 문제로도 확인했다. AIME 2025에서 R1은 11.3/15(약 75%)를 풀어 o1-1217의 12.0/15에 근접했고, AMC 12 2024에서 143.7/150으로 AIME와 합한 USAMO 지수(256.7)가 진출 기준 251.5를 넘었다(부록 E.2, Table 13).
증류 vs 작은 모델의 RL (보고서 Table 15, 16)
Although the distilled models only received SFT, the 1.5B beats GPT-4o and Claude-3.5-Sonnet in math (AIME 28.9 vs 9.3/16.0, MATH-500 83.9 vs 74.6/78.3). On knowledge-heavy GPQA, the 1.5B and 7B still trail. The more important comparison is Table 16.
| Model (report Table 16) | AIME 2024 pass@1 | AIME cons@64 | MATH-500 | GPQA Diamond | LiveCodeBench |
|---|---|---|---|---|---|
| QwQ-32B-Preview | 50.0 | 60.0 | 90.6 | 54.5 | 41.9 |
| Qwen2.5-32B-Zero (10K+ step RL) | 47.0 | 60.0 | 91.6 | 55.0 | 40.2 |
| R1-Distill-Qwen-32B (SFT only) | 72.6 | 83.3 | 94.3 | 62.1 | 57.2 |
On the same Qwen2.5-32B-Base, a model given more than 10K steps of R1-Zero-style RL on math, code and STEM data only reached the level of QwQ-32B-Preview, while a model that was only SFT-ed on data produced by R1 led by a wide margin on every item (Appendix F.1). The report’s conclusion has two branches. Distilling a strong model into a small one is far cheaper and better than running RL directly on the small model. But pushing the boundary of intelligence still needs a stronger base and bigger RL. Appendix G.1 records that early experiments starting from a 7B dense and a 16B MoE produced no meaningful improvement on AIME (as responses grew longer they fell into repetition), and that the effect of pure RL became visible only at 32B dense, 230B MoE and 671B MoE. On the other hand, Qwen2-Math-7B-Zero — about 10,000 steps of RL on Qwen2-Math-7B, released before o1 — reached 22.3% on AIME 2024 and 18.1% on AIME 2025, ahead of Qwen2-Math-7B-Instruct (7.9%, 4.6%) (Table 17). So RL does learn something even on small models.
In R1's stage-2 RL, general data and the preference reward model (RM) were added only in the last 400 of 1,700 steps. What reason does the report give?
§3.2.2 and Appendix B.5 say that “training for more steps with model-based preference rewards can lead to reward hacking,” and show a curve (Figure 6) where the reward rises while CodeForces performance falls. Rule verifiers are safe to optimise for a long time, but a learned RM gets over-optimised. So R1 used an asymmetric schedule: long on verifiable rewards, short on learned rewards.
Reading critically
- There is no raw data behind the curves. R1-Zero’s accuracy and length curves exist only as figures; the numbers in the text are the start (15.6%), the end (77.9%) and the jump at step 8.2k, more or less. The 5–7× increase in reflective words also counts a word list chosen by three people. There is limited means to verify independently when and how strongly “emergence” happened.
- We cannot tell whether the equations match the implementation. The objective is written with a sequence-level ratio and no visible token normalisation. Whether ε=10 clips at which unit, which estimator was used for the std, and how token averaging was done decide whether the length bias pointed out by Dr. GRPO is present. It is the first thing you hit when reproducing.
- The numbers do not quite fit together. R1-Zero is said to be 10,400 steps × 32 questions = 1.6 epochs, but multiplied out that would need about 200K unique questions. The reasoning RL data of Table 4 (math 26K, code 17K+8K, STEM 22K, logic 15K) is far less. The definitions of step and epoch may differ, or R1-Zero’s data may differ from Table 4, but the report does not explain.
- The same model scores differently in different reports. The DeepSeek-V3 scores in R1 Table 8 differ from V3 report Table 6: LiveCodeBench 36.2 vs 40.5, Codeforces percentile 58.7 vs 51.6, C-SimpleQA 68.0 vs 64.8. This appears to be because LiveCodeBench’s problem window (2024-08 – 2025-01 for R1, 2024-08 – 2024-11 for V3) and the evaluation settings changed — an example of why numbers from different reports should not be mixed in one table.
- The comparison models were not evaluated under the same conditions. R1 thinks for up to 32,768 tokens, whereas GPT-4o and Claude are non-reasoning models. For o1-1217, API access was difficult, so OpenAI’s officially announced numbers were copied in (Appendix D.1). That is why the table has many blanks, and “close to o1-1217” is not a comparison under the same prompts and the same number of samples.
- Contamination was reduced but not ruled out. The report admits the 10-gram filter cannot catch paraphrased problems. That performance held up on problems from after training, such as AIME 2025 and AMC 12 2024 (Appendix E.2), is a good sign, but there are few problems (AIME has 15).
- The reading “RL creates reasoning” has counter-arguments. Yue et al. (2025) reported that after RLVR a model has higher pass@1, but at very large the base model can have higher pass@k. Whether R1-Zero created an ability that was absent from the base, or made a behaviour the base showed occasionally happen often (sharpening), cannot be decided from this report alone. The G.1 observation that “it did not work on small bases” rather supports the view that the base’s latent capacity is decisive.
- There is no tool use. In §6 the report admits that R1 cannot use tools such as search or a calculator and is weak at structured output. This gap leads to “thinking in tool-use” in DeepSeek-V3.2.
Summary
- R1-Zero trained V3-Base for 10,400 steps with GRPO and only rule rewards for accuracy and format, no SFT, raising AIME 2024 pass@1 from 15.6% to 77.9%; longer responses and reflective behaviour appeared together.
- Length grows without a length reward because, on problems where “longer means more likely correct,” the policy gradient follows the covariance, and the max generation length is the ceiling. When the cap was raised to 65,536 at step 8.2k, length and performance jumped together.
- A KL coefficient of 0.001 with the reference replaced every 400 steps uses the KL not as an anchor to the base but as a trust region around the recent policy. The expected gradient of the k3 term is .
- R1 goes through four stages — cold start SFT (thousands) → reasoning RL (+ language-consistency reward) → rejection-sampling SFT (about 800K) → mixed RL (RM only in the last 400 steps) — gaining readability and general ability while giving up some GPQA and CNMO relative to R1-Zero.
- For small models, distillation beats RL. R1-Distill-Qwen-32B (SFT only) beat Qwen2.5-32B-Zero, RL-trained from the same base, on every reasoning metric.
- The report’s objective is written with a sequence ratio, so implementation details such as ε=10 and length normalisation are ambiguous. For reproduction and comparison, check the unit of the ratio and the evaluation settings first.
증류 모델은 SFT만 했는데도 1.5B가 수학에서 GPT-4o와 Claude-3.5-Sonnet을 앞선다(AIME 28.9 vs 9.3/16.0, MATH-500 83.9 vs 74.6/78.3). 지식형인 GPQA에서는 1.5B·7B가 여전히 뒤진다. 더 중요한 비교는 Table 16이다.
| 모델 (보고서 Table 16) | AIME 2024 pass@1 | AIME cons@64 | MATH-500 | GPQA Diamond | LiveCodeBench |
|---|---|---|---|---|---|
| QwQ-32B-Preview | 50.0 | 60.0 | 90.6 | 54.5 | 41.9 |
| Qwen2.5-32B-Zero (10K+ step RL) | 47.0 | 60.0 | 91.6 | 55.0 | 40.2 |
| R1-Distill-Qwen-32B (SFT만) | 72.6 | 83.3 | 94.3 | 62.1 | 57.2 |
같은 Qwen2.5-32B-Base에서 수학·코드·STEM 데이터로 10K step 넘게 R1-Zero식 RL을 한 모델은 QwQ-32B-Preview 수준에 그쳤고, R1이 만든 데이터로 SFT만 한 모델이 모든 항목에서 크게 앞섰다(부록 F.1). 보고서의 결론은 두 갈래다. 강한 모델을 작은 모델로 증류하는 것이 작은 모델에 직접 RL하는 것보다 훨씬 싸고 좋다. 그러나 지능의 경계를 넓히는 것은 여전히 더 강한 base와 더 큰 RL이 필요하다. 부록 G.1은 7B dense와 16B MoE로 시작한 초기 실험이 AIME에서 의미 있는 개선을 내지 못했고(응답이 길어지면 반복에 빠졌다), 32B dense·230B MoE·671B MoE에서야 순수 RL의 효과가 보였다고 적었다. 반면 o1 출시 이전에 공개된 Qwen2-Math-7B로 약 10,000 step RL을 한 Qwen2-Math-7B-Zero는 AIME 2024 22.3%, AIME 2025 18.1%로 Qwen2-Math-7B-Instruct(7.9%, 4.6%)를 앞섰다(Table 17). 작은 모델에서도 RL이 무언가를 배우기는 한다는 뜻이다.
R1의 2단계 RL에서 일반 데이터와 선호 보상모델(RM)을 1,700 step 중 마지막 400 step에만 넣은 이유로 보고서가 든 것은?
§3.2.2와 부록 B.5에 “모델 기반 선호 보상으로 더 많은 step을 학습하면 reward hacking이 생길 수 있다”며, 보상은 오르는데 CodeForces 성능은 내려가는 곡선(Figure 6)을 실었다. 규칙 검증기는 오래 최적화해도 안전하지만 학습된 RM은 과최적화된다. 그래서 R1은 검증 가능한 보상으로 길게, 학습된 보상으로 짧게라는 비대칭 일정을 썼다.
비판적으로 읽기
- 곡선의 원자료가 없다. R1-Zero의 정확도·길이 곡선은 그림으로만 있고, 본문 수치는 시작(15.6%)·끝(77.9%)과 8.2k step의 도약 정도다. 반성 단어 5–7배 증가도 3명이 고른 단어 목록을 센 것이다. “창발”의 시점과 크기를 독립적으로 확인할 방법이 제한적이다.
- 식과 구현이 같은지 알 수 없다. 목적함수가 시퀀스 단위 ratio로 적혀 있고 토큰 정규화가 보이지 않는다. ε=10이 어느 단위의 clip인지, std 계산에 어떤 추정량을 썼는지, 토큰 평균을 어떻게 했는지에 따라 Dr. GRPO가 지적한 길이 편향의 유무가 달라진다. 재현할 때 가장 먼저 부딪히는 지점이다.
- 숫자들이 서로 딱 맞지는 않는다. R1-Zero는 10,400 step × 질문 32개를 1.6 epoch라고 했는데, 그대로 곱하면 약 20만 개의 고유 질문이 필요하다. Table 4의 추론 RL 데이터(수학 26K, 코드 17K+8K, STEM 22K, 논리 15K)는 그보다 훨씬 적다. step·epoch의 정의가 다르거나 R1-Zero의 데이터가 Table 4와 다를 수 있지만 보고서는 설명하지 않는다.
- 같은 모델의 점수가 보고서마다 다르다. R1 Table 8의 DeepSeek-V3 점수는 V3 보고서 Table 6과 다르다. LiveCodeBench 36.2 vs 40.5, Codeforces percentile 58.7 vs 51.6, C-SimpleQA 68.0 vs 64.8. LiveCodeBench의 문제 기간(R1은 2024-08 – 2025-01, V3는 2024-08 – 2024-11)과 평가 설정이 달라졌기 때문으로 보이며, 다른 보고서의 숫자를 한 표에 섞으면 안 되는 예다.
- 비교 대상의 평가 조건이 같지 않다. R1은 최대 32,768 토큰까지 생각하는 반면 GPT-4o·Claude는 비추론 모델이다. o1-1217은 API 접근이 어려워 OpenAI 공식 발표 수치를 옮겨 왔다(부록 D.1). 그래서 표에 빈칸이 많고, “o1-1217과 비슷하다”는 같은 프롬프트·같은 샘플 수의 비교가 아니다.
- 오염은 줄였지만 배제하지 못했다. 10-gram 필터는 바꿔 쓴 문제를 거르지 못한다고 보고서가 인정한다. AIME 2025·AMC 12 2024 같은 학습 이후 문제에서도 성능이 유지된 것(부록 E.2)은 좋은 신호지만 문제 수가 적다(AIME 15문제).
- “RL이 추론을 만든다”는 해석에는 반론이 있다. Yue et al.(2025)은 RLVR 후 모델이 pass@1은 높지만 아주 큰 의 pass@k는 base가 더 높을 수 있다고 보고했다. R1-Zero가 base에 없던 능력을 만든 것인지, base가 가끔 하던 행동을 자주 하게(sharpening) 만든 것인지는 이 보고서만으로 가를 수 없다. G.1의 “작은 base에서는 안 됐다”는 관찰은 오히려 base의 잠재력이 결정적이라는 쪽을 지지한다.
- 도구 사용이 없다. §6에서 R1은 검색·계산기 같은 도구를 쓰지 못하고 구조화된 출력도 약하다고 인정한다. 이 공백은 DeepSeek-V3.2의 “thinking in tool-use”로 이어진다.
정리
- R1-Zero는 V3-Base에 SFT 없이 GRPO와 정답·형식 규칙 보상만으로 10,400 step 학습해 AIME 2024 pass@1을 15.6%에서 77.9%로 올렸고, 응답 길이 증가와 반성 행동이 함께 나타났다.
- 길이 보상 없이 길이가 늘어나는 것은 “길수록 맞을 확률이 오르는” 문제에서 policy gradient가 공분산을 따라 움직이기 때문이고, 최대 생성 길이가 그 천장이다. 8.2k step에서 상한을 65,536으로 올리자 길이와 성능이 함께 뛰었다.
- KL 계수 0.001에 400 step마다 reference를 교체하는 설정은 KL을 base로의 닻이 아니라 최근 정책 근처의 신뢰 영역으로 쓴다. k3 항의 기대 gradient는 다.
- R1은 cold start SFT(수천 개) → 추론 RL(+언어 일관성 보상) → rejection sampling SFT(약 80만) → 혼합 RL(RM은 마지막 400 step만)의 4단계로, 가독성과 일반 능력을 얻는 대신 GPQA·CNMO 일부를 R1-Zero보다 내주었다.
- 작은 모델에는 증류가 RL보다 낫다. R1-Distill-Qwen-32B(SFT만)가 같은 base에서 RL한 Qwen2.5-32B-Zero를 모든 추론 지표에서 앞섰다.
- 보고서의 목적함수는 시퀀스 ratio로 적혀 있어 ε=10, 길이 정규화 같은 구현 세부가 모호하다. 재현과 비교에서는 ratio의 단위와 평가 설정부터 확인해야 한다.
더 읽을거리Further reading
- DeepSeek-AI, DeepSeek-R1: Incentivizing Reasoning Capability in LLMs via Reinforcement Learning (arXiv 2501.12948, v1 2025-01, v2 2026-01) — 이 레슨이 리뷰하는 보고서. v2는 학습 세부사항·데이터·안전성·실패 사례를 담은 부록이 크게 늘었다. 레슨의 표·절 번호는 v2 기준.The report this lesson reviews. v2 greatly expanded the appendices with training details, data, safety and failure cases. The lesson's table and section numbers follow v2.
- Shao et al., DeepSeekMath: Pushing the Limits of Mathematical Reasoning in Open Language Models (2024) — GRPO를 처음 제안한 논문. 그룹 정규화 advantage와 k3 KL 항의 원형이며, 토큰 단위로 쓰인 원래 목적함수를 볼 수 있다.The paper that first proposed GRPO. The original of the group-normalised advantage and the k3 KL term, and the place to see the original objective written at the token level.
- DeepSeek-AI, DeepSeek-V3 Technical Report (2024) — R1의 출발점인 V3-Base(671B 총 / 37B 활성 MoE, 14.8T 토큰). 반대로 V3의 사후학습은 R1 계열 모델에서 추론 데이터를 증류했다.V3-Base, R1's starting point (671B total / 37B active MoE, 14.8T tokens). Conversely, V3's post-training distilled reasoning data from R1-series models.
- Schulman et al., Proximal Policy Optimization Algorithms (2017) — GRPO가 물려받은 clip 목적함수. R1 부록 A.3은 PPO와 GRPO를 직접 비교한다.The clip objective GRPO inherits. R1 Appendix A.3 compares PPO and GRPO directly.
- Liu et al., Understanding R1-Zero-Like Training: A Critical Perspective (2025) — Dr. GRPO. R1-Zero식 학습에서 길이 정규화와 std 정규화가 응답 길이 증가에 기여할 수 있다는 비판.Dr. GRPO. A critique arguing that length normalisation and std normalisation in R1-Zero-style training can contribute to growing response length.
- Yu et al., DAPO: An Open-Source LLM Reinforcement Learning System at Scale (2025) — Qwen2.5-32B에서 R1-Zero식 RL을 공개 재현하며 Clip-Higher·dynamic sampling·token-level loss를 제안. KL 항을 아예 뺐다.A public reproduction of R1-Zero-style RL on Qwen2.5-32B, proposing Clip-Higher, dynamic sampling and token-level loss. It drops the KL term entirely.
- Yue et al., Does Reinforcement Learning Really Incentivize Reasoning Capacity in LLMs Beyond the Base Model? (2025) — RL이 새 추론 능력을 만든다는 R1의 서사에 대한 반론. 큰 k의 pass@k에서는 base 모델이 앞설 수 있다.A counter to R1's narrative that RL creates new reasoning ability. At pass@k with large k the base model can come out ahead.