Group-Based Policy Optimization › Sampling and Rollout Costs
Language AI HandbookAll chapters 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 prompts with completions per prompt requires 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 groups of responses, each of length at most , requires 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!