RL
×GRPO with rule-based and model-based rewards.
GRPO, group relative policy optimization
For each prompt the model writes a group of answers; each is scored and compared with the group’s mean, and the model is moved toward the answers above it, by a step clipped near the policy that wrote them and with a penalty for leaving a reference model.
DeepSeek-R1 paper, eq. 1 to 3, and DeepSeek-V3 report, eq. 26 to 28; for one prompt, in the atlas’s letters w, w̄, D
What the letters mean
: answer ’s probability under the model being trained over its probability under the policy that wrote it; : its reward less the group’s mean, over the group’s standard deviation; : a KL penalty to the reference model; : the group size; , : hyper-parameters. Maximized.
The DeepSeek-V3 report writes this objective itself (eq. 26 to 28, p. 30), with a reward model trained from the V3 SFT checkpoints and rule-based rewards.
- Compute
- 5K H800 GPU hours for SFT and RL together
Not disclosed Group size · The clip range (ε) · The KL weight (β) · Steps · Learning rate
Architecture at this stageThe model as drawn, the published DeepSeek-V3.
What the terms meanRule-based reward · Reward model · SFT
- Rule-based reward
- A reward computed by a fixed check, such as whether the final answer matches the reference or the code passes its tests, with no model judging.
- Reward model
- A model learns to give a response a score, from responses people ranked, so that the preferred one scores higher.
- SFT
- The model is trained on examples of the answers wanted, prompts with their responses, by the cross-entropy of next-token prediction on the responses.
All settings5
- Algorithm
- GRPO: a group of outputs per question from the old policy, the advantage normalised within the group, a clipped ratio and a KL penalty to a reference model
- Rewards
- Rule-based where answers can be checked (formats, compilers and tests); a reward model trained from the V3 SFT checkpoints elsewhere
- Prompts
- Coding, mathematics, writing, role-playing and question answering
- Self-feedback
- DeepSeek-V3 with voting judges open-ended answers; the constitutional AI approach for broader contexts
- Compute
- 5K H800 GPU hours for SFT and RL together
Sources4
- DeepSeek-V3 report, p. 30Algorithm, Prompts
- DeepSeek-V3 report, p. 29Rewards
- DeepSeek-V3 report, pp. 33–34Self-feedback
- DeepSeek-V3 report, p. 5Compute