v0.11.02026-11-22
prime-rl 发布新版本,自 v0.10.0 以来 25 位贡献者提交 285 次,含破坏性变更,升级前请先读一遍 Breaking Changes。重点更新:新增 Mega MoE 融合式专家并行分发器 [model.moe.dispatch] type = "megamoe",把 EP 通信与专家 GEMM 重叠执行,实测吞吐提升到 eager all-to-all 的 1.63 倍;新增 uv run pretrain 预训练入口,支持 datatrove 分片、加权 [[data.source]] 混合与精确续训;trainer.loss.scorecentering 让 IcePop 分数按采样分布中心化;P/D 分离的多轮推理支持双向 KV 传输,prefill 只算新 token;env server 改为 env worker pool,2048 集批次的 orchestrator 峰值内存从 85.3 GB 降到 17.5 GB;另接入 GLM-5.3 Flash、Muse Glimmer、Nemotron 3.5 Super、Qwen3.8 Flash Next 等新模型。
v0.10.02026-10-13
自 v0.9.0 以来累计 279 次提交、25 位贡献者参与。本版重心是训练器性能:MoE 运行时与检查点布局统一为一套,运行时 gate/up 与 QKV 融合默认开启,新增 SonicMoE BF16 后端,MoE 计算可逐层选择;MoE 块改用 fullgraph 编译,FA4 包成自定义算子便于编译器追踪,loss 改为 torchtitan 式分块计算。CPU 优化器 offload 复用 pinned buffer,DeepSeek V4 Flash 一个 SFT step 从 30.9 秒降至 6.5 秒。同配置下 Qwen3-235B-A22B SFT 比 torchtitan 快 1.15×,单步 4.39 秒、MFU 46.6%,并附最大吞吐配方与复现命令。GLM-5 新增 model.dsabackend = "cudnnflashmla" 稀疏注意力后端,前向比 TileLang 快 1.9–3.6×、反向快 3–4.7×,配套 12 节点 16k SFT 配方与 SWE RL 示例。
v0.9.02026-08-25
自 v0.8.0 以来的 105 个提交中,自适应并发最实用:编排器与在线评测按 vLLM 实时压力收放在途任务,逼近 KV cache 阈值前主动退让,过载时优先取消最新一批;把上下限设为同值即回到固定并发。
新增本地面板 uv run dashboard,集中呈现实时指标、配置、rollout 轨迹、生成 token、工具上下文与合并日志;RL 与 SFT 共用同一守护进程,本地 agent 还能据此产出带可校验引用的报告。
SFT 现可在训练旁并行跑基于 rollout 的评测,单机自动切分训练与推理卡,多机走独立任务,权重传输默认使用 NCCL。优化器支持完全卸载 CPU:梯度、FP32 主权重与状态留在主机内存,优化分块与 GPU 反向并行执行,SignSGD 每参数仅占 8 字节。
另外新增 prime-kernels 子模块,按架构分发预编译 CUDA 轮子,首个可选内核是 Blackwell 上的融合 MoE 前向。课程学习改为可组合:每个训练源配可断点恢复的任务采样器与准入门控,被拒的组保持可观测,由编排器回填训练批次。
v0.8.02026-08-07
98 commits from 13 contributors since v0.7.0._
1. Multi-Agent RL Algorithms
prime-rl integrates verifiers 0.3.0 for first-class multi-agent (single-policy) training support. Simply select a multi-agent environment with --env.id and mark all trainable agents. prime-rl will take care of the rest! Two new named algorithms were added for special multi-agent environments:
- RAE (Role-conditioned Advantage Estimation) — SPIRAL's per-agent EMA-baseline advantage for self-play environments. Each trainable agent keeps an EMA of its own rewards; advantage is scored against the pre-update baseline and folded in at a configurable decay (default 0.95), keyed by agent_name per env instance.
- Hierarchical GRPO — for proposer-solver environments where a single group average is misleading. Solvers are compared only with other solver attempts on the same proposed problem; proposers are compared with other proposals from the same source task.
#3136 — RAE — role-conditioned advantage estimation for self-play envs (SPIRAL)
#3138 — Hierarchical GRPO for proposer-solver envs
#3165 — Multi-agent native metrics
#3104 — Adopt the multi-agent episode wire (verifiers 0.2.2.dev7)
2. NIXL & ModelExpress Weight Broadcast
The inference stack moves to vLLM 0.26.0. A new NIXL + ModelExpress weight-synchronization path provides direct trainer-to-vLLM weight transfer over NIXL with a declarative trainer-to-HF conversion graph and typed BF16/FP32 wire arenas. ZMQ is now the default rollout transport — rollout batches stream orchestrator → trainer over sockets instead of being written to disk, with filesystem still available as a fallback. A single global router now fronts all engines in every deployment type.
#3060 — NIXL + ModelExpress weight synchronization
#3166 — vLLM 0.26.0
#3149 — Default rollout transport to ZMQ + multi-node host injection
#3105 — Single global router in front of engines for all deployments
#3051 — uint16 routed-experts payload for >256-expert models
#3031 — Online quantization config
#3028 — Factor-derived YaRN scaling for Laguna
3. Extended Multimodal Support
Multimodal training now extends to SFT and gains context parallelism. Renderer-produced multimodal samples flow end to end through SFT — including image-safe truncation, mmtokentypeids, multimodal processor outputs, and cat packing. The dense Qwen3.5 composite VLM body (HF vision encoder + custom PrimeRL text model) with MRoPE positions is supported. Context parallelism now extends to hybrid linear-attention and VLM models in SFT, and multimodal samples can be packed with CP. Ulysses CP breaks the numkv_heads ceiling via GQA KV-head replication — critical for hybrid-Mamba GQA models like NemotronH Super/Ultra/Nano (2 KV heads), which were previously stuck at cp <= 2 and can now scale to cp = 64.
#3075 — Multimodal (VLM) SFT
#3099 — Context parallelism for hybrid + VLM SFT
#3103 — Pack multimodal samples with context parallelism
#3042 — Ulysses CP beyond numkvheads via GQA KV-head replication
#3032 — seq_lens as the packed-sample boundary contract
#2988 — Require renderer-based tokenization for SFT
#3044 — Unify the SFT loss path with the RL trainer
---
Misc
Trainer performance & attention backends: FlashAttention 3 is now the default, with attn = "auto" (FA4 on Blackwell, FA3 on Hopper, FA2 on older). The eager path and fa4 alias are removed. Nemotron-H packed Mamba conv uses the faster fla causal_conv1d kernel; unneeded gradients in the fused LM-head backward are skipped.
#3057 — FA3 as default, rename fa4 → flashattention4, remove eager
#3076 — attn = "auto" (FA3 on Hopper, FA4 on Blackwell)
#3192 — fla causal_conv1d for packed Mamba conv (Nemotron-H perf)
#3011 — Skip unneeded gradients in fused LM-head backward
#3063 — Require FLA for DeltaNet (Qwen3.5)
#3168 — B300/GB200/GB300 peak FLOPS for MFU
FP8 & quantization: MXFP8 training via TorchAO — MXFP8 linear for forward/backward and weight conversions, compatible with all-to-all and grouped GEMM. SM100-specific UE8M0 FP8 scales gated to Blackwell; SM100 FP8 weights emitted in vLLM kernel format.
#2910 — MXFP8 support
#3112 — UE8M0 FP8 scales only on SM100
#3036 — Emit SM100 FP8 weights in vLLM kernel format
Orchestrator architecture: env collections restructured around composable sources (verifiers env / serve / legacy blocks); env servers are now always standalone; all config shims removed; maxinflightrollouts → maxinflightepisodes. The orchestrator now owns each v1 env's taskset and ships task data to env servers; infinite tasksets are supported.
#3150 — Rename env collections to sources, compose verifiers config blocks
#3162 — Standalone env servers
#3156 — Remove every config shim
#3151 — Rename maxinflightrollouts → maxinflightepisodes
#3043 — Orchestrator owns v1 tasksets, ships task data to env servers
#2993 — Support infinite tasksets
Observability: local file monitor for JSONL metrics, effective reward/score as a second W&B overview panel, platform trace metadata via verifiers Trace fields.
#3111 — Local file monitor for JSONL metrics
#3153 — Effective reward and eval score in W&B overview
#3061 — Stamp platform trace metadata via verifiers Trace fields
CI & infrastructure: nightly FFT workflow with cron, GHCR image build fixes, workflow actions bumped to Node 24, Docker Hub push removed, GPU integration test timeouts increased.
#3118, #3142 — Nightly FFT workflow + cron
[#3127](http
v0.7.02026-07-14
v0.7.0 三处大改。V1 推出路径全面接入 Verifiers 的 Task / TaskData 模型:环境改用 taskset 与 harness 配置,trace 携带嵌套任务描述符,环境目录来自统一的 Verifiers 与 research-environments 包,升级需 verifiers>=0.2.0。
训练算法不再散落在 orchestrator 与 trainer 的各项 flag 里,改由具名 algorithm config 统一路由——GRPO、OPD、SFT 蒸馏、自蒸馏、echo 及按环境混合算法共用一层,GRPO 另加覆盖完成 token、上下文 token 与轮数的线性长度惩罚;采样默认各环境等权,rollout 指标按 all/effective 矩阵统一。
省显存默认值这次直接开箱即用:激活检查点、激活卸载、torch.compile、优化器 CPU 卸载、融合 LM-head 分块全部默认开启,新配置不调参就能跑更大模型。MoE 专家并行 model.ep 默认 "auto",路由走 fp32 换更干净的数值;权重广播改用 NCCL,同步延迟与文件系统开销双降,SM100 上也支持 DeepGEMM FP8 训练。
v0.6.02026-06-23
自 v0.5.0 以来的 330 次提交、25 位贡献者,主要落在三处:
推理服务栈整体重做。新增 llm-d(EPP + Envoy)路由后端,可与原有 router 并存,路由策略改为可配置,默认切到 consistent_hash;KV 缓存改成分层卸载,按 CPU、磁盘、MoonCake 分布式存储逐级溢写,非 P/D 部署也能用。分离式 prefill/decode 全面改走外部负载均衡,弃用混合 LB,且必须经由 SLURM 部署;orchestrator 现在可选与推理节点同机运行。另外补齐了分引擎的推理指标、vLLM 存活探针(超时可配)和 JSON 日志。
FP8 训练端到端打通:基于 DeepGEMM,加入 FP8 融合 transpose-cast 路径,trainer 向推理同步权重时支持 FP8 格式,同时用 int64 地址等手段堵住溢出问题。
性能方面,上下文并行新增 Ulysses all-to-all 路径、与 ring attention 并存,ring 模式下支持 FA4;序列打包更紧凑,MoE 引入 DeepEP 专家并行,吞吐与显存均有改善。
v0.5.02026-03-30
推理侧新增分离式 Prefill-Decode 架构:prefill 与 decode 拆到独立 GPU 池,配合多副本水平扩展和 vLLM router 智能分流,大规模 RL 训练的吞吐与延迟明显改善,同时支持 router_url 接入弹性推理池。环境执行改为多环境 worker,env server 独立进程运行,故障隔离更彻底,并补上了崩溃后子进程清理、任务取消等修复。
模型支持是一大重点:GLM5(含 deep-gemm FP8 依赖与 AFMoE flash attention)、Qwen3.5 MoE(EP、VLM 权重广播、DeltaNet + 注意力混合上下文并行、LoRA 兼容)、MiniMax M2.1、Nemotron-H 混合 Mamba-Transformer,以及 GPT-OSS,各自都带上了 LoRA 或维度方面的修补。
SFT 新增 LoRA 参数高效微调,蒸馏部分修复若干问题,并加入 VLM 支持与预分词优化。
v0.4.02026-02-06
1. Bring Your Own Algorithms
Researchers can now plug in custom loss functions and advantage functions without modifying the core training code. Define your own RL objectives and advantage estimators, configure them via TOML, and experiment freely.
- Custom Loss: provide a per-sequence loss function via LossInputs / LossOutputs dataclasses
- Custom Advantage: provide a per-problem advantage function via AdvantageInputs / AdvantageOutputs dataclasses
- Configure everything in your TOML config with type = "custom", import_path and kwargs
``toml
Custom loss
[loss]
type = "custom"
importpath = "mymodule.ppocliploss"
kwargs = { clip_eps = 0.2 }
Custom advantage
[advantage]
type = "custom"
importpath = "mymodule.normalized_advantage"
kwargs = { eps = 1e-8 }
``
See docs/bring-your-own-algorithms.md for full documentation.
#1715 — Bring your own algorithms
2. Multimodal RL Training
Added experimental support for multimodal reinforcement learning training, enabling RL fine-tuning of vision-language models (VLMs). This opens up new possibilities for training models that can reason over both text and images using reinforcement learning.
Key capabilities:
- Train VLMs with the same GRPO/PPO algorithms used for text-only models
- Multi-turn conversation support for multi-modal interactions, allowing complex dialogue flows with interleaved images and text
- Compatible with existing reward functions and verifiers
#1680 — Add multimodal training (experimental)
#1703 — Add multi-turn support for multi-modal RL
3. Performance & Parallelism
Expert Parallelism (EP)
Added support for Expert Parallelism, a distributed training strategy for Mixture of Experts (MoE) models.
#1595 — Expert Parallelism support
#1614 — Add CP and EP to benchmarks
Flash Attention 4
Added FA4 support for fast attention on Blackwell.
#1726 — Flash Attention 4
FA3 Ring-Attention Kernel
Previously our ring attention algorithm was still using the Flash Attention 2 kernel. We now allow using FA3 instead for significant speedup on long context training.
#1727 — Add FA3 ring-attention kernel wrapper and benchmark coverage
Optimizer State CPU Offload
Offload optimizer states (e.g. Adam first and second moments) to CPU memory. Particularly useful to reduce memory usage when doing RL experiments at smaller scale, allowing large MoE models to fit on a couple of training nodes. The performance reduction is negligible in RL because large batch sizes mean many gradient accumulation steps, and the cost of offloading weights to CPU is amortized.
#1694 — Add optimizer state CPU offload
3-Stage Chunked LM Head Loss
Improved memory efficiency for the language model head loss computation via a 3-stage chunked approach. Instead of materializing the full logit tensor, the loss is computed in chunks, reducing peak memory usage. This is especially beneficial for large-vocabulary models where the logit tensor can be a major memory bottleneck during the backward pass.
#1649 — 3-stage logic for chunked lm head loss
4. Other Improvements
- Elastic Inference Pool: New elastic inference pool with DNS-based service discovery for dynamic scaling of inference servers at runtime. Add or remove servers without restarting the training loop, with automatic health checking and failover. #1617, #1704
- Temperature Scheduler: Control sampling temperature throughout training with various scheduling strategies, enabling curriculum-style exploration. #1624
- JSON Structured Logging: JSON structured logging for easier log aggregation and analysis in production. #1681
- Gemma3 Support: Added native support for Gemma3 models. #1648
- Worker Rate Limiting: Rate limiting for worker job submissions to control dispatch pace. #1711
- K8s Health Probes: Health probes for inference and trainer, plus parallel pod management for faster scaling. #1719, #1718
- Multi-run Checkpointing: Checkpoint support for multiple concurrent training runs. #1593, #1632
- RunsManager Refactor: Renamed Runs → RunsManager with hook cleanup, and ability to evict runs with bad batches. #1619, #1634
---
Breaking Changes
vLLM upgraded to 0.14**: Upgraded vLLM dependency to version 0.14. This may require updating your environment. Token chat preprocessing has been aligned with vLLM 0.14 behavior. #1625, #1637
Liger kernel model deprecated**: The Liger kernel model implementation has been deprecated. #1691
---
Bug Fixes
#1717 — Fix race condition
#1725 — Fix int64 JSON serialization in Chinese character metrics
#1720 — Handle empty completiontemperatures in preparesample
#1712 — Use stable checkpoints for orchestrator resume
#1702 — Fix eval watcher only picks up checkpoints in increasing order
#1693 — Fix NCCL update
#1690 — Don't create config dir on trainer during config validation
#1686 — Make NCCL broadcast compatible with DP
#1683 — Fix bug where hosted RL rollouts were missing final message
#1670 — Zombie guard on checkpoint
#1678 — Only master clean weight
#1665 — Fix support for NCCL mode when resuming from checkpoint
#1650 — Fix KL mismatch by resetting prefix cache
#1644 — Fix weight update when enforce_eager=True
#1642 — Use discovery in eval
#1636 — Fix CPU offloading
#1630 — Make search for line more robust
[#1612](https://github.com/PrimeIntellect-
v0.3.02026-01-16
RL 训练的显存占用是这版的重头。新增融合 LM head 分块计算(fused chunked lm head),只按需产出 logprobs,RL loss 的峰值显存因此大幅压缩,现已默认开启(fusedlmheadchunksize=2048),非自定义的 HF 模型也支持 loss 分块(#1525、#1544、#1545)。以 Qwen/Qwen3-0.6B、16384 序列长度为例,峰值显存从 44.2 GiB 降到 3.3 GiB,占用率由 93.1% 降至 6.9%,吞吐还略有上涨——原先基本吃满整张卡,现在小显存环境也能跑 RL 训练。
旧实现
```
Benchmark
┏━━━━━━━━━━━┳━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━┳━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━┳━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━┳━━━━━━━━━━━━━━━━━━━━┓
┃ Step ┃ MFU ┃ Throughput ┃ Step Time ┃ Peak Memory ┃
┡━━━━━━━━━━━╇━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━╇━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━╇━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━╇━━━━━━━━━━━━━━━━━━━━┩
│ 1 │ 7.85% │ 12.12K │ 21.63s │ 44.2 GiB │
│ 2 │ 7
v0.2.02025-12-31
prime-rl 进入第二阶段。本次大版本集中了训练 Intellect-3 时所做的全部底层重构:多数设计已在大规模训练中验证,具备长期维护的基础。同时引入 nightly 测试,每晚连续跑数小时覆盖单轮、多轮与 agentic 三类训练任务,以便及时发现性能或收敛回归。此后将保持固定的发版节奏。