GRPO step

qPromptqqOld policy{oi}i=1G∼πθold(O∣q)\{o_i\}_{i=1}^{G}\sim\pi_{\theta_{\mathrm{old}}}(O\mid {\htmlClass{vl-stream-q}{q}})o[B, G]Rewardsrules ⋅ generative RM with rubrics\text{rules}\ \cdot\ \text{generative RM with rubrics}r[B, G]Normalize in the groupAi=ri−mean⁡(r1,…,rG)std⁡(r1,…,rG)A_i=\frac{r_i-\operatorname{mean}(r_1,\dots,r_G)}{\operatorname{std}(r_1,\dots,r_G)}A[B, G]Policywi=πθ(oi∣q)πθold(oi∣q)w_i=\frac{\pi_\theta(o_i\mid {\htmlClass{vl-stream-q}{q}})}{\pi_{\theta_{\mathrm{old}}}(o_i\mid {\htmlClass{vl-stream-q}{q}})}w[B, G]KL to the referenceDi=πref(oi∣q)πθ(oi∣q)−log⁡πref(oi∣q)πθ(oi∣q)−1D_i=\frac{\pi_{\mathrm{ref}}(o_i\mid {\htmlClass{vl-stream-q}{q}})}{\pi_\theta(o_i\mid {\htmlClass{vl-stream-q}{q}})}-\log\frac{\pi_{\mathrm{ref}}(o_i\mid {\htmlClass{vl-stream-q}{q}})}{\pi_\theta(o_i\mid {\htmlClass{vl-stream-q}{q}})}-1D[B, G]Clipped objectiveJ=1G∑i(min⁡(wiAi,clip⁡(wi,1±ε)Ai)−βDi)J=\tfrac1G\sum_i\big(\min(w_iA_i,\operatorname{clip}(w_i,1\pm\varepsilon)A_i)-\beta D_i\big)J[1]hatched band: not updated in this step · solid band: what this stage trainsq: one prompt, named beside each model that reads it

Normalize in the group

×

An output’s advantage is its reward against the group’s: above the mean is positive, below it negative.

Ai=ri−mean⁡(r1,…,rG)std⁡(r1,…,rG){\htmlData{light=advantage advantage-op}{A_i}}=\frac{{\htmlData{light=reward rewards}{r_i}}-\operatorname{mean}(r_1,\dots,r_G)}{\operatorname{std}(r_1,\dots,r_G)}
in
rr [B batch, G]
out
AA [B batch, G]
Sources

Direct evidence

§2.2.1, Reinforcement Learning Algorithm: GRPO foregoes the critic model and estimates the baseline from group scores. For each question a group of outputs is sampled from the old policy; the objective is the clipped ratio times the advantage, less β times a KL term to π_ref, averaged over the group (eq. 1, 2); the advantage is the reward less the group’s mean, over its standard deviation (eq. 3). ε and β are hyper-parameters the paper does not give for this model.

DeepSeek-R1-2501.12948v1.pdf p. 5 ↗ · arXiv 2501.12948 @ v1