cd /news/machine-learning/grpo-from-scratch-group-relative-pol… · home topics machine-learning article
[ARTICLE · art-65292] src=pub.towardsai.net ↗ pub= topic=machine-learning verified=true sentiment=· neutral

GRPO from Scratch: Group Relative Policy Optimization in Python

Group Relative Policy Optimization (GRPO) eliminates the value model required by Proximal Policy Optimization (PPO), reducing active memory footprint from 42 GB to 28 GB for a 7B parameter model. DeepSeek-R1 was trained using GRPO, enabling reasoning model training without separate reward model rollout infrastructure.

read1 min views1 publishedJul 20, 2026
GRPO from Scratch: Group Relative Policy Optimization in Python
Image: Pub (auto-discovered)

Member-only story

Proximal Policy Optimization (PPO) requires four active components (policy, reference, reward, value); the 42 GB calculation below counts only the three trainable / host-resident weight copies (policy, reference, value), since the reward model is typically a frozen scorer that can be off-loaded for a 7B in FP16 (16-bit floating point), and forces synchronous rollouts between policy and critic. Group Relative Policy Optimization (GRPO) eliminates the value model — bringing the active footprint down to 28 GB — by generating G responses to the same prompt, normalizing rewards within the group to compute advantages, and applying the PPO clipping objective directly. No critic. No value function. The group is the baseline.

DeepSeek-R1 (DeepSeek-AI 2024, DeepSeek-R1: Reasoning Model Trained via Reinforcement Learning) was trained with GRPO. It is how you get a reasoning model without a separate reward model rollout infrastructure.

Disclaimer: The opinions expressed in this article are my own and do not represent the views of Google. This content is based solely on publicly available information.

Why GRPO Over PPO #

PPO (Proximal Policy Optimization) for language models requires four active components during training:

── more in #machine-learning 4 stories · sorted by recency
── more on @deepseek-r1 3 stories trending now
sponsored brought to you by zahid.host 4,200+ EU-deployed projects
reading about agents? ship yours in a single git push.

Run your AI side-project on zahid.host

EU-based hosting, git-push deploys, automatic HTTPS, no cold starts. Free tier with a custom domain — perfect for shipping the agent you just read about.

$git push zahid main
Live at https://your-agent.zahid.host
Get free account → Pricing
from €0/mo · no card required
LIVE [news/grpo-from-scratch-gr…] indexed:0 read:1min 2026-07-20 ·