| RL objective | |
|---|---|
| prompt; its i-th rollout; token t of that rollout | |
| rollouts per prompt | |
| reward of rollout i; mean reward of its group | |
| advantage, the reward minus the group mean | |
| probabilities the inference engine sampled with; trainer's probabilities at weights θ | |
| trainer-to-inference probability ratio of a token | |
| masking function; the window of ratios kept | |
| length of rollout i in tokens | |
| Constants | |
| masking window of the objective | |
| a token ratio below it drops the whole rollout | |
| 8 | most policy versions a rollout may span (max_off_policy_steps) |
| 256 × 16 | prompts per RL step × rollouts per prompt |
| 65,536 | maximum RL context in tokens |
| Muon learning rate in RL; in SFT stage 1 | |
| 16; 44 | trainer nodes; inference nodes, 8 H200s each |
| 1,500 s | time of one RL step with in-flight updates (Step 1) |
Context. Open-weight models trained with RL on verifiable rewards are now strong at math and code, but the machinery that trains them, the asynchronous trainer, the environmentspackages that pair a dataset of tasks with a loop that runs the model and its tools on a task to a stopping condition, and a rubric of weighted reward functions; built here with the verifiers library and their reward checks, the code sandboxes and the evaluations, has mostly stayed inside the groups that built it or in monolithic frameworks. The INTELLECT-3 report documents one such pipeline end to end and releases it: a 106B-parameter mixture-of-expertsa model whose layers send each token to a few of many expert subnetworks, so only part of the parameters are used per token; here 12B of 106B model post-trained from GLM-4.5-Air-Basethe released pretrained 106B mixture-of-experts model of the GLM-4.5 family, before any post-training by supervised fine-tuning and then RL on math, code, science, logic, web-search and software-engineering environments, on up to 512 H200an NVIDIA data-center GPU with 141 GB of memory GPUs, together with the RL framework prime-rl, the environment library verifiers with its public Environments Hub, and a sandbox service. Most of the engineering goes into keeping generation, tool execution and training busy at the same time while controlling two gaps between the policy that sampled a token and the policy being trained: staleness, since a rolloutone sampled attempt at a task: the model's tokens and any tool calls and results, up to a stopping condition may be generated by up to 8 policy versions, and numerical differences between the inference engine and the trainer. One mechanism handles both, a per-token importance ratio taken against the inference engine's own probabilities, with tokens outside a fixed range dropped; the numerical gap is the one that led the study of RL scaling curves (Khatri et al., 2026) to compute the output layer in 32-bit precision.
The recipe has two stages. Supervised fine-tuning on reasoning traces generated by DeepSeek-R1-0528, then on agentic tool-use and software-engineering traces, brings the model to about 85% on AIME 2024 and 2025 before RL (read off the paper's training curves). RL then runs about 600 steps (the length of those curves; the text gives no step count) of 256 prompts with 16 rollouts each at a context of 65,536 tokens and adds a few points on the reasoning benchmarks tracked, by the same curves about 3 to 5 on AIME and 7 on LiveCodeBench, still rising when training stopped. The final model scores 90.8 on AIME 2024, 88.0 on AIME 2025, 69.3 on LiveCodeBench v6 and 74.4 on GPQA Diamond, above GLM-4.5-Air, the same base model with its makers' own post-training, on all six benchmarks reported. The two system choices the report singles out are in-flight weight updatesthe inference servers pause to load new weights as soon as the trainer has them and continue every unfinished rollout with them, which more than halve the time of a step, and the masked importance ratio, which the authors found necessary to keep runs from crashing days in.
Setting. Training is split across three services. An orchestratora CPU process that sends rollout requests to the inference servers, scores the results through the environments, packs them into training batches, and passes new weights from the trainer to inference sits between a trainer, built on FSDP2PyTorch's fully sharded data parallelism: each GPU holds a slice of the parameters, gradients and optimizer state and gathers whole layers when it needs them, on 16 nodes of 8 H200s, and a pool of vLLMan open-source inference engine for language models, built around paged KV-cache memory servers on 44 nodes. For a prompt , the inference pool samples the number of rollouts per prompt, 16 rollouts with rewards , and every token of gets the advantage : the rollout's reward minus the mean reward of the prompt's group, with no division by the standard deviation. Write the token probabilities the inference engine used when it sampled the rollout, returned by vLLM with each token and the trainer's token probabilities at its current weights for the inference engine's and the trainer's token probabilities respectively, and for token of rollout for their ratio, , at token of rollout . The objective keeps the ratio only inside a window: where the sums run over the rollouts of a batch and their tokens, is the length of in tokens, and why: a ratio far from 1 means the trainer and the inference engine disagree on the token, from staleness or from numerical mismatch; those tokens give noisy updates, so they are dropped. On a token inside the window the gradient is , an importance-weighted policy gradient, and outside it the gradient is zero. A whole rollout is dropped if any of its tokens has a ratio below . This is IcePopmasked token-level importance sampling (Zhao et al., 2025): weight each token's update by its trainer-to-inference ratio and exclude tokens whose ratio falls outside a window, close to CISPOclipped importance sampling policy optimization: policy gradient with each token's importance weight capped at a fixed value and treated as a constant but with masking where CISPO caps the weight. The orchestrator also discards rollouts generated by more than 8 policy versionswhy: in-flight updates let one rollout span several weight versions; past 8 the data are too far off-policy and are discarded to prevent policy drift. The optimizer is Muonan optimizer that replaces each weight matrix's momentum by the nearest orthogonal matrix, computed with a few Newton-Schulz iterations, at learning rate in RL.
Main findings (all empirical). On AIME 2024 and 2025 (mean accuracy over 32 samples per problem), LiveCodeBench v6 (2 samples), GPQA Diamond (4 samples), the text-only part of Humanity's Last Exam and MMLU-Pro, INTELLECT-3 scores 90.8, 88.0, 69.3, 74.4, 14.6 and 81.9, against 84.6, 82.0, 61.5, 73.3, 13.3 and 73.9 for GLM-4.5-Air. GLM-4.5, about 3 times larger, is behind on the AIME sets and LiveCodeBench (85.8, 83.3, 64.5) and ahead on GPQA, Humanity's Last Exam and MMLU-Pro (77.0, 14.8, 83.5); GLM-4.6, also about 3 times larger, is ahead on AIME 2024, AIME 2025, LiveCodeBench, GPQA and MMLU-Pro (92.0, 90.3, 73.0, 78.8, 83.1); DeepSeek-R1-0528 is behind on both AIME sets (83.2, 73.4). In the online evaluations during RL the benchmarks generally trend upward to the last step.
What failed along the way. vLLM's own multi-node data parallelism stopped gaining throughput as inference nodes were added (Step 1). Runs crashed several days in from the gap between trainer and inference probabilities until tokens with extreme ratios were masked, and GSPOgroup sequence policy optimization: a clipped objective with one importance ratio per rollout, the length-normalized ratio of its sequence probabilities, in place of token ratios collapsed under staleness (Step 2). Rule-based answer checking marked a noticeable share of correct math answers wrong (Step 3). Commands sent to sandboxes through the API of Kubernetesthe standard system for running containers across a cluster; its API server records every operation in a central key-value store took up to 2.5 s each at thousands of concurrent sandboxes (Step 4). Context parallelismsplitting the attention computation of one long sequence across several GPUs reached 256K tokens but halved data parallelism and lost accuracy, asynchronous activation offloadingmoving the activations kept for the backward pass from GPU to CPU memory and back leaked memory, round-robin gathering for distributed Muon congested the network, and expert parallelismplacing different experts of a mixture-of-experts layer on different GPUs and routing tokens between them lowered throughput (Step 5).
Consequences and limits. The practice the report recommends for agentic RL: package each environment with its data, rollout loop and reward so that it can be tested apart from the trainer; run trainer and inference on separate GPUs with continuous batching and in-flight weight updates; weight each token's update by the trainer's probability over the one the inference engine recorded, dropping tokens with ratios far from 1; keep code execution off the cluster's control plane; and filter prompts by difficulty online. The evidence for most of this is the run itself. There is one training run and no ablation of the environment mix, the SFT data or the RL objective beyond the GSPO test and the step-time comparison. No score is reported for the SFT checkpoint apart from the starting points of the RL curves, which place most of the final score in the SFT stage, trained on DeepSeek-R1-0528's traces. The comparisons are the authors' own evaluations apart from two copied entries (Step 7), and the AIME numbers use rule-based checking only, which they note is stricter than leaderboards that use an LLM judge. Web-search and software-engineering environments were in the RL mix, but no agentic benchmark is reported.
Continuous batching with in-flight weight updates more than halves the step time. With rollouts tens of thousands of tokens long, a system that sends a batch of requests and waits for the slowest leaves inference GPUs mostly idle at the end of each batch. prime-rl keeps a fixed number of rollout requests in flight and replaces each finished group at once; when the trainer has new weights, the inference servers pause, load them, and continue every unfinished rollout with them, so one rollout can span several policies, up to 8. At 65,536 tokens a step takes about 1,500 s this way and more than twice as long without in-flight updates; the split of 16 trainer nodes and 44 inference nodes (about 1 to 3) gave the best throughput. Scaling inference needed one more change: with vLLM's multi-node data parallelism, throughput stopped growing as nodes were added, so each node runs as an independent server, the orchestrator holds one client per node and sends rollout groups round-robin, and throughput then grew linearly with the number of nodes. In-flight updates remove the wait for the slowest rollout at the cost of rollouts that mix weight versions, the opposite choice from systems that keep each trajectory on one version; the per-token ratio of the objective handles the mixing, since each token's denominator is the probability under the version that produced it.
Masking tokens with extreme ratios keeps long asynchronous runs stable. Even with the same weights, the trainer and the inference engine can compute noticeably different token probabilities, and in this setup the resulting shift between the two distributions could crash a run several days in. Because the ratio's denominator is the probability vLLM reports for each sampled token, one weight per token corrects for staleness, for mixed versions within a rollout and for the numerical gap at once, and the window removes the tokens where the two disagree most. Masking replaced CISPO's capping, the authors' algorithm earlier in the project, to avoid the noisy updates that large ratios bring; the report says double-sided masking was critical but shows no run comparing it with capping. The one stability test shown ran with rollouts up to 8 versions stale: GSPO's reward rose along with CISPO's to about 0.8 and then fell to about 0.3 within some 50 steps after step 300, while CISPO's stayed near 0.8 through step 470 (read off the paper's figure), in line with GSPO collapses reported elsewhere.
Each environment pairs curated tasks with a checker, and failures of the checker are kept out of the loss. Math has 21.2K problems drawn from Skywork-OR1, AceReason-Math, DAPO and ORZ-Hard; math-verify compares the final answer with the reference, and because rule-based checking produced a non-negligible share of false negatives, every answer it marks wrong is checked again by CompassVerifier-7B, a model trained to judge answers. Code has 8.6K single-turn Python problems, largely from the authors' SYNTHETIC-2 set, each run against up to 15 tests in sandboxes, with over 4,000 sandboxes running at once; a completion whose sandbox fails is masked, so an infrastructure error never counts as a wrong answer. Science has 29.3K problems filtered from MegaScience, checked like math. Logic has 11.6K problems of 29 kinds, such as Boolean expressions, crosswords, Sudoku and Minesweeper, with SynLogic's checkers. Deep research gives the model search, click, open and finish tools over a web-search API and scores 1 for a correct final answer and 0 otherwise, on 2.2K RL questions from DeepDive, multi-step questions built from knowledge graphs; as a check of the environment, Qwen3-4B raised its reward over 122 RL steps after SFT on 884 public traces. Software engineering runs two agent scaffolds (R2E-Gym and mini-swe-agent-plus, adapted to native tool calls) with shell and file-editing tools for up to 200 turns inside a repository image, from over 20,000 hosted images, and the reward is whether the designated tests go from failing to passing. Math, code, science and logic tasks are labeled with the solve rate of a Qwen3-4B model over 8 or 16 samples, used to drop easy tasks offline. Online, prompts are sorted into easy, normal and hard pools by observed solve rate, a prompt solved by all 16 rollouts is not sampled again, and groups whose rollouts all succeed or all fail are discarded, since all their advantages are zero.
Sandboxes reach thousands of concurrent rollouts once the Kubernetes control plane is out of the execution path. Sending each command through the Kubernetes API server makes every call an authenticated, logged request serialized by the store's write locks, and at thousands of sandboxes one command took up to 2.5 s for code that runs in milliseconds. Prime Sandboxes send commands from a gateway directly to the sandbox containers, bypassing the API server, and a helper container next to each sandbox runs them inside it. A sandbox reports that it is ready by calling the training side itself instead of being polled, and images stream from a private registry, so a cold start takes under 10 s for any container image and is instant from a pool of containers started in advance. Each node packs 256 sandboxes whose CPU use may burst above its reservation, since sandboxes are idle most of the time, and gVisora container runtime that runs the sandbox on a kernel implemented in user space, isolating the host from untrusted code isolates the host.
Long contexts and Muon on a sharded mixture-of-experts model needed workarounds in the trainer. With full activation checkpointing (each decoder layer's output kept, everything inside it recomputed in the backward pass), FlashAttention 3 and FSDP over 32 GPUs, training reached 48K tokens per sequence; the stored layer outputs alone take bytes, about 18 GB, for 46 layers of width 4,096 in 16-bit precision. Some environments needed at least 64K. Context parallelism reached 256K tokens with 2 GPUs per sequence but halved the data-parallel degree and lost accuracy, so the run offloaded the stored activations to CPU memory instead, reaching 72K on the same hardware with no loss of MFUmodel FLOPs utilization: the fraction of the GPUs' peak arithmetic rate spent on the model's own computation; the asynchronous offloading code leaked memory, and the synchronous version cost about 0.1% MFU. Muon is used because earlier work found that a model pretrained with Muon post-trains best with it, but its Newton-Schulz step needs whole gradient matrices, which FSDP splits across GPUs. Having each GPU gather a share of the matrices round-robin congested the InfiniBand network at many nodes, so the run used all-to-all exchanges instead. Expert parallelism lowered throughput, because at these sequence lengths the grouped matrix multiplication over up to 128 experts on one GPU already ran at full speed, and splitting experts across GPUs only added communication; it was left off.
Two SFT stages set up the long reasoning and tool use that RL builds on. Stage 1 trains one epoch on the math, code, science and tool splits of Nemotron-Post-Training-Dataset-v1 and the chat and instruction-following splits of AM-DeepSeek-R1-0528-Distilled, all with reasoning traces generated by DeepSeek-R1-0528, at about 33M tokens per step and 65K context, with Muon at learning rate . Stage 2 trains two epochs, 800 steps, on agentic data (SWE-Swiss, Toucan Tool and traces from the hub's environments generated with DeepSeek-R1-0528), with context parallelism up to 98K tokens. Both loss curves are smooth, and the chat template always turns reasoning on. The RL curves start from this checkpoint at about 85% on both AIME sets and about 66% on LiveCodeBench (read off the paper's figure), so most of the final score is reached before RL starts; the report does not evaluate the base model or the SFT checkpoint on the benchmarks.
The comparisons run every model through the same evaluation code. Each benchmark is an environment on the hub, used online during RL, every 15 steps on the same inference pool as training, and offline. AIME scores are mean accuracy over 32 samples per problem with rule-based checking only, GPQA Diamond over 4 samples, LiveCodeBench v6 (454 problems from August 2024 to May 2025) over 2 with the official checking code run in the sandboxes, MMLU-Pro over 1, and Humanity's Last Exam on its 2,158 text-only questions without tools. Other models were queried through their makers' APIs with the recommended sampling settings; one provider served GPT-OSS-120B with less reasoning effort than advertised, so it was evaluated through another. Two entries of the comparison table, GLM-4.5 on MMLU-Pro and GLM-4.6 on Humanity's Last Exam, are copied from an external leaderboard instead. AIME has 30 problems a year, so one point there is less than a third of a problem even after averaging 32 samples.
Terms
- Recipe
- GLM-4.5-Air-Base, SFT on DeepSeek-R1-0528 traces, agentic SFT up to 98K context, then about 600 RL steps on a mix of environments
- prime-rl
- asynchronous RL framework: orchestrator, FSDP2 trainer and vLLM inference on separate GPUs
- Continuous batching
- a fixed number of rollouts in flight; each finished group is replaced at once
- In-flight weight updates
- inference pauses to load new weights mid-rollout; rollouts span up to 8 versions; steps over twice as long without
- IcePop masking
- weight each token by if , else drop it; drop a rollout if any
- Trainer-inference mismatch
- same weights, different kernels, different token probabilities; crashed runs days in until masked
- Advantage
- , the group mean subtracted, no division by the standard deviation
- verifiers environment
- dataset, rollout loop and rubric of reward functions in one installable module, versioned on the Environments Hub
- Online difficulty filtering
- easy, normal and hard pools by solve rate; prompts solved by all 16 rollouts retired; all-equal groups discarded
- Masked sandbox failures
- a completion whose sandbox fails is left out of the loss instead of scored as wrong
- Prime Sandboxes
- commands bypass the Kubernetes API; cold start under 10 s; 256 sandboxes per node; gVisor isolation
- Results
- AIME 2024/2025 90.8/88.0, LiveCodeBench v6 69.3, GPQA 74.4, HLE 14.6, MMLU-Pro 81.9; above GLM-4.5-Air on all six
Quiz
- Why are groups whose 16 rollouts all succeed or all fail discarded, and prompts solved by every rollout not sampled again?With , equal rewards give zero advantage for every token, so the group only spends generation and training compute. Retiring always-solved prompts keeps the batch on prompts that still teach something.
- Why is every math answer that rule-based checking marks wrong checked again by an LLM judge?math-verify had a non-negligible rate of false negatives. Re-checking only the answers it rejects corrects those errors without asking the judge about every answer.
Sources
- Prime Intellect Team (Mika Senghaas, Fares Obeid, Sami Jaghouar, William Brown, et al.). INTELLECT-3: Technical Report. arXiv preprint, 2025.