Group-Based Policy Optimization › Sampling and Rollout Costs

Michael BrenndoerferNovember 29, 20262 min read
Language AI HandbookAll chapters
Part 40 of 67Reasoning Post-Training and Verifiable Rewards
Chapter 301Group-Based Policy Optimization › Sampling and Rollout Costs
Reading section 6 of 10 · Sampling and Rollout Costs · 2 minSection 6 of 10 · 2 min

Section 6 of 10 · 2 min read

Reading settings

Definitions

Choose how many terms have tooltips.

Article links

Make inline references clickable

Notes & comments

There are three costs to track separately: response generation, reward scoring, and learner updates. Which one dominates depends on response length, batching, verifier latency, and how often a rollout is reused.

A batch of BB prompts with GG completions per prompt requires BGB G sequences. In ordinary autoregressive decoding, each next-token distribution depends on the generated prefix. Batching can execute multiple completions together. During teacher-forced scoring the model already has the complete sequence, so token positions can be processed together under causal masking.

Storing a constant number of per-token rollout fields for BB groups of GG responses, each of length at most TT, requires O(BGT)\mathcal{O}(BGT) storage. That is a bound for the rollout fields, separate from parameters, optimizer states, activations, and generation caches.

DeepSeekMath §4.2 reports sampling 64 outputs per question in its DeepSeekMath-RL training configuration. Group size determines the number of responses to generate and compare. With independent binary scores and a success probability strictly between zero and one, a larger group is less likely to tie. If success is certain or impossible, every group ties regardless of size.

The number of optimizer steps per rollout controls reuse. Reuse amortizes sampling but means the learner can differ from the behavior policy. DeepSeekMath reports one update per exploration stage in its main experiments. The toy uses two updates per group to illustrate the distinction.

Comments

Add to the conversation

A question, a correction, or an example from your own work.

No comments yet. Be the first to share your thoughts!

Newsletter

Stay up to date

Get new articles, book updates, and notes on AI and technology.

Unsubscribe at any time. Privacy policy