Skip to content

v0.11.0

Latest

Choose a tag to compare

@samsja samsja released this 22 Nov 01:49
· 84 commits to main since this release
4cec527

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 = true centers 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 pretrain trains 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) and orchestrator.pad_to_seq_len = true (RL), both off by default, give packed rows one shape, so torch.compile and 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_seqlens and max_seqlen as 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 logs time/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 = true copies 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 step count 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_vio and routing_confidence values do not change.
  • Token-chunked activation checkpointing for Nemotron-H MoE layers (#4222, experimental): model.ac.token_chunk_size lets 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_flashmla is the default model.dsa_backend (#4055). It runs on SM90/SM100/SM103 and now uses vLLM's bundled FlashMLA, so it also runs on aarch64 (#4365). Set tilelang on other GPUs.
  • Faster FP8 indexer (#3958, #4235, #4276, #4278, #4330): DeepSelect top-k, DeepGEMM fp8_fp4_mqa_logits scoring, 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.targets entries 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 from max_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 from off_policy/* to staleness/*, and the trainer logs mismatch KL per staleness bin.
  • IcePop score centering (#4012, #4176, #4232, #4445, #4284): trainer.loss.score_centering = true centers 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-subagent GRPO length penalty scales tokens from subagent calls by subagent_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 = true keeps shipped batches until a trainer checkpoint covers them, so a crashed trainer can be restarted on its own with --resume while the orchestrator, inference and env worker pools keep running. It needs ckpt.interval and the filesystem weight broadcast, which it makes the default under rl. The rl launcher 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_omni checkpoint) 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 on scaleswe and evaluate on SWE-bench Verified. Each composes a base rl.toml with a GPU overlay from gpu/, 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 pretrain trains a model from scratch on datatrove token shards. It samples documents (longer ones in seq_len pieces) from named [[data.source]] folders, mixed by relative weight (natural shares if unset). repetitions reads a fixed, seeded subset of a source that many times over the run (needs max_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 logs val/<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 a name, an optional relative weight (natural shares by row count if unset), and its own columns and chat-template kwargs (renderer). Sources take turns by weighted fair queuing, so every stretch of samples holds the mix, and each source logs progress/<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 or num_workers (pretraining also seq_len and seed). Sources match by name, each kept source continues where it stopped, and the new shares hold from the first step. A pretraining source with repetitions resizes its subset so the run still reads it about repetitions times. An unchanged config resumes exactly, and pretraining also resumes exactly onto a different GPU count. #4619, #4661
  • uv run launch @ config.toml reads a top-level mode (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 for sft. vllm-router now 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 for sft and rl) loads the weights at model.name. type = "scratch" (default for pretrain) uses the model's own init, seeded by model.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 write trainer/mapping.json, which maps HF tensors to prime tensors (not for LoRA runs, or when the HF conversion is more than views). Point model.name at .../checkpoints/step_N to 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; --workers exports 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_config of orchestrator.speculative_decoding.draft loads 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_0 NIC, 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 needs vllm-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-router no 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/actions with {"type": "update_config", ...} applies at the next step boundary. Live fields include batch_size, max_staleness, concurrency.*_inflight, per-source ratio, group_size, the sampling temperature, max_completion_tokens and extra_body, and the GRPO length_penalty. Updates survive --resume. #4273, #4318, #4322, #4452
  • A checkpoint action saves the trainer and orchestrator at the trainer's next step while training continues, and GET /v1/checkpoints lists checkpoints on disk. #4379, #4493
  • A running uv run eval --control serves GET/PUT /v1/concurrency. #4097
  • Per-run admin token (#4660): rl and sft create a token for each run, or use PRIME_RL_ADMIN_TOKEN if 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 the X-Prime-Admin-Token header. 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, and require_admin_token = true under [server] ([inference.server] in an rl config) makes the server refuse to start instead. uv run eval --control checks the token only when PRIME_RL_ADMIN_TOKEN is set.

9. Monitoring and Traces

  • The Prime monitor is on by default for rl, sft and eval. 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 = false turns 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 rl launcher, 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.files read task lists from files. #4460
  • uv run eval, including its --control API, runs without the gpu extra (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-server is now uv run env-worker-pool, and its config class prime_rl.configs.env_server.EnvServerConfig is now prime_rl.configs.env_worker_pool.EnvWorkerPoolConfig. Import from prime_rl.env instead of verifiers.v1.serve. serve.pool.max_workers = 0 is rejected; use 1. 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_steps to orchestrator.max_staleness. Metrics move from off_policy/* to staleness/rollout/* and staleness/token/*, and dispatcher/off_policy/* is removed. Stale rollouts are no longer cancelled (the stale cancel 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_strategy and data.type are removed. Write one [[data.source]] per (dataset, subset, split) with a unique name (no /), a dataset, and optional subset, split (default "train") and revision. Replace probabilities with a weight on every source. stopping_strategy has no replacement: sources repeat until max_steps. [val.data] takes the same sources. [data] type = "fake" becomes [data.fake] (--data.fake), with length and input_ids under 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 need ckpt.skip_dataloader = true. #4635
  • Context parallelism: ring CP and trainer.model.cp_style are removed; Ulysses is the only CP style. With cp > 1, cp must divide num_attention_heads and divide or be a multiple of num_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_init is removed; use model.init.type = "scratch" (shared [model] in RL), which gives a real seeded init. A resume whose model architecture differs from the checkpoint's config.json now stops before loading. #4476, #4433
  • Tools: verifiers removed env.taskset.task.tools.colocated; choose where the tool server runs with env.taskset.task.tools.runtime. #4577
  • MoE: trainer.model.moe_router_dtype is removed (#4177). DeepEP's unused token_chunk_size is removed (#3954).
  • Distillation: orchestrator.train.algo.sampling is removed. For type = "sft", move [orchestrator.train.algo.sampling.source] to [orchestrator.train.algo.teacher]. OPSD's algo.renderer is removed; hints use orchestrator.renderer. #3987
  • VLM: [model.vlm] keeps only freeze_vision_encoder; vision_encoder_attr, language_model_attr and [orchestrator.model.vlm] are removed. #3861
  • LoRA: model.lora.modules_to_save is 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_group is removed; set trainer.model.dp_replicate (model.dp_replicate in SFT). SFT num_eval_gpus/num_eval_nodes are now num_infer_gpus/num_infer_nodes, and multi-node SFT requires num_train_nodes. #3992
  • Launcher-derived fields: explicitly set trainer.weight_broadcast, orchestrator.weight_broadcast, orchestrator.pad_to_multiple_of or orchestrator.num_train_workers must match the derived value, or validation fails. #3977
  • Prime monitor on by default: rl, sft and eval runs 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.prime or PRIME_RUNS_MODE=disabled. A trainer started without the rl launcher fails unless the monitor is off. monitors.prime, monitors.wandb and monitors.file must be set in the shared [monitors.<name>] block, not in one component. Custom multi-node SLURM templates must wrap the launch in python -m prime_rl.entrypoints.run_owner {rl,sft} <config> (SFT templates pass {{ run_config_path }}). The file-monitor producer orch is renamed orchestrator. #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 .bin sidecars (#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_optimizer in RL) (#4108).
  • Checkpoint export: tools/convert_dcp_to_bf16.py and tools/convert_dcp_to_fp8.py run in one CPU process and fail under torchrun; 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_v3 reasoning parser is removed; use nemotron_v3 (#4140). vLLM's SageMaker routes (/invocations, /adapters) and /v1/load_lora_adapter / /v1/unload_lora_adapter are no longer served; use prime-rl's /load_lora_adapter (#4530, #4593). Code that imported deep_gemm / flash_mla must use vllm.third_party.deep_gemm / vllm.third_party.flashmla (#4365).
  • Admin token: engines that rl and sft start reject requests to their admin routes (/pause, /resume, /update_weights, /load_lora_adapter, /init_broadcaster, ...) without the run's token in the X-Prime-Admin-Token header, and so do the trainer and orchestrator control APIs. To call them yourself, set PRIME_RL_ADMIN_TOKEN before launching. If you start inference and orchestrator yourself, set PRIME_RL_ADMIN_TOKEN to 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_level and $PRIME_VF_LOG_LEVEL are removed; log.level covers verifiers (#4383). Trainer metrics no longer report /median (#4250). The KV-usage concurrency controller is replaced: concurrency/signal and concurrency/growth_multiplier are removed, and new concurrency/* metrics such as concurrency/queued_share and concurrency/elasticity report the new controller (#4403).
  • Installation: uv run prime ... no longer works; install the CLI with uv tool install prime (#4371). uv sync --extra flash-mla no 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.vlm and VLM_REGISTRY are removed (#3861). CPSupport/cp_support is replaced by cp_blocker (#4134). ULYSSES_PARAMS, update_ulysses_params and setup_cp_attention_params are removed; Ulysses attention takes cu_seqlens and max_seqlen as arguments (#4068).

Changed defaults

  • model.dsa_backend = "cudnn_flashmla" (was tilelang). #4055
  • monitors.prime is on for rl, sft and eval. #4096
  • orchestrator.concurrency.max_inflight = None (no ceiling; was 1024). #4403
  • Default train top_k under 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-directory model.name, inference.vllm.load_format defaults to "dummy". #4477
  • VLLM_HTTP_TIMEOUT_KEEP_ALIVE = 3600 in 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 client uses only its own sampling. Frozen sources on the renderer client default to top_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; set trainer.warmup = false to skip it. #4604
  • SFT sources without a weight mix by their row counts. In v0.10.0, with data.probabilities unset, 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_only load 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.offload mode (none, optimizer, full), also when it differs from the mode that saved them. Before, some combinations crashed, and a none run resuming an optimizer checkpoint 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 with ckpt.skip_optimizer or as a new run's starting point no longer rounds them to BF16. Full-offload checkpoints from before this release still resume exactly with full; 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 honors is_causal (#4138). NUMA binding is skipped when the GPU has no sysfs numa_node (#4202). model.debug.force_balanced_routing covers 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_seconds now 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 /tmp from failing the rollout with a SandboxError before 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-ci label, 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 rl and inference SLURM templates can {% include %} the bundled helper templates, as sft templates 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-factory agent skill covers launching runs on Model Factory. #4239
  • The trainer imports without the kernels extra (#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, needs generate_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 (locked 0.4.2.dev65); renderers: 0.1.12 → >=0.2.0 (locked 0.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, with flashinfer-cubin and flashinfer-jit-cache added to the gpu extra. #4190, #4558
  • nvidia-cudnn-frontend: >=1.30.0 → ==1.32.2. huggingface-hub 2.4.0 on Linux. #4558
  • deep-select is a new gpu dependency. ring-flash-attn is removed. deep-gemm and flash-mla are removed in favor of the copies bundled in vLLM, and the flash-mla extra 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.0 is a direct dependency. datasets 4.6.1 → 5.1.0, plus security upgrades across the lock (pip-audit advisories 200 → 17). #4534, #4535
  • msgpack >=1.2.3, certifi 2026.10.19 (eMudhra CA compromise), dion 0c801b0. #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 as ifeval fail to find their data, run chmod -R go-w ~/nltk_data. #4639
  • soupsieve 2.8.4 → 4.0.1, black 26.5.1 → 26.10.1, datamodel-code-generator 0.68.0 → 0.81.0, typing-extensions 4.15.0 → 4.16.0, tornado 6.5.5 → 6.6.1, truststore 0.10.4 → 0.10.5, cbor2 6.1.1 → 6.2.0, grpcio 1.80.0 → 1.80.1. #4535, #4640, #4641

New Contributors

Contributors

Ranked by commits in this release:

  1. @faresobeid (61)
  2. @mikasenghaas (56)
  3. @garrett361 (31)
  4. @samsja (29)
  5. @snimu (25)
  6. @hallerite (23)
  7. @hubert-marek (12)
  8. @nxphi47 (10)
  9. @eexwhyzee (7)
  10. @skpulipaka26 (5)
  11. @yafshar (4)
  12. @MarioSieg, @xeophon (3 each)
  13. @artzhuravel, @cabrinha, @KyleWong288, @VishokJ (2 each)
  14. @akirillo, @Arsh624, @BenCurtis2003, @brendanhogan, @JannikSt, @kevinjosethomas, @parkerpettit, @rasdani (1 each)