Repository navigation
285 commits from 25 contributors (6 new) since v0.10.0.
Important
This release has breaking changes. Read Breaking Changes before upgrading.
Top Features
- IcePop score centering:
trainer.loss.score_centering = truecenters IcePop scores over the sampler's distribution. With top-k/top-p sampling, the trainer replays the sampler's exact kept set. #4012, #4176, #4232, #4445 - Pretraining entrypoint:
uv run pretraintrains a model from scratch on datatrove token shards, with weighted[[data.source]]mixes, per-document validation and exact resume. #4377, #4567 - Mega MoE: a fused expert-parallel MoE dispatcher (
[model.moe.dispatch] type = "mega_moe") that overlaps EP communication with the expert GEMMs, with optional least-loaded expert rebalancing. It needs the prime-mega-moe kernels. #3651, #4345 - Bidirectional KV transfer for P/D: in multi-turn disaggregated P/D, decode keeps a finished turn's KV and the next turn's prefill reads it back over NIXL, so prefill computes only the new tokens. #4575
- Env worker pools and lower orchestrator memory: env servers become env worker pools (
uv run env-worker-pool), with a replica per inference node on multi-node SLURM runs. They keep the per-token training arrays and pass them to the trainer by reference. With NumPy rollout data and raw-buffer micro batches, peak orchestrator memory on a recorded 2048-episode batch drops from 85.3 to 17.5 GB. #4375, #4381, #4196, #4226 - New models: GLM-5.3 Flash (text), Muse Glimmer, Nemotron 3.5 Super and Qwen3.8 Flash Next multimodal. #4072, #4181, #4391, #3916
Highlights
1. Trainer Performance
Mega MoE
A new expert-parallel dispatcher, [model.moe.dispatch] type = "mega_moe", fuses token dispatch, the SwiGLU expert GEMMs and the combine into persistent kernels that overlap EP communication with compute. precision selects bf16, mxfp8, fp8, fp8_bwd, or the new mxfp8_qat (MXFP8 forward, BF16 backward on the dequantized weights, SM100). Optional least-loaded expert parallelism ([model.moe.dispatch.llep]) hands overloaded ranks' routes and a copy of the expert weights to the least-loaded ranks, with exact results. It works with bf16, mxfp8 and mxfp8_qat. Mega MoE needs EP > 1 and prime-mega-moe, Prime Intellect's closed-source DeepGEMM fork, installed over the public deep_gemm wheel.
Replaying recorded DeepSeek-V4-Flash-Base SFT routing at 64k tokens/rank (8 × H200, EP 8), the MoE layer (forward + backward) runs at 391k tokens/s/GPU (35.8% MFU) with rebalancing, against 310k without rebalancing and 240k for the eager torch all-to-all (1.63×). In the full 43-layer SFT model (6 × 8 H200), the forward with rebalancing is 1.14× faster than with the torch all-to-all. On synthetic routing, rebalancing gives a 1.67× geomean speedup over plain Mega MoE across 18 routing scenarios at 8k tokens/rank, and costs at most 4% when routing is balanced.
#3651 — Mega MoE dispatch
#4345, #4599 — Least-loaded expert rebalancing (llep), now also with mxfp8
#4394 — mxfp8_qat precision
#4188, #4308 — NCCL_MAX_CTAS deadlock fix, buffer sized for a rank's CP share
Compile and EP
- EP MoE now compiles with the default
fullgraph = false(#4086). An explicit all-to-all output size removes a graph break inside activation checkpointing that made every MoE layer run eagerly: Qwen3-30B-A3B (12 layers, 1 × 8 B300, EP 8) goes from 1.067 to 0.703 s/step (1.52×), GLM-4.5-Air real data 1.33×. - DeepEP works with compile, full AC and gradient clipping (#3954, #4421). Dispatch and combine are in-graph custom ops, and DeepEP layers now compile under AC. On Qwen3-30B-A3B SFT (8 × H200, EP 8, seq 16k) DeepEP goes from 1.68× slower than the torch dispatcher to 11% faster. On GLM-4.5-Air SWE (2 × 8 H200, EP 16, seq 131k), a DeepEP step takes 77.3 s against 99.4 s with the torch all-to-all.
- Static row lengths (#4160, #4184):
data.pad_to_seq_len = true(SFT) andorchestrator.pad_to_seq_len = true(RL), both off by default, give packed rows one shape, sotorch.compileand DeepGEMM stop recompiling. Rows are padded with real tokens, so pad tokens no longer all route to one expert. Qwen3-235B-A22B FP8 SFT (8 × 8 H200): 20.2 → 12.7 s/step. - DeepSeek V4 recompiles (#4285, #4609): new row lengths and document layouts no longer trigger recompiles that stalled all ranks for 30–200 s. Each decoder layer type of DeepSeek V4 and GLM-5.3 Flash now compiles once instead of twice: on a 6-layer DeepSeek V4 (1 × 8 B200, cold caches), step 1 takes 527 s instead of 702 s.
- Ulysses CP recompiles (#4068): attention takes
cu_seqlensandmax_seqlenas forward arguments instead of reading a module global that compiled blocks guarded on, so a micro batch with a new document count no longer recompiles every rank. On GLM-4.5-Air (8 layers, 1 × 8 B300, EP 8, CP 2) with #4086, recompiles per rank drop from 3 to 1 and the slowest step from 8.1 s to 1.8 s. - RL trainer warmup (#4604): while the orchestrator generates the first batch, the trainer runs its forward and backward on synthetic micro batches that train nothing.
torch.compile, kernel JIT and NCCL communicator setup then happen while the trainer would otherwise wait. It is on by default (trainer.warmup) and logstime/warmup. On a cold DeepSeek-V4-Flash RL run (H200, 4 trainer nodes + 1 inference node), step 1's forward and backward take 61 s instead of 637 s. The warmup uses worst-case micro batches, so an OOM shows up in the first minutes instead of at the first long batch.
Memory, Offloading and Checkpoints
- Async checkpointing (#4428, #4517):
ckpt.async_save = truecopies state into reused pinned host buffers, sized to the shard, and writes it on a background thread. A 20 GB checkpoint on a slow disk costs 2–5 s instead of ~50 s. Checkpoints cut off mid-write are now skipped on resume. - Activation offloading (#4237, #4277): expert weights are no longer copied to CPU every micro batch under compile + EP (offload overhead −70–75%), and tensors saved by several blocks are offloaded once (GLM-5.3 at 512k: host peak 1182 → 807 GiB).
- Optimizer offload (the default
model.offload = "optimizer"):- Pinned buffers pin their exact size instead of rounding up to a power of two: 705 → 500 GiB host memory per node on GLM-4.5-Air SFT. #4516
- The optimizer step moves one param group's states to the GPU at a time, which lowers the step's memory peak on large models. #4563
- AdamW's
stepcount stays on the CPU, cutting hundreds of host syncs per step. #4512 - Trainer ranks bind to their GPU's NUMA node whenever they copy state to host memory, including the default config: Qwen3-30B-A3B on 8 × H200 runs +11.5% tok/s. #4426
- SFT and pretraining keep step statistics on the GPU and sync once per step instead of once per micro batch (−5–7% step time on small models). #4478
- HSDP all-reduces gradients once per step (#4393) instead of after every micro batch.
- MoE routing stats are reduced once per step (#4265) instead of once per micro batch (three collectives each time). The logged
max_vioandrouting_confidencevalues do not change. - Token-chunked activation checkpointing for Nemotron-H MoE layers (#4222, experimental):
model.ac.token_chunk_sizelets 1M-token rows fit on 4 × 8 H200.
Numerics
- FP32 LM-head logits (#4474): the trainer LM head computes logits with one BF16 × BF16 → FP32 GEMM, matching inference's FP32 head. Trainer–vLLM mismatch drops 23–41% on Qwen3, and the fused head gets 4–9% faster.
- Fused chunked cross-entropy (#4263, #4582) for SFT and pretraining on Hopper (SM90) GPUs, with lower peak memory.
- MoE routers (#4177): BF16 operands with FP32 logits from the gate matmul, and FP32 accumulation of expert outputs, for both RL and SFT. RL ran the router fully in FP32 before, so its router operands are now BF16.
- Deterministic MoE combine (#4074): identical frozen forwards now give bitwise identical logprobs.
- RL loss scaling (#4465): RL divides by the global loss-token count after backward, so MoE expert gradients no longer underflow in MXFP8 backward kernels.
Sparse Attention (GLM-5.x, DeepSeek V4)
cudnn_flashmlais the defaultmodel.dsa_backend(#4055). It runs on SM90/SM100/SM103 and now uses vLLM's bundled FlashMLA, so it also runs on aarch64 (#4365). Settilelangon other GPUs.- Faster FP8 indexer (#3958, #4235, #4276, #4278, #4330): DeepSelect top-k, DeepGEMM
fp8_fp4_mqa_logitsscoring, chunking so FP32 logits stay bounded (GLM-5.3 indexer at 128k without CP: 69.8 → 2.7 GiB peak), and load balancing across CP ranks. - DeepSeek V4 mHC (#4216, #4333, #4194, #4357): the mHC input side is one fused op that no longer saves an FP32 copy of the streams (one decoder layer without AC at 64k tokens: 42.3 → 34.3 GiB saved activations; at 131k the layer now fits on one H200), the pre-pass projection uses DeepGEMM's TF32 prenorm GEMM like vLLM, the write-back backward is one Triton kernel, and the write-back gates stay in FP32 as in vLLM.
- DeepSeek V4 attention (#4354, #4355, #4356, #4357, #4358): cuDNN's fused CSA/HCA compressor on SM100+ (
model.dsv4_compressor_backend = "cudnn", the default; other GPUs run the torch ops), a CP halo exchange instead of all-gathering the whole row, and vLLM's fused query norm + RoPE kernels. A 6-layer V4 Flash proxy (1 × 8 B200, CP 8, EP 8, MXFP8) goes from 9.00 to 8.44 s/step (−6%). Selective AC can now save an operator only at chosen modules (model.ac.targetsentries like"aten::mm@self_attn.kv_proj"), which brings the proxy to 8.17 s (−9.5%) for 5 GiB more peak memory (113.0 vs 108.1 GiB). No shipped config sets these targets.
Qwen3.8 Flash Next
Fused hyper-connection kernels (8-layer proxy on 8 × H200: −12–15% step time, up to −15 GiB peak) (#4211, #4314), new prime-kernels indexed-attention kernels (16k QSA layer 116 → 31 ms) (#4279), and n-gram embeddings that look up rows on their owner rank, live in a shared module, and reach inference one fragment at a time instead of being gathered whole on every rank (#3938, #4293, #4102).
MFU and Memory Metrics
MFU is now computed the way torchtitan computes it, from the real model, with per-layer attention rules for sliding-window, linear, Mamba-2 and sparse attention (#3840). The orchestrator balances micro batches by the same FLOP cost. Packed rows are charged attention per document, not over the whole row: GLM-4.5-Air at 131k with packed samples previously logged an impossible 127.7% MFU, and the same steps now log 24.4%. Hybrid and sparse models also report lower, correct MFU. perf/mfu_6dn adds the plain 6ND estimate (#4189). perf/peak_memory now includes memory outside PyTorch and takes the max over ranks (#4320).
2. RL Algorithms and Off-Policy Control
- Per-token staleness (#4143, #4253, #4141, #4295): inference engines label each sampled token with the policy step that produced it.
orchestrator.max_staleness(renamed frommax_off_policy_steps) now masks stale tokens from the loss instead of cancelling whole episodes, and fresher tokens of the same sample still train. Metrics move fromoff_policy/*tostaleness/*, and the trainer logs mismatch KL per staleness bin. - IcePop score centering (#4012, #4176, #4232, #4445, #4284):
trainer.loss.score_centering = truecenters IcePop scores over the sampler's distribution. With truncated sampling (top-k/top-p), the trainer replays the sampler's exact kept set, captured on the GPU inside vLLM's sampler. Sampler supports travel as a ragged CSR structure. When every RL token is replayed and no CE or ref-KL term trains, the built-in losses take a sparse LM-head backward (fused head forward + backward, 64k tokens, RTX PRO 6000: 2488 → 1488 ms, 3.97 → 1.90 GiB). The trainer checks the sampler data on the GPU and syncs once per step (8-layer DeepSeek-V4-Flash slice, 1 × 8 B300: 5.65 → 1.84 s per micro batch). - MXFP8 RL (#4098, #4525): fixes for online MXFP8 MoE across weight reloads and 32-token padding. On DeepSeek-V4-Flash math RL (B300, 60 steps), a trainer that runs MXFP8 on the same modules as vLLM keeps mismatch KL flat at ~0.002; with a BF16 trainer it rises from 0.0012 to 0.0082. The DeepSeek-V4-Flash SWE recipe has an MXFP8 overlay for B300 (
examples/advanced/deepseek-v4-flash/gpu/b300.toml). - Subagent length penalty (#4172, #4380): the new opt-in
linear-subagentGRPO length penalty scales tokens from subagent calls bysubagent_token_weight. Length penalties now skip discarded branches. - Optimizer (#4113, #4157, #4108, #4332): Muon uses Nesterov momentum by default, AdamW and Muon get a configurable
eps, expert biases and n-gram tables train with AdamW, and resuming with optimizer offload restores Muon's param groups. - Diagnostics (#4294): IPO and IcePop log importance-ratio statistics for all and accepted tokens.
- PPO and CISPO losses are removed; IPO (default), IcePop and custom losses remain (#4231).
3. Orchestrator Throughput and Robustness
A new adaptive concurrency controller sizes the in-flight cap from engine throughput elasticity and the time episodes spend queued, read from vLLM metrics, instead of KV usage. It handles tool waits, KV offload and P/D, which the old controller misread. In trainer-bound runs it also caps admission at what the trainer consumes, so staleness stays bounded. On Qwen3-4B agentic RL (1 × 8 H200) it trains 1.9× more episodes per minute, and a 32-turn eval of 120 episodes finishes 2.2× faster (#4403, #4495, #4496, #4471).
Orchestrator memory and stalls. Per-token data stays in typed NumPy arrays from vLLM to the trainer, and micro batches travel as raw buffers. On a recorded 2048-episode agentic batch (194M tokens), peak orchestrator RSS drops from 85.3 to 17.5 GB and the batch wire size halves (#4226). Per-token training arrays (router-replay routes, score-centering supports, sampling masks) now stay with the env worker pools and reach the trainer by reference (orchestrator peak RSS 14.5 → 2.7 GiB) (#4196). Python's automatic full GC is off in the orchestrator, so it no longer freezes the event loop at unpredictable times; [orchestrator.gc] runs one full collection every 50 steps instead (#4225). Episode serialization, eval-epoch closing and batch packing moved off the event loop or were vectorized (#4257, #4366, #4298, #4255). Groups with no training signal free their episodes as soon as they finish, instead of when the next batch ships (#3806).
Resume and recovery.
- Runs resume with changed train and eval sources, and groups drawn but not yet trained are re-run (#4370, #4457).
rollout_transport.retain = truekeeps shipped batches until a trainer checkpoint covers them, so a crashed trainer can be restarted on its own with--resumewhile the orchestrator, inference and env worker pools keep running. It needsckpt.intervaland the filesystem weight broadcast, which it makes the default underrl. Therllauncher does not restart the trainer yet: it still ends the run when a process exits (#4297).- The orchestrator exits as soon as one of its components (dispatcher, weight watcher, control API) fails, instead of idling. A trainer rank that raises exits at once instead of hanging until the NCCL watchdog fires. Multi-node SLURM jobs also fail as soon as an inference server exits (#4125, #4130, #4570).
- Traces with no reward signal are dropped and reported instead of failing (#4224).
4. Env Worker Pools
The env server moves from verifiers into prime_rl.env and is renamed to env worker pools (uv run env-worker-pool). On multi-node SLURM runs, each inference node runs a replica of each launcher-managed pool, and the orchestrator sends each run to the least-loaded replica (env memory 90.6 GiB on one node → ~26 GiB on each of 4). The trace stream uses verifiers.v1.delta, so new trace fields stream without a prime-rl change. Env and verifiers logs are scoped per episode and trace, and log.level controls them all.
#4375, #4381, #4447 — Env worker pools in prime_rl.env
#4196 — Replicas per inference node, training arrays by reference
#4383 — Readable env logs
5. New Models
- GLM-5.3 Flash (text,
glm5_next, 313B / ~18B active): KDA linear attention, NoPE sparse MLA with a pooled DSA indexer, mHC and MoE, with context parallelism. Example:examples/advanced/glm-5.3-flash/swe.toml(128k). #4072 - Muse Glimmer (text): sandwich norms, gated attention, iRoPE with sliding-window and NoPE layers, logit soft-capping, Ulysses CP. #4181
- Nemotron 3.5 Super (text-only,
nemotron_h_omnicheckpoint) on the Nemotron-H implementation. #4391 - Qwen3.8 Flash Next multimodal, with image RL examples for Qwen3.5 and Qwen3.8 in
examples/extra/vlm/. #3916 - Agentic SWE RL examples for DeepSeek-V4-Flash at 131k context (
examples/advanced/deepseek-v4-flash/) and Qwen3.6-35B-A3B at 256k context (examples/advanced/qwen3.6-35b-a3b/). They train onscalesweand evaluate on SWE-bench Verified. Each composes a baserl.tomlwith a GPU overlay fromgpu/, e.g.uv run rl @ examples/advanced/qwen3.6-35b-a3b/rl.toml @ examples/advanced/qwen3.6-35b-a3b/gpu/h200.toml. #4525, #4559 - Multimodal code lives in one module with one VLM registry (#3861). Tied-embedding Qwen3.5 checkpoints such as Qwen3.5-4B now train (#4144). On every model, the input embedding of the token used as
pad_token_id(EOS if the checkpoint defines none) now trains; on untied checkpoints it stayed frozen, e.g.<|im_end|>on Qwen3-8B and<|end▁of▁sentence|>on DeepSeek-V4-Flash (#4274).
6. Pretraining, Data Mixes and Launch
uv run pretraintrains a model from scratch on datatrove token shards. It samples documents (longer ones inseq_lenpieces) from named[[data.source]]folders, mixed by relativeweight(natural shares if unset).repetitionsreads a fixed, seeded subset of a source that many times over the run (needsmax_steps), so a data mix needs no pre-built folders. Rows are packed full without padding, and EOD loss masking is on by default. Validation scores every document of each[[val.set]]on its own and logsval/<name>/loss@<seq_len>and, with a byte-level BPE tokenizer, bits per byte (val/<name>/bpb@<seq_len>). SFT and pretraining share one trainer loop. #4377, #4436, #4461, #4567- SFT mixes several datasets with the same
[[data.source]]tables. Each source is one(dataset, subset, split)with aname, an optional relativeweight(natural shares by row count if unset), and its owncolumnsand chat-template kwargs (renderer). Sources take turns by weighted fair queuing, so every stretch of samples holds the mix, and each source logsprogress/<name>/*.[data.fake]replaces the sources with synthetic tokens. #4635 - Resume with a changed data mix (SFT and pretraining): a resume may add, remove or reweight sources, and change
batch_size, the GPU count, the parallel layout ornum_workers(pretraining alsoseq_lenandseed). Sources match by name, each kept source continues where it stopped, and the new shares hold from the first step. A pretraining source withrepetitionsresizes its subset so the run still reads it aboutrepetitionstimes. An unchanged config resumes exactly, and pretraining also resumes exactly onto a different GPU count. #4619, #4661 uv run launch @ config.tomlreads a top-levelmode(rl,sft,pretrain,eval) and runs that entrypoint. #4419- Faster startup (#4595): the launchers pre-download the model and data without importing torch or transformers. In a fresh container this step takes 0.3 s instead of 26–31 s for
rl, and 1.2 s instead of 27–36 s forsft.vllm-routernow checks for started engines every second instead of every 30 s, so a started engine no longer waits up to 30 s before it gets requests. [model.init]sets where the weights start.type = "pretrained"(default forsftandrl) loads the weights atmodel.name.type = "scratch"(default forpretrain) uses the model's own init, seeded bymodel.init.seed, and now initializes every parameter of every PrimeRL model. #4476, #4518- Start from a checkpoint: every checkpoint step directory now holds
config.json, the tokenizer files and a VLM's processor files. Full-weight PrimeRL models also writetrainer/mapping.json, which maps HF tensors to prime tensors (not for LoRA runs, or when the HF conversion is more than views). Pointmodel.nameat.../checkpoints/step_Nto start a new run from it at step 0 with a fresh optimizer, for chaining pretrain → SFT → RL. vLLM then starts with placeholder weights, and the trainer's first broadcast supplies the real ones. #4433, #4476, #4477, #4289 - The DCP export tools (
tools/convert_dcp_to_bf16.py,tools/convert_dcp_to_fp8.py) run on CPU in one process;--workersexports several layers at once (#4168).
7. Inference and Weight Transfer
- vLLM 0.34.0 and torch 2.14 (#4140, #4365, #4558). NCCL is pinned to 2.32.3, because the NCCL 2.30.7 that torch 2.14 brings halves cross-node bandwidth when all GPUs send at once (20.0 vs 33.5 GB/s per GPU on 2 × 8 H100). The trainer and vLLM must run the same NCCL version (#4521).
- Router replay at full speed (#3920, #4193, #4215): engine-side patches bring GLM-4.5-Air generation with replay from 5,724 to 9,412 tok/s, on par with replay off. Router replay now also works with KV cache offload (#3831).
- Speculative decoding for RL (#4466): sampling replay works with a draft, and a live
update_configoforchestrator.speculative_decoding.draftloads a new draft on every engine at the next weight sync, without a restart. Adds DSpark serving for DeepSeek V4 (examples/specdecode/deepseek-v4/dspark.toml). - ModelExpress weight transport (#4015, #4528):
[weight_broadcast] type = "modelexpress"sends weights through ModelExpress: inference GPUs pull their shards over RDMA (NIXL). Inference pause vs NCCL: 4.34 → 2.25 s (Qwen3-30B-A3B), 7.20 → 3.53 s (GLM-4.5-Air). - Sampling masks without GPU→CPU syncs (#4267, #4232): mask capture copies through pinned, non-blocking buffers, so vLLM keeps its async scheduling. On Qwen3-1.7B (1 × H200, 512 concurrent, top_k 128, top_p 0.95), generation with mask capture runs at 23,165 tok/s vs 23,164 without masks.
- P/D and KV offload (#3832, #4059, #4061, #4410, #4414, #4023): per-role KV offload, prefill pauses before decode during weight updates (step 146 → 104 s with NCCL), decode is no longer pinned to the
mlx5_0NIC, a configurable Mooncake lease (default 30 s instead of a hard-coded 1 h: 493 → 759 generated tok/s at concurrency 256 on 2 × 8 H200), and experimental HiSparse on decode. - Bidirectional KV transfer for multi-turn P/D (#4575): with
[inference.deployment.bidirectional_kv_transfer], decode keeps a finished turn's KV blocks (decode_blocks_ttl_s, default 480 s) and the session's next prefill reads them back over NIXL, so prefill computes only the new tokens. It needsvllm-router. In P/D mode the router also retries a turn whose prefill or decode request fails with a connection error (router.pd_turn_retries, default 2). Weight-update pauses no longer wait for KV blocks held for the other side: on a 28-node P/D deployment, 27 updates under load paused for 0.5–6.2 s each. Each single-GPU engine sends its NIXL traffic through the RDMA port nearest its GPU (deployment.nixl_nic_affinity, on by default), which stopped GPU resets under sustained P/D load on B200 nodes. Example:configs/advanced/deepseek-v4-flash/inference_pd.toml. - Weight transfer: NFS handshake markers are seen in under a second instead of ~30 s (#4081), NCCL metadata and the NCCL rendezvous no longer use pickle (#4515, #4531), and Qwen3.8 weight updates with a CPU-offloaded n-gram table no longer exhaust GPU memory and copy shards straight into the live table (an update of an 8-layer stand-in with the full n-gram table: 102–170 s → 6 s) (#4241, #3919, #4578).
- FlashInfer's precompiled cubins and JIT cache are installed, so nodes no longer JIT-build at startup (#4190). Router sessions of recursive-harness sub-agents are released at episode end (#4400), and session releases no longer stop for the rest of a run after a burst of finished episodes (#4408). Requests behind
vllm-routerno longer fail at 500+ concurrent agentic sessions (#4568), and the SLURM router no longer logs at debug level (#4592).
8. Control API and Live Config
- The orchestrator config can be updated live:
POST /v1/actionswith{"type": "update_config", ...}applies at the next step boundary. Live fields includebatch_size,max_staleness,concurrency.*_inflight, per-sourceratio,group_size, the samplingtemperature,max_completion_tokensandextra_body, and the GRPOlength_penalty. Updates survive--resume. #4273, #4318, #4322, #4452 - A
checkpointaction saves the trainer and orchestrator at the trainer's next step while training continues, andGET /v1/checkpointslists checkpoints on disk. #4379, #4493 - A running
uv run eval --controlservesGET/PUT /v1/concurrency. #4097 - Per-run admin token (#4660):
rlandsftcreate a token for each run, or usePRIME_RL_ADMIN_TOKENif it is set. The control APIs and the engines' admin routes (/pause,/resume,/update_weights*,/update_draft_weights,/weight_fingerprint,/load_lora_adapter,/init_broadcaster) reject requests without it in theX-Prime-Admin-Tokenheader. Only the orchestrator (or an SFT run's online evals) gets the token; engines and control APIs get its SHA-256 digest. A standalone server or control API without a token stays open and logs a warning, andrequire_admin_token = trueunder[server]([inference.server]in anrlconfig) makes the server refuse to start instead.uv run eval --controlchecks the token only whenPRIME_RL_ADMIN_TOKENis set.
9. Monitoring and Traces
- The Prime monitor is on by default for
rl,sftandeval. One Prime run receives the launch config, orchestrator and trainer metrics, and every episode as it arrives. Prime no longer shows advantages or which episodes were trained, since episodes upload before batching; the local dashboard still shows both. SFT online evals log to the training run. Uploads are non-blocking and concurrent. #4096, #4228, #4316, #4363 - Less trainer stall on large batches: per-token metrics accumulate on the GPU (metric-path GPU peak at 1.6B global tokens: 40.28 → 0.01 GiB). Annotation streams are gathered over CP leaders only and written as raw float32 sidecars (stall on ranks 1–7 at 5e8 tokens per step, 8 × H200, cp=4: 40.1 → 7.6 s), and
trainer.annotations = falseturns the streams off. #4249, #4250, #4504, #4513, #4505 - Dashboard: token usage scoped to episode, trace and branch, failed model calls marked in red, and retried agent runs replace their trace in the live stream. The trace viewer shows no reward, usage or truncation for traces written by v0.10.0. #4417, #4198, #4376, #4415
- The dashboard shows the config, run type, model and environments of RL runs whose trainer and orchestrator start without the
rllauncher, as on Model Factory: both components now save their resolved configs at startup. #4030 - MoE runs log EP rank imbalance (#4346), and weight updates log the inference pause separately (#4054).
10. Eval
- Per-turn token limits (
env.agent.max_turn_tokens) and skipping scoring for truncated or timed-out runs. #4206 select.include.files/select.exclude.filesread task lists from files. #4460uv run eval, including its--controlAPI, runs without thegpuextra (e.g. on macOS), and CI now checks this. #4258
Breaking Changes
This release has many breaking config, CLI and wire-format changes. Read this section before upgrading. All components (orchestrator, trainer, inference, env worker pools) must run the same prime-rl version.
- Env servers → env worker pools:
uv run env-serveris nowuv run env-worker-pool, and its config classprime_rl.configs.env_server.EnvServerConfigis nowprime_rl.configs.env_worker_pool.EnvWorkerPoolConfig. Import fromprime_rl.envinstead ofverifiers.v1.serve.serve.pool.max_workers = 0is rejected; use1. On multi-node SLURM, per-pool limits (serve.max_concurrent, worker pool, sandbox limits) apply per inference-node replica. Train env pools must use prime-rl's entrypoint. #4375, #4381, #4196 - Staleness: rename
orchestrator.max_off_policy_stepstoorchestrator.max_staleness. Metrics move fromoff_policy/*tostaleness/rollout/*andstaleness/token/*, anddispatcher/off_policy/*is removed. Stale rollouts are no longer cancelled (thestalecancel reason is gone). #4253, #4143 - SFT data:
[data]takes a list of[[data.source]]tables.data.name,data.revision,data.subsets,data.splits,data.probabilities,data.stopping_strategyanddata.typeare removed. Write one[[data.source]]per(dataset, subset, split)with a uniquename(no/), adataset, and optionalsubset,split(default"train") andrevision. Replaceprobabilitieswith aweighton every source.stopping_strategyhas no replacement: sources repeat untilmax_steps.[val.data]takes the same sources.[data] type = "fake"becomes[data.fake](--data.fake), withlengthandinput_idsunder it.progress/<subset>/ratio_*metrics are keyed by source name. Single-source SFT checkpoints resume their data position; runs that interleaved several subsets or splits needckpt.skip_dataloader = true. #4635 - Context parallelism: ring CP and
trainer.model.cp_styleare removed; Ulysses is the only CP style. Withcp > 1,cpmust dividenum_attention_headsand divide or be a multiple ofnum_key_value_heads(DeepSeek V4, GLM-5 DSA and GLM-5.3 Flash excepted). #4134 - RL losses:
trainer.loss.type = "ppo"and"cispo"are removed. #4231 - Random init:
model.debug.random_initis removed; usemodel.init.type = "scratch"(shared[model]in RL), which gives a real seeded init. A resume whose model architecture differs from the checkpoint'sconfig.jsonnow stops before loading. #4476, #4433 - Tools: verifiers removed
env.taskset.task.tools.colocated; choose where the tool server runs withenv.taskset.task.tools.runtime. #4577 - MoE:
trainer.model.moe_router_dtypeis removed (#4177). DeepEP's unusedtoken_chunk_sizeis removed (#3954). - Distillation:
orchestrator.train.algo.samplingis removed. Fortype = "sft", move[orchestrator.train.algo.sampling.source]to[orchestrator.train.algo.teacher]. OPSD'salgo.rendereris removed; hints useorchestrator.renderer. #3987 - VLM:
[model.vlm]keeps onlyfreeze_vision_encoder;vision_encoder_attr,language_model_attrand[orchestrator.model.vlm]are removed. #3861 - LoRA:
model.lora.modules_to_saveis removed, and LoRA DCP checkpoint keys change, so old LoRA DCP checkpoints cannot be resumed (exported adapters are fine). #3855 - Deployment:
deployment.nodes_per_fsdp_groupis removed; settrainer.model.dp_replicate(model.dp_replicatein SFT). SFTnum_eval_gpus/num_eval_nodesare nownum_infer_gpus/num_infer_nodes, and multi-node SFT requiresnum_train_nodes. #3992 - Launcher-derived fields: explicitly set
trainer.weight_broadcast,orchestrator.weight_broadcast,orchestrator.pad_to_multiple_ofororchestrator.num_train_workersmust match the derived value, or validation fails. #3977 - Prime monitor on by default:
rl,sftandevalruns register on Prime. A launch fails if there is no Prime API key or the run cannot register (for example, no team is selected). Opt out with--no-monitors.primeorPRIME_RUNS_MODE=disabled. A trainer started without therllauncher fails unless the monitor is off.monitors.prime,monitors.wandbandmonitors.filemust be set in the shared[monitors.<name>]block, not in one component. Custom multi-node SLURM templates must wrap the launch inpython -m prime_rl.entrypoints.run_owner {rl,sft} <config>(SFT templates pass{{ run_config_path }}). The file-monitor producerorchis renamedorchestrator. #4096, #4228, #4316 - Orchestrator packing builds the PrimeRL model on the meta device; models without a PrimeRL implementation fail at orchestrator startup. MFU for hybrid, sliding-window and sparse models is not comparable with earlier runs. #3840
- Wire formats: the orchestrator↔trainer batch format (#4226, #4445, #4297), the env delta stream (#4447) and the NCCL broadcast metadata and rendezvous (#4515, #4531) changed. All components must run the same prime-rl version. Annotation streams are written as
.binsidecars (#4513). - Checkpoints: orchestrator checkpoints written by this version cannot be loaded by older code (#4370). Converted Qwen3.8 prime-format checkpoints and conversion caches must be reconverted from HF (#4293). Resuming a Muon checkpoint of gpt-oss, Nemotron-H or Qwen3.8 saved by v0.10.0 needs
ckpt.skip_optimizer = true(trainer.ckpt.skip_optimizerin RL) (#4108). - Checkpoint export:
tools/convert_dcp_to_bf16.pyandtools/convert_dcp_to_fp8.pyrun in one CPU process and fail undertorchrun; use--workers. FP8 export quantizes on CPU unless you pass--device cuda. The default output directory is replaced as a whole, and another non-empty one needs--overwrite. #4168 - Inference: the
nano_v3reasoning parser is removed; usenemotron_v3(#4140). vLLM's SageMaker routes (/invocations,/adapters) and/v1/load_lora_adapter//v1/unload_lora_adapterare no longer served; use prime-rl's/load_lora_adapter(#4530, #4593). Code that importeddeep_gemm/flash_mlamust usevllm.third_party.deep_gemm/vllm.third_party.flashmla(#4365). - Admin token: engines that
rlandsftstart reject requests to their admin routes (/pause,/resume,/update_weights,/load_lora_adapter,/init_broadcaster, ...) without the run's token in theX-Prime-Admin-Tokenheader, and so do the trainer and orchestrator control APIs. To call them yourself, setPRIME_RL_ADMIN_TOKENbefore launching. If you startinferenceandorchestratoryourself, setPRIME_RL_ADMIN_TOKENto the same value on both, or on neither. Custom multi-node SLURM templates keep working, but their engines and control APIs stay open (with a warning) unless they pass the token the way the bundled templates do. #4660 - Logging and metrics:
log.vf_leveland$PRIME_VF_LOG_LEVELare removed;log.levelcovers verifiers (#4383). Trainer metrics no longer report/median(#4250). The KV-usage concurrency controller is replaced:concurrency/signalandconcurrency/growth_multiplierare removed, and newconcurrency/*metrics such asconcurrency/queued_shareandconcurrency/elasticityreport the new controller (#4403). - Installation:
uv run prime ...no longer works; install the CLI withuv tool install prime(#4371).uv sync --extra flash-mlano longer works (#4055, #4365). - Python API: the shared supervised trainer loop moved to
prime_rl/trainer/train.py(#4377).prime_rl.multimodal,prime_rl.utils.vlmandVLM_REGISTRYare removed (#3861).CPSupport/cp_supportis replaced bycp_blocker(#4134).ULYSSES_PARAMS,update_ulysses_paramsandsetup_cp_attention_paramsare removed; Ulysses attention takescu_seqlensandmax_seqlenas arguments (#4068).
Changed defaults
model.dsa_backend = "cudnn_flashmla"(wastilelang). #4055monitors.primeis on forrl,sftandeval. #4096orchestrator.concurrency.max_inflight = None(no ceiling; was 1024). #4403- Default train
top_kunder truncated sampling (e.g. top-p only) is 10000 (was 512). #4232 - Muon
optim.nesterov = true. #4113 [orchestrator.gc]is on (interval = 50), replacing Python's automatic full GC in the orchestrator. #4225- Mooncake
inference.kv_cache_offload.lease_ttl_s = 30(was a hard-coded 1 h). #4410, #4414 - DeepEP
[model.moe.dispatch] num_sms = 32(was 20). #3954 model.dsv4_compressor_backend = "cudnn"on SM100+ (set"torch"for the old path). #4354- NUMA binding runs whenever the trainer offloads to host memory, which includes the default config (was only
model.offload = "full"). #4426 - With
model.init.type = "scratch"or a step-directorymodel.name,inference.vllm.load_formatdefaults to"dummy". #4477 VLLM_HTTP_TIMEOUT_KEEP_ALIVE = 3600in the default inference env vars (was vLLM's 5 s). #4568- Inductor keeps its compile-worker pool alive for the whole run, so the workers' host memory stays allocated (about 30 GiB per 8-GPU node in the PR's runs). A lost compile result raises after 30 minutes. #4594
- vLLM 0.34 upstream defaults apply, e.g. KV cache block size 16 → 64. #4558
- Trainer LM-head logits are FP32 (no switch). #4474
- Policy sampling applies only to the policy client. An env agent with its own
clientuses only its ownsampling. Frozen sources on the renderer client default totop_k = -1,min_p = 0.0. #4243 trainer.warmup = true(new): the RL trainer warms up on synthetic micro batches before the first batch arrives. It uses worst-case micro batches, so its peak memory can be higher than in the first real steps; settrainer.warmup = falseto skip it. #4604- SFT sources without a
weightmix by their row counts. In v0.10.0, withdata.probabilitiesunset, SFT alternated between subsets or splits one sample at a time; set equal weights to keep that mix. #4635 - P/D: each single-GPU engine sends its NIXL traffic through the RDMA port nearest its GPU (
deployment.nixl_nic_affinity = true), and the router retries a turn that fails with a connection error up to twice (router.pd_turn_retries = 2). #4575
Bug Fixes
- CP peers no longer lose micro batches to a race that released payloads before every rank fetched them (up to ~45% of a step's micro batches were dropped on multi-node RL). #4489
- Fixed a host-memory leak in the RL trainer from per-token logging stats. #4229
- Qwen3.5 / Qwen3.8: text-only checkpoints with
language_model_onlyload without a vision tower (#4335), compiled runs with W&B on no longer crash on the first forward (#4350), and activation checkpointing no longer fails in backward (#4111). Qwen3.8 no longer OOMs in the PLE convolution under long-context CP (#4252), and compiled Qwen3.8 no longer fails when a micro batch is one packed sequence (#4028). - Resumed runs no longer reuse prefix-cache entries from the abandoned attempt (#4101). Progress counters include the checkpointed step (#4349), and an incomplete conversion cache is rebuilt instead of failing every later run (#4218).
- Checkpoints resume exactly under any
model.offloadmode (none,optimizer,full), also when it differs from the mode that saved them. Before, some combinations crashed, and anonerun resuming anoptimizercheckpoint switched AdamW's kernel. A full-offload resume restores the scheduled learning rate (an SFT run resumed during warmup logged ~1e-12 instead of 6.25e-5). Full-offload checkpoints store the FP32 master weights as the model weights, so loading one withckpt.skip_optimizeror as a new run's starting point no longer rounds them to BF16. Full-offload checkpoints from before this release still resume exactly withfull; other loads of them still read the BF16 weights. #4607 model.ep = "auto"picks a degree that divides the expert count and the FSDP island (#4083). Flash attention honorsis_causal(#4138). NUMA binding is skipped when the GPU has no sysfsnuma_node(#4202).model.debug.force_balanced_routingcovers DeepSeek V4's hash-routed layers (#3969).- Compiled training no longer hangs in its first step when Inductor's compile-worker pool re-forks (#4594).
dist_timeout_secondsnow also applies to CP, EP and FSDP sub-groups, which kept torch's 10-minute default (#4562). - The DCP export tools no longer crash on models that cannot generate, such as Nemotron-H (#4288, #4536). Env workers let in-flight handlers finish cleanup on shutdown (#4555).
- Verifiers bumps close a grading-sandbox reward hack via crafted artifact archives (#4459), lift the 24 h cap on live sandbox processes (#4368), and stop a verifier that clears
/tmpfrom failing the rollout with aSandboxErrorbefore grading (#4506).
Misc
- Every push to a non-draft PR from this repository (not from forks) runs a ~4 min tiny GPU suite, including loss/gradient parity across parallel layouts, offloading and checkpoint round trips, and vLLM logprob parity. The full GPU suite is now opt-in on PRs with the
gpu-cilabel, and runs on Modal after the tiny suite passes, with one check per test group. #4185, #4550, #4596, #4611 - Config overlays document how to compose them, and a test parses every documented stack. #4552
- Custom
rlandinferenceSLURM templates can{% include %}the bundled helper templates, assfttemplates already could. #4637 - A nightly eval regression suite runs GSM8K and PI-TerminalBench2.1 against committed baselines. #4115, #4155
- The trainer benchmark CI and its scripts and baselines (
benchmarks/scripts/,benchmarks/baselines/) are removed, and images no longer contain/app/benchmarks/scripts. To benchmark a parallelism config, follow Scaling § Benchmarking. #4122 - A new
model-factoryagent skill covers launching runs on Model Factory. #4239 - The trainer imports without the
kernelsextra (#3741), and FP8 DeepGEMM paths fail fast outside SM90/SM100 (#3959). - RL fake data can pack samples of one fixed length (
trainer.data.fake.doc_len, needsgenerate_samples), e.g. two 262k rollouts in a 524k row (#4309). Fake micro batches are seeded by their global index, so every DP layout trains the same batch (#4003).
Dependencies
- torch:
2.13→2.14.0. #4365 - vllm:
0.31.0→0.34.0. #4140, #4365, #4558 - transformers:
5.6.2→5.20.2. #4140, #4365 - verifiers:
0.4.0→>=0.4.1(locked0.4.2.dev65); renderers:0.1.12→>=0.2.0(locked0.2.1.dev12). #4384, #4577 - vllm-router:
0.2.3→0.2.8, with less memory held per in-flight P/D turn. #4411, #4575, #4667 - NCCL: pinned to
nvidia-nccl-cu13==2.32.3. #4521 - NIXL:
0.10.1→1.5.0. modelexpress:0.3.0→0.8.0.dev20261022. #4365, #4015 - flash-linear-attention:
>=0.6.0, for higher-precision CP state chains. #4264 - FlashInfer:
0.7.3, withflashinfer-cubinandflashinfer-jit-cacheadded to thegpuextra. #4190, #4558 - nvidia-cudnn-frontend:
>=1.30.0→==1.32.2. huggingface-hub2.4.0on Linux. #4558 - deep-select is a new
gpudependency.ring-flash-attnis removed.deep-gemmandflash-mlaare removed in favor of the copies bundled in vLLM, and theflash-mlaextra is gone. #3958, #4134, #4055, #4365 - prime: no longer a Python dependency; install the CLI with
uv tool install prime. prime-runs:>=0.1.6. #4371, #4363 - pillow
>=13.0.0is a direct dependency. datasets4.6.1→5.1.0, plus security upgrades across the lock (pip-audit advisories 200 → 17). #4534, #4535 - msgpack
>=1.2.3, certifi2026.10.19(eMudhra CA compromise), dion0c801b0. #4529, #4180, #4108 - nltk
3.9.4→3.10.4(adds defusedxml). nltk 3.10 refuses a group- or world-writable data directory: if NLTK-backed envs such asifevalfail to find their data, runchmod -R go-w ~/nltk_data. #4639 - soupsieve
2.8.4→4.0.1, black26.5.1→26.10.1, datamodel-code-generator0.68.0→0.81.0, typing-extensions4.15.0→4.16.0, tornado6.5.5→6.6.1, truststore0.10.4→0.10.5, cbor26.1.1→6.2.0, grpcio1.80.0→1.80.1. #4535, #4640, #4641
New Contributors
- @KyleWong288 made their first contribution in #4072
- @BenCurtis2003 made their first contribution in #4144
- @kevinjosethomas made their first contribution in #4168
- @brendanhogan made their first contribution in #4181
- @Arsh624 made their first contribution in #4202
- @VishokJ made their first contribution in #4447
Contributors
Ranked by commits in this release:
- @faresobeid (61)
- @mikasenghaas (56)
- @garrett361 (31)
- @samsja (29)
- @snimu (25)
- @hallerite (23)
- @hubert-marek (12)
- @nxphi47 (10)
- @eexwhyzee (7)
- @skpulipaka26 (5)
- @yafshar (4)
- @MarioSieg, @xeophon (3 each)
- @artzhuravel, @cabrinha, @KyleWong288, @VishokJ (2 each)
- @akirillo, @Arsh624, @BenCurtis2003, @brendanhogan, @JannikSt, @kevinjosethomas, @parkerpettit, @rasdani (1 each)
- Full comparison: v0.10.0...v0.11.0