微软公开 MAI-Base-2 训练配方:1.6 万张 GPU,38 天练出 2.8 万亿参数模型
从小模型的重复数据,到专家挤爆内存时的分轮调度,拆开微软这份前沿预训练报告里的方法、证据与取舍。
微软人工智能团队披露了其新一代前沿基座大模型 MAI-Base-2 的预训练工程细节。这个混合专家(MoE)模型拥有 800 亿激活参数、2.8 万亿总参数。在 16,000 块英伟达 GB200 GPU 的集群上,团队历时 38 天完成了 50 万亿 Token 的全量训练,并将原生视觉理解直接融入了底座架构。
| 对照项 | MAI-Base-1 | MAI-Base-2 |
|---|---|---|
| 总参数 | 1 万亿 | 2.8 万亿 |
| 每个 Token 激活参数 | 350 亿 | 800 亿 |
| 训练 Token(含重复) | 30 万亿 | 50 万亿 |
| 预训练模态 | 纯文本 | 原生图文 |
| MoE 布局 | 隔层采用 | 每层采用 |
总参数与训练量扩大了,但每个 Token 仍只激活少量参数;视觉也从预训练阶段就纳入底座。
在超大规模训练中,小实验选出的方案可能在放大后过拟合;理论上省计算的专家结构,也可能卡在显存分配和跨卡通信上。微软把这些问题连起来处理:先让小实验复现大训练的数据重复方式,再改造专家调度、优化器与数据流水线。报告披露的不只是模型规模,还有这些选择如何影响实际训练。
预训练底座与日常聊天的 AI,究竟相隔多远?
许多日常使用 AI 的人习惯了与 ChatGPT 或 Copilot 对话,容易将“大模型发布”等同于“聊天机器人升级”。但 MAI-Base-2 属于预训练基座(Base Model),主要通过海量语料的自监督学习建立语言与世界知识表征,尚未经过指令微调(SFT)或强化学习(RL)等后训练工序。
两者的直观区别在于交互形态:预训练基座的核心任务是根据前文预测下一个 Token(词元),更擅长顺着输入内容续写;而日常使用的对话模型,则是经过后训练引导其理解指令,以结构化的问答方式作答。微软自己的上一代就是一个例子:MAI-Base-1 经过后训练,成为了 MAI-Thinking-1。
基座模型可以通过下游任务进行评测,但在跨模型直接比较交叉熵损失(Cross-Entropy Loss)时,会受到不同分词器(Tokenizer)切词粒度的干扰——同样一段文本,不同分词器切出的 Token 数量不同,直接对比每 Token 损失并不公平。
为此,微软在评测中采用了与分词器解耦的指标:每字节比特数(Bits-Per-Byte, 简称 BPB)。
(BPB 将模型对文本的预测损失按原始字节数归一化,衡量模型压缩未知文本时平均每个字节所需的理论信息比特数。BPB 越低,说明模型对测试集概率分布的预测越准确。)
纵轴为未见测试集(Held-Out)上的每字节比特数(BPB,越低越好)。测试集涵盖内部代码库与外部委托供应商题集,并对训练集进行了去污染过滤。注:标星号的 Kimi K3、Qwen3.8 及 MiMo 为后训练检查点,后训练过程可能对这些评测结果产生影响。
在包含代码(Code)、第三方定制问答(QA)、科学理工(STEM)和数学(Math)的独立预留测试集上,MAI-Base-2 分别取得了 0.2203、0.4162、0.3653 和 0.3561 的 BPB 成绩,优于其参与对比的其他基准模型。
“效率提高 4 到 12 倍”是怎么算出来的?
微软报告的 4.2 至 12.3 倍,是训练配方的计算效率提升,比较基准是 DeepSeek-V4-Pro-Base。
实际训练成本并不能直接由 FLOPs 推断,且 MAI-Base-2 最终实际消耗的训练 FLOPs 也显著多于 DeepSeek-V4-Pro-Base。“4.2–12.3 倍”是微软基于拟合曲线给出的等 BPB 算力效率(FLOPs-Efficiency)比较。
如果直接对比最终评测结果,容易将训练配方的效率与消耗的总算力混淆。为了单独评估配方的效率,研究团队在不同规模的模型上拟合出独立的缩放定律曲线,推算若达到与 DeepSeek-V4-Pro-Base 相同的 BPB,该训练配方所需的理论计算量:在代码任务上约为后者的 1/12.3,问答任务约为 1/4.2,理工与数学任务分别约为 1/8.3 与 1/6.6。相比前代 MAI-Base-1,配方效率提升了 6.3 至 12.7 倍。
横轴为训练总 FLOPs 的对数坐标,纵轴为预留测试集 BPB。水平箭头指示达到相同 BPB 时的计算量比值:相较于 DeepSeek-V4-Pro-Base,代码提升 12.3x、问答 4.2x、理工 8.3x、数学 6.6x。拟合曲线包含了 MAI-Base-2 的最终实测点。
算力配方效率 vs. 实际训练总预算
点击切换不同评测领域,观察“达到相同 BPB 所需的拟合计算量”与“实际训练投入”的本质区别
该拟合曲线包含了 MAI-Base-2 的最终实测点,使得基准对比点落在已知模型的拟合区间内(属于内插而非外推)。微软没有减少总算力开销,而是利用效率更高的配方训练了总参数达 2.8 万亿的更大模型。
小模型也得经历大模型的“重复学习”
在启动超大规模训练之前,工程团队需要在较小规模的模型上探索架构与超参数。为此,微软构建了多尺度实验梯子,并在各阶梯中保持固定 TPP(Training Tokens per active Parameter,每个激活参数对应的训练 Token 数),让模型参数量与训练数据量协同按比例调整。
然而,如果在小尺度实验中直接使用全部数据,会引入数据重复轮数失真的问题。
例如,若某个特定数据源在 50T Token 的全量训练中会被重复训练 8 次,但小尺度实验只分配 5T Token 预算。若直接把全量数据交给小模型,该数据源可能连 1 遍都读不完。这会导致小尺度实验由于缺乏多轮重复,偏好正则化不足的架构或超参数配置,而在放大到大规模多轮重复训练时出现过拟合。
为了解决这种偏差,微软采用了源数据缩放(Source Scaling)机制:在低层级的小模型实验中,人为按比例限制独立样本规模。以该数据源为例,在 5T Token 的小尺度实验中只取其 1/10 的独立样本,同样使其循环 8 次,从而在固定 TPP 下保持了独立数据与参数的比例稳定。
横轴为训练总 FLOPs 的对数坐标,纵轴为评估指标。实线为基于 L18 至 L42 较小层级模型拟合的曲线,虚线外推至 102 层的预测点(星形)与实际训练的最终表现(圆点)高度吻合。
除了数据尺度外,超参数的选择同样复杂。在大模型训练中,多个超参数的效果往往互相牵动,改变其中一个就会影响另一个的最优取值。以学习率(LR)与权重衰减(WD)为例,前者控制每步更新幅度,后者约束权重增长,在微软这组实验中,模型表现对两者的乘积 LR × WD 最为敏感。这种相互影响导致表现优异的超参数组合高度集中在 (log LR, log WD) 平面上的一条狭窄倾斜对角带中。
如果直接在 (log LR, log WD) 平面上按常规矩形网格搜索,大量实验点会落在窄带之外,既浪费算力又难以密集覆盖好组合。团队为此改换了搜索坐标系,改为在 (log LR, log (LR × WD)) 空间中布设网格,更有效地覆盖原先集中在窄带中的好组合。通过在不同模型大小与 TPP 下训练模型,并对评估结果拟合二维二次曲面求出解析极值点,最终总结出确定 MAI-Base-2 超参数的经验公式:
LR* × WD* = 17.04 / steps
log LR* = −1.51 + 0.175 log TPP − 0.573 log steps
其中 steps 为训练总步数,TPP 为每个激活参数对应的训练 Token 数。公式中 LR* × WD* 与训练步数成反比,反映出解耦权重衰减的时间尺度相当于训练步数的固定比例;而 LR* 随步数的指数 -0.573 接近 -0.5,在其他训练条件不变时,与批大小翻倍通常对应学习率调整 √2 倍的经验规律保持相容。
参数只用一小部分,为什么还会跑得慢?
MAI-Base-2 拥有 102 层网络。每一层包含 1 个常驻的共享专家(Shared Expert),以及从 512 个路由专家中动态激活的 7 个专家。这意味着一个 Token 经过一层时仅激活部分计算分支,全网 2.8 万亿总参数中,单个 Token 实际激活的参数约为 800 亿。
选架构时,微软把目标固定在相同的评估损失,再分别比较训练计算量(FLOPs)和实际耗时。当前主要按实际耗时选方案,因为它反映现有集群真正能跑出的效率;如果一个设计省计算却跑得更慢,差距就指向了后续基础设施要优化的地方。
稀疏 MoE 能够以较少的单步计算量容纳更大的总参数量。此前的建模实验已经发现,每层采用 MoE 比密集 FFN 与 MoE 交替更省计算;但在实际硬件执行中,动态路由会带来显存碎片化,细粒度专家也会增加调度与跨卡通信开销。在前代 MAI-Base-1 中,正因 MoE 底层实现效率受限,隔一层放置 MoE、隔一层放置密集 FFN 的折中方案在实际耗时上反而最优。到了 MAI-Base-2,团队通过改善显存利用与专家调度瓶颈,将 MoE 计算层的模型 FLOPs 利用率(MFU)从 24% 提升至 35%,从而能够在全部 102 层采用 MoE。在 38 天的全量训练中,整个集群的全程平均 MFU 为 21%(以每块 GB200 的 BF16 理论峰值 2.5 PFLOPS 为基准,不计激活重计算与优化器运算),goodput 为 89%(衡量训练有效向前推进的时间比例),两者分别对应有效计算效率与有效运行时间,不能混淆为单纯的 GPU 占用率。
提升 MoE 层效率的关键改进之一是多轮零丢弃调度(Multi-round Dropless MoE)。
MoE 路由网络由数据驱动训练得到,专家间的负载并不均衡。当某些专家接收到过多 Token 时,容易引发显存超限。传统做法中,如果设置固定阈值直接丢弃溢出的 Token,实验表明会降低模型的训练表现;若按极端不均衡的最坏情况为每个专家预留超额显存,又会导致平时显存闲置,挤占本可用于减少激活重计算(Activation Recomputation)的显存空间。
任务挤到同一个专家时,固定内存怎样接住它?
教学示意:一个专家组内有三位专家,每位初始配额 100 个 Token,总缓冲容量 300;数字不代表微软实测。借的是缓冲容量,任务仍由原专家计算。
同一个专家组 · 固定缓冲容量 300
低于初始配额
低于初始配额
低于初始配额
微软的做法是将每个专家并行节点(Expert Parallel Rank)上的专家划分为固定的专家组(Expert Group),并赋予其固定的单轮 Token 容量:
- 组内容量共享: 当组内某位专家的 Token 溢出时,优先借用同一专家组内其他专家的闲置容量。
- 多轮流水托底: 若专家组总容量仍无法容纳全部 Token,溢出部分进入追加轮次继续处理,避免丢弃 Token。追加轮次会带来额外计算并降低 MFU。
- 通信与计算流水重叠: 分发(Dispatch)、计算(Compute)与收集(Collect)在各专家组和轮次之间流水重叠。在前向传播中,除了首轮分发与末轮收集仍有部分暴露耗时外,通信主要与专家计算及共享专家计算并行重叠;在反向传播中,输入分发与本层激活重计算重叠,梯度收集与权重梯度计算重叠。
专家的 Token 容量本身是一项可配置的权衡:分配更大的容量缓冲会占用更多显存,容量若设得过小则可能增加追加轮次与额外计算;在实际训练中,该容量通常被调校为在稳态下保持单轮完成。
首轮未处理完毕的溢出 Token 顺延进入追加轮次;各专家组遵循统一的时钟节奏推进。除首轮分发与末轮收集仍有部分暴露耗时外,通信主要与计算重叠执行。
此外,团队通过 GPU 直接发起 All-to-All 通信、利用对称内存直接经由 NVLink 交换 Token,并将每层的负载均衡损失合并为全局单次规约,减少了细粒度专家带来的底层调度开销。
怎么让参数更新更快、更稳?
在大规模集群训练中,优化器设计与数值稳定性对保障训练平稳推进至关重要。
在 MAI-Base-2 中,微软对非嵌入层的二维矩阵参数采用了 Muon 优化器,并保留了 AdamW(用于嵌入层等参数)。在扩展至该规模时,团队发现相比 AdamW,Muon 带来了更稳定的训练动态与显著的效率增益。Muon 的核心是利用 Newton–Schulz 迭代算法对权重矩阵的动量进行正交化处理,该算法由多轮矩阵乘法构成。
但这在大规模分布式训练中遇到了核心矛盾:为了节省显存,ZeRO 架构会将优化器动量切成碎片、分散在各个 GPU 上;然而 Newton–Schulz 算法依赖完整的二维矩阵乘法,无法在孤立的分片上直接执行。为此,团队在优化器步骤中对动量进行分批重组(Resharding):各 GPU 先在本地更新 FP32 动量分片并转为 BF16,再通过分批 All-to-All 交换拼回完整动量矩阵,使每块卡各自持有一部分完整矩阵;接着各 GPU 在本地调用对称感知 Newton–Schulz 核函数完成正交化计算;最后通过第二轮 All-to-All 将更新结果送回原分片,转回 FP32 后应用到权重上。
经过重组元数据缓存与预取等优化后,Muon 阶段的平均耗时为 165 毫秒,占训练单步迭代时间的 2.1%。基于通信瓶颈估算的理论极限约为 55 毫秒,实测耗时约为理论值的 3 倍(主要差距源于各节点掉队、核函数启动开销、负载不均衡与内存拷贝等因素)。
另一项稳定训练的方法是激活梯度裁剪(Activation Gradient Clipping)。 在常规预训练中,通常对整个批次的权重梯度范数(Global Norm)进行裁剪。但当批次中出现少数异常样本时,全局裁剪会将整个批次中正常样本的梯度一并成比例缩小。
为了缓解这一问题,微软在网络特定位置对激活值的梯度(而非激活输出本身)进行裁剪。这种局部限制有助于减轻异常梯度对全批次梯度的连带缩减影响。在实际训练中,配合 Muon 等优化配方,MAI-Base-2 的梯度范数波动范围比前代明显收窄,不过其中位梯度绝对值并非全程更低。报告中的训练损失曲线也显示,二代在完整训练过程中比前代更平滑;这是多项配方变化共同作用下的观测。
横轴为训练 FLOPs 对数坐标,纵轴为未见集上的等效算力收益(EG_FLOPs)。实验在 18 层至 42 层阶梯模型上测试,报告未将该 +28% 外推至 102 层的最终模型。
该技术带来的效率增益随模型规模扩大逐步提高,从 18 层时的约 2% 提升至 42 层时的 28%。
此外,激活梯度裁剪还协助团队排查了数据异常。例如在代码语料中,一个触发裁剪的异常样本显示:一段 Apache 开源许可证文本在 distributed under 处被意外截断,紧接着拼接了拉取请求标题 # PR Title。团队借此定位到了预处理流水线中的一处切分缺陷并予以修复。
在
distributed under 之后本应延续许可证声明,却因预处理缺陷直接拼入了 # PR Title,触发了该处的激活梯度裁剪,协助工程团队定位了数据切分问题。
数据底座:50 万亿 Token 是怎么混出来的?
在数据构建方面,微软报告强调了自建数据流水线与数据可追溯性(Data Provenance),表示其训练数据均来自原生采集与内部清洗,未使用来自其他模型的蒸馏数据。
多收网页,不等于模型能学到同样多的新信息。比如,假设多篇近似网页反复转述同一件事,网页数量增加了,新增信息却很有限。微软改进了网页解析、质量分类、主题分桶和去重:清理网页内容,判断质量与所属主题,再减少重复材料。在此基础上,团队还使用基于向量嵌入(Embedding)的多样性采样,按内容的语义特征优先选取新颖数据,进一步减少近似内容的重复。
相较于 MAI-Base-1,MAI-Base-2 语料库中的独立 Token(Unique Tokens)规模扩充了约 36%,而全量训练吞吐的 Token 总量达到了 50 万亿(含多轮重复训练)。
柱状图总长度分别代表 30T 与 50T 的训练混合总量,深色表示独立 Token,浅色表示重复 Token。在独立 Token 增量上,图书增长 194%,PDF 增长 104%,代码增长 34%。
代码仍是最大的来源;它在训练混合中的份额从 55% 降至 45%,独立 Token 量却增长了 34%,份额下降并不等于内容变少。在 50 万亿训练 Token 的整体混合池中,各数据源的配比为:代码类 45%、网页内容 12%、纯视觉(Vision-only)14%、科学理工 9%、PDF 9%、图书 5%、数学 4%、其他 2%。
此处图表中呈现的 14% 为纯视觉(Vision-only)Token,而报告指出的 VLM(视觉语言多模态)语料在 50 万亿训练总量中占 18%(含重复折合约 9 万亿训练 Token),其中包含 4.5 万亿独立 VLM Token。两者统计口径不同,图文交错文档等数据在分类统计中可能同时归入其他来源。
与前代 MAI-Base-1 的纯文本架构不同,MAI-Base-2 转向了无独立视觉编码器(Encoder-free)的原生图文预训练架构,直接在底座中处理视觉 Token。训练输入包括图文对,以及文字和图片交错的文档;语料覆盖图表理解、空间推理、电脑操作、乐谱阅读等任务。(这些是训练语料覆盖的任务,报告未单独公布它们的评测成绩。)
微软要把数据、模型和系统一起掌握
MAI-Base-2 的预训练实践展现了软硬件全栈协同优化的价值:
通过对数据流水线、模型架构与集群基础设施的联合调优,工程团队能够在给定的计算预算内实现更高效率的学习,并通过小尺度实验梯子为大尺度训练提供相对可靠的指引。
在商业与应用方向上,微软表示全流程自主的数据构建与可追溯性,旨在未来通过 Foundry 平台向可信合作伙伴提供模型权重许可。目前,MAI-Base-2 仍处于后训练阶段,尚未向公众开放使用,也未公布相关的 API 与价格信息;与此同时,下一代 MAI-Base-3 的筹备工作也已展开。
微软公开 MAI-Base-2 训练配方:1.6 万张 GPU,38 天练出 2.8 万亿参数模型
这次披露的是预训练基座:先从海量语料学习续写与知识表征,再经过指令微调、强化学习等后训练,才能面向日常对话任务。报告关注的是这个底座怎样训练出来。
不同模型的分词器切词方式不同,直接比较每 Token 的损失不公平。微软采用每字节比特数(BPB),把预测损失按原始字节数归一化:在同一测试文本上越低,概率预测越准确。它不等于完整的聊天能力评分。
4.2–12.3 倍究竟比较什么?以 DeepSeek-V4-Pro-Base 为参照,用拟合曲线估算两种配方达到相同 BPB所需的计算量。MAI-Base-2 的最终点已纳入拟合,这里的比较点在已知区间内,属于内插。
若对照模型所需计算量记为 1,微软配方在四类任务中的理论计算量分别如下。这不是训练账单节省倍数,也不是模型能力倍数;MAI-Base-2 的实际总 FLOPs 反而更多。
小实验也要复现大训练的重复学习
一个数据源在完整训练中可能循环 8 次。如果小模型预算更少,却拿到全量独立样本,它可能连一遍都读不完,选出的配置就未必适应放大后的重复训练。
这个示例说明源数据缩放如何保留重复轮数;实验梯子同时固定每个激活参数对应的训练 Token 数(TPP),让小模型选方案时更贴近大训练条件。
每个 Token 并不调用全部 2.8 万亿参数。102 层中的每一层都使用 1 个常驻共享专家,再从 512 个路由专家中选 7 个。但少算不等于跑得快:Token 可能扎堆到个别专家,显存分配和跨卡通信仍会拖慢训练。
不丢 Token,怎样处理突然拥挤的专家?
直接扔掉溢出 Token 会损伤训练效果;按最坏情况预留大量显存,又会挤占本可用于减少重计算的空间。微软把问题拆成容量、轮次、流水重叠三层处理。
参数更新要适应分片,也要控制异常样本
Muon 需要完整的二维动量矩阵做正交化,ZeRO 却为省显存把它切在多张卡上。微软因此采用:分片重组 → 本地矩阵运算 → 送回原分片。非嵌入二维参数用 Muon,嵌入层等保留 AdamW。优化后 Muon 平均耗时 165 毫秒,占单步 2.1%。
激活梯度裁剪限制的是激活值的梯度,不是激活输出。它有助于减轻少数异常样本连带缩小全批正常梯度的问题。阶梯实验的等效算力收益从 18 层约 2% 到 42 层 28%;28% 不能外推为最终 102 层模型的收益。触发裁剪的异常语料还帮助团队发现了许可证半句截断、拼入 PR 标题的数据缺陷。
这次报告说明了什么?
更大的底座需要数据、模型和集群共同调优:小实验保留真实重复条件,专家调度减少显存与通信浪费,优化器适应分片,梯度异常还能反馈数据清洗。微软计划未来通过 Foundry 向可信伙伴提供权重许可;报告时仍在后训练,尚无公开 API 或价格。
Frontier Pre-training at Microsoft AI | Microsoft AI
Lab Notes
October 15, 2026
Lab Notes
In June, we announced MAI-Thinking-1, a general-purpose foundation model post-trained on top of MAI-Base-1 with strong reasoning performance. We’ve recently completed pre-training our new state-of-the-art model, MAI-Base-2, an MoE foundation model with 80 billion active and 2.8 trillion total parameters.
MAI-Base-2 outperforms every open-weight model we tested on our held-out evaluations. It is 4-12x more pre-training FLOPs-efficient than the strongest open base model, DeepSeek-V4-Pro-Base (see Figure 3 below), and we have put that saving into training a larger model.
Figure 1 shows the performance of MAI-Base-2 and other models with at least one trillion total parameters across a range of pre-training evaluations (lower is better).
Owning our model pipeline end-to-end allows Microsoft to make a distinctive offering to our customers. Microsoft has strong data provenance over training tokens that go into our model. Our pre-training is built on organic data which does not involve distillation from other models. This will enable us to license our model weights to trusted partners through Foundry, which provides enterprises with a trusted source of world-class intelligence that serves their needs.
Owning the full stack allows us to tune our models and infrastructure together for the best performance at the lowest cost, first in our own products and then for Foundry customers. MAI-Base-2 is currently undergoing post-training, and we look forward to sharing more results soon.
How MAI-Base-2 Compares
When we finished training MAI-Base-1, our path ahead for pre-training was clear: scale up. While MAI-Base-1 is a strong model for its size, it is smaller than open weight and proprietary models at the frontier.
Three initiatives were particularly important for the successful pre-training of MAI-Base-2:
- Scaling science: scaling ladders that account for repeated training data, alongside empirical hyperparameter scaling laws.
- Model-infrastructure co-design: improved MoE and Muon implementations, alongside activation gradient clipping.
- Scaling data: expanded data pipelines and the integration of vision data.
MAI-Base-2 is a larger, sparser model than MAI-Base-1, trained on more data. We trained MAI-Base-2 on 16k GB200 GPUs over 38 days in August and September 2026. Over the course of the run, the average MFU (model FLOPs utilization) was 21% and the goodput (the fraction of time training progressed) was 89%. Our MFU is normalized by 2.5 PFLOPS (GB200’s theoretical max in BF16) and excludes FLOPs for rematerialization and the optimizer.
We compare pre-trained models on held-out text using bits-per-byte (BPB), which is agnostic to each model’s tokenizer. For held-out code, we use MAI’s own codebase, while STEM, Math, and Q&A evaluations are commissioned from vendors to reduce the risk of training-set contamination. We additionally decontaminated all evaluation sets against our training data.
We compare MAI-Base-2 with frontier checkpoints available before October 2026:
- DeepSeek-V4-Pro-Base is the most capable base model with open weights.
- Kimi K3, Qwen3.8-2.4T-A95B, and MiMo-V2.6-Pro-RL are highly capable open weights models. Only post-trained checkpoints are available for these models. We report their results with the caveat that post-training may affect these evaluations.
Across these held-out evaluations, MAI-Base-2 achieves lower BPB than the other models we tested. Below, we dive into a few of the advances that made this possible.
Robust scaling ladders
We evaluate model changes using a scaling ladder, a family of models of different sizes with a fixed training recipe. Each rung of the ladder is named after its number of layers \( L \), and \( L \) alone determines the rest of the architecture. For example, the hidden size is \( (256/3) \cdot L \), and the number of query heads is \( L \), rounded to the nearest multiple of 16. We train models of increasing size while holding training tokens per active parameter (TPP) constant.
To account for multi-epoch training at smaller scales, we use a technique we call source scaling. On the lower rungs of the scaling ladder, source scaling artificially restricts the set of unique samples the model trains on, so that each dataset is repeated the same number of times regardless of the training horizon. For example, if a dataset is repeated 8 times over the full 50T-token run, a 5T-token run will loop 8 times over just 1/10 of that data.
Under a fixed TPP, source scaling effectively keeps the ratio of unique data to parameters fixed, which helps ensure that results transfer smoothly across scales. Without source scaling, experiments at smaller scale can favor under-regularized architecture and hyperparameter choices that overfit at larger scales. Including source scaling in our ladders was key to scaling up to a 2.8T parameter model reliably. Figure 2 demonstrates the use of a scaling ladder to accurately forecast the performance of MAI-Base-2.
Isolating modeling efficiency from compute
Direct comparisons between models conflate the quality of the training recipe with differences in model size and training compute. To isolate the recipe, we estimate how much compute our recipe would need to match a strong external base model. We use DeepSeek-V4-Pro-Base as the reference: it is the only released base pretraining checkpoint with more than one trillion parameters, though it is still trained on significantly fewer FLOPs than MAI-Base-2.
For each of the four held-out evaluations in Figure 1, we fit an independent scaling law of BPB against training FLOPs and estimate the compute a model on our ladder would need to match DeepSeek-V4-Pro-Base’s BPB. MAI-Base-2’s final performance is known, and we include it in the fits, so the matching point falls within the range of our fitted models rather than beyond it. Comparing these estimates with DeepSeek-V4-Pro-Base’s training compute, we find that our recipe is 4.2–12.3x more FLOPs-efficient, as shown in Figure 3. We also compare against MAI-Base-1 and find that our progress since that model’s release in June this year has led to 6.3-12.7x FLOPs-efficiency improvement. We attribute MAI-Base-2’s FLOPs-efficiency to the quality and relevance of our data and to the efficiency gains from our modeling choices, both described in the sections below.
Scaling laws for hyperparameters
Selecting optimal hyperparameters for a large training run is complicated by the combinatorial space of hyperparameter optimization, where changing one hyperparameter can affect the optimal value of others. For MAI-Base-2, we revisited how we approach this problem.
We swept learning rate (\(LR\)) and weight decay (\(WD\)) jointly because their effects on training are coupled. Model performance is most sensitive to the product of \(LR\) and \(WD\), so good configurations lie in a narrow diagonal band of the \((\log{LR}, \log{WD})\) plane. A rectangular grid in \((\log{LR}, \log{WD})\) would sample this band inefficiently, so we instead swept a grid in \((\log{LR}, \log{(LR \times WD)})\).
For several combinations of model size and TPP, we trained models along the search grid and evaluated them on our pre-training evaluations. We fit a 2D quadratic function to evaluations and extracted the analytical minimum \((LR^, LR^ \times WD^*)\). Figure 4 shows a few slices of this experiment.
We then modeled \(\log{(LR^* \times WD^)}\) and \(\log{LR^}\) as a function of model size, TPP, or other features such as log steps. Using model selection, we found that \(LR^* \times WD^\) depended primarily on the number of training steps, while \(\log{LR^}\) additionally depended on \(\log{TPP}\). The empirical exponent for \(LR^* \times WD^\) with respect to steps was very close to −1, which matches the view that the decoupled weight decay time scale (\(\dfrac{1}{LR \times WD}\)) should be a fixed fraction of training. The empirical exponent of LR with respect to steps was close to −0.5, which matches the widely used rule of thumb that when doubling the batch size, one should multiply the learning rate by \(\sqrt{2}\). Our final scaling laws for \(LR^\) and \(WD^*\) are:
\[LR^* \times WD^* = 17.04 / \text{steps}\] \[\log{LR^*} = -1.51 + 0.175\log{\text{TPP}} - 0.573\log{\text{steps}}\]
Using a similar approach, we also derived the following scaling law for dropout:
\[\small \mathrm{Dropout}=\operatorname{sigmoid}\big(0.526\,(\log \mathrm{ActiveParams}-27.2)\big)\]
We estimated our new scaling laws in small-scale experiments, then validated them at an intermediate scale where they consistently outperformed previous heuristics. These laws defined MAI-Base-2’s hyperparameters.
Codesigning our infrastructure and MAI-Base-2
Training frontier models within a compute budget requires co-designing models and infrastructure for both evaluation quality and computational efficiency. We use an efficiency gain (EG) metric to help guide our decisions: the ratio of compute required by a candidate to reach the same evaluation loss as the baseline. Compute can be measured in FLOPs (EGFLOPs) or in wall-clock time (EGtime), and the two are complementary. We rely mainly on EGtime, since it reflects the current state of our infrastructure. EGFLOPs, in turn, measures a prototype’s potential and guides future infrastructure development: a change that wins on FLOPs but loses on wall-clock time shows us where to invest. This joint optimization of modeling and infrastructure is reflected in several design choices below.
Scaling MoE
Our past modeling experiments have shown that MoE in every layer has a consistent EGFLOPs advantage over alternating dense FFN and MoE layers. However, inefficiencies in our MoE implementation made MoE every other layer EGtime optimal for MAI-Base-1. For MAI-Base-2, we identified two inefficiencies that led to suboptimal MoE MFU:
- Dynamic routing increased memory fragmentation and tied up more memory for rare, extreme expert load imbalances, memory that could otherwise reduce activation recomputation.
- Adding more, finer-grained experts increased per-expert overhead.
Addressing these inefficiencies increased the MFU of our MoE layers from 24% to 35%, which allowed us to adopt MoE in every layer for MAI-Base-2.
Dropless MoE with tunable, fixed-size memory usage
In MoE layers, each expert sees a variable number of tokens. This introduces GPU memory challenges as experts that are overloaded can run out of memory. One solution is to set a fixed threshold for each expert, after which additional tokens are dropped. Our experiments found that dropping tokens leads to worse performance. A naive solution is to simply allocate enough memory per expert to account for the largest imbalance, but this leads to inefficient usage of memory under normal loads. Our multi-round dropless MoE, illustrated in Figure 6, achieves fixed memory usage under arbitrary routing imbalance, eliminating fragmentation and out-of-memory crashes.
We group the experts on each expert parallel rank into one or more groups of a configurable size. Each expert group runs one or more dispatch → compute → collect rounds with a fixed per-expert token capacity. If an expert receives more tokens than it can hold, the expert group processes those overflow tokens in additional rounds. To reduce the number of additional rounds, we allow overloaded experts to use unused token capacity from other experts in the same group. In the backward pass, we then perform fine-grained recomputation per expert group following a similar multi-round schedule. This keeps memory usage static regardless of token imbalance. Token capacity is configurable: more capacity means more memory, and less capacity means potentially more rounds and thus extra compute. In practice, the capacity is configured to maintain a single round in steady state.
Dispatch, compute, and collect are pipelined across all rounds of all expert groups, so that all but the first dispatch and the last collect overlap with expert compute. In the forward pass, weight quantization and shared-expert compute overlap with the exposed communication. In the backward pass, all expert communications are fully overlapped: the exposed input dispatch is overlapped with recompute of the same layer, and the exposed gradient collect is overlapped with weight-gradient computations.
Reducing per-expert overhead
We reduce per-expert overhead in four ways. First, we improve GEMM and NVLink efficiency by grouping both computation and communication for each expert group. This reduces kernel-launch overhead and tail effects. Second, we reduce host-device synchronization by using device-resident token metadata and initiating all-to-all communication directly from the GPU. Third, we further optimize all-to-all with symmetric memory to exchange tokens directly over NVLink without staging copies, improving communication throughput and reducing HBM contention when running GEMMs concurrently. Lastly, we batch load-balancing loss across layers, replacing per-layer all-reduces with a single batched reduction across all layers. These optimizations enable us to train sparser models without significantly degrading MFU.
Scaling Muon
When scaling up to MAI-Base-2, we found that Muon delivered more stable training dynamics and large efficiency gains over AdamW. Adopting Muon for our largest models required reducing its per-step overhead.
Muon orthogonalizes the momentum of each weight matrix with Newton–Schulz, an iterative algorithm consisting of several matrix multiplications. This requires the full matrix, which conflicts with ZeRO’s sharding of momentum across the data-parallel dimension. Following prior work, we reshard the momentum during the optimizer step. Each GPU updates its local FP32 momentum shard and casts it to BF16. An all-to-all exchange, batched over parameters of the same shape, then gives each GPU ownership of a subset of full momentum matrices. Each GPU orthogonalizes its full momentum matrices locally with a symmetry-aware Newton–Schulz kernel. A second all-to-all returns the updates to their original shards, where they are cast back to FP32 and applied to the weights.
We further apply several optimizations that are beneficial to our training efficiency on 16K GPUs:
- We overlap communication and computation by prefetching multiple batches.
- We cache and reuse the resharding metadata to avoid repeated indexing logic. This is especially useful in sparse MoE models with thousands of identically shaped parameters.
- Selected weights, such as the MoE router weights, are replicated across GPUs rather than sharded. The first communication phase is skipped, and we instead issue an all-gather collective after Newton-Schulz to get the full set of replicated updates.
After optimizations, Muon accounted for 2.1% (165 ms) of the average training iteration time of MAI-Base-2. We tracked the quality of our implementation and prioritized changes based on profiles, using both large-scale and small-scale testing setups. We compared measurements from tests to the theoretical peak performance, which we estimated to be 55 ms and bottlenecked by communication for MAI-Base-2’s final training setup. We attribute the gap between theoretical and measured performance to stragglers, kernel dispatch overheads, load imbalance, and memory copies/allocations during resharding.
Activation gradient clipping
Gradient clipping is a common method to stabilize training by reducing the impact of outlier gradients. Standard gradient clipping operates on the global norm of the weight gradient for a whole batch. However, outlier gradients are typically driven by a small portion of the data within a batch. An outlier can therefore cause the gradients from the entire batch to be scaled down, including contributions from otherwise well-behaved examples. As a more targeted mitigation, we clip the gradients of activations at selected places in the network. Together with Muon, this keeps MAI-Base-2’s gradient norm in a much tighter range than MAI-Base-1’s (Figure 7).
Activation gradient clipping also made optimization more stable, and its benefit grew with scale as shown in Figure 8. In contrast, most changes we have tested yield a roughly constant efficiency gain across scales.
We also use activation gradient clipping as a diagnostic tool for validating our training data. Figure 9 shows a malformed training example identified by activation gradient clipping. In a pull request from our code data, a license header is abruptly cut off mid-sentence. Tracing this clipped example back revealed a bug in our preprocessing pipeline, which has since been fixed.
Scaling Data
MAI-Base-2 follows the same data principles as MAI-Base-1: our path to frontier performance is built on organic data, not distillation from other models. Investing in our own data pipelines continues to pay off, and we processed every training token in-house. Our corpus grew by roughly 36% from MAI-Base-1 to MAI-Base-2, measured in unique training tokens (see Figure 10).
Since MAI-Thinking-1, we’ve improved our quality classification, topic binning, web parsing, deduplication, and evaluation decontamination. For MAI-Base-2, we expanded our pipelines to process substantially more web content1, with a March 2026 knowledge cutoff. We also used embedding-based diversity sampling to prioritize novel data and reduce duplicative content. Our experiments showed that these approaches substantially improved model performance.
Unlike MAI-Base-1, MAI-Base-2 is pre-trained natively with vision using an encoder-free VLM architecture. Accordingly, we invested heavily in growing our VLM corpus across image-text pairs and documents with interleaved text and images. The corpus spans tasks including image captioning from the web, chart understanding, visual grounding, spatial reasoning, medical understanding, computer use, sheet-music reading, and other areas we anticipate users will find useful. Our VLM corpus contains 4.5T unique tokens and, with repetition, VLM data accounted for 18% of the 50T-token training mixture.
What’s next
MAI-Base-2 is the foundation for our next generation of models, which we’re excited to share more about soon. While MAI-Base-2 goes through post-training, preparations for MAI-Base-3 are already underway. All our models are built following the same principles that have guided us since MAI-Base-1:
- Intelligence should be learned from first principles.
- Simple methods scale best.
- Scientific rigor over shortcuts.
We have conviction that these principles will lead to continued scaling towards the frontier. Training frontier AI requires researchers and engineers across modeling, data, and infrastructure to work as one team. If this appeals to you, we’re hiring!
1 For web data, we use a proprietary crawler that respects the Robots Exclusion Protocol (robots.txt) and related meta-tag and HTML controls, enabling site owners to manage how content on their sites is accessed and used. We also exclude sources that violate Microsoft Responsible AI policies or appear on the Office of the United States Trade Representative (USTR) Notorious Markets list.
Build the Future With Us
We’re a lean, fast-moving lab made up of some of the world’s most talented minds. We have an exciting roadmap of compute at MAI, which is ramping quickly and extensively. And we have an ambitious mission we truly believe in. We’re also fortunate to partner with incredible product teams giving our models the chance to reach billions of users and create immense positive impact. If you’re a brilliant, highly-ambitious and low ego individual, you’ll fit right in—come and join us as we work on our next generation of models!
