Agentic RL
×Stage · GLM-5
Asynchronous RL on coding and search agents, with over 10,000 verifiable software-engineering and terminal environments: rollouts and training run on separate GPUs.
GRPO, group relative policy optimization
For each prompt the model writes a group of answers; each is scored and compared with the group’s mean, and the model is moved toward the answers above it, by a step clipped near the policy that wrote them and with a penalty for leaving a reference model.
DeepSeek-R1 paper, eq. 1 to 3, and DeepSeek-V3 report, eq. 26 to 28; for one prompt, in the atlas’s letters w, w̄, D
What the letters mean
: answer ’s probability under the model being trained over its probability under the policy that wrote it; : its reward less the group’s mean, over the group’s standard deviation; : a KL penalty to the reference model; : the group size; , : hyper-parameters. Maximized.
The GLM-5 report writes its own objective (§4.1, p. 15): rewards less the group’s mean, with no division by its spread and no KL term; the ratio taken to the rollout engine’s log-probabilities, and tokens outside masked.
- Environments
- over 10K software-engineering environments, terminal and search tasks
- Off-policy correction
- token-level, masked outside a band
Undisclosed settings 3
Not disclosed Steps · Learning rate · Group size
Why
Agent rollouts are long and uneven, and synchronous RL leaves GPUs idle waiting for the slowest; decoupling generation from training keeps them busy. GLM-5 report §4.1, p. 15
What the terms meanAsynchronous RL · Rollout
- Asynchronous RL
- Generation keeps a steady number of responses in flight, and training takes over the machines as soon as enough are finished; an unfinished response resumes under the updated model, so the model also learns from tokens an earlier version of itself wrote, and tokens that are too stale are left out of the loss.
- Rollout
- A response the policy writes during reinforcement learning, tool calls included, to be scored.
All settings5
- Algorithm
- Group-wise policy optimization: K traces per problem from the previous policy, each reward less their mean; only the model’s own tokens enter the loss (§4.1)
- Asynchrony
- Inference and training engines on separate GPUs; weights pushed to the rollout engines every K updates, the optimizer reset after each; samples whose oldest policy version is too stale are dropped
- Off-policy correction
- Token-level importance sampling against the rollout’s own log-probabilities; tokens outside [1 − ε_ℓ, 1 + ε_h] masked out of the gradient
- Environments
- Over 10K verifiable software-engineering environments across 9 languages, synthesized terminal tasks and multi-hop search tasks
- Indexer
- Frozen by default throughout the RL stages, its top-k by the deterministic torch.topk; non-deterministic top-k operators degraded RL drastically within a few steps
Sources6
- GLM5-2602.15763v2.pdf, p. 15Algorithm, Asynchrony
- GLM5-2602.15763v2.pdf, p. 16Asynchrony, Off-policy correction
- GLM5-2602.15763v2.pdf, p. 17Asynchrony, Off-policy correction
- GLM5-2602.15763v2.pdf, p. 13Off-policy correction, Environments
- GLM5-2602.15763v2.pdf, p. 18Environments
- GLM5-2602.15763v2.pdf, p. 12Indexer