Long, stable, and numerically accurate Reinforcement Learning (RL) is an essential piece of Microsoft AI’s (MAI) path to Humanist Superintelligence. We aim to climb capabilities from the base model through RL itself, which means runs of many thousands of training steps spanning weeks to months on thousands of GPUs, rather than a short RL phase at the end of post-training. Over runs that long, small numerical mismatches and system inefficiencies compound, so we built Rocket, MAI’s in-house RL framework, to enable us to post-train models at increasing scale. We recently shared an update on our new three-trillion-parameter base model, MAI Base 2, in Frontier Pre-training at Microsoft AI. MAI Base 2 is now being post-trained with Rocket, climbing from the base model through RL without distillation from third-party models. This work is separate from the MAI Code 2 models.
Post-training MAI Base 2
The MAI Thinking 1 technical report introduced Rocket as the RL framework which post-trained our previous pre-trained model, MAI Base 1, into the reasoning model MAI Thinking 1. Since then, we have improved Rocket to operate at the larger scale demanded by MAI Base 2. RL infrastructure needs to address many challenges at increasing scale:
- Staleness. Agentic rollouts can take hours while the learner keeps updating the policy. Because GRPO scores each rollout against the others for the same problem, a single slow or failed rollout holds back its entire group, so training drifts further off-policy.
- Numerical consistency. Fitting a larger model and longer contexts into the sampler requires lower-precision storage, and differences in precision, kernels, and parallelism between the sampler and learner can slow learning and destabilize training.
- Fault tolerance and elasticity. Runs that span thousands of GPUs for weeks or months will encounter hardware failures, while the best runtime configuration and data mixture change. Restarting the whole job for every failure or reconfiguration wastes GPU time, so the system must recover and reconfigure components while the run continues.
RL infrastructure built for MAI’s training recipe
The right RL infrastructure depends on the training recipe it serves, and one factor that is easy to overlook is distillation. A model distilled from a stronger teacher begins RL close to its ceiling, so RL becomes a comparatively short refinement phase. In that regime, the infrastructure priorities differ: a failed run can simply be restarted, and small mismatches between sampler and learner have little time to compound.
Rocket is built for the more demanding case of climbing from base capabilities through RL itself, without a distilled head start. Being able to reach the frontier without depending on other labs’ models is central to MAI’s self-sufficiency. The infrastructure challenges above become the main design constraints rather than edge cases in this regime. Hardware failures are a certainty, small numerical mismatches accumulate over thousands of updates, and the best data mixture and GPU allocation shift as the policy improves.
Open-source frameworks such as verl and slime provide strong foundations for RL post-training, including distributed execution, customizable agent workflows, and asynchronous sampling. However, our long climbs from a base model push these capabilities beyond the regime they are typically exercised in. We built Rocket to tightly design our RL infrastructure around the unique needs of our RL workloads and MAI’s models.
MAI develops and operates three tightly connected systems necessary for RL: the learner and training framework, Rocket, and an inference engine built on an MAI-maintained fork of SGLang. Owning all three allows us to co-design the interfaces between them rather than optimize each component in isolation.
This does not mean building every layer from scratch. Rocket leverages Kubernetes or Slurm to allocate nodes to a job, and Rocket’s components run on Ray as actors. We adopted SGLang as our inference foundation and have substantially adapted it to MAI’s models and long-running agentic RL workloads. Owning these integrations carries a maintenance cost, but lets us evolve the complete RL loop rather than optimize its components in isolation. A future blog post will detail the ways that we adapted SGLang to fit our workloads.
Rocket overview
Figure 1 shows Rocket’s asynchronous training loop. A problem defines a task; a rollout is one attempt at solving it. Our long-running RL training is based on Group Relative Policy Optimization (GRPO), which computes advantages by comparing rewards across rollouts of the same problem. The controller (1) selects a problem from the curriculum and sends it to a problem worker (2), which dispatches a set of rollout requests to the rollout worker pool (3). Each problem and rollout worker handles many requests concurrently.
Figure 4 follows three rollouts from one GRPO group, from dispatch to the training step that consumes them. In this example, the sampler receives up-to-date learner weights every four steps. When the time between training steps is roughly constant, a token’s staleness is approximately
Sampler lag + Time when token is trained on − Time when token was generatedTime between training steps
The first term, sampler lag, measures how far the sampler’s policy version lags the learner’s when a token is generated. The second captures staleness accumulated between generation and training: while the token’s rollout finishes, while the completed rollout waits for the rest of its GRPO group, and while the group waits for the learner. The controls below target each of these in turn.
Keeping the sampler current. In Figure 4, the sampler receives up-to-date learner weights every 4 training steps, so sampler lag is 0–3 steps. We reduce this term through frequent sampler weight updates. The distributed learner must supply updated weights to every sampler replica, and sending weights separately to each one would make learner-side communication cost grow with the inference fleet size. Rocket therefore transfers weights to samplers in two stages: selected sampler engines first pull packed parameter chunks from the learner, and then distribute them to corresponding ranks across sampler replicas. In our current configuration and training run, weight transfer takes 15 seconds, enabling frequent sampler weight updates to limit policy lag at generation.
Prioritizing existing rollouts over new ones. A long wait before a rollout’s first token is generated does not contribute to staleness. Once a token is generated, however, it becomes increasingly stale as the rollout performs additional inference calls, tool calls, and requeues. The slowest rollout in Figure 4 samples from six successive weight versions before it completes. In early experiments, multi-turn rollouts sometimes paused for hours between inference requests while waiting for inference capacity. To mitigate this, we prioritize finishing existing rollouts over starting new ones. Each request inherits a priority based on its rollout’s start time, so earlier rollouts are served first. We also automatically scale the number of in-flight rollouts up or down to match available inference capacity, keeping queues short under normal conditions. Even with this automatic scaling, new rollouts can wait for a long time before their first request. Each rollout in Figure 4 waits 24 minutes before its first inference request begins. Rollout-level timeouts must account for this wait, and rollouts may hold VMs and other resources before generation starts.
Dropping failed rollouts. Across a GRPO group, tokens from completed rollouts become stale while waiting for the rest of their group to finish so that training can occur. In Figure 4, the fastest rollout waits 7.6 hours for the slowest one to finish. Retrying failed rollouts can add a large gap between the retry finishing and the rollouts that succeeded on the first try. We therefore drop failed rollouts rather than hold back the group’s training data. This reduces staleness, but dropping failed rollouts can add noise to or bias the baseline for GRPO’s group advantage, since the failed rollouts may share features that never make their way to the learner.
Keeping jobs inference-bound. Completed rollouts that wait in a long internal queue before they’re sent to the learner accumulate further staleness. We overallocate GPUs to our learner so that RL jobs are bottlenecked by inference capacity, not training capacity. In Figure 4, the completed group spends just 12 seconds in the controller queue before it is trained on. The trade-off is that the learner’s GPUs sit partially idle.
The formula’s denominator has a counterintuitive consequence: adding inference servers while leaving batch size unchanged can increase staleness. With more inference servers, it takes less time to collect enough rollouts for a training step. Since our jobs are typically inference-bound, this shortens the time between training steps. More training steps can be completed in the time it takes for a rollout to finish, even if the rollout’s wall-clock time is unchanged.
Numerical precision
For MAI Thinking 1, we prioritized numerical fidelity by retaining BF16 weights and KV caches throughout the sampler. Since MAI Base 2 is a much larger model, we selectively use MXFP8 for MoE weights and KV caches to accelerate rollouts while maintaining training stability. Figure 5 summarizes the precision choices in the sampler and learner.