解读 MiniMax-M2 的 MoE 架构创新:用 256 个细粒度专家替代少量大专家以增加路由组合多样性、用相互独立的 Sigmoid 门控取代 softmax top-k 竞争,并梳理其面向智能体编码的后训练数据方案。
MiniMax-M2 技术报告摘要
论文:The MiniMax-M2 Series: Mini Activations Unleashing Max Real-World Intelligence
团队:MiniMax
时间:2026.05(arXiv:2605.26494)
页数:35页
1. 预训练 Recipe
训练策略
| 项目 | 详情 |
|---|---|
| 架构 | MoE,229.9B总参/9.8B激活, 62层, hidden=3072, vocab=200064 |
| Attention | Full multi-head attention(所有层),48 query heads + 8 KV heads (GQA), RoPE |
| Experts | 256 fine-grained experts, 8 activated/token, sigmoid gating + learnable bias |
| MTP | Multi-Token Prediction module (训练后通过weight copying扩展支持speculative decoding) |
| 上下文 | 原生192K tokens |
| 总Token | 29.2T |
| 训练阶段 | Constant phase (19.9T, 8K) + Decay phase (9.3T, multi-stage 8K→32K→192K) |
| 与M1区别 | 弃用hybrid lightning attention,改为全层full attention(在大规模setting下表现更优) |
关键架构设计
① Fine-Grained Experts + Sigmoid Gating
- 256个小expert(而非少量大expert):增加routing组合多样性,减少设备间利用率方差
- Sigmoid gating(非softmax top-k):每个expert独立activation score,无zero-sum competition
- Learnable bias terms:改善load balancing,大幅减少对auxiliary loss的依赖
② Full Attention Decision
- 明确benchmarking表明:在此规模下full attention优于hybrid attention
- 放弃M1的lightning+softmax交替设计
训练数据
| 项目 | 详情 |
|---|---|
| 来源 | web documents, academic literature, books, code, structured QA |
| 质量控制 | model-based reward scoring + auxiliary classifiers多维度评估 |
| Sampling | balanced strategy:upweight高质量 + 保持category diversity |
| 分布 | code/math/STEM显著上采样 |
| Long-context extension | 高质量code拼接、长PDF文档、主题相关文档packing |
| Decay phase | 混入高质量数据consolidate能力 + 扩展context length |
Infra设计
| 项目 | 详情 |
|---|---|
| 原文未详述预训练Infra细节 | - |
2. 后训练 Recipe (SFT Data Collection)
Agentic Coding 数据
三个domain:
- Software Engineering (SWE):GitHub PR-based,description+code changes+test cases
- Application Development (AppDev):full-stack开发任务
- Terminal Interaction:交互式终端环境任务
Agentic Cowork 数据
Office-task相关的agent轨迹
原文提到executable workspace + artifact-aligned reward
数据特点
每条数据grounded in executable workspace
可通过运行验证正确性
大规模、可验证的agent轨迹
3. RL Recipe
算法建模
| 项目 | 详情 |
|---|---|
| 建模方式 | 将LLM视为policy,model generation之外的一切(context管理、memory、agent state转换)视为environment |
| MDP | M=(S,A,T,R,γ);state=当前context window内容;action=单步LLM completion(可含reasoning/tool call/context op/sub-agent通信) |
| 训练单元 | 每个(s_t, a_t) pair作为独立训练sample,policy不需要显式推理state transition |
| 算法 | CISPO(沿用M1) |
关键设计:ForgeRL System
三模块解耦架构:
| 模块 | 职责 |
|---|---|
| Agent Side | 封装任意agent实现,驱动环境交互,记录(s_t, a_t, o_t) tuples,完全不感知训练/推理机制 |
| Middleware | Gateway Server(标准化通信接口,路由completion requests)+ Data Pool(分布式trajectory存储,异步收集) |
| Training/Inference Side | RolloutEngine + TrainEngine,完全解耦于agent逻辑 |
关键特性:
- 支持Black-box和White-box agents
- Windowed-FIFO scheduling:解决异构rollout时间(秒到小时)与训练稳定性的矛盾
- Prefix-tree merging:合并共享前缀的trajectories
- Training-Inference-Agent三方完全decouple
关键设计:GenRM Length Bias Online Monitoring(沿用M1)
Online监控RL policy是否利用长度获取reward
检测到时立即触发GenRM recalibration
关键设计:M2.7 Self-Evolution
M2.7 checkpoint迈出self-evolution第一步
模型可自主debug训练runs并修改自身scaffold
代表从human-in-the-loop到autonomous improvement的方向
Infra设计
| 项目 | 详情 |
|---|---|
| 系统 | Forge(agent-nativeRL system) |
| 核心能力 | 适配long-horizon agent trajectories(up to 192K tokens) |
| 调度 | Windowed-FIFO解决throughput vs distributional consistency矛盾 |
| 推理优化 | Prefix-tree merging + inference optimization |
| 扩展性 | Agent side和Training side独立scale |
4. 关键亮点
- 9.8B激活达frontier性能:229.9B总参但仅9.8B active,竞争力匹敌远大模型
- 回归Full Attention:明确证明大规模下full attention优于hybrid,弃用M1的lightning attention
- Forge系统:Agent/Middleware/Training三模块完全解耦,支持black-box/white-box agents,异步数据收集
- AgentRL MDP建模:clean abstraction——LLM为policy,其余为environment,(s,a) pairs为独立训练单元
- M2.7 Self-Evolution:模型自主debug和修改scaffold,towards autonomous improvement
- 29.2T tokens + 192K context:大规模预训练+超长上下文
- Fine-grained 256 experts + Sigmoid gating:增加routing多样性,减少auxiliary loss依赖

