Sign In
Back to Visual Labs
Lab 21 · Reasoning Models & Reinforcement Learning
DeepSeekMath (Shao et al., 2024)

GRPO vs. PPO Reasoning Alignment Simulator

Explore Group Relative Policy Optimization (GRPO) from DeepSeekMath and DeepSeek-R1. Compare traditional 4-model PPO with critic-free group advantage normalization Â_i = (r_i - μ_r)/(σ_r + ε), inspect token-level Schulman k_3 non-negative KL divergence penalties, test zero-variance collapse guards, and observe ~50% GPU cluster VRAM reductions across 7B, 67B, and 671B architectures.

Initializing GRPO vs PPO Reasoning Alignment Engine...
1

Critic-Free Group Advantage Normalization

Examine how GRPO computes relative advantage Â_i = (r_i - μ_r) / (σ_r + ε) across $G$ sampled reasoning rollouts. By substituting the learned Critic value network $V_\phi(s)$ with empirical group statistics, GRPO eliminates value function training instability and saves ~50% of peak training VRAM.

2

Zero-Variance Collapse Guard ($\sigma_r < 10^-8$)

Select Zero-Variance Collapse Guard preset. When all $G$ reasoning paths produce identical rewards (e.g. all fail difficult Olympiad theorem questions, $r_i = 0$), $\sigma_r$ vanishes. Witness how GRPO gracefully forces Â_i = 0.0 to safeguard training against division-by-zero gradient explosions.

Numerical Stability Protection
3

Schulman k_3 Non-Negative KL Divergence

Inspect the per-token KL heatmap. Traditional sample estimators log(π_θ / π_ref) can be negative, causing reward instability. Schulman's $k_3$ formulation r - log(r) - 1 ≥ 0 guarantees non-negativity at every individual token position while remaining an unbiased estimator of true KL divergence.

Unbiased Regularization Invariant
Mechanism Reference · Post-Training & RLVRInteractive Browser Simulator

How GRPO vs. PPO Reasoning Alignment Simulator Works

Group Relative Policy Optimization (GRPO) replaces PPO's parameter-heavy learned value critic with baselines computed directly from normalized reward statistics across G sampled completions per prompt. Dropping the critic cuts GPU training memory roughly in half while stabilizing verifiable reasoning optimization with a low-variance non-negative k3 KL penalty.

Frequently Asked Engineering Questions

How does GRPO eliminate the PPO critic network?
GRPO samples a group of G responses for each prompt, evaluates each with a rule or outcome verifier, and normalizes reward advantages using the group's empirical mean and standard deviation.
Why does GRPO use the Schulman k3 KL estimator?
The k3 estimator (r - log r - 1) is strictly non-negative and exhibits lower variance than naive log-ratio approximations, preventing unstable negative KL estimates from corrupting policy updates.
What happens when all G completions receive identical rewards?
Zero within-group reward variance produces zero standard deviation; production GRPO trainers guard division by adding epsilon and filtering zero-signal groups to avoid NaN gradients.
Master This Simulator In
Free · Verifiable Credential

FS-102LLM Systems Foundations

Build a connected mental model from tokens through retrieval evaluation security and operations.

24 concepts~18h self-paced
Start Free Course
Weekly Engineering Dispatch

Get the weekly systems teardown

One technical note per week covering inference bottlenecks, retrieval harnesses, and commit-pinned teardowns.