DiffusionGemma 技术报告
DiffusionGemma 团队,Google DeepMind
摘要
我们推出 DiffusionGemma,一款实验性的开放权重语言模型,采用离散扩散技术以极高速度生成文本。DiffusionGemma 并非逐 token 解码,而是并行迭代精炼 256 个 token 的块,从而规避了传统自回归(AR)大语言模型的顺序解码瓶颈。我们并非从零训练,而是通过对 Gemma 4 混合专家模型进行微调获得 DiffusionGemma,该模型激活参数为 3.8B,总参数为 25.2B。我们计算高效的两阶段训练流程所用训练 token 预算不足初始 AR 模型总预算的 10%。第一阶段使用监督微调来教授双向去噪,第二阶段则将强化学习与采样器蒸馏相结合,共同提升生成质量和推理效率。DiffusionGemma 在生成速度与模型能力之间的权衡上开辟了新的帕累托前沿。在我们的完整评测套件中,它平均每次前向传播生成约 20 个 token,在单个 NVIDIA H100 GPU 上每秒可输出约 1,500 个 token,即便与采用最先进投机解码的 AR 模型相比也快得多。DiffusionGemma 还保留了初始模型对思考模式、多模态输入和长上下文的支持。尽管经过扩散微调,它仍能以轻微性能下降为代价进行 AR 生成,这为混合扩散-AR 解码指明了一条路径。
1 引言
自回归(AR)模型主导着当前大语言模型(LLM)的格局,但其严格的从左到右、逐 token 生成方式造成了严重的内存瓶颈。在同时服务大量请求时,可以通过批处理实现可接受的吞吐量,但服务单个或低并发请求时从根本上受限于内存:从内存向加速器传输模型权重和上下文 KV cache 所花费的时间远超实际计算时间。这导致加速器的计算单元利用率不足,并限制了单用户生成速度。投机解码可以通过从一个小型“草稿”模型生成候选序列(通常为 8 个 token),并将草稿交给 LLM 进行验证来提升利用率(72; 13; 132)。草稿长度为 8 时,每次前向传播(TPF)可产出 3-6 个 token(76)。然而,先草稿后验证的范式仍然受限:一方面,AR 草稿模型受顺序生成的瓶颈制约;另一方面,并行草稿模型——基于早期块状解码(119)和前瞻策略(145)构建——在草稿位置靠后时接受率会下降(18)。
文本扩散通过同时预测整块 token(图 22)绕过了这一瓶颈,从而有效地将执行从内存受限模式转向计算受限模式。近来,文本扩散领域的研究兴趣激增(28),出现了诸如 Gemini Diffusion(46)、Mercury(61)、LLaDA(91;7)、Seed Diffusion(118)和 Nemotron-Labs-Diffusion(38)等模型。然而,当前格局迫使人们在速度、智能和可获取性之间做出严峻的取舍。一些模型,例如 Gemini Diffusion 和 Mercury,被锁定在专有 API 之后。另一方面,现有的开放权重替代方案要么推理能力和多模态理解有限,要么未能兑现扩散技术所承诺的极致低延迟优势,或者两者兼而有之。迄今为止,还没有一个文本扩散模型能够同时做到高度智能、异常快速且开放可获取。
我们推出 DiffusionGemma 以弥合这一差距。作为 Gemma 4 26B A4B 混合专家(MoE)模型(41)的微调文本扩散变体,该模型在生成式文本建模的智能-速度权衡中建立了新的帕累托前沿(图 1)。值得注意的是,它将速度前沿扩展到了此前的文本扩散模型和 Gemma 4 AR 系列在所有参数规模(从 E2B 到 31B)之上,即便 AR 模型配备了多 token 预测(47;25,MTP)——一种最先进的投机解码技术。为了解锁这一新的速度-智能前沿,DiffusionGemma 通过在大约 12 次前向传播中同时输出 256 个 token 的块来最大化算法效率。换言之,DiffusionGemma 平均生成 20 TPF——相比最先进投机解码方法所能达到的 3-6 TPF,这是一个阶跃式的改进。总前向传播次数的这一大幅减少直接抵消了扩散模型单次前向传播计算成本更高的问题,因此,DiffusionGemma 在单个 NVIDIA H100 GPU 上可实现约每秒 1,500 个 token(TPS)的生成速度。此外,126 等第三方推理提供商的早期基准测试表明,这些速度在 NVIDIA RTX 6000 上可扩展至 2,000 TPS。
为避免预训练高昂的计算成本,从预训练的 AR 模型初始化文本扩散模型是常见做法(50;43)。我们从 Gemma 4 26B A4B MoE 模型(41)最终后训练、公开发布的权重对 DiffusionGemma 进行热启动。通过采用相同的 Transformer 主干,我们高效地重新利用 AR 权重,使其同时支持用于上下文编码的因果注意力和用于扩散过程的双向注意力,同时继承其全部能力。我们采用两阶段训练流程(见图 2),该流程使用的训练 token 不到 AR 模型总训练 token 的 10%。
- topsep=0pt
监督微调(SFT):我们首先运行一个 SFT 阶段,使模型适应于关注干净 token 的上下文,并对一块 256 个含噪 token(由扩散过程决定)进行去噪,同时在该块内使用双向注意力。
- topsep=0pt
采样器蒸馏与强化学习(SDRL):随后我们应用一个在线学习阶段,该阶段同时提升生成质量(通过最大化奖励)并解锁超低延迟(通过大幅减少前向传播次数)。
通过保留其自回归起点的特征,DiffusionGemma 展现出强大的多模态理解能力、长上下文能力以及思考模式,使其能够在响应之前生成推理轨迹。这些是当前前沿系统的标志性特征(40)。尽管将模型适配到扩散机制相比原始自回归基线会带来一定的性能损失,但推理速度的巨大提升为延迟敏感型应用提供了一个全新的操作点。DiffusionGemma 保留了自回归生成文本的能力。这种双模式为根据延迟约束和任务复杂度动态路由请求,以及采用混合解码方法开辟了可能性。
| 总计 | 25.2B |
| 激活参数 | 3.85B |
| 视觉编码器 | 550M |
| 嵌入层 | 740M |
| 自条件化 | 7.8M |
| 激活 / 总专家数 | 8 / 128 |
| + 1 共享 |
| 画布长度 | 256 |
|---|---|
| 采样器最大去噪步数 | 48 |
| 自适应停止熵阈值 | 0.005 |
| Token 选择熵阈值 | 0.1 |
| 温度调度(线性) | 0.8 0.4 |
开放权重发布。
我们以宽松的 Apache 2.0 许可证开放了 DiffusionGemma 的模型权重,旨在让最先进的文本扩散技术惠及更多人。通过提供对模型参数的完全、无限制访问,我们希望赋能由研究人员、开发者和实践者组成的多元生态。对于研究社区而言,这种透明发布提供了一个强大的白盒基线,可以深入探究离散扩散的底层机制,加速基础研究并推动文本生成的理论前沿。对于开发者来说,宽松的许可消除了使用障碍,确保模型能够无缝集成到实验原型和商业应用中,而不受限制性使用壁垒的阻碍。
关键在于,DiffusionGemma 的高效架构使其成为快速、领域特定适配的理想基础。通过大幅降低计算门槛,社区可以轻松微调出针对自身独特用例的超快速、任务特定模型,即使在计算预算受限的环境中也能实现。这种轻量级、快速迭代的能力迅速推动了社区的采用。尽管在撰写本文时该模型仅发布了几周,它已经成为专业下游应用的引擎。这些快速涌现的用例展示了该模型在高度多样化和严苛领域中的多功能性,涵盖从多语言自动语音识别(63)到医疗保健中的交互式放射学报告撰写(127)。
大纲。
本技术报告的其余部分组织如下。第 2 节形式化定义了离散扩散框架及我们方法的理论基础。第 3 节详细介绍 DiffusionGemma 架构,包括双向解码机制和采样算法。随后我们描述训练流程的两个阶段:第 4 节的 SFT 阶段,以及第 5 节结合采样器蒸馏和强化学习的在线学习阶段。第 6 节分解我们的底层推理优化。第 7 节展示实验结果。第 8 节提供针对下游应用微调 DiffusionGemma 的说明和实际示例。在第 9 节中,我们展示文本扩散的一些实际优势。最后,我们在第 10 节讨论局限性和已知问题,并在第 11 节作出总结。
2 基于离散扩散的生成式文本建模
从历史上看,大语言模型将文本生成视为一个严格顺序的过程(6; 89; 48; 121; 128; 49)。经典的自回归语言建模将长度为某值的序列的联合概率分解为条件概率的精确乘积:,其中表示序列中的 token 位置。虽然这在理论上严谨,但这种单 token 分解从根本上限制了现代硬件加速器上的生成速度,原因是严重的内存带宽约束,并且它严格阻止了模型基于未来 token 对 token 进行双向修正(72; 109)。
扩散模型通过将生成过程分解为一系列噪声级别(一条马尔可夫链)上的因子化过程来近似联合分布,而非严格从左到右的空间位置(112; 53; 117; 54),这建立在分数匹配和连续时间流模型的基础性工作之上(116; 113; 115; 87; 77; 24)。在训练期间,前向过程逐步将干净数据破坏为随机噪声;一个神经网络被训练来学习逆向去噪过程。在推理期间,模型从随机噪声开始,通过并行迭代细化输出序列来生成完整的数据序列。
将扩散模型适配到文本领域,需要处理语言的离散特性(136)。早期方法通过将离散 token 映射到连续嵌入空间,将标准高斯扩散模型应用于文本。这些模型的主要区别在于如何映射回文本:像 Diffusion-LM(75)和 SED(120)这样的架构会生成连续向量,必须强行投影或“取整”回离散 token;而 CDCD(33)等方法则保持连续过程,但直接预测类别 logits 来采样 token。无论采用何种解码机制,这些公式都面临理论和几何上的挑战,最终限制了它们相对于原生离散扩散模型的有效性。特别是,硬取整操作从根本上破坏了连续时间和变分公式(67)所建立的扩散似然界的精确性,而且有效词汇 token 在高维潜在空间中所占的比例微乎其微。因此,逆向生成过程常常漂移到空间中空旷的、“无意义”的区域;当取整到最近的 token 时,这些退化的嵌入会映射到任意、无关的 token,从而产生不连贯的文本(110;88)。为了对抗这种空间漂移,研究人员开发了依赖逐步离散化机制的方法,但这些方法通常未能充分利用连续空间,并限制了生成的灵活性(59)。
离散扩散模型已成为一种非常有效的替代方案(4;105;83;143)。这一范式将早期双向模型中单步破坏的启发式方法推广为形式化的多步马尔可夫过程。现代扩散模型在类别状态之间定义的概率转移——例如吸收掩码状态和跨词表的多元分布——直接继承了 BERT 引入的掩码和随机 token 交换(32;82;107),以及 ELECTRA 的合理 token 替换(19)。通过在离散状态上直接操作而非连续向量,离散扩散模型完全避免了嵌入投影不匹配的问题,并为类别转移提供了更扎实的理论基础(39)。DiffusionGemma 正是基于这一离散扩散的谱系构建,以确保高保真度的 token 生成。
2.1 概率路径与去噪
为了形式化我们的离散扩散框架,我们采用了近期文献中建立的连续时间马尔可夫链(CTMC)方法(10;11;39)。设 定义一个大小为 的类别 token 词表。我们将经历迭代精炼的 token 序列称为画布(canvas),其长度为 。该画布在时间 的一个实现用向量 表示。我们构建一条边际概率路径,在时间 的干净数据分布与时间 的完全破坏源画布之间平滑插值。在这条路径的起点,干净 token 被定义为 ,最终过渡到完全破坏状态 。这里, 表示联合状态空间上的均匀先验,其中每个 token 在 上独立均匀分布。这一破坏过程与顺序无关的离散扩散模型中常用的显式转移矩阵(如均匀噪声或吸收掩码)相平行(55)。通过在连续时间内运行,该框架绕过了传统自回归模型从左到右的顺序解码瓶颈,使得整个画布上的 token 可以被并行处理和精炼。
2.1.1 前向过程
前向过程决定了从干净文本 token 向均匀分布 token 的转移。在给定固定干净起始画布 的条件下,前向转移概率路径在每个 token 坐标上独立分解:
| (1) |
其中 是一个平滑变化、单调递减的噪声调度,从 变化到 , 表示克罗内克 delta 函数。实际而言,随着时间向 推进,每个 token 越来越可能被替换为从词表中均匀随机采样的 token(56;4)。我们使用这种闭式前向过程从干净文本生成训练数据。
2.1.2 反向去噪过程
为了从噪声中重建数据,我们学习一个反向过程来逆转这种类别破坏。离散流匹配理论表明,要完美逆转前向轨迹,我们需要在给定损坏状态的情况下推断原始未损坏 token 的条件分布(11;39;93)。对于给定的实现 ,按小增量向后回溯时间由某个转移映射控制,我们将其记为 ,它输出下一步中间状态的概率分布¹¹ ¹¹ 作为一个典型示例,该函数可以实例化为 39 中引入的离散欧拉更新步骤,其中 且 。:
| (2) |
为了计算这一更新,我们需要干净 token 在给定噪声状态下的真实后验分布,即 。我们用神经网络 来近似这个后验分布。在生成过程中,我们使用这一近似来采样下一个 token 状态: 。
图 3 展示了一个高度简化的示例,用以说明在一个简化的双 token 画布上的这种反向采样轨迹()。随着时间从 反向运行至 ,模型平滑地将概率质量从均匀噪声分布(例如,围绕“blue moon”)转移到有效数据模式上。与此同时,各个序列坐标经历连续时间的跳跃式转变——通过从 处的“blue moon”到 处的“dark cloud”,最终在 处落到“red sunset”等高概率模式的逐步路径来可视化。这凸显了并行维度如何随时间协调,而无需依赖从左到右的顺序生成。
由于此去噪过程是因子化的,它在各个反向步骤中假设条件独立性。位置 处新更新的 token 会全局地以当前带噪画布 为条件,但它无法看到其他位置()同时进行的采样选择。这种结构性权衡有时会引入局部不一致性或相互冲突的语法预测。在下一节中,我们将通过自条件架构和熵有界采样策略,直接抵消这些不协调的机制。
3 DiffusionGemma 架构
DiffusionGemma 架构作为一个共享权重的编码器-解码器 Transformer(128)运行。我们并非从头开始预训练扩散模型,而是使用公开的 Gemma 4 26B A4B MoE 检查点(41)来初始化我们的模型。将我们的架构与现有的自回归骨干网络绑定,是一种务实的做法,它以绝对的生成质量为代价,换取了训练计算成本的大幅降低。这种初始化还使我们能够继承基础模型的高级特性——例如其扩展的上下文窗口和原生多模态理解能力。此外,我们的实验表明,我们最终的模型权重仍保留着自回归采样的能力(见表 3)。
本节其余部分将详细说明 DiffusionGemma 如何在推理阶段利用该架构生成文本。我们将这一过程拆解为三个组成部分:用于处理长序列的块自回归解码策略(第 3.1 节)、用于对单个画布进行去噪的通用框架(第 3.2 节),以及一个特定的熵受限采样器(第 3.3 节)。
3.1 块自回归生成
第 2 节中引入的离散流匹配公式作用于固定长度的序列。为了生成开放式文本,我们采用块自回归(block-AR)生成策略。模型每次对包含 256 个 token 的画布进行去噪,一旦画布完全去噪,它就会被提交到序列历史中,模型随即开始对下一块画布进行去噪。
KV 缓存初始化。
如图 4 所示,块自回归生成的第一步是将上下文编码为 KV 缓存。上下文包括系统指令和用户提示词,其最大 token 数为 .22 2 在实践中,还包括交错的多媒体嵌入向量,这些不属于 token 词表的一部分。我们将该编码过程记为
| (3) |
其中 是带有权重和因果注意力掩码的 Transformer 前向传播。
基于 KV 缓存条件的画布去噪。
通过对 KV cache 进行交叉注意力,画布生成可以以系统指令、用户输入和过往响应为条件。画布生成从一张由均匀随机 token 组成的画布开始,并使用第 3.2 节和第 3.3 节所述的过程进行迭代去噪。一旦画布完全去噪,33 3 画布完全去噪是指达到最大去噪步数,或满足第 3.3 节所述的自适应停止条件。记作 ,其键和值会被追加到 KV cache 中(图 4 中以红色标示):
| (4) |
我们对后续画布重复这一去噪过程,直到模型生成一个标记模型回合结束的特殊 token,之后所有画布被拼接成最终响应。由于我们在编码器中使用因果注意力,编码器只需追加最新的画布即可更新 KV cache。这构成了对 BART (73) 或 T5 (100) 等标准编码器-解码器模型的一种架构性反转。那些模型使用双向编码器处理上下文、使用因果解码器进行生成,而我们的方法则使用因果编码器处理序列历史、使用双向解码器进行基于扩散的画布生成。这种因果编码方式会阻止早期上下文 token 关注最新的画布,但它消除了从头重新编码不断增长的上下文的必要,使我们的方法能够扩展到长推理生成,并形成了扩散与自回归生成的架构性融合。这种块级自回归策略由我们团队在 2023 年 6 月的一份未发表手稿中提出;类似的块级序列建模和 KV 缓存方法也由 131、2 和 30 独立开发。
3.2 推理时的去噪框架
画布初始化。
为了生成一张画布,我们在最多 个去噪步内对其进行迭代细化,步长为 。设 表示第 步时的被破坏画布。我们从 步开始,以来自词表 的均匀随机 token 组成的画布初始化该过程。
解码器前向传播。
在每一步中,我们使用共享权重的 Transformer 作为解码器(记为 )来预测干净 token 的概率分布。解码器接收三个输入:当前带噪画布 、上下文 KV 缓存 ,以及一个连续的自我条件化信号,该信号将模型之前的预测反馈给模型自身(17; 120; 66)。解码器在画布 token 上使用双向注意力,并对 KV 缓存使用交叉注意力,输出未归一化的 logits:
| (5) |
去噪迭代。
在每次迭代中,我们计算 logits 并评估干净 token 概率 ,更新下一步的自我条件化信号,并采样得到精炼后的画布:
| (6) | ||||
这里, 是 token 嵌入矩阵, 是标准前馈网络。时间相关的温度参数可以在我们计算最终转移概率之前锐化模型的预测。如公式(2)所述,转移映射 计算用于采样更新后画布 的类别分布,该画布连同新的自我条件化信号 一起被送入下一步去噪过程。第 3.3 节详细说明了我们对转移映射和温度参数 的具体选择。
多项式扩散。
我们的去噪迭代(公式 6)使用多项式(或均匀)扩散,而非掩码扩散(56; 4)。由于所有 token 之间都可以相互转移,模型可以持续修正自身的错误:在当前画布中较早去噪步骤( )中被接受的 token 仍然可以被修改。然而,我们注意到,来自先前生成画布的 token 会被永久冻结。
关于可解释性的说明。
最近的可解释性分析表明,虽然自我条件化信号向序列中引入了连续的潜在空间注入,但这些中间的自我条件化向量能够稳健地映射到一个可解释的 token 瓶颈,从而保持模型的算法透明度(35; 3)。
3.3 DiffusionGemma 采样器
与自回归生成不同,自回归生成依赖于温度、top- 和 top- 等刚性启发式规则,而扩散建模引入了远为丰富的采样设计空间,其中包含离散预测-校正机制和多步求解器(74; 27; 78; 134; 104)。将文本生成视为一个迭代的时间过程,使我们能够将推理时算法与底层架构解耦,从而对计算成本与生成质量之间的权衡实现细粒度控制。
虽然我们在第 3.2 节中描述了画布去噪的整体方法,但本小节将详细介绍一个具体实例:带温度退火和自适应停止的熵有界采样器(5)(算法 1)。虽然这是我们的默认且推荐的采样器,但 DiffusionGemma 是模块化的,并不严格绑定于这一确切的采样配置才能实现高质量推理。
熵有界的 token 精炼。
在利用去噪器生成边际分布并应用温度缩放(详见下文)之后,从所得概率分布中采样 token。我们采用熵有界采样器(5),即按熵从低到高的排序顺序接受 token(类似于 12 的 MaskGIT 解码方案),确保其互信息界严格保持在预定义的误差容限阈值()之下。一旦达到该阈值,所有其他 token 将被均匀随机地重新加噪,将这些未确定位置保持为均匀先验,以在下一轮前向传播中强制进行局部探索。
温度退火。
为平衡收敛速度与语言多样性,通过温度调节对 token 概率进行人为锐化。温度从初始值沿分数去噪时间尺度线性退火至终值。虽然传统上静态温度调整用于截断 token 分布中不可靠的尾部并防止文本退化,但这种动态退火机制确保模型在早期高噪声状态下探索多样的 token 可能性,并在语义结构逐渐清晰时果断锁定高置信度序列(141)。
自适应停止启发式。
为优化推理效率,采样器根据模型逐步的不确定性动态终止去噪过程,并将迭代次数严格限制在上限以内。当以下两个条件同时满足时,触发提前终止:
- topsep=0pt
高置信度预测:整个画布上的平均预测熵低于预设阈值。
- topsep=0pt
稳定预测:连续两个去噪步骤的确定性序列预测(即最可能的 token)完全相同。
通过成功跳过冗余的细化步骤,该机制使模型能够根据提示词的复杂度动态调整其推理时计算量。如图 5 所示,模型并未耗尽最大预算,而是在图中所示的下游评测中平均执行约有效去噪步数(定义见第 3.4 节)。这在不牺牲生成质量的前提下降低了整体延迟。此外,箱线图揭示了不同领域的明显收敛特征:模型在代码等结构化任务上倾向于使用更少的步骤,而在自然语言任务上则使用更多步骤。而且,决定这一行为的不仅是领域,还有任务复杂度;例如,较难的代码问题(如 LiveCodeBench)自然需要比简单问题(如 HumanEval)更多的步骤才能收敛。
3.4 推理效率指标
由于自适应停止将去噪步数变成了一个随机变量,我们引入一组指标来量化去噪推理效率。设 为生成的画布(canvas)总数, 为第 个画布执行的去噪步数, 为该画布中生成的有效 token 数(即全部 token,或若生成了序列结束符则为截至第一个序列结束符之前的所有 token)。首先,我们将总 token 数(Total Tokens)定义为整个序列中生成的所有有效 token 之和:
| (7) |
我们将总去噪步数(Total Denoising Steps)定义为整个生成过程中执行的去噪步数的绝对数量:
| (8) |
由于每一步去噪都会产生固定的计算成本,总去噪步数是端到端生成延迟的主要驱动因素。然而,由于这一绝对指标本质上会随总序列长度而缩放,我们还评估了一种归一化的模型效率度量。我们将有效去噪步数(Effective Denoising Steps)定义为所有画布上去噪步数的 token 加权平均值:
| (9) |
我们按有效 token 数进行加权,以防止该指标被最后一个画布向下拉偏——当最后一个画布仅部分填充时,它往往需要更少的去噪步数。请注意,在没有自适应停止的情况下,有效去噪步数指标始终等于去噪预算 。最后,我们计算每前向传播 token 数(Tokens Per Forward,TPF):
| (10) |
其中 项表示画布之间所需的额外一次前向传播,用于编码新生成的干净 token,并将其键值对追加到 KV cache 中。
3.5 保留的自回归能力
由于 DiffusionGemma 与 Gemma 4 共享完全相同的 Transformer 架构,DiffusionGemma 的最终权重可以无缝加载回原始架构,使用因果注意力执行标准的自回归(AR)生成,与基础模型完全一致。如第 7 节表 3 所示,模型在此设置下保持了稳健的能力;其在自回归模式下的性能得分恰好介于 DiffusionGemma 的主要文本扩散模式与 DiffusionGemma 初始化所基于的基线 Gemma 4 检查点之间。
4 监督微调
我们从公开发布的 Gemma 4 26B A4B (41) 检查点出发,进行了一个扩展的微调阶段,在此阶段模型适应于从带噪输入预测 256 个 token 的块。我们使用块对角注意力掩码,使得每个块内可以进行双向注意力,同时不允许模型依赖其他去噪块。对于给定的画布(canvas),模型通过编码器 KV 缓存来依赖提示词和先前(未损坏的)token。我们使用离散多项式扩散作为损坏过程,并从词表中均匀采样带噪 token (56; 4)。对于给定的画布,我们采样一个噪声水平,并以概率 对画布中的每个 token 添加噪声。给定通过 KV 缓存编码的干净上下文(包括提示词和先前画布)、一个自条件信号 以及一个带噪画布 ,模型被训练以最小化其预测与从训练数据中提取的真实画布之间的交叉熵损失 (39):
| (11) |
其中上标表示沿画布维度的索引;该索引通过神经网络输出 logits 上的 softmax 变换进行参数化。如图 6 和图 7 所示,去噪性能在训练初始阶段迅速提升,之后进入对数线性性能改进趋势。思考性能受益于更长时间的 SFT,因为模型最初难以维持连贯的推理轨迹,常常陷入结巴或循环——这是语言模型内化推理能力时面临的常见挑战(140)。
5 采样器蒸馏与强化学习
在 SFT 阶段之后,模型在使用较多去噪步数时能够实现强大的生成质量。然而,其在高级推理和编程任务上的表现略逊于基线 AR 模型。更关键的是,在超低延迟推理所需的少步数场景下,生成质量会急剧下降。为解决这一问题,我们瞄准双重改进:提升模型智能水平,同时压缩其去噪轨迹。
传统上,实现这两个目标需要解耦的多阶段流水线,将奖励驱动的对齐和采样器蒸馏视为不同阶段。我们通过一个统一的在线学习阶段绕过了这一流程,称之为采样器蒸馏与强化学习(SDRL),该阶段同时优化两个维度。依托联合目标,单次梯度更新即可驱动:
- topsep=0pt
奖励最大化:提升绝对生成质量和对齐水平,类似于 AR 模型和扩散模型的标准强化学习(8;79;146;144;85;129;36;20;34;71)。
- topsep=0pt
采样器蒸馏:将这种高质量生成映射到少步数场景,解决迭代扩散框架特有的压缩挑战(106;114;29;37;84;108;81;137;57)。
训练设置。
我们针对自身用例调整了 Gemma 4 RL 配方(41)所使用的数据分布。该设置同时涵盖思考模式与非思考模式,旨在提升多方面的能力,如有用性、数学推理、编码和指令遵循。模型从 SFT 权重初始化,充当在线教师,生成去噪轨迹(使用配置了高最大去噪步数和温和温度退火的采样器),以建立高质量的参考。SDRL 联合目标利用这些轨迹同时最大化奖励并驱动采样器蒸馏,从而将模型最高质量的输出压缩到少步数区间。
训练动态与隐式课程效应。
在 SDRL 训练过程中,会出现两种协同动态,如图 8 所示。首先,在线教师的平均奖励稳步上升,反映出基础能力的提升。其次,在自适应停止机制的辅助下,在线教师达到这些高奖励所需的有效去噪步数逐渐减少。这种加速之所以发生,是因为 SDRL 目标系统地降低了模型的预测熵。关键在于,奖励目标与自适应停止之间的相互作用产生了课程学习效应。训练早期,高预测熵会延迟自适应停止的触发。随着模型置信度提高、熵值下降,自适应停止会更早触发。这无缝地将训练分布转向越来越短的去噪轨迹,使算法能够动态调整自身的采样器蒸馏节奏。因此,与自回归模型的 RL 不同,即使奖励指标趋于平稳,延长 SDRL 阶段仍然非常有益;持续的熵降低会直接转化为进一步的推理加速。
改进的速度-智能帕累托前沿。
如图 9 所示,SDRL 训练显著扩展了由 SFT 检查点建立的帕累托前沿。在质量轴上,它在 GPQA-Diamond 和 LiveCodeBench-v6 综合得分上带来了 10 分的提升。在效率轴上,它将 TPF 从 5 提高到近 20,实现了 4 倍提升,解锁了超低延迟推理。
如图 9 所示,使用默认的 DiffusionGemma 采样器(最大去噪步数)评估 SFT 检查点会导致较差的下游准确率和人为偏低的有效去噪步数。这种反直觉的行为源于 SFT 模型在此受限步数区间内经常退化为重复 token 循环。一旦陷入循环,其预测熵就会崩溃,从而过早触发自适应停止机制。附录 B 中的图 16 和图 17 提供了 GPQA-Diamond 基准上的生成样本,展示了这些退化现象的表现形式:SFT 模型以有效、逻辑合理的推理轨迹开始,但突然崩溃为 token 重复循环。相比之下,SDRL 之后的样本避免了这些退化陷阱,能够在极低延迟下维持连贯推理。
SDRL 在少步数区间的专门化。
对于 SFT 检查点,下游性能与最大去噪步数持续呈正比提升,直至 192 步,此时去噪过程大致相当于任意顺序的自回归生成。在 SDRL 之后,扩展行为改善更快且更早进入平台期:性能稳步提升至该步数,但此后收益递减(图 10)。这种早期饱和的出现,是因为 SDRL 目标通过激进地最小化预测熵,明确地让模型专精于少步数场景。
涌现出的简洁性。
我们 SDRL 优化的一个涌现特性是,它促使模型生成简洁、token 高效的输出。这与自回归模型的 RL 形成对比,后者通常通过诱导更长的推理轨迹来最大化奖励。我们的最终检查点生成的文本比 SFT 检查点短近一半(图 9)。虽然这意味着模型放弃了通常与扩展推理相关的一些能力增益,但它成为推理速度提升的倍增器。将更少的总 token 数与每个画布上更少的有效去噪步数相结合,直接带来了极低的端到端延迟:在我们的评估套件中,DiffusionGemma 所需的前向传播总数不到 Gemma 4 自回归基线的三分之一。
6 推理优化
前面的章节聚焦于通过我们的 SFT 和 SDRL 流程,最大化每次前向传播生成的 token 数量。现在我们转向互补的维度:通过针对性的 GPU 级优化,最小化每次前向传播的墙钟时间成本。从根本上说,文本扩散模型相对于自回归解码的吞吐量优势由两个相互竞争的量决定:一方面,每个去噪步骤解码 token,因此所需的前向传播次数比自回归基线少倍。另一方面,由于每次前向传播处理一个包含 256 个 token 的画布,每个这样的步骤慢倍,因此相对于自回归基线的整体吞吐量变为。通过硬件优化可以大幅降低前向传播的开销。
低批量大小服务。
虽然文本扩散模型推理每个生成的 token 所需的浮点运算次数(FLOPs)多于自回归模型,但它依赖的前向传播次数显著更少。由于现代硬件加速器上的大语言模型服务通常是内存受限的——主要由 KV 缓存容量和内存带宽决定(69;95)——这种内存传输的减少带来了延迟优势,超过了更高的计算成本。因此,文本扩散在低批量大小场景中非常高效,利用可用的计算能力来最小化每请求延迟。为简化分析,我们的分析聚焦于 DiffusionGemma 的单请求推理吞吐量(批量大小为 1),并将其直接与其自回归对应模型 Gemma 4 26B A4B 进行比较。参考推理实现可在 HuggingFace Transformers(45)和 vLLM(124)中获取。
GPU 时间分解。
图 11 展示了两个模型在每步 GPU 内核时间上的分解情况;我们重点关注 GPU 内核时间而非端到端延迟,以便隔离出模型特有的瓶颈。对于每个模型而言,由于去分词化及其他 CPU 侧服务开销,端到端延迟比 GPU 内核时间多出约 1 毫秒,且这一差距在 Gemma 4 AR 和 DiffusionGemma 两个模型上基本一致。DiffusionGemma 的每一步处理了更多 token,但其速度仅比单 token 的 AR 步骤稍慢。这一时间差异主要可归因于三个操作:混合专家(MoE)、采样和注意力机制。其他操作(如共享专家、注意力输出投影等)最多也只是稍慢一些。
- topsep=0pt
MoE。在服务单个请求时,MoE 层的计算受内存带宽限制,其运行时间主要由从高带宽内存传输专家权重所决定,这是服务稀疏 MoE 模型时一个已被充分记录的瓶颈(101;60)。对于 Gemma 4 AR 模型,每个 token 在每个 MoE 层仅激活 8 个唯一专家。对于 DiffusionGemma 模型,根据 PG-19 基准(99)的测量,每个 MoE 层平均每个 256 token 的画布约激活 84 个唯一专家。44 4 数据集可在 https://github.com/google-deepmind/pg19 获取。每次前向传播激活更多专家会导致 MoE 内核速度变慢。这与投机解码中验证所付出的代价类型相同,但被放大到了更大的 token 并行度。对于密集架构,这一开销将被消除,使每步前馈网络的减速降至不足 。
- topsep=0pt
采样。除了 AR 的单 token softmax 和采样之外,文本扩散采样还需要额外的操作,最显著的是自条件嵌入矩阵乘法和对整个 256 token 画布进行 softmax(见算法 1)。这些操作以全精度执行,词表维度为 262k。因此,文本扩散采样耗时 3.06 毫秒,而 AR 采样仅需 0.56 毫秒。我们使用标准 PyTorch 原语并通过 torch.compile 进行优化来实现采样,而非手写 GPU 内核,以便社区更容易进行扩展。
- topsep=0pt
注意力机制。与 AR 模型不同,DiffusionGemma 在 256 个 token 的画布上使用双向注意力。因此,我们无法利用 AR 模型可用的快速单 token 解码注意力,但可以利用高度优化的 FlashAttention-4 内核(23;139)。在这些优化下,DiffusionGemma 模型的注意力操作比 Gemma 4 AR 模型更慢。
消除 CPU-GPU 同步。
服务 DiffusionGemma 时还存在额外的复杂性:去噪步骤依赖于自适应停止,并且存在两种类型的前向传递(去噪步骤和 KV 缓存更新),它们需要不同的注意力掩码,并且可能出现在同一个批次中。为了最大限度地减少请求延迟,重要的是这种复杂性仅由 GPU 操作处理,而不触发任何额外的 CPU-GPU 同步。这是通过将异步调度扩展到文本扩散模型并引入每序列因果注意力标志来实现的(更多细节见 124)。
批大小为 1 时的服务吞吐量。
文本扩散模型的解码吞吐量通过以下公式计算:
| (12) |
其中 TPS 是每秒 token 数,TPF 是每次前向传递的 token 数(见公式 10), 是单次去噪步骤所需的时间,该时间随上下文长度(由于注意力机制)而变化。在 H100 GPU(FP8 精度)上,当服务单个请求(4096 个输入 token 和 1024 个输出 token)时,DiffusionGemma 的单次去噪步骤平均耗时(端到端;每步 GPU 时间为 12.63 毫秒,见图 11)。TPF 因任务而异。假设 TPF 为 19.74(表 3 中报告的 7 个基准测试的平均 TPF),该模型的平均解码吞吐量为 1456 TPS——在相同的设备设置下,相比 Gemma 4 AR 模型(204 TPS)提升了 ,相比带 MTP 的 AR 模型(303 TPS)提升了 。
多用户吞吐量。
图 12 展示了 Gemma 4 AR 模型(含 MTP)与 DiffusionGemma 的总吞吐量与每用户吞吐量之间的权衡,具体取决于并发用户数(即批处理规模)。重要的是,这些结果并未针对大于 1 的批处理规模进行定向优化:当前的 kernel 选择并非最优,采样也未针对批处理规模的扩展进行调优;例如,对采样步骤应用 top- 截断预计将在较高批处理规模下带来显著的吞吐量提升,而对输出质量的影响可忽略不计。尽管如此,在低批处理规模区间,DiffusionGemma 提供的每用户 TPS 和总吞吐量均显著高于 Gemma 4 AR(MTP)模型,AR 模型仅在中等批处理规模(约 32 个并发请求)时才开始获得吞吐量优势。
面向真实流量吞吐量。
与对应的 AR 模型相比,DiffusionGemma 改变了两层 Transformer 层的计算特性:对于注意力层,它减少了 TPF 次 KV cache 的传输;对于 MoE 层,它执行了比例更高的 FLOPs(随有效去噪步数扩展)。这有可能解决现代 LLM 服务中的一个挑战:内存受限的注意力限制了 FFW/MoE 层中的计算利用率(148;123;149),这对于具有长上下文的智能体工作流尤其相关。DiffusionGemma 有效地将数据移动转化为计算,这在计算与带宽之比持续增长的现代 GPU 硬件上是有利的;在真实流量条件下进行彻底的实证分析超出了本工作的范围。
7 实验结果
我们从四种运行模式评估 DiffusionGemma 的能力与推理效率:文本扩散(TD)对比自回归(AR)生成,每种模式分别在启用与未启用思考的情况下进行评估;除非另有说明,默认启用带思考的 TD 模式。我们将该模型与其 AR 初始化版本(Gemma 4 26B A4B)、当代开源权重文本扩散模型(LLaDA 2.1 Flash 100B 和 Nemotron Diffusion 14B)以及专有的 Mercury 2 API 进行基准对比。
我们采用了一套多样化的基准测试套件,涵盖数学推理、代码生成、通用知识、多模态理解、指令遵循以及智能体能力等核心领域。具体而言,数学推理方面,我们使用 AIME(26)、GSM8K(21)、MGSM(111)、Putnam(125)和 HiddenMath(内部)。代码能力通过 LiveCodeBench-v6(64)、Codeforces(98)、HumanEval(16)、BigCodeBench(150)、LBPP(v2)(86)和 Natural2Code(内部)进行衡量。广泛及专家级通用知识通过 GPQA-Diamond(103)、BIG-Bench(122)、MMMLU(92)和 MMLU-Pro(130)进行衡量,而多模态推理则通过 MMMU-Pro(138)评估。最后,严格的指令遵循通过 IFEval(147)评估,智能体任务完成度则通过 Tau-bench 套件(涵盖 Retail、Airline 和 Telecom 环境)进行评估(133)。
所有模型及推理配置的完整逐基准测试结果见表 3。表 4 对 DiffusionGemma 的解码效率进行了补充分析,报告了每前向传播 token 数(TPF;公式 10)、每秒 token 数(TPS;公式 12)、有效去噪步数(公式 9)、生成 token 总数(公式 7)以及端到端生成延迟(不含预填充时间)。为便于更高层面的比较,图 13 将各基准测试归为三大能力领域——推理与知识、编码、指令遵循与智能体行为——并报告了每个领域内 0–100 分基准分数的未加权平均值,以及输出吞吐量。只有当某个模型完成了某一能力领域内的全部组成基准测试时,才会在该领域显示该模型;因此,缺失的柱状图表示基准覆盖不完整,而非得分为零。带斜纹的柱状图表示无思考(no-think)变体。
DiffusionGemma 为文本扩散模型树立了新的性能标杆,大幅超越现有开放权重扩散基线,同时将 TPF 提升了约一个数量级。在质量方面,它与封闭权重文本扩散模型 Mercury 2 高度竞争,同时在单块上一代 H100 GPU 上达到约每秒 1,500 个输出 token,相比 Mercury 2 实现了约 [原文此处缺失具体倍数] 倍的加速。
相对于用于初始化的自回归(AR)模型,DiffusionGemma 在文本扩散(TD)模式下以部分绝对基准性能的牺牲换取了显著更高的解码速度。尽管这种转换降低了三个能力领域的性能,但在重度优化的 MTP 服务下,TD 模式的输出吞吐量几乎达到了原始 Gemma 4 AR 基线的水平:每秒 1,479 个 token,而基线为每秒 303 个 token。尽管如此,两阶段训练流程仍然保留了对自回归解码的支持。当以标准的从左到右 AR 模式运行时,DiffusionGemma 恢复了在 TD 模式下观察到的部分性能差距,并将与原始基线的能力差距缩小,尽管吞吐量较低。这种双模式能力可以根据延迟要求和任务复杂度对请求进行动态路由。

* 基准分为以下几组:推理与知识(AIME 2026、GPQA Diamond、BigBench EH、GSM8K、MGSM、MMMLU、Putnam、MMLU-Pro 和 HiddenMath);编码(LiveCodeBench V6、HumanEval、BigCodeBench、LBPP 和 Natural2Code);以及指令遵循与智能体行为(IFEval、Tau2 Retail、Tau2 Airline 和 Tau2 Telecom)。
| 开放权重模型 | 闭源权重模型 | |||||||||
| DiffusionGemma | Gemma 4 | LLaDA 2.1 Flash | Nemotron Diffusion | Mercury 2 | ||||||
| 26B A4B | 26B A4B | 100B | 14B | 未知 | ||||||
| 模式 | TD | TD(无思考) | AR | AR(无思考) | AR(MTP) | AR(MTP,无思考) | TD(S 模式) | TD(扩散模式) | 高 | 中 |
| AIME 2026 | 69.1 | 50.8 | 84.2 | 57.5 | 88.3 | 80.0 | 80.0 | 40.0 | 91.7 | 82.5 |
| GPQA Diamond | 73.2 | 64.6 | 79.8 | 67.2 | 82.3 | 73.7 | 68.7 | 47.0 | 75.2 | 66.7 |
| LiveCodeBench-V6 | 69.1 | 60.6 | 71.4 | 58.3 | 77.1 | 72.6 | 39.4 | 28.6 | 79.4 | 74.9 |
| Codeforces ELO | 1429 | 959 | 1569 | 1059 | 1718 | 1529 | 718 | - | 1986 | 1629 |
| BigBench EH | 47.6 | 40.0 | 59.1 | 42.2 | 64.8 | 56.2 | - | - | 48.9 | 43.8 |
| GSM8K | 96.3 | 95.8 | 96.6 | 96.1 | 96.7 | 96.4 | 45.0 | - | 96.5 | 95.8 |
| MGSM | 84.8 | 80.7 | 87.9 | 84.3 | 92.9 | 91.5 | 6.8 | 69.3 | 91.9 | 91.2 |
| MMMLU | 81.5 | 76.3 | 82.2 | 78.0 | 86.3 | 78.0 | - | - | 81.9 | 80.6 |
| MMMU Pro | 54.3 | 66.0 | 63.3 | 66.7 | 73.8 | 72.5 | - | - | - | - |
| Putnam | 67.4 | 57.1 | 74.7 | 59.7 | 81.0 | 72.9 | - | 45.8 | 73.6 | 73.6 |
| HumanEval | 94.5 | 92.7 | 98.2 | 97.6 | 98.8 | 97.6 | 90.2 | 86.0 | 98.2 | 98.2 |
| BigCodeBench | 46.0 | 41.9 | 47.7 | 45.9 | 50.2 | 48.1 | - | 33.5 | 47.6 | 45.3 |
| LBPP | 81.0 | 68.9 | 86.3 | 74.1 | 89.5 | 77.3 | 45.7 | 40.7 | 89.2 | 85.0 |
| IFEval | 97.4 | 94.5 | 97.2 | 95.7 | 98.7 | 97.8 | - | 72.1 | 97.0 | 94.5 |
| Tau2 零售 | 71.5 | 57.5 | 75.4 | 61.0 | 85.5 | 79.0 | - | - | - | - |
| Tau2 航空 | 69.0 | 49.0 | 72.0 | 50.0 | 76.0 | 51.0 | - | - | - | - |
| Tau2 电信 | 28.1 | 32.0 | 33.8 | 32.0 | 43.0 | 34.2 | - | - | - | - |
| MMLU-Pro | 77.6 | 77.9 | 78.8 | 79.1 | 82.6 | 82.6 | - | - | 77.6 | 75.5 |
| Natural2Code | 94.0 | 90.1 | 96.2 | 92.3 | 96.3 | 94.7 | 86.9 | 73.3 | 79.1 | 71.3 |
| HiddenMath | 80.6 | 74.3 | 85.4 | 77.5 | 87.2 | 81.6 | - | 44.3 | 82.7 | 82.3 |
| 输出速度(TPS) | 1479 | 1512 | 204 | 204 | 303 | 303 | 375 | 49 | 600 | 547 |
| 每次前向传播的 Token 数(TPF) | 19.74 | 18.76 | 1.00 | 1.00 | 1.40 | 1.40 | 4.63 | 1.79 | - | - |
| 平均总 Token 数 | 4,001 | 829 | 5,184 | 1,025 | 7,207 | 1,816 | 4,371 | 941 | 3,882 | 1,222 |
| 得分 () | TPF () | TPS () | 有效 DNS () | 总前向传播次数 () | 总 Token 数 | 端到端时间(秒) () | ||||||||
|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|
| 基准测试 | 思考 | 不思考 | 思考 | 不思考 | 思考 | 不思考 | 思考 | 不思考 | 思考 | 不思考 | 思考 | 不思考 | 思考 | 不思考 |
| AIME 2026 | 69.1 | 50.8 | 19.3 | 16.7 | 1365.4 | 1333.0 | 12.6 | 14.1 | 390.6 | 91.1 | 6,445 | 1,309 | 4.72 | 0.98 |
| GPQA Diamond | 73.2 | 64.6 | 16.7 | 16.5 | 1207.8 | 1330.2 | 15.1 | 13.4 | 443.4 | 48.1 | 5,647 | 726 | 4.68 | 0.55 |
| LiveCodeBench-V6 | 69.1 | 60.6 | 18.5 | 16.9 | 1278.3 | 1333.4 | 13.8 | 14.0 | 581.8 | 195.7 | 7,534 | 1,847 | 5.89 | 1.39 |
| Codeforces ELO | 1429 | 959 | 15.1 | 14.0 | 950.5 | 1040.3 | 17.1 | 18.5 | 959.6 | 521.1 | 11,622 | 4,279 | 12.23 | 4.11 |
| BigBench EH | 47.6 | 40.0 | 20.8 | 17.7 | 1390.2 | 1415.1 | 11.9 | 12.8 | 434.9 | 68.1 | 9,062 | 1,233 | 6.52 | 0.87 |
| GSM8K | 96.3 | 95.8 | 23.2 | 24.1 | 1866.2 | 1966.4 | 9.1 | 7.5 | 43.4 | 13.2 | 883 | 298 | 0.47 | 0.15 |
| MGSM | 84.8 | 80.7 | 19.0 | 16.8 | 1526.7 | 1367.5 | 11.5 | 11.9 | 63.6 | 19.5 | 1,085 | 291 | 0.71 | 0.21 |
| MMMU Pro | 54.3 | 66.0 | 17.7 | 15.4 | 1351.3 | 1255.1 | 13.8 | 15.3 | 191.6 | 31.6 | 3,178 | 472 | 2.35 | 0.38 |
| Putnam | 67.4 | 57.1 | 18.1 | 16.0 | 1330.8 | 1282.4 | 13.4 | 14.4 | 303.8 | 77.4 | 4,725 | 1,103 | 3.55 | 0.86 |
| HumanEval | 94.5 | 92.7 | 23.0 | 24.3 | 1838.2 | 1981.2 | 9.4 | 8.0 | 55.6 | 14.3 | 1,174 | 305 | 0.64 | 0.15 |
| BigCodeBench | 46.0 | 41.9 | 19.6 | 19.4 | 1560.1 | 1579.0 | 11.3 | 10.1 | 77.3 | 21.8 | 1,410 | 394 | 0.90 | 0.25 |
| LBPP | 81.0 | 68.9 | 20.5 | 19.2 | 1509.8 | 1545.4 | 11.6 | 10.9 | 264.3 | 79.4 | 4,730 | 859 | 3.13 | 0.56 |
| IFEval | 97.4 | 94.5 | 17.2 | 9.0 | 1368.3 | 732.1 | 13.0 | 14.4 | 100.8 | 24.0 | 1,464 | 239 | 1.07 | 0.33 |
| Natural2Code | 94.0 | 90.1 | 21.1 | 21.0 | 1682.7 | 1706.5 | 10.5 | 9.6 | 70.5 | 24.7 | 1,391 | 465 | 0.83 | 0.27 |
| HiddenMath | 80.6 | 74.3 | 21.0 | 19.4 | 1591.2 | 1564.7 | 11.3 | 11.5 | 206.4 | 49.7 | 3,501 | 844 | 2.20 | 0.54 |
8 开源下游 SFT
与 DiffusionGemma 一同发布的,还有一套开源的微调工具包,让从业者能够将模型适配到自己的领域专属数据集。我们基于 Hackable Diffusion (22) 构建,这是一个模块化的开源生成式建模研究工具箱。我们提供了低秩适配(LoRA)方案 (58),以便在消费级硬件上进行微调。
微调流程。
我们的开源 SFT 工具包同时包含因果编码器和扩散解码器目标。训练序列的长度为 ,其中 为提示词 token 数, 为画布数, 为画布大小。为计算总损失,编码器首先处理整个序列中的所有 token,填充 KV 缓存 ,并提供下一个 token 的预测,这些预测被输入到编码器的标准交叉熵损失中。解码器损失通过从可用的画布中均匀采样一个画布来计算。对于画布 ,我们使用解码器根据当前噪声状态 、提示词的 KV 缓存以及序列中任何先前画布(即画布 、 、…、 )预测的 logits 来评估去噪交叉熵损失;对于批次中 的数据点,解码器还以先前前向传播计算出的自条件状态为条件。其余 的数据点则 。形式上,我们将损失写为
| (13) |
对于编码器损失,索引覆盖序列中的所有 token(提示词和各画布);对于解码器损失,索引覆盖给定画布中的 token。最终损失为两者之和。
使用 LoRA 进行参数高效微调。
LoRA 应用于所有线性运算(注意力投影、MLP 门控、MoE 路由器和自条件前馈模块)。这使得我们能够在仅训练模型一小部分参数的情况下实现强大的下游性能,仅使用 2 块 A100 80GB GPU。我们所有的训练细节均在附录 C 中报告。
| 模型 | 去噪步数 | 准确率(%) |
|---|---|---|
| DiffusionGemma | 40.65 | 0.00 |
| + LoRA 微调 | 10.72 | 84.40 |
案例研究:数独谜题求解。
由于该任务具有非自回归特性,求解数独谜题是离散扩散模型的一个极具说服力的测试平台。我们在一个开源的数独谜题数据集上对 DiffusionGemma 进行微调。55 5 https://www.kaggle.com/datasets/rohanrao/sudoku 通过完全微调,采样器(算法 1)在保留的谜题集上实现了超过 85% 的谜题级准确率(图 14)。降低 LoRA 秩会在准确率和计算量之间进行权衡。在表 5 中,我们报告了原始模型和微调模型的性能。关于 PubMedQA 的更多结果,请参见附录 C(65)。
文本扩散的 9 个实际优势
在本手稿中,我们主要强调了文本扩散模型相较于标准自回归语言建模(42; 44; 75; 33)的核心优势在于低延迟。然而,文本扩散的架构范式还提供了超越计算效率的多项益处。在此,我们通过具体示例和对模型生成样本的定性分析来展示这些实际优势。为了隔离架构本身的内在能力,我们在DiffusionGemma和基线Gemma自回归模型中均禁用了显式思考模式。这使我们能够观察并评估底层的生成过程。
9.1 双向推理与自我修正
自回归下一个token预测本质上是因果性的;在生成某个给定token的过程中,模型只能关注到前面的上下文。它从根本上缺乏基于尚未生成的token进行条件约束的能力。相比之下,文本扩散在整幅画布上采用完全的双向注意力机制。这种非因果特性使得画布上任意位置的token能够同时关注过去和未来的表征——这对于复杂的规划和推理任务至关重要,因为在这些任务中,早期的决策往往取决于最终的结果(94; 68; 142; 90,例如)。因此,在画布局部范围内,未来的token可以直接影响早期token的形成。
由于文本扩散采用迭代精炼过程,它具备内置的自我修正机制。在早期去噪步骤中产生的任何过早承诺,都可以在后续的去噪迭代中得到修正(102; 51)。虽然我们之前已经在数独等结构化逻辑谜题中证明了双向推理和自我修正的有效性,但在此我们通过两个推理示例来展示这些机制。
考虑图15中详述的多步算术问题。受因果生成的约束,AR Gemma模型必须在阐述中间计算过程之前,就先确定最终答案的第一个token。这迫使模型做出一个错误的初始预测(),而模型之后必须对此进行修正。相比之下,DiffusionGemma利用其双向注意力画布,同时演化最终答案及其底层逻辑。正如随附的去噪轨迹所示,并行扩散过程会探索错误的中间状态,但会利用逐渐浮现的推理token来纠正方向,无缝地收敛到正确答案()。关于通过双向注意力和去噪进行逻辑推理与修正的第二个示例,请参见附录G.1。

9.2 动态与自适应计算
与自回归模型不同——后者本质上为每个生成的 token 分配固定的计算量——文本扩散模型支持动态的测试时计算。文本扩散模型能够自主校准针对给定提示词所投入的计算量,根据任务本身的难度,以增加推理时间换取更强的生成性能(135)。DiffusionGemma 通过自适应停止机制自动适应任务难度。如图 5 所示,不同复杂度的任务会自然地触发不同数量的有效去噪步数。这使得模型可以在较简单的查询上节省计算资源,同时将更多计算投入到复杂推理中。在附录 G.2 中,我们通过对比一个结构上“困难”的生成任务与一个结构上“简单”的任务,具体展示了文本扩散的自适应行为,表明简单任务所需的去噪步数更少,并展示了在这两种情况下信息如何在 token 画布上以不同方式传播。
此外,最大去噪步数作为一个显式配置参数,用于管理延迟与质量之间的权衡。较低的步数会迫使模型以更粗糙的方式遍历反向过程,从而获得更快的结果,但输出精度相应降低。增加步数则允许在生成过程中实现更精细的分辨率,在最大化质量的同时延长所需的计算时间。图 10 绘制了这一连续关系,展示了模型如何被动态校准以适应不同的运行约束。
9.3 结构化与受约束输出
在许多实际应用中,期望输出遵循严格、高度结构化的格式(例如 JSON 模式),或与输入提示词存在强烈的词汇依赖关系,例如光学字符识别(OCR)、代码编辑任务或细粒度句法控制(15;75)。由于文本扩散模型并行生成并细化所有 token,它能无缝利用这些结构先验来加速收敛。自回归模型缺乏这种能力;受严格顺序解码的约束,它们即使生成的是固定样板文本或输入上下文的逐字复制,也必须付出相同的计算成本。相比之下,DiffusionGemma 能够同时识别并锁定整个序列中可预测的句法结构。我们通过两个实际案例来突出这种效率:严格 JSON 提取(附录 G.3,图 27 和图 27)和 Python 代码调试(附录 G.3,图 29 和图 29)。两个案例都清楚表明,高度受限的输出使扩散过程仅需两到三步即可收敛,与顺序解码相比大幅降低了延迟。
10 局限性与已知问题
在上一节中,我们讨论了文本扩散的新涌现特性以及我们的方法相对于自回归语言建模的优势。虽然 DiffusionGemma 为生成式文本建模和推理效率建立了新的帕累托前沿,但当前实验版本存在以下已知局限性:
- topsep=0pt
与自回归基线相比的性能差距:绝对性能低于其自回归初始化版本(Gemma 4 26B A4B),这源于几个实际约束:绕过原生扩散预训练,转而从自回归权重热启动;由于计算预算限制,依赖相对较短的 SFT 阶段;使用明确针对超低延迟的在线学习算法(SDRL),本质上牺牲了渐近性能;以及继承了自回归基线中可能对离散扩散范式并非最优的架构、优化和数据混合决策。
- topsep=0pt
生成长度与简洁性:如第 5 节所述,我们的最终检查点会产生高度简洁的输出。这种涌现出的简洁性虽然成为推理速度的倍增器,但也使模型无法利用通常由更长、更精细的推理轨迹所解锁的质量提升。
- topsep=0pt
偶发的 token 卡顿:在极少数情况下,模型的输出会退化为重复循环或局部卡顿(例如,无休止地重复一个常见 token,如“the the the”)。虽然我们的 SDRL 训练成功缓解了绝大多数此类情况,但这种罕见现象仍然是超低延迟运行模式的直接后果——在该模式下,激进减少的去噪步数偶尔会削弱生成过程的稳健性。
- topsep=0pt
多模态任务中偶发遗漏结束思考标签:在处理多模态提示词时,模型并不总能可靠地生成结束思考标签(即使推理本身是正确的)。这会在特定基准的思考模式下人为拉低性能;例如,在 MMMU-Pro 上,思考模式得分低于非思考模式得分(54.3 对 66.0)。这一问题在流程中被发现得太晚,无法在本版本中加以修复。
- topsep=0pt
高批量大小下的吞吐量限制:DiffusionGemma 通过以内存带宽成本换取计算量,在低批量大小下表现出色,在最多 32 个并发用户的情况下,其单用户吞吐量和总吞吐量均优于 Gemma 4 AR(带 MTP)(图 12)。超过这一阈值后,更高的每 token 计算成本使 AR 模型获得吞吐量优势。如第 6 节所述,这些结果是在未进行针对性批量大小优化的情况下获得的;在真实流量条件下进行彻底的实证分析仍是未来工作。
11 结论
DiffusionGemma 展示了一条实用且计算高效的路径,可实现超快速文本生成。通过对现有 Gemma 4 26B A4B AR 模型进行微调,并利用我们两阶段的训练流程(SFT 和 SDRL)使其执行文本扩散,它在速度与智能的权衡上建立了新的帕累托前沿——在单个 H100 上实现了每秒约 1500 个 token 的生成速度,同时保持了极具竞争力的推理和多模态能力。通过将 DiffusionGemma 作为实验性的开放权重模型发布——并附带 HuggingFace Transformers 和 vLLM 中的参考实现——我们旨在赋能开源社区,推动文本扩散的边界。我们希望研究者和从业者能够基于此方法进行构建,无论是通过针对特定任务进行微调、探索新颖的采样算法,还是进一步优化推理效率。
参考文献
- Abramovich 等人(2026)T. Abramovich、M. Ashkenazi、I. Putterman、B. Chislett、T. Mitra、B. D. Rouhani、R. Zilberstein 和 Y. Geifman,《SPEED-Bench:用于投机解码的统一且多样化的基准测试》。发表于《国际机器学习大会论文集》,引用位置:表 3、表 3。
- Arriola 等人(2025)M. Arriola、A. K. Gokaslan、J. T. Chiu、Z. Yang、Z. Qi、J. Han、S. S. Sahoo 和 V. Kuleshov,《块扩散:在自回归与扩散语言模型之间进行插值》。发表于《国际学习表征会议论文集》,引用位置:§3.1。
- Asaria 等人(2026)A. Asaria、T. Salomone 和 D. Gandhi,《既非并行也非顺序:DiffusionGemma 实际如何提交 token》。arXiv 预印本 arXiv:2606.14620。引用位置:§3.2。
- Austin 等人(2021)J. Austin、D. D. Johnson、J. Ho、D. Tarlow 和 R. Van Den Berg,《离散状态空间中的结构化去噪扩散模型》。发表于《神经信息处理系统进展》,引用位置:§2.1.1、§2、§3.2、§4。
- Ben-Hamu 等人(2026)H. Ben-Hamu、I. Gat、D. Severo、N. S. Nolte 和 B. Karrer,《通过熵有界去掩码实现掩码扩散模型的加速采样》。发表于《神经信息处理系统进展》,引用位置:§3.3、§3.3。
- Bengio 等人(2003)Y. Bengio, R. Ducharme, P. Vincent 和 C. Jauvin 合著《神经概率语言模型》。Journal of Machine Learning Research 3,第 1137–1155 页。引用位置:§2。
- Bie 等人(2025)T. Bie, M. Cao, K. Chen, L. Du, M. Gong, Z. Gong, Y. Gu, J. Hu, Z. Huang, Z. Lan 等人合著《LLaDA 2.0:将扩散语言模型扩展至 1000 亿参数》。arXiv 预印本 arXiv:2512.15745。引用位置:§1。
- Black 等人(2024)K. Black, M. Janner, Y. Du, I. Kostrikov 和 S. Levine 合著《用强化学习训练扩散模型》。发表于国际学习表征会议论文集。引用位置:第 1 条。
- Cai 等人(2024)T. Cai, Y. Li, Z. Geng, H. Peng, J. D. Lee, D. Chen 和 T. Dao 合著《MEDUSA:基于多头解码的简单 LLM 推理加速框架》。发表于国际机器学习会议论文集。引用位置:§A.2。
- Campbell 等人(2022)A. Campbell, J. Benton, V. De Bortoli, T. Rainforth, G. Deligiannidis 和 A. Doucet 合著《离散去噪模型的连续时间框架》。发表于神经信息处理系统进展。引用位置:§2.1。
- Campbell 等人(2024)A. Campbell, J. Yim, R. Barzilay, T. Rainforth 和 T. Jaakkola 合著《离散状态空间上的生成流:实现多模态流并应用于蛋白质协同设计》。发表于国际机器学习会议论文集。引用位置:§2.1.2、§2.1。
- Chang 等人(2022)H. Chang, H. Zhang, L. Jiang, C. Liu 和 W. T. Freeman 合著《MaskGIT:掩码生成式图像 Transformer》。发表于 IEEE/CVF 计算机视觉与模式识别会议论文集。引用位置:§3.3。
- Chen 等人(2023a)C. Chen, S. Borgeaud, G. Irving, J. Lespiau, L. Sifre 和 J. Jumper 合著《利用推测采样加速大语言模型解码》。arXiv 预印本 arXiv:2302.01318。引用位置:§A.2、§1。
- Chen 等人(2026)J. Chen, Y. Liang 和 Z. Liu 合著《DFlash:用于闪速推测解码的块扩散》。发表于国际机器学习会议论文集。引用位置:§A.2。
- Chen 等人(2023b)J. Chen、Y. Huang、T. Lv、L. Cui、Q. Chen 和 F. Wei 著《TextDiffuser:扩散模型作为文本画家》。发表于《神经信息处理系统进展》,第 36 卷。引用位置:§9.3。
- Chen 等人(2021)M. Chen、J. Tworek、H. Jun、Q. Yuan、H. P. D. O. Pinto、J. Kaplan、H. Edwards、Y. Burda、N. Joseph、G. Brockman 等人著《评估在代码上训练的大语言模型》。arXiv 预印本 arXiv:2107.03374。引用位置:§7。
- Chen 等人(2023c)T. Chen、R. Zhang 和 G. E. Hinton 著《模拟比特:利用带自条件的扩散模型生成离散数据》。发表于《国际学习表征会议论文集》。引用位置:§3.2。
- Cheng 等人(2026)X. Cheng、X. Yu、C. Shao、J. Li、Y. Xiong、Y. Qian、J. Zhu、S. Ma、X. Zhang、J. Ye、Q. Chen、C. Deng、J. Yu、D. Dai、Z. Zhang、Y. Wei、Y. Tan、W. Yang、R. Xu、Y. Wu、Z. Xu、X. Wang、M. Chen、R. Tian、X. Bi、Z. Hao、S. Chen、H. Cao、W. Zhang、A. Xu、H. Zhang、D. Zhao 和 W. Liang 著《DSpark:基于置信度调度的半自回归生成投机解码》。arXiv。引用位置:§A.2、§1。
- Clark 等人(2020)K. Clark、M. Luong、Q. V. Le 和 C. D. Manning 著《ELECTRA:将文本编码器预训练为判别器而非生成器》。发表于《国际学习表征会议论文集》。引用位置:§2。
- Clark 等人(2024)K. Clark、P. Vicol、K. Swersky 和 D. J. Fleet 著《在可微奖励上直接微调扩散模型》。发表于《国际学习表征会议论文集》。引用位置:第 1 项。
- Cobbe 等人(2021)K. Cobbe、V. Kosaraju、M. Bavarian、M. Chen、H. Jun、L. Kaiser、M. Plappert、J. Tworek、J. Hilton、R. Nakano、C. Hesse 和 J. Schulman 著《训练验证器以解决数学应用题》。arXiv 预印本 arXiv:2110.14168。引用位置:§7。
- Crepy 等人(2026)C. Crepy、V. De Bortoli、A. Galashov、K. Greff 和 I. Korshunova 著《Hackable Diffusion:一个用 jax 编写的模块化工具箱,用于扩散建模的实验与教学》。备注:赞助方:A. Doucet 和 R. Elie 外部链接:链接 引用位置:§8。
- Dao 等人(2022)T. Dao、D. Fu、S. Ermon、A. Rudra 和 C. Ré《FlashAttention:基于 IO 感知的快速且内存高效精确注意力机制》。收录于《神经信息处理系统进展》,第 35 卷。引用位置:第 3 条。
- De Bortoli 等人(2021)V. De Bortoli、J. Thornton、J. Heng 和 A. Doucet《扩散薛定谔桥及其在基于分数的生成建模中的应用》。收录于《神经信息处理系统进展》,第 34 卷。引用位置:第 2 节。
- DeepSeek-AI(2024)DeepSeek-AI《DeepSeek-v3 技术报告》。arXiv 预印本 arXiv:2412.19437。引用位置:第 1 节。
- Dekoninck 等人(2026)J. Dekoninck、N. Jovanović、T. Gehrunger、K. Rögnvaldsson、I. Petrov、C. Sun 和 M. Vechev《超越基准:MathArena 作为大语言模型数学评估平台》。收录于国际机器学习大会(ICML)第三届 AI 数学研讨会,外部链接:链接。引用位置:第 7 节。
- Deschenaux 等人(2026)J. Deschenaux、C. Gulcehre 和 S. S. Sahoo《扩散对偶性,第二章:采样器》。收录于国际学习表征会议论文集。引用位置:第 3.3 节。
- Deschenaux 和 Gulcehre(2024)J. Deschenaux 和 C. Gulcehre《扩散语言建模的前景、展望与挑战》。arXiv 预印本 arXiv:2406.11473。引用位置:第 1 节。
- Deschenaux 和 Gulcehre(2025)J. Deschenaux 和 C. Gulcehre《超越自回归:通过时间自蒸馏实现快速大语言模型》。收录于国际学习表征会议论文集。引用位置:第 2 条。
- Deschenaux 和 Gulcehre(2026a)J. Deschenaux 和 C. Gulcehre《BlockGen:基于混合采样器的灵活分块序列建模》。收录于国际学习表征会议论文集。引用位置:第 3.1 节。
- Deschenaux 和 Gulcehre(2026b)J. Deschenaux 和 C. Gulcehre《基于超球面流的语言建模》。arXiv 预印本 arXiv:2605.11125。引用位置:第 A.1 节。
- Devlin 等人(2019)J. Devlin、M. Chang、K. Lee 和 K. Toutanova《BERT:用于语言理解的深度双向 Transformer 预训练》。收录于北美计算语言学协会年会论文集。引用位置:第 2 节。
- Dieleman 等人(2022)S. Dieleman、L. Sartran、A. Roshannai、N. Savinov、Y. Ganin、P. H. Richemond、A. Doucet、R. Strudel、C. Dyer、C. Durkan、C. Hawthorne、R. Leblond、W. Grathwohl 和 J. Adler 著《面向分类数据的连续扩散模型》。arXiv 预印本 arXiv:2211.15089。引用位置:第 2 节、第 9 节。
- Dong 等人(2023)H. Dong、W. Xiong、D. Goyal、R. Pan、S. Diao、J. Zhang、K. Shum 和 T. Zhang 著《RAFT:用于生成式基础模型对齐的奖励排序微调》。发表于《机器学习研究汇刊》。引用位置:第 1 项。
- Engels 等人(2026)J. Engels、C. McDougall、B. Chughtai、J. Kramar、S. Rajamanoharan、C. Wu、A. Conmy、A. Q. Chen、J. Tarbouriech、M. Ma、B. O’Donoghue、J. G. L. de Oliveira、R. Shah 和 N. Nanda 著《DiffusionGemma 的透明度有多高?》。arXiv 预印本 arXiv:2606.20560。引用位置:第 3.2 节。
- Fan 等人(2023)Y. Fan、O. Watkins、Y. Du、H. Liu、K. Moon、C. Boutilier、P. Abbeel、B. Lin 和 H. Lee 著《DPOK:用于微调文本到图像扩散模型的强化学习》。发表于《神经信息处理系统进展》,第 36 卷。引用位置:第 1 项。
- Fu 等人(2025)F. Fu、T. Guo 和 Z. Liu 著《面向离散扩散模型的可学习采样器蒸馏》。发表于《神经信息处理系统进展》。引用位置:第 2 项。
- Fu 等人(2026)Y. Fu、L. Whalen、A. Garg、C. Wu、M. Khadkevich、N. Oswald、E. Xie、D. Egert、S. T. Sreenivas、S. Diao、C. Yu、Y. Yu、W. Chen、S. Norouzi、J. Liu、S. Lan、L. Zhu、J. Wang、J. Jiang、M. Mardani、M. Maghoumi、S. Han、A. Jukic、N. Tajbakhsh、J. Kautz 和 P. Molchanov 著《Nemotron-Labs-Diffusion:统一自回归、扩散与自推测解码的三模态语言模型》。NVIDIA 技术报告。注:技术报告。引用位置:第 1 节。
- Gat 等人(2024)I. Gat、T. Remez、N. Shaul、F. Kreuk、R. T. Chen、G. Synnaeve、Y. Adi 和 Y. Lipman 著《离散流匹配》。发表于《神经信息处理系统进展》。引用位置:第 2.1.2 节、第 2.1 节、第 2 节、第 4 节、脚注 1。
- Gemini Team(2025)Gemini Team 著《Gemini 2.5:以先进推理、多模态、长上下文和下一代智能体能力推动前沿》。arXiv 预印本 arXiv:2507.06261。引用位置:第 1 节。
- Gemma 团队等(2026)Gemma 团队,S. E. Abd,V. Aggarwal,R. Algayres,A. Andreev,O. Bachem,I. Ballantyne,C. Brick,V. Cărbune,M. Casbon,等。Gemma 4 技术报告。arXiv 预印本 arXiv:2607.02770。引用位置:§1、§1、§3、§4、§5。
- Ghazvininejad 等(2019)M. Ghazvininejad,O. Levy,Y. Liu 和 L. Zettlemoyer。Mask-predict:条件掩码语言模型的并行解码。收录于《自然语言处理经验方法会议论文集》。引用位置:§9。
- Gong 等(2025)S. Gong,S. Agarwal,Y. Zhang,J. Ye,L. Zheng,M. Li,C. An,P. Zhao,W. Bi,J. Han,H. Peng 和 K. Kong。通过自回归模型适配来扩展扩散语言模型。收录于《国际学习表征会议论文集》。引用位置:§1。
- Gong 等(2023)S. Gong,M. Li,J. Feng,Z. Wu 和 L. Kong。DiffuSeq:基于扩散模型的序列到序列文本生成。收录于《国际学习表征会议论文集》。引用位置:§9。
- Google DeepMind 团队(2026)Google DeepMind 团队。DiffusionGemma 在 HuggingFace transformers 中的实现。备注:https://github.com/huggingface/transformers/pull/46540 拉取请求。引用位置:§6。
- Google DeepMind(2025)Google DeepMind。Gemini 扩散模型。外部链接:链接。引用位置:§1。
- Google DeepMind(2026)Google DeepMind。加速 Gemma 4:利用多 token 预测草稿模型实现更快推理。外部链接:链接。引用位置:§1。
- Graves(2013)A. Graves。使用循环神经网络生成序列。arXiv 预印本 arXiv:1308.0850。引用位置:§2。
- Gu 等(2018)J. Gu,J. Bradbury,C. Xiong,V. O.K. Li 和 R. Socher。非自回归神经机器翻译。收录于《国际学习表征会议论文集》。引用位置:§2。
- Han 等(2024)K. Han,K. Kenealy,A. Barua,N. Fiedel 和 N. Constant。文本扩散模型的迁移学习。arXiv 预印本 arXiv:2401.17181。引用位置:§1。
- Han 等人(2023)X. Han、S. Finkelstein、S. Sharma、Y. Chen 和 H. He 著《SSD-LM:用于文本生成与模块化控制的半自回归单纯形扩散语言模型》,发表于计算语言学协会年会论文集,引用位置:§9.1。
- He 等人(2024)Y. He、N. Murata、C. Lai、Y. Takida、T. Uesaka、D. Kim、W. Liao、Y. Mitsufuji、J. Z. Kolter、R. Salakhutdinov 和 S. Ermon 著《流形保持引导扩散》,发表于国际学习表征会议论文集,引用位置:§A.1。
- Ho 等人(2020)J. Ho、A. Jain 和 P. Abbeel 著《去噪扩散概率模型》,发表于神经信息处理系统进展,引用位置:§2。
- Holderrieth 和 Erives(2025)P. Holderrieth 和 E. Erives 著《流匹配与扩散模型导论》,arXiv 预印本 arXiv:2506.02070,引用位置:§2。
- Hoogeboom 等人(2022)E. Hoogeboom、A. A. Gritsenko、J. Bastings、B. Poole、R. v. d. Berg 和 T. Salimans 著《自回归扩散模型》,发表于国际学习表征会议论文集,引用位置:§2.1。
- Hoogeboom 等人(2021)E. Hoogeboom、D. Nielsen、P. Jaini、P. Forré 和 M. Welling 著《Argmax 流与多项式扩散:学习分类分布》,发表于神经信息处理系统进展,第 34 卷,引用位置:§2.1.1、§3.2、§4。
- Hoogeboom 等人(2026)E. Hoogeboom、D. Ruhe、J. Heek、T. Mensink 和 T. Salimans 著《超越单 token:通过离散 MMD 蒸馏离散扩散模型》,arXiv 预印本 arXiv:2603.20155,外部链接:文档,引用位置:第 2 项。
- Hu 等人(2022)E. J. Hu、yelong shen、P. Wallis、Z. Allen-Zhu、Y. Li、S. Wang、L. Wang 和 W. Chen 著《LoRA:大语言模型的低秩适配》,发表于国际学习表征会议论文集,引用位置:§8。
- Hu 等人(2026)K. Hu、L. Qiu、Y. Lu、H. Zhao、T. Li、Y. Kim、J. Andreas 和 K. He 著《ELF:嵌入式语言流》,arXiv 预印本 arXiv:2605.10938,引用位置:§A.1、§2。
- Huang 等人(2024)H. Huang、N. Ardalani、A. Sun、L. Ke、S. Bhosale、H. S. Lee、C. Wu 和 B. Lee《面向混合专家模型的高效推理》。收录于《神经信息处理系统进展》,引用位置:第 1 条。
- Inception Labs 等人(2025)Inception Labs、S. Khanna、S. Kharbanda、S. Li、H. Varma、E. Wang、S. Birnbaum、Z. Luo、Y. Miraoui、A. Palrecha 等《Mercury:基于扩散模型的超快语言模型》。arXiv 预印本 arXiv:2506.17298。引用位置:§1。
- Inception Labs(2026)Inception Labs《推出 Mercury 2》。注:https://www.inceptionlabs.ai/blog/introducing-mercury-2 访问时间:2026-07-22。引用位置:附录 E。
- Interfaze(2026)Interfaze《首个开源扩散音频 ASR 模型》。注:https://interfaze.ai/blog/the-first-open-source-diffusion-audio-asr-model 博客文章。引用位置:§1。
- Jain 等人(2025)N. Jain、A. Gu、W. Li、F. Yan、T. Zhang、S. Wang、A. Solar-Lezama、K. Sen 和 I. Stoica《LiveCodeBench:面向代码大语言模型的全面且无污染评估》。收录于《国际学习表征会议论文集》,引用位置:§7。
- Jin 等人(2019)Q. Jin、B. Dhingra、Z. Liu、W. Cohen 和 X. Lu《PubMedQA:面向生物医学研究问答的数据集》。收录于《自然语言处理经验方法会议论文集》,引用位置:附录 C、附录 C、§8。
- Jo 等人(2026)M. Jo、J. Yoon、J. Deschenaux、C. Gulcehre 和 S. Ahn《离散扩散的漏洞利用:绕过采样墙的确定性捷径》。收录于《国际学习表征会议论文集》,引用位置:§3.2。
- Kingma 等人(2021)D. P. Kingma、T. Salimans、B. Poole 和 J. Ho《变分扩散模型》。收录于《神经信息处理系统进展》,第 34 卷。引用位置:§2。
- Kitouni 等人(2024)O. Kitouni、N. Nolte、A. Williams、M. Rabbat、D. Bouchacourt 和 M. Ibrahim《分解诅咒:你预测哪些 token 决定了反转诅咒及其他现象》。收录于《神经信息处理系统进展》,引用位置:§9.1。
- Kwon 等人(2023)W. Kwon、Z. Li、S. Zhuang、Y. Sheng、L. Zheng、C. H. Yu、J. E. Gonzalez、H. Zhang 和 I. Stoica,《利用 PagedAttention 实现大语言模型服务的高效内存管理》,载于第 29 届操作系统原理研讨会(SOSP)论文集,引用位置:§6。
- Lee 等人(2026)C. Lee、J. Yoo、M. Agarwal、S. Shah、J. Huang、A. Raghunathan、S. Hong、N. M. Boffi 和 J. Kim,《流图语言模型:通过连续去噪实现单步语言建模》,arXiv 预印本 arXiv:2602.16813。引用位置:§A.1。
- Lee 等人(2023)K. Lee、H. Liu、M. Ryu、O. Watkins、Y. Du、C. Boutilier 和 P. Abbeel,《利用人类反馈对齐文生图模型》,arXiv 预印本 arXiv:2302.12192。引用位置:第 1 项。
- Leviathan 等人(2023)Y. Leviathan、M. Kalman 和 Y. Matias,《通过推测解码实现 Transformer 的快速推理》,载于国际机器学习大会论文集,引用位置:§A.2、§1、§2。
- Lewis 等人(2020)M. Lewis、Y. Liu、N. Goyal、M. Ghazvininejad、A. Mohamed、O. Levy、V. Stoyanov 和 L. Zettlemoyer,《BART:面向自然语言生成、翻译与理解的去噪序列到序列预训练》,载于计算语言学协会年会论文集,引用位置:§3.1。
- Lezama 等人(2023)J. Lezama、T. Salimans、L. Jiang、H. Chang、J. Ho 和 I. Essa,《离散扩散模型的预测-校正采样》,载于国际学习表征大会论文集,引用位置:§3.3。
- Li 等人(2022)X. L. Li、J. Thickstun、I. Gulrajani、P. Liang 和 T. B. Hashimoto,《Diffusion-LM 提升可控文本生成》,载于神经信息处理系统进展,引用位置:§2、§9.3、§9。
- Li 等人(2026)Y. Li、F. Wei、C. Zhang 和 H. Zhang,《EAGLE-3:通过训练时测试扩展大语言模型的推理加速》,载于神经信息处理系统进展,引用位置:§A.2、§1。
- Lipman 等人(2023)Y. Lipman、R. T. Q. Chen、H. Ben-Hamu、M. Nicklas 和 M. Le,《用于生成式建模的流匹配》,载于国际学习表征大会论文集,引用位置:§2。
- Liu 等人(2026a)E. Liu、X. Ning、Y. Wang 和 Z. Lin,NI 采样:通过 token 顺序优化加速离散扩散模型采样。发表于国际学习表征会议论文集,引用位置:§3.3。
- Liu 等人(2025)J. Liu、G. Liu、J. Liang、Y. Li、J. Liu、X. Wang、P. Wan、D. Zhang 和 W. Ouyang,Flow-GRPO:通过在线强化学习训练流匹配模型。发表于神经信息处理系统进展,引用位置:条目 1。
- Liu 等人(2026b)J. Liu、X. Dong、Z. Ye、R. Mehta、Y. Fu、V. Singh、C. Zhang 和 P. Molchanov,TiDAR:在扩散中思考,在自回归中表达。发表于机器学习与系统会议论文集,引用位置:§A.2。
- Liu 等人(2024)X. Liu、X. Zhang、J. Ma、J. Peng 和 Q. Liu,InstaFlow:一步即可实现高质量基于扩散模型的文生图。发表于国际学习表征会议论文集,引用位置:条目 2。
- Liu 等人(2019)Y. Liu、M. Ott、N. Goyal、J. Du、M. Joshi、D. Chen、O. Levy、M. Lewis、L. Zettlemoyer 和 V. Stoyanov,RoBERTa:一种稳健优化的 BERT 预训练方法。arXiv 预印本 arXiv:1907.11692。引用位置:§2。
- Lou 等人(2024)A. Lou、C. Meng 和 S. Ermon,通过估计数据分布的比率进行离散扩散建模。发表于国际机器学习会议论文集,引用位置:§A.1、§2。
- Luo 等人(2023)S. Luo、Y. Tan、L. Huang、J. Li 和 H. Zhao,潜在一致性模型:用少步推理合成高分辨率图像。发表于神经信息处理系统进展,第 36 卷。引用位置:条目 2。
- Ma 等人(2026)H. Ma、O. Nabati、A. Rosenberg、B. Dai、O. Lang、C. Boutilier、N. Li、S. Mannor、L. Shani 和 G. Tenneholtz,面向组合动作空间的离散扩散策略强化学习。发表于国际机器学习会议论文集,引用位置:条目 1。
- Matton 等人(2024)A. Matton、T. Sherborne、D. Aumiller、E. Tommasone、M. Alizadeh、J. He、R. Ma、M. Voisin、E. Gilsenan-McMahon 和 M. Gallé,关于代码生成评测数据集泄露的研究。发表于计算语言学协会 Findings:EMNLP,引用位置:§7。
- Meng 等人(2022)C. Meng、Y. He、Y. Song、J. Song、J. Wu、J. Zhu 和 S. Ermon《SDEdit:基于随机微分方程的引导式图像合成与编辑》。发表于国际学习表征会议论文集,引用位置:§2。
- Meshchaninov 等人(2025)V. Meshchaninov、E. Chimbulatov、A. Shabalin、A. Abramov 和 D. Vetrov《Cosmos:面向文本扩散模型的压缩平滑潜空间》。发表于神经信息处理系统进展,引用位置:§A.1、§2。
- Mikolov 等人(2010)T. Mikolov、M. Karafiát、L. Burget、J. Černockỳ 和 S. Khudanpur《基于循环神经网络的语言模型》。发表于 Interspeech,第 2 卷。引用位置:§2。
- Nagarajan 等人(2025)V. Nagarajan、C. H. Wu、C. Ding 和 A. Raghunathan《掷骰子并三思而后行:超越下一 token 预测的创造极限》。发表于国际机器学习会议论文集,引用位置:§9.1。
- Nie 等人(2026)S. Nie、F. Zhu、Z. You、X. Zhang、J. Ou、J. Hu、J. Zhou、Y. Lin、J. Wen 和 C. Li《大规模语言扩散模型》。发表于神经信息处理系统进展,引用位置:§1。
- OpenAI(2024)OpenAI《多语言大规模多任务语言理解(MMMLU)》。注:https://huggingface.co/datasets/openai/MMMLU 引用位置:§7。
- Ou 等人(2025)J. Ou、S. Nie、K. Xue、F. Zhu、J. Sun、Z. Li 和 C. Li《你的吸收式离散扩散模型其实在隐式建模干净数据的条件分布》。发表于国际学习表征会议论文集,引用位置:§2.1.2。
- Papadopoulos 等人(2024)V. Papadopoulos、J. Wenger 和 C. Hongler《大语言模型的时间之箭》。发表于国际机器学习会议论文集,引用位置:§9.1。
- Pope 等人(2023)R. Pope、S. Douglas、A. Chowdhery、J. Devlin、S. Ghemawat、J. He、D. Maher、S. Narang、S. Mishra、A. Ni 等人《高效扩展 Transformer 推理》。发表于机器学习和系统会议论文集(MLSys),第 5 卷。引用位置:§6。
- Potaptchik 等人(2026)P. Potaptchik、J. Yim、A. Saravanan、P. Holderrieth、E. Vanden-Eijnden 和 M. S. Albergo《离散流映射》。arXiv 预印本 arXiv:2604.09784。引用位置:§A.1。
- Pynadath 等人(2026)P. Pynadath、J. Shi 和 R. Zhang《CANDI:混合离散-连续扩散模型》。发表于《国际机器学习大会论文集》,引用位置:§A.1。
- Quan 等人(2025)S. Quan、J. Yang、B. Yu、B. Zheng、D. Liu、A. Yang、X. Ren、B. Gao、Y. Miao、Y. Feng 等人《CodeElo:利用可媲美人类的 Elo 评分对 LLM 竞赛级代码生成进行基准测试》。arXiv 预印本 arXiv:2501.01257。引用位置:§7。
- Rae 等人(2020)J. W. Rae、A. Potapenko、S. M. Jayakumar、C. Hillier 和 T. P. Lillicrap《用于长程序列建模的压缩 Transformer》。发表于《国际学习表征会议论文集》,引用位置:第 1 项。
- Raffel 等人(2020)C. Raffel、N. Shazeer、A. Roberts、K. Lee、S. Narang、M. Matena、Y. Zhou、W. Li 和 P. J. Liu《探索基于统一文本到文本 Transformer 的迁移学习极限》。发表于《机器学习研究杂志》。引用位置:§3.1。
- Rajbhandari 等人(2022)S. Rajbhandari、C. Li、Z. Yao、M. Zhang、R. Y. Aminabadi、A. A. Awan、J. Rasley 和 Y. He《DeepSpeed-MoE:推进混合专家模型推理与训练,赋能下一代 AI 规模》。发表于《国际机器学习大会论文集》,引用位置:第 1 项。
- Reid 等人(2022)M. Reid、E. Marrese-Taylor 和 Y. Matsuo《DiffusER:基于编辑重建的离散扩散模型》。发表于《亚太计算语言学协会第二届会议暨第十二届自然语言处理国际联合会议(AACL-IJCNLP)论文集》,引用位置:§9.1。
- Rein 等人(2024)D. Rein、B. L. Hou、A. C. Stickland、J. Petty、R. Y. Pang、J. Dirani、J. Michael 和 S. R. Bowman《GPQA:研究生级别的防谷歌问答基准》。发表于《语言建模会议论文集》,引用位置:§7。
- Ren 等人(2025)Y. Ren、H. Chen、Y. Zhu、W. Guo、Y. Chen、G. M. Rotskoff、M. Tao 和 L. Ying《离散扩散模型的快速求解器:高阶算法的理论与应用》。发表于《神经信息处理系统进展》,引用位置:§3.3。
- Sahoo 等人(2024)S. S. Sahoo、M. Arriola、Y. Schiff、A. Gokaslan、E. Marroquin、J. T. Chiu、A. Rush 和 V. Kuleshov,《简单有效的掩码扩散语言模型》,发表于《神经信息处理系统进展》,引用位置:§2。
- Salimans 和 Ho(2022)T. Salimans 和 J. Ho,《用于扩散模型快速采样的渐进式知识蒸馏》,发表于《国际学习表征会议论文集》,引用位置:第 2 项。
- Sanh 等人(2019)V. Sanh、L. Debut、J. Chaumond 和 T. Wolf,《DistilBERT:BERT 的蒸馏版本:更小、更快、更便宜、更轻量》,arXiv 预印本 arXiv:1910.01108。引用位置:§2。
- Sauer 等人(2024)A. Sauer、D. Lorenz、A. Blattmann 和 R. Rombach,《对抗式扩散蒸馏》,发表于《IEEE/CVF 计算机视觉与模式识别会议论文集》,引用位置:第 2 项。
- Savinov 等人(2022)N. Savinov、J. Chung、M. Binkowski、E. Elsen 和 A. van den Oord,《用于文本生成的逐步展开去噪自编码器》,发表于《国际学习表征会议论文集》,引用位置:§2。
- Shabalin 等人(2025)A. Shabalin、V. Meshchaninov、E. Chimbulatov、V. Lapikov、R. Kim、G. Bartosh 和 D. Vetrov,《TEncDM:理解语言模型编码空间中的扩散模型特性》,发表于《AAAI 人工智能会议论文集》,引用位置:§A.1、§2。
- Shi 等人(2023)F. Shi、M. Suzgun、M. Freitag、X. Wang、S. Srivats、S. Vosoughi、H. W. Chung、Y. Tay、S. Ruder、D. Zhou、D. Das 和 J. Wei,《语言模型是多语言链式推理者》,发表于《国际学习表征会议论文集》,引用位置:§7。
- Sohl-Dickstein 等人(2015)J. Sohl-Dickstein、E. Weiss、N. Maheswaranathan 和 S. Ganguli,《利用非平衡热力学进行深度无监督学习》,发表于《国际机器学习会议论文集》,引用位置:§2。
- Song 等人(2021a)J. Song、C. Meng 和 S. Ermon,《去噪扩散隐式模型》,发表于《国际学习表征会议论文集》,引用位置:§2。
- Song 等人(2023)Y. Song、P. Dhariwal、M. Chen 和 I. Sutskever,《一致性模型》,发表于国际机器学习大会论文集,被引:第 2 条。
- Song 等人(2021b)Y. Song、C. Durkan、I. Murray 和 S. Ermon,《基于分数的扩散模型的最大似然训练》,发表于神经信息处理系统进展,第 34 卷。被引:§2。
- Song 和 Ermon(2019)Y. Song 和 S. Ermon,《通过估计数据分布的梯度进行生成建模》,发表于神经信息处理系统进展,第 32 卷。被引:§2。
- Song 等人(2021c)Y. Song、J. Sohl-Dickstein、D. P. Kingma、A. Kumar、S. Ermon 和 B. Poole,《通过随机微分方程进行基于分数的生成建模》,发表于国际学习表征会议论文集。被引:§2。
- Song 等人(2025)Y. Song、Z. Zhang、C. Luo、P. Gao、F. Xia、H. Luo、Z. Li、Y. Yang、H. Yu、X. Qu 等人,《Seed Diffusion:一种高速推理的大规模扩散语言模型》,arXiv 预印本 arXiv:2508.02193。被引:§1。
- Stern 等人(2018)M. Stern、N. Shazeer 和 J. Uszkoreit,《深度自回归模型的分块并行解码》,发表于神经信息处理系统进展,第 31 卷。被引:§1。
- Strudel 等人(2022)R. Strudel、C. Tallec、F. Altché、Y. Du、Y. Ganin、A. Mensch、W. Grathwohl、N. Savinov、S. Dieleman、L. Sifre 和 R. Leblond,《用于文本生成的自条件嵌入扩散》,arXiv 预印本 arXiv:2211.04236。被引:§2、§3.2。
- Sutskever 等人(2014)I. Sutskever、O. Vinyals 和 Q. V. Le,《基于神经网络的序列到序列学习》,发表于神经信息处理系统进展。被引:§2。
- Suzgun 等人(2023)M. Suzgun、N. Scales、N. Schärli、S. Gehrmann、Y. Tay、H. W. Chung、A. Chowdhery、Q. Le、E. Chi、D. Zhou 和 J. Wei,《具有挑战性的 BIG-Bench 任务以及思维链能否解决它们》,发表于计算语言学协会 Findings:ACL 2023。被引:§7。
- Tang 等人(2024)J. Tang、Y. Zhao、K. Zhu、G. Xiao、B. Kasikci 和 S. Han,《Quest:面向高效长上下文 LLM 推理的查询感知稀疏性》,发表于国际机器学习大会论文集,引用位置:§6。
- vLLM 团队与 Google DeepMind 团队(2026)vLLM 团队与 Google DeepMind 团队,《DiffusionGemma:vLLM 原生支持的首个扩散 LLM(dLLM)》。注:https://vllm.ai/blog/2026-06-10-diffusion-gemmavLLM 博客。实现代码:https://github.com/vllm-project/vllm/pull/45163 引用位置:§6、§6。
- Tsoukalas 等人(2024)G. Tsoukalas、J. Lee、J. Jennings、J. Xin、M. Ding、M. Jennings、A. Thakur 和 S. Chaudhuri,《PutnamBench:在 Putnam 数学竞赛上评估神经定理证明器》,发表于神经信息处理系统进展大会,引用位置:§7。
- Unsloth(2026)Unsloth,《DiffusionGemma》。注:https://unsloth.ai/docs/models/diffusiongemma 访问日期:2026-06-11 引用位置:§1。
- Van Puyvelde 等人(2026)M. Van Puyvelde、H. I. Gulluk、W. Van Criekinge 和 O. Gevaert,《用于交互式放射报告起草的离散扩散语言模型》,arXiv 预印本 arXiv:2607.01436。引用位置:§1。
- Vaswani 等人(2017)A. Vaswani、N. Shazeer、N. Parmar、J. Uszkoreit、L. Jones、A. N. Gomez、Ł. Kaiser 和 I. Polosukhin,《注意力就是你所需要的一切》,发表于神经信息处理系统进展大会,引用位置:§2、§3。
- Wallace 等人(2024)B. Wallace、M. Dang、R. Rafailov、L. Zhou、A. Lou、S. Purushwalkam、S. Ermon、C. Xiong、S. Joty 和 N. Naik,《使用直接偏好优化进行扩散模型对齐》,发表于 IEEE/CVF 计算机视觉与模式识别大会论文集,引用位置:第 1 项。
- Wang 等人(2024)Y. Wang、X. Ma、G. Zhang、Y. Ni、A. Chandra、S. Guo、W. Ren、A. Arulraj、X. He、Z. Jiang、T. Li、M. Ku、K. Wang、A. Zhuang、R. Fan、X. Yue 和 W. Chen,《MMLU-Pro:一个更稳健且更具挑战性的多任务语言理解基准》,发表于神经信息处理系统进展大会,引用位置:§7。
- Wu 等人(2025)C. Wu、H. Zhang、S. Xue、S. Diao、Y. Fu、Z. Liu、P. Molchanov、P. Luo、S. Han 和 E. Xie,《FastDLLM v2:高效的块扩散 LLM》,arXiv 预印本 arXiv:2509.26328。引用位置:§3.1。
- Xia 等人(2024)H. Xia、Z. Yang、Q. Dong、P. Wang、Y. Li、T. Ge、T. Liu、W. Li 和 Z. Sui《释放大语言模型推理效率:推测解码综合综述》。发表于 Findings of the Association for Computational Linguistics: ACL 2024,引用位置:§A.2、§1。
- Yao 等人(2024)S. Yao、N. Shinn、P. Razavi 和 K. Narasimhan《-Bench:真实世界领域中工具-智能体-用户交互的基准测试》。arXiv 预印本 arXiv:2406.12045。引用位置:§7。
- Yao 等人(2026)Y. Yao、H. Zhou、A. Han、W. Huang 和 M. Sugiyama《利用时间并行采样加速离散扩散模型》。arXiv 预印本 arXiv:2607.00773。引用位置:§3.3。
- Ye 等人(2024)J. Ye、S. Gong、L. Chen、L. Zheng、J. Gao、H. Shi、C. Wu、X. Jiang、Z. Li、W. Bi 和 L. Kong《思想扩散:扩散语言模型中的链式推理》。发表于 Advances in Neural Information Processing Systems,引用位置:§9.2。
- Yi 等人(2024)Q. Yi、X. Chen、C. Zhang、Z. Zhou、L. Zhu 和 X. Kong《文本生成中的扩散模型:综述》。PeerJ Computer Science。引用位置:§2。
- Yin 等人(2024)T. Yin、M. Gharbi、R. Zhang、E. Shechtman、F. Durand 和 T. Park《利用文本到图像模型实现一步图像翻译》。发表于 Proceedings of the IEEE/CVF Conference on Computer Vision and Pattern Recognition,引用位置:第 2 项。
- Yue 等人(2025)X. Yue、T. Zheng、Y. Ni、Y. Wang、K. Zhang、S. Tong、Y. Sun、B. Yu、G. Zhang、H. Sun、Y. Su、W. Chen 和 G. Neubig《MMMU-Pro:更稳健的多学科多模态理解基准》。发表于 Proceedings of the Annual Meeting of the Association for Computational Linguistics,引用位置:§7。
- Zadouri 等人(2026)T. Zadouri、M. Hoehnerbach、J. Shah、V. Thakkar 和 T. Dao《FlashAttention-4:面向非对称硬件扩展的算法与内核流水线协同设计》。发表于 Proceedings of Machine Learning and Systems,引用位置:第 3 项。
- Zelikman 等人(2024)E. Zelikman、G. Harik、Y. Shao、V. Jayasiri、N. Haber 和 N. D. Goodman《Quiet-STaR:语言模型可以在开口前自我思考》。发表于 Proceedings of the Conference on Language Modeling,引用位置:§4。
- Zhang 等人(2024)S. Zhang、Y. Bao 和 S. Huang《EDT:通过基于熵的动态温度采样提升大语言模型的生成质量》。arXiv 预印本 arXiv:2403.14541。引用位置:§3.3。
- Zhang-Li 等人(2024)D. Zhang-Li、N. Lin、J. Yu、Z. Zhang、Z. Yao、X. Zhang、L. Hou、J. Zhang 和 J. Li《把这个数字倒过来!解码顺序在算术学习中的重要性》。arXiv 预印本 arXiv:2403.05845。引用位置:§9.1。
- Zhao 等人(2025)L. Zhao、X. Ding、L. Yu 和 L. Akoglu《面向分类数据的统一离散扩散模型》。Journal of Machine Learning Research 26(215),第 1–49 页。引用位置:§2。
- Zhao 等人(2026)S. Zhao、D. Gupta、Q. Zheng 和 A. Grover《D1:通过强化学习扩展扩散大语言模型的推理能力》。收录于 Advances in Neural Information Processing Systems。引用位置:第 1 项。
- Zhao 等人(2024)Y. Zhao、Z. Xie、C. Liang、C. Zhuang 和 J. Gu《Lookahead:一种无损生成精度的的大语言模型推理加速框架》。收录于第 30 届 ACM SIGKDD 知识发现与数据挖掘会议论文集。引用位置:§1。
- Zheng 等人(2026)K. Zheng、H. Chen、H. Ye、H. Wang、Q. Zhang、K. Jiang、H. Su、S. Ermon、J. Zhu 和 M. Liu《DiffusionNFT:带前向过程的在线扩散强化学习》。收录于国际机器学习大会论文集。引用位置:第 1 项。
- Zhou 等人(2023)J. Zhou、T. Lu、S. Mishra、S. Brahma、S. Basu、Y. Luan、D. Zhou 和 L. Hou《大语言模型的指令遵循评估》。arXiv 预印本 arXiv:2311.07911。引用位置:§7。
- Zhu 等人(2025a)K. Zhu、Y. Gao、Y. Zhao、L. Zhao、G. Zuo、Y. Gu、D. Xie、T. Tang、Q. Xu、Z. Ye、K. Kamahori、C. Lin、Z. Wang、S. Wang、A. Krishnamurthy 和 B. Kasikci《NanoFlow:迈向最优的大语言模型服务吞吐量》。收录于第 19 届 USENIX 操作系统设计与实现会议论文集。引用位置:§6。
- Zhu 等人(2025b)R. Zhu、Z. Jiang、C. Jin、P. Wu、C. A. Stuardo、D. Wang、X. Zhang、H. Zhou、H. Wei、Y. Cheng、J. Xiao、X. Zhang、L. Liu、H. Lin、L. Chang、J. Ye、X. Yu、X. Liu、X. Jin 和 X. Liu 合著《MegaScale-Infer:基于解耦专家并行的高效混合专家模型服务》,发表于 ACM SIGCOMM 2025 会议论文集,引用位置:§6。
- Zhuo 等人(2025)T. Y. Zhuo、V. M. Chien、J. Chim、H. Hu、W. Yu、R. Widyasari、I. N. B. Yusuf、H. Zhan、J. He、I. Paul、S. Brunner、C. GONG、J. Hoang、A. R. Zebaze、X. Hong、W. Li、J. Kaddour、M. Xu、Z. Zhang、P. Yadav、N. Jain、A. Gu、Z. Cheng、J. Liu、Q. Liu、Z. Wang、D. Lo、B. Hui、N. Muennighoff、D. Fried、X. Du、H. de Vries 和 L. V. Werra 合著《BigCodeBench:以多样化函数调用和复杂指令对代码生成进行基准测试》,发表于国际学习表征会议论文集,引用位置:§7。
贡献者与致谢(按字母顺序排列)
核心贡献者(工作流负责人以“*”标注)
Adrien Ali Taïga、James Assiene、Daniele Calandriello*、Rahma Chaabouni、João Gante*、Tamara von Glehn*、Nate Keating、Chris Knutsen、Martin Kukla*、Tianlin Liu、Ivan Lobov*、Ofir Nabati、João Gabriel Oliveira、Nicolas Perez-Nieves*、Nastasia Prutianova、Bobak Shahriari*、Jean Tarbouriech*、Pavel Tyletski、Çağlar Ünlü、Cindy Wu
Glenn Cameron、Jerome Connor、Sertan Girgin、Maarten Grootendorst、Alon Levkovitch、Eliya Nachmani、Omar Sanseviero、Piotr Stanczyk
微调框架
Quentin Berthet、Andrew Campbell、Clément Crepy、Valentin De Bortoli、Arnaud Doucet、Romuald Elie、Alexandre Galashov、Klaus Greff、Alexis Jacq、David Ruhe、Yu-Han Wu
负责人
Sebastian Flennerhag、Brendan O’Donoghue、George Scrivener、Shantanu Thakoor
致谢
Sander Dieleman、Lucas Dixon、Johan Ferret、Parnian Kassraie、Preethi Lahoti、Gaël Liu、Sarah Perrin、Angéline Pouget、Louis Rouillard、Pier Giuseppe Sessa、Danilla Sinopalnikov、Gemma 团队
赞助方
Olivier Bachem、Jeff Dean、Zoubin Ghahramani、Raia Hadsell、Demis Hassabis、Prateek Jain、Armand Joulin、Koray Kavukcuoglu、Marc’Aurelio Ranzato、Oriol Vinyals
附录 A 相关工作
A.1 文本的连续扩散模型
尽管离散扩散模型仍然非常有效,但最近的进展表明,连续方法和混合方法正在复兴。像 Embedded Language Flows 这样的流匹配框架已经证明,通过放弃逐步的 token 监督,并在最终离散化步骤之前保持在不受限制的连续嵌入空间中,连续模型可以大幅超越离散基线(59)。在这一连续范式的基础上,针对离散数据的流映射(flow maps)的最新进展表明,通过将训练动态与概率单纯形的几何结构对齐,这些生成轨迹可以被压缩为单步映射,从而在一步或几步内实现高质量的并行语言生成(70;96)。类似地,利用预训练上下文自编码器(例如 Cosmos、TEncDM)的模型将文本映射到压缩、平滑的潜在空间中,高斯扩散可以在其中高效运行而不会产生舍入误差,从而提供一个非常适合高级引导技术的连续流形(52;88;110),而最近的一些方法(如超球面流)则通过在超球面上旋转 token 嵌入来避免高斯破坏,从而更好地匹配语言的几何结构(31)。其他混合框架,例如 CANDI(97),通过解耦离散和连续破坏来解决将高斯噪声应用于离散数据时的“时间失调”问题,使模型能够同时学习条件结构和连续几何。与此同时,Score Entropy Discrete Diffusion 通过应用连续时间马尔可夫链来学习离散数据分布的概率比率,从而弥合了这些领域之间的鸿沟(83)。这些突破表明,连续文本扩散最初的失败可能源于次优的空间几何和限制性的训练目标,而非模态本身的固有限制。
A.2 投机解码
投机解码(72;13;132)通过利用一个较小的草稿模型来提出 token 序列,再由一个较大的目标模型并行验证这些序列,从而降低服务延迟。整体延迟取决于草稿模型和目标模型两者的生成时间。AR 草稿模型(76)从根本上受到顺序生成的限制:提高草稿质量需要更多参数,这会增加每个 token 的延迟,并削弱端到端的收益。Medusa(9)等并行草稿模型通过一次性生成多个 token 来规避这一问题,但它们是独立生成的,导致接受率并非最优。基于扩散的草稿模型通过转而建模草稿 token 上的联合分布,恢复了 token 间的依赖关系。TiDAR(80)使用单一模型进行基于扩散的草稿生成和 AR 验证——DiffusionGemma 也支持这种配置——而 DFlash(14)则使用单独的模型作为草稿模型。然而,它存在后缀衰减问题,即在草稿位置靠后时接受率下降(18)。DSpark(18)通过在并行主干之上添加一个轻量级 AR 模块来解决这一问题。相比之下,DiffusionGemma 作为一个独立的扩散模型运行,消除了验证瓶颈,并且能够扩展到比“先草稿后验证”方法更长的生成画布。
附录 B SDRL 训练前后的样本
为了说明我们 SDRL 阶段的影响,图 16、17 对比了 SFT 模型和最终检查点的代表性生成结果。它们展示了 SDRL 训练如何解决 SFT 基线中观察到的严重重复循环问题,使模型能够完成复杂的推理轨迹。
附录 C 额外的开源下游微调结果
在第 8 节中,我们描述了微调策略以及在数独求解上的主要结果。现在我们提供完整的训练方案以及 PubMedQA(65)的额外结果。
数独求解轨迹摘要。
在图 18 中,我们展示了一个成功求解数独谜题的轨迹摘要。
实用方案摘要。
表 7 总结了数独和 PubMedQA 中使用的关键超参数。完整的训练和评估代码可通过 Hackable Diffusion 适配器以开源形式获取。对于我们的 LoRA 策略,即更新所有线性层,在数独求解问题上使用秩 8,我们仅微调了 8M 参数。
案例研究:PubMedQA。
为了证明该方法在结构化推理之外的适用性,我们在 PubMedQA(65)上对 DiffusionGemma 进行了微调。PubMedQA 是一个生物医学问答基准,模型必须阅读医学研究摘要,并产生一个分类答案(是、否或可能)以及一段详细的解释性文字。模型仅在长任务上使用 BLEU 分数与参考解释进行对比评估,结果表明 DiffusionGemma 可以用最少的数据和算力,有效地适配到特定领域的自然语言生成任务。
| 模型 | 有效去噪步数 | 准确率(%) | BLEU |
|---|---|---|---|
| DiffusionGemma | 18.09 | 75.6 | 10.76 |
| + LoRA 微调 | 31.57 | 76.62 | 20.67 |
| 超参数 | 数独(LoRA) | 数独(全量) | PubMedQA |
|---|---|---|---|
| LoRA 秩 | 8 | — | 4 |
| 画布大小 | 256 | 256 | 128 |
| 画布数量 | 1 | 1 | 2 |
| 提示词长度 | 256 | 256 | 1024 |
| 批大小 | 2 | 8 | 2 |
| 峰值学习率 | |||
| 结束学习率 | |||
| 训练步数 | 8,000 | 2,000 | 2,000 |
| 优化器 | Adam | Adafactor | Adam |
| 学习率调度 | 带预热的余弦退火 | 带预热的余弦退火 | 带预热的余弦退火 |
| 预热迭代次数 | 400 | 100 | 100 |
| 权重衰减 | |||
| 最低硬件要求 | 2 块 A100 80GB | 8 块 A100 80GB | 2 块 A100 80GB |
附录 D 提示词格式
为支持复杂的多轮交互、多模态输入以及智能体工作流,该模型采用了一种基于 Jinja2 的结构化聊天模板。该模板利用专门的控件 token,将对话历史、系统指令和工具模式序列化为标准化的字符串格式。明确的格式设计确保模型能够准确区分用户输入、内部推理、工具调用和系统级上下文。以下是主要特性的概述,但完整细节请参阅实现文档66 6 https://huggingface.co/google/diffusiongemma-26B-A4B-it/blob/main/chat_template.jinja。
D.1 BOS 与 EOS 特殊 Token
与其他 Gemma 模型一样,每段对话必须以一个特殊的 BOS token 开头,该 token 不渲染任何文本,但对应整数 token 2。BOS 特殊 token 必须手动添加到分词后的输入之前,或者通常由分词器通过
`add_bos=True` 关键字参数自动添加。在另一端,当一次 block-AR 生成完成时,会以通常的特殊 token
`<turn|>` 结束,随后用 EOS token 进行填充。同样,EOS token 对应整数 1,但在去分词时也不渲染任何文本。
D.2 对话结构组织
该模板使用开闭标签严格划分对话轮次。
`<|turn>` 和
`<turn|>` token 分别封装单条消息,且开标签会附加具体的角色(例如,
`<|turn|>system\n`)。模型预期四种角色:
`user`、
`model`,以及
`tool`(用于工具调用响应)。
该模板通过解析内容数组中特定的媒体类型来原生支持多模态路由,并在适当位置向上下文流中注入
`<|image|>` token。在模型的前向传播中,这些 token 会被输入图像特征所替换,而非对应的 token 嵌入。
D.3 思考通道
与 Gemma 4 模型一样,DiffusionGemma 支持思考模式,可通过在系统指令中添加思考 token
`<|think|>` 来启用。启用思考后,模型会输出一个内部推理通道(技术上可能仍为空),随后给出最终答案:
重要的是,即使在
<|think|>token 未出现在系统指令中,模型仍会输出一个空的思考通道,如下所示:
channel
thought
channel
final
对于多轮对话,不要在对话历史中包含之前隐藏的思考内容。在下一轮用户输入之前,只包含最终的助手回复。
D.4 工具与函数调用序列化
模板中有很大一部分内容专门用于将类似 JSON 的工具模式解析并序列化为紧凑、节省 token 的格式。所有类似 JSON 的模式(例如工具定义或工具响应)都依赖自定义分隔符
<|"|>(而不是普通的
")以保证清晰性。
- topsep=0pt
<|tool>和
<tool|>:在系统提示词中用于定义可用的函数模式,包括其描述、参数和必需参数。
- topsep=0pt
<|tool_call>和
<tool_call|>:模型请求调用工具的格式为
<|tool_call>call:function_name{arguments}<tool_call|>。
- topsep=0pt
<|tool_response>和
<tool_response|>:外部工具返回的结果会以这些 token 包裹的形式追加到上下文窗口中,使模型能够在后续轮次中无缝整合外部数据。
附录 E Mercury 2 速度估算
估算数据。
由于 Mercury 2 (62) 是闭源模型,我们无法直接访问以生成 TPF 和 TPS 等速度指标。我们采用黑盒方法,通过查询 OpenRouter 的 API 77 7 https://openrouter.ai 并使用默认的最大序列(输入+输出)长度 50,000 来估算 TPS。我们进行了两轮独立的查询——第一轮在 2026 年 7 月 9 日至 10 日(7 月 11 日有少量重试),第二轮在 2026 年 7 月 25 日至 26 日之间——两轮测量得到的结果一致。每个 API 响应都包含以下元数据:
- topsep=0pt
输入 token 的数量(提示词分词);
- topsep=0pt
有多少提示词 token 被缓存(KV 缓存命中 vs. 全新预填充);
- topsep=0pt
总输出 token 数(分为思考 token 和答案 token);
- topsep=0pt
请求的墙钟时间(包括网络延迟和其他开销)。
响应元数据不包含生成速度的细分信息。我们通过最小二乘模型估算生成 TPS,详见下文。
估算模型。
我们通过非负最小二乘法(NNLS)拟合以下模型来估算每 token 的生成速度:
| (14) |
其中, 是需要全新计算的 token 数量, 是每 token 的预填充时间, 是每 token 的生成时间, 则捕捉每次请求的固定开销(网络延迟等)。根据拟合得到的 ,我们以 TPS 计算生成速度。非负约束反映了处理 token、生成 token 以及每次请求的开销只会增加时间这一事实。在实际操作中,我们会在查询之间禁用缓存。
为了捕捉生成速度中任何潜在的按任务差异(例如来自自适应计算方法),我们会在取算术平均值之前,先针对每个基准独立拟合方程 (14)。同样,对于开放权重模型,我们通过先测量每个任务的生成速度,再取算术平均值来计算综合 TPS 测量值。
速度估算。
我们针对图 1 的速度测量基于 GPQA-Diamond 和 LiveCodeBench-v6 数据集。对于 Mercury 2,我们使用上述方法估算每个任务的生成速度。图 19 显示了相应的分析结果;我们得到 GPQA Diamond 的 TPS 为 452.6,LiveCodeBench-v6 的 TPS 为 525.5,换算成平均速度为 489 TPS。
我们针对表 3 的速度测量基于七个基准,这些基准我们拥有所有模型的测量数据:AIME 2026、GPQA Diamond、HumanEval、LBPP、LiveCodeBench-v6、MGSM 和 Natural2Code。同样,对于 Mercury 2,我们会在取算术平均值之前,先分别对每个任务拟合我们的速度估算模型。图 20 和图 21 报告了相应的分析结果;我们得到高推理强度下的平均 TPS 估算值为 600 TPS,中等推理强度下的平均 TPS 估算值为 547 TPS。我们注意到,某些评估(尤其是 HumanEval 和 Natural2Code)存在异常值,这些异常值以极高的速度生成 50,000 个 token。这些异常值对我们的生成速度估算产生了略微有利的偏差,也解释了为什么高推理强度的 TPS 高于中等推理强度。这些异常值代表的是损坏的输出,即模型陷入思考循环,在未返回有效响应的情况下耗尽了最大生成长度。
Inception 报告称其产品在 NVIDIA Blackwell GPU 上达到 1000 TPS(每秒 token 数)88 8 https://www.inceptionlabs.ai/blog/introducing-mercury-2,检索于 2026 年 7 月 28 日。而 Artificial Analysis99 9 https://artificialanalysis.ai/models/mercury-2,检索于 2026 年 7 月 28 日。报告称在未公开硬件上中位数为 987 TPS。与我们估算的差异可能由多种原因造成——尤其是硬件不同、服务优化不同,和/或用于测量的数据集不同(由于自适应计算,这可能会产生很大影响)。值得注意的是,Artificial Analysis 也报告了显著的方差。我们的估算反映的是用户通过 OpenRouter API 体验到的平均速度。
附录 F 从 DiffusionGemma 采样的去噪轨迹
附录 G 关于文本扩散实际优势的更多内容
G.1 双向推理与自我修正
考虑图 23 中的青蛙过河谜题。这个例子凸显了逻辑推理中自我修正的必要性。提示词引入了一个具有欺骗性的数学陷阱——一个无限循环——而 AR 基线模型盲目地陷入其中,生成了自相矛盾的“是”。DiffusionGemma 的并行生成展现出截然不同的自我修正轨迹。虽然它最初对直观但错误的“是”赋予了高概率,但逻辑约束在序列中的双向传播使模型能够修正其立场,并在最终 token 采样之前干净利落地输出“否”。

G.2 关于动态与自适应计算的更多内容
为了具体展示文本扩散的自适应行为,我们在图 24 和图 25 中对比了一个结构上“困难”的生成任务与一个“简单”的任务。这两个任务都涉及生成由相同局部逻辑规则支配的二进制数字序列。然而,在结构困难的变体(图 24)中,每个新 token 严格依赖于其前面紧邻的两个已生成 token。这种因果依赖要求顺序推理,迫使模型主要以从左到右的方式解析逻辑。因此,扩散过程自适应地投入更多计算量,需要 7 步去噪才能完全解析该序列。但必须指出的是,即使在这个结构困难、顺序性强的问题上,DiffusionGemma 也仅用 7 步去噪就成功解码了整个 40 个 token 的序列(20 个二进制数字和 20 个分隔空格)——与 AR 模型所需的 40 个离散顺序步骤相比,这是显著的加速。
相反,“简单”的卷积变体(图 25)要求模型对静态提供的输入字符串应用完全相同的逻辑规则。由于消除了对模型自身动态输出的因果依赖,该任务缺乏序列结构。DiffusionGemma 立即利用其双向注意力并行独立地解析所有局部规则,使得整个输出序列仅需 4 步去噪即可同时收敛。


G.3 结构化与受约束输出
DiffusionGemma Technical Report
DiffusionGemma Team, Google DeepMind
Abstract
We introduce DiffusionGemma, an experimental open-weight language model that uses discrete diffusion to generate text at exceptionally high speed. Rather than decoding one token at a time, DiffusionGemma iteratively refines blocks of 256 tokens in parallel, avoiding the sequential decoding bottleneck of conventional autoregressive (AR) large language models. Instead of training from scratch, we obtain DiffusionGemma by fine-tuning the mixture-of-experts Gemma 4 model with 3.8B activated and 25.2B total parameters. Our compute-efficient two-stage training pipeline uses fewer than 10% of the starting AR model’s total training token budget. The first stage uses supervised fine-tuning to teach bidirectional denoising, while the second stage combines reinforcement learning with sampler distillation to jointly improve generation quality and inference efficiency. DiffusionGemma establishes a new Pareto frontier for the trade-off between generation speed and model capability. Averaged across our full evaluation suite, it generates around 20 tokens per forward pass and achieves roughly 1,500 output tokens per second on a single NVIDIA H100 GPU, which is substantially faster than AR models even with state-of-the-art speculative decoding. DiffusionGemma also retains the starting model’s support for thinking mode, multimodal inputs, and long contexts. Despite diffusion fine-tuning, it remains capable of AR generation with only minor performance degradation, suggesting a path toward hybrid diffusion-AR decoding.
1 Introduction
Autoregressive (AR) models dominate the current Large Language Model (LLM) landscape, but their strict left-to-right, token-by-token generation creates a problematic memory bottleneck. When serving many requests simultaneously, one can achieve acceptable throughput by batching, but serving single or low-concurrency requests is fundamentally memory-bound: time spent transferring model weights and context KV cache from memory to the accelerator far exceeds time spent on actual computation. This leaves the accelerator’s compute units under-utilized and limits per-user generation speed. Speculative decoding can improve utilization by drafting a candidate sequence, typically 8 tokens, from a small “drafter” model and feeding the draft to the LLM for verification (72; 13; 132). With a draft length of 8 this can produce 3-6 tokens per forward pass (TPF) (76). However, the draft-then-verify paradigm is still limited: on one hand, AR drafters are bottlenecked by sequential generation; on the other hand, parallel drafters—building on early blockwise decoding (119) and lookahead strategies (145)—exhibit declining acceptance rates at later draft positions (18).
Text diffusion circumvents this bottleneck by predicting entire blocks of tokens simultaneously (Figure 22), effectively shifting execution from a memory-bound regime toward a compute-bound one. Recently, there has been a surge of interest in text diffusion (28), with models like Gemini Diffusion (46), Mercury (61), LLaDA (91; 7), Seed Diffusion (118), and Nemotron-Labs-Diffusion (38). However, the current landscape forces a stark compromise between speed, intelligence, and accessibility. Some models, e.g., Gemini Diffusion and Mercury, are locked behind proprietary APIs. On the other hand, existing open-weights alternatives either exhibit limited reasoning capabilities and multimodal understanding, or fail to deliver on the extreme latency benefits promised by the diffusion technology, or both. Until now, there has been no text diffusion model that is highly intelligent, exceptionally fast, and openly accessible.
We introduce DiffusionGemma to bridge this gap. A finetuned text diffusion variant of the Gemma 4 26B A4B mixture-of-experts (MoE) model (41), the model establishes a new Pareto frontier in the intelligence-to-speed trade-off for generative text modeling (Figure 1). Notably, it extends the speed frontier beyond both prior text diffusion models and the Gemma 4 AR family across all parameter scales (from E2B up to 31B), even when the AR models are equipped with multi-token prediction (47; 25, MTP,), a state-of-the-art speculative decoding technique. To unlock this new speed-to-intelligence frontier, DiffusionGemma maximizes algorithmic efficiency by outputting blocks of 256 tokens simultaneously in around 12 forward passes. Put differently, DiffusionGemma generates on average 20 TPF—a step-change improvement over the 3-6 TPF that can be achieved by state-of-the-art speculative decoding methods. This massive reduction in total forward passes directly offsets the computational cost of the diffusion model’s heavier individual forward passes and as a result, DiffusionGemma yields generation speeds of around 1,500 tokens per second (TPS) on a single NVIDIA H100 GPU. Furthermore, early benchmarking by third-party inference providers such as 126 demonstrates these speeds can scale up to 2,000 TPS on the NVIDIA RTX 6000.
To avoid the prohibitive computational cost of pretraining it is common practice to initialize text diffusion models from pretrained AR models (50; 43). We warm-start DiffusionGemma from the final post-trained, publicly released weights of the Gemma 4 26B A4B MoE model (41). By adopting the same transformer backbone, we efficiently repurpose the AR weights to support both causal attention for context encoding and bidirectional attention for the diffusion process while inheriting their full capabilities. We employ a two-stage training pipeline (see Figure 2) that utilizes less than 10% of the AR model’s total training tokens:
- topsep=0pt
Supervised fine-tuning (SFT): We first run an SFT phase to adapt the model to attend to a context of clean tokens as well as denoising a block of 256 noisy tokens (as dictated by the diffusion process) with bidirectional attention across the block.
- topsep=0pt
Sampler distillation and reinforcement learning (SDRL): We then apply an online learning phase that simultaneously improves generation quality (by maximizing rewards) and unlocks ultra-low latency (by substantially reducing the number of forward passes).
By preserving features of its AR starting point, DiffusionGemma exhibits strong multimodal understanding, long-context capabilities, and thinking mode, enabling it to generate reasoning traces prior to responding. These are hallmarks of current frontier systems (40). Although adapting the model to the diffusion regime introduces a performance penalty compared to the original AR baseline, the massive gains in inference speed offer an entirely new operating point for latency-critical applications. DiffusionGemma retains the ability to generate text autoregressively. This dual mode opens up the possibility to route requests dynamically based on latency constraints and task complexity, as well as to employ hybrid decoding approaches.
| Total | 25.2B |
| Activated | 3.85B |
| Vision Encoder | 550M |
| Embedder | 740M |
| Self-Conditioning | 7.8M |
| Active / Total Experts | 8 / 128 |
| + 1 shared |
| Canvas Length | 256 |
|---|---|
| Sampler Maximum Denoising Steps | 48 |
| Adaptive Stopping Entropy Threshold | 0.005 |
| Token Selection Entropy Threshold | 0.1 |
| Temperature Schedule (Linear) | 0.8 0.4 |
Open-weights release.
We release DiffusionGemma with open weights under a permissive Apache 2.0 license, aiming to democratize access to state-of-the-art text diffusion technology. By providing full, unrestricted access to the model parameters, we hope to empower a diverse ecosystem of researchers, developers, and practitioners. For the research community, this transparent release provides a robust, white-box baseline to deeply probe the underlying mechanics of discrete diffusion, accelerating foundational research and pushing the theoretical frontier of text generation. For developers, the liberal licensing removes friction, ensuring seamless integration into both experimental prototypes and commercial applications without restrictive usage barriers.
Crucially, DiffusionGemma’s highly efficient architecture makes it an ideal foundation for rapid, domain-specific adaptation. By dramatically lowering the computational barrier to entry, the community can easily finetune ultra-fast, task-specific models tailored to their own unique use cases, even in environments with constrained compute budgets. This capacity for lightweight, rapid iteration has catalyzed immediate community adoption. Despite the model being available for only a few weeks at the time of writing, it is already serving as the engine for specialized downstream applications. These rapidly emerging use cases showcase the model’s versatility across highly diverse and demanding domains, spanning from multilingual automatic speech recognition (63) to interactive radiology report drafting in healthcare (127).
Outline.
The remainder of this technical report is organized as follows. Section 2 formalizes the discrete diffusion framework and the theoretical foundations of our approach. Section 3 details the DiffusionGemma architecture, including the bidirectional decoding mechanism and sampling algorithm. We then describe the two stages of our training pipeline: the SFT phase in Section 4, followed by our online learning phase combining sampler distillation and reinforcement learning in Section 5. Section 6 breaks down our low-level inference optimizations. Section 7 presents experimental results. Section 8 provides instructions and a practical example of finetuning DiffusionGemma for downstream applications. In Section 9, we showcase some practical advantages of text diffusion. Finally, we discuss limitations and known issues in Section 10, before concluding in Section 11.
2 Generative Text Modeling with Discrete Diffusion
Historically, LLMs have treated text generation as a strictly sequential process (6; 89; 48; 121; 128; 49). Classical AR language modeling factorizes the joint probability of a sequence of length into an exact product of conditional probabilities: , where indicates the token position in the sequence. While theoretically rigorous, this single-token factorization fundamentally limits generation speed on modern hardware accelerators due to severe memory-bandwidth constraints as well as strictly preventing the model from bidirectionally revising tokens based on future tokens (72; 109).
Diffusion models approximate the joint distribution by factorizing the generative process over a sequence of noise levels (a Markov chain) rather than strictly left-to-right spatial positions (112; 53; 117; 54), building upon foundational work in score-matching and continuous-time flow models (116; 113; 115; 87; 77; 24). During training, a forward process gradually corrupts clean data into random noise; a neural network is trained to learn the reverse denoising process. During inference, the model generates full sequences of data by iteratively refining the output sequence in parallel, starting from random noise.
Adapting diffusion to text requires handling the discrete nature of language (136). Early approaches adapt standard Gaussian diffusion to text by mapping discrete tokens into a continuous embedding space. These models differ primarily in how they map back to text: architectures like Diffusion-LM (75) and SED (120) produce continuous vectors that have to be forcibly projected or “rounded” back to discrete tokens, whereas methods like CDCD (33) maintain continuous processes but predict categorical logits directly to sample tokens. Regardless of the decoding mechanism, these formulations face theoretical and geometric challenges that ultimately limit their effectiveness compared to native discrete diffusion models. In particular, hard rounding operations fundamentally break exactness of diffusion likelihood bounds established by continuous-time and variational formulations (67) and the valid vocabulary tokens occupy an infinitesimally small fraction of a high-dimensional latent space. As a result, the reverse generative process often drifts into empty, “meaningless” regions of the space; when rounded to nearest token, these degenerate embeddings map to arbitrary, unrelated tokens and produce incoherent text (110; 88). To combat this spatial drift, methods have been developed to rely on per-step discretization mechanisms, but these generally underutilize the continuous space and restrict generative flexibility (59).
Discrete diffusion has emerged as a highly effective alternative (4; 105; 83; 143). This paradigm generalizes the single-step corruption heuristics of early bidirectional models into formal, multi-step Markov processes. The probabilistic transitions defined between categorical states in modern diffusion, such as absorbing mask states and multinomial distributions across the vocabulary, are direct descendants of masking and random token swapping introduced by BERT (32; 82; 107), as well as the plausible token replacements of ELECTRA (19). By operating directly on discrete states rather than continuous vectors, discrete diffusion avoids embedding projection mismatches entirely and offers better theoretical grounding for categorical transitions (39). DiffusionGemma builds upon this lineage of discrete diffusion to ensure high-fidelity token generation.
2.1 Probability Paths and Denoising
To formalize our discrete diffusion framework, we adopt the continuous-time Markov chain (CTMC) approach established in recent literature (10; 11; 39). Let define a categorical token vocabulary of size . We refer to the sequence of tokens undergoing iterative refinement as the canvas, with a length of . A realization of this canvas at time is denoted by the vector . We construct a marginal probability path to smoothly interpolate between a clean data distribution at time and a fully corrupted source canvas at time . At the start of this path, the clean tokens are defined as , which ultimately transition into the fully corrupted state . Here, denotes the uniform prior over the joint state space, where each of the tokens is independently uniformly distributed over . This corruption process parallels the explicit transition matrices—such as uniform noise or absorbing masking—commonly utilized in order-agnostic discrete diffusion models (55). By operating in continuous time, this framework bypasses the sequential, left-to-right decoding bottleneck of traditional AR models, allowing tokens across the entire canvas to be processed and refined in parallel.
2.1.1 The Forward Process
The forward process dictates the transition from clean text tokens to uniformly distributed tokens. Conditioned on a fixed clean starting canvas , the forward transition probability path factorizes independently over each token coordinate :
| (1) |
where is a smoothly varying, monotonically decreasing noise schedule from to , and represents the Kronecker delta. In practical terms, as time progresses toward , each token is increasingly likely to be replaced by a token sampled uniformly at random from the vocabulary (56; 4). We use this closed-form forward process to generate training data from clean text.
2.1.2 The Backward Denoising Process
To reconstruct data from noise, we learn a reverse process to undo this categorical corruption. Discrete flow matching theory shows that to perfectly reverse the forward trajectory, we need to infer the conditional distribution of the original uncorrupted tokens given a corrupted state (11; 39; 93). For a given realization , stepping backward in time by a small increment is governed by some transition mapping, which we denote , which outputs the probability distribution for the next intermediate step11 1 As a typical example, the function can be instantiated as a discrete Euler update step introduced in 39, in which with .:
| (2) |
To compute this update, we need the true posterior distribution of clean tokens given a noisy state, . We approximate this posterior with a neural network . During generation, we use this approximation to sample the next token state: .
Figure 3 presents a highly stylized example to illustrate this reverse sampling trajectory within a simplified two-token canvas (). As time runs backward from to , the model smoothly shifts probability mass away from a uniform noise distribution (e.g., around “blue moon”) toward valid data modes. Concurrently, individual sequence coordinates undergo continuous-time jump transitions—visualized by the step-by-step path from “blue moon” at , to “dark cloud” at , and finally landing on a high-probability mode like “red sunset” at . This highlights how parallel dimensions coordinate over time without requiring sequential left-to-right generation.
Because this denoising process is factorized, it assumes conditional independence during individual reverse steps. A newly updated token at position is conditioned globally on the current noisy canvas , but it cannot see the simultaneous sampling choices made at other positions (). This structural tradeoff can occasionally introduce local inconsistencies or conflicting grammatical predictions. In the next section, we counteract these uncoordinated mechanics directly through our self-conditioning architecture and entropy-bounded sampling strategies.
3 The DiffusionGemma Architecture
The DiffusionGemma architecture functions as an encoder-decoder transformer (128) with shared weights . Rather than pretraining a diffusion model from scratch, we initialize our model with the publicly released Gemma 4 26B A4B MoE checkpoint (41). Tying our architecture to an existing AR backbone is a pragmatic choice that trades off absolute generation quality for a substantial reduction in the computational cost of training. This initialization also allows us to inherit the base model’s advanced features—such as its extended context window and native multimodal understanding. Moreover, our experiments demonstrate that our final model weights retain the ability to be sampled from autoregressively (see Table 3).
The remainder of this section details how DiffusionGemma uses this architecture to generate text at inference time. We break this process down into three components: the block-autoregressive decoding strategy for handling long sequences (Section 3.1), the general framework for denoising individual canvases (Section 3.2), and a specific entropy-bounded sampler (Section 3.3).
3.1 Block-Autoregressive Generation
The discrete flow matching formulation introduced in Section 2 operates on fixed-length sequences. To generate open-ended text, we use a block-AR generation strategy. The model denoises a canvas of 256 tokens at a time, and once a canvas is fully denoised, it is committed to the sequence history, and the model begins denoising the next canvas.
KV cache initialization.
As illustrated in Figure 4, the first step in block-AR generation is to encode the context, , into a KV cache . The context includes system instructions and user prompts of maximum token count .22 2 In practice, also includes interleaved multimedia embeddings which are not part of the token vocabulary. We write the encoding as
| (3) |
where is the transformer forward pass with weights and causal attention masking.
Canvas denoising conditioned on KV cache.
By cross-attending to the KV cache , canvas generation can be conditioned on system instruction, user inputs and past responses. Canvas generation starts from a canvas of uniformly random tokens and is iteratively denoised using the process described in Sections 3.2 and 3.3. Once a canvas is fully denoised,33 3 A canvas is fully denoised either by reaching or by the adaptive stopping condition described in Section 3.3. denoted by , its keys and values are appended to the KV cache (depicted in red in Figure 4):
| (4) |
We repeat this denoising process for subsequent canvases until the model generates a special token marking the end of the model’s turn, after which all canvases are concatenated into a final response. Since we use causal attention in the encoder, it lets the encoder update the KV cache by appending only the newest canvas. This constitutes an architectural inversion of standard encoder-decoder models such as BART (73) or T5 (100). Whereas those models utilize a bidirectional encoder for context and a causal decoder for generation, our approach utilizes a causal encoder for the sequence history and a bidirectional decoder for the diffusion-based canvas generation. This causal encoding prevents early context tokens from attending to the latest canvas, but it eliminates the need to re-encode the growing context from scratch, making our approach scalable to long reasoning generations and yielding a structural blend of diffusion and AR generation. This block-AR strategy was developed by our group in an unpublished June 2023 manuscript; analogous approaches to blockwise sequence modeling and KV caching were independently developed by 131, 2, and 30.
3.2 The Denoising Framework at Inference
Canvas initialization.
To generate a canvas, we iteratively refine it over a maximum of denoising steps, with step size . Let denote the corrupted canvas at step . We initialize the process at with a canvas of uniformly random tokens from the vocabulary .
The decoder forward pass.
At each step , we apply the transformer with the shared weights as a decoder, written as , to predict the probability distribution of the clean tokens. The decoder takes three inputs: the current noisy canvas , the context KV cache , and a continuous self-conditioning signal that feeds the model’s previous predictions back into itself (17; 120; 66). Using bidirectional attention across the canvas tokens and cross-attention to the KV cache, the decoder outputs the unnormalized logits :
| (5) |
The denoising iteration.
At each iteration, we compute the logits and evaluate the clean token probabilities , update the self-conditioning signal for the next step, and sample the refined canvas:
| (6) | ||||
Here, is the token embedding matrix and is a standard feedforward network. The time-dependent temperature can sharpen the model’s predictions before we calculate the final transition probabilities. A transition mapping , as described in Equation (2), computes the categorical distribution used to sample the updated canvas , which, along with the new self-conditioning signal , is then fed into the next denoising step. Section 3.3 details our specific choices for transition mapping and the temperature .
Multinomial diffusion.
Our denoising iteration (Equation 6) uses multinomial (or uniform) diffusion rather than masked diffusion (56; 4). Because all tokens can transition between one another, the model can continuously correct its own errors: tokens accepted during earlier denoising steps () within the current canvas can still be revised. However, we note that tokens from previously generated canvases are permanently frozen.
Remark on interpretability.
Recent interpretability analyses demonstrate that while the self-conditioning signal introduces a continuous latent space injection into the sequence, these intermediate self-conditioning vectors map robustly to an interpretable token bottleneck, preserving the model’s algorithmic transparency (35; 3).
3.3 The DiffusionGemma Sampler
In contrast to AR generation, which relies on rigid heuristics like temperature, top-, and top-, diffusion modeling introduces a vastly richer sampling design space that includes discrete predictor-corrector mechanisms and multi-step solvers (74; 27; 78; 134; 104). Framing text generation as an iterative temporal process allows us to decouple the inference-time algorithm from the underlying architecture, granting fine-grained control over the trade-off between computational cost and generation quality.
While we described the overall approach of canvas denoising in Section 3.2, this subsection details a specific instantiation: the entropy-bounded sampler (5) with temperature annealing and adaptive stopping (Algorithm 1). While this is our default and recommended sampler, DiffusionGemma is modular and is not strictly bound to this exact sampling configuration for high-quality inference.
Entropy-bounded token refinement.
After producing the marginal distributions with the denoiser and applying temperature scaling (detailed below), tokens are sampled from the resulting probability distribution. We employ an entropy-bounded sampler (5), whereby tokens are accepted in rank order from lowest to highest entropy (similar to the MaskGIT decoding scheme by 12), ensuring that their mutual information bound remains strictly below a predefined error tolerance threshold (). Once the threshold is attained, all other tokens are renoised uniformly at random, maintaining these uncommitted positions as a uniform prior to force local exploration during the next forward pass.
Temperature annealing.
To balance rate of convergence and linguistic diversity, token probabilities are artificially sharpened via tempering. A temperature is annealed linearly from an initial value of down to across the fractional denoising timescale . While static temperature adjustments are traditionally used to truncate the unreliable tail of token distributions and prevent text degeneration, this dynamic annealing ensures that the model explores diverse token possibilities in early, highly-noised states and aggressively commits to high-confidence sequences as the semantic structure crystallizes (141).
Adaptive stopping heuristic.
To optimize inference efficiency, the sampler dynamically halts the denoising process based on the model’s step-wise uncertainty, strictly capping iterations at . This early termination is triggered when two conditions are simultaneously satisfied:
- topsep=0pt
Confident predictions: The mean predictive entropy across the entire canvas falls below a predefined threshold ().
- topsep=0pt
Stable predictions: The deterministic sequence predictions (i.e., the most likely tokens) from two consecutive denoising steps are identical.
By successfully bypassing redundant refinement steps, this mechanism allows the model to dynamically scale its inference-time compute to the complexity of the prompt. As illustrated in Figure 5, instead of exhausting the maximum budget, the model averages approximately effective denoising steps (defined in Section 3.4) across the downstream evaluations shown in the figure. This yields a reduction in overall latency without sacrificing generation quality. Furthermore, the boxplots reveal distinct convergence profiles across domains: the model tends to deploy fewer steps for structured tasks like code and more for natural language. Moreover, it is not only the domain, but also the task complexity that dictates this behavior; for instance, harder code problems (e.g., LiveCodeBench) naturally require more steps to converge than easier ones (e.g., HumanEval).
3.4 Inference Efficiency Metrics
Because adaptive stopping turns the number of denoising steps into a random variable, we introduce a set of metrics to quantify denoising inference efficiency. Let be the total number of canvases generated, be the number of denoising steps executed for the -th canvas, and be the number of valid tokens produced in that canvas (i.e., all tokens, or up to the first end-of-sequence token if one is generated). First, we define the Total Tokens as the sum of all valid tokens generated across the entire sequence:
| (7) |
We define the Total Denoising Steps as the absolute number of denoising steps executed across the entire generation:
| (8) |
Since each denoising step incurs a fixed computational cost, the Total Denoising Steps is the primary driver of end-to-end generation latency. However, because this absolute metric inherently scales with the total sequence length, we also evaluate a normalized measure of model efficiency. We define the Effective Denoising Steps as the token-weighted average of steps across all canvases:
| (9) |
We weight by the number of valid tokens to prevent the metric from being downwardly biased by the final canvas, which tends to require fewer denoising steps when it is only partially filled. Note that without adaptive stopping, the Effective Denoising Steps metric always reduces to the denoising budget . Finally, we calculate the Tokens Per Forward (TPF):
| (10) |
where the term accounts for the single additional forward pass required between canvases to encode the newly generated clean tokens and append their key-value pairs to the KV cache.
3.5 Retained Autoregressive Capability
Because DiffusionGemma shares the exact same transformer architecture as Gemma 4, the final DiffusionGemma weights can be seamlessly loaded back into the original architecture to perform standard AR generation using causal attention, exactly as the base model does. As demonstrated in Section 7, Table 3, the model maintains robust capabilities in this setting; its performance scores in AR mode land squarely between those of DiffusionGemma’s primary text diffusion mode and the baseline Gemma 4 checkpoint from which DiffusionGemma was initialized.
4 Supervised Finetuning
We start from the publicly released Gemma 4 26B A4B (41) checkpoint and run an extended finetuning phase where the model adapts to predicting blocks of 256 tokens from noisy inputs. We use a block-diagonal attention mask, enabling bidirectional attention within each block without allowing the model to condition on other denoising blocks. For a given canvas, the model conditions on the prompt and previous (uncorrupted) tokens via the encoder KV cache. We use discrete multinomial diffusion as our corruption process and uniformly sample noisy tokens from the vocabulary (56; 4). For a given canvas, we sample a noise level and noise each token in the canvas with probability . Given a clean context of prompt and previous canvases (encoded through the KV cache), a self-conditioning signal , and a noisy canvas , the model is trained to minimize the cross-entropy loss between its predictions and the ground-truth canvas extracted from the training data (39):
| (11) |
where superscript denotes indexing along the canvas dimension; is parameterized via a softmax transformation over the neural network’s output logits. As shown in Figures 6 and 7, denoising performance improves rapidly within the initial steps of training, after which it settles into a log-linear performance improvement trend. Thinking performance benefits from extended SFT, as the model initially struggles with maintaining coherent reasoning traces, often collapsing into stuttering or cycles—a common challenge for internalizing reasoning in language models (140).
5 Sampler Distillation & Reinforcement Learning
Following the SFT stage, the model achieves strong generation quality when using a high number of denoising steps. However, its performance on advanced reasoning and coding tasks is somewhat poorer than the baseline AR model. More critically, when operating in the few-step regime required for ultra-low latency inference, generation quality collapses. To address this, we target a dual improvement: pushing the model’s intelligence while simultaneously compressing its denoising trajectory.
Traditionally, achieving these two goals requires a decoupled, multi-stage pipeline that treats reward-driven alignment and sampler distillation as distinct phases. We bypass this with a unified online learning stage, coined sampler distillation & reinforcement learning (SDRL), which optimizes both axes concurrently. Relying on a joint objective, a single gradient update drives:
- topsep=0pt
- topsep=0pt
Training setup.
We adapt the data distribution used by the Gemma 4 RL recipe (41) for our use case. Encompassing both thinking and non-thinking modes, our setup targets improvements across a variety of capabilities such as helpfulness, mathematical reasoning, coding and instruction-following. Initialized from the SFT weights, the model acts as an online teacher that generates denoising trajectories (using a sampler configured with high maximum denoising steps and mild temperature annealing) to establish a high-quality reference. The SDRL joint objective uses these trajectories to simultaneously maximize reward and drive sampler distillation in order to compress the model’s highest-quality output into the few-step regime.
Training dynamics & implicit curriculum effect.
Over the course of SDRL training, two synergistic dynamics emerge, as shown in Figure 8. First, the online teacher’s average reward steadily increases, reflecting improved fundamental capabilities. Second, facilitated by the adaptive stopping mechanism, the online teacher progressively requires fewer effective denoising steps to achieve these high rewards. This acceleration occurs because the SDRL objective systematically reduces the predictive entropy of the model. Crucially, the interplay between the reward objective and adaptive stopping induces a curriculum learning effect. Early in training, high predictive entropy delays the adaptive stopping trigger. As the model’s confidence improves and entropy drops, adaptive stopping triggers earlier. This seamlessly shifts the training distribution toward ever shorter denoising trajectories, allowing the algorithm to dynamically pace its own sampler distillation. Consequently, and in contrast to RL for AR models, prolonging the SDRL phase remains highly beneficial even after the reward metric plateaus; continued entropy reduction translates directly into further inference speedups.
Improved speed-to-intelligence Pareto frontier.
As illustrated in Figure 9, SDRL training significantly expands the Pareto frontier established by the SFT checkpoint. On the quality axis, it yields a 10-point improvement on the combined GPQA-Diamond and LiveCodeBench-v6 score. On the efficiency axis, it quadruples the TPF from 5 to nearly 20, unlocking ultra-low latency inference.
As shown in Figure 9, evaluating the SFT checkpoint with the default DiffusionGemma sampler (maximum of denoising steps) results in poor downstream accuracies and artificially low effective denoising steps. This counterintuitive behavior stems from the SFT model frequently degenerating into repetitive token loops in this restricted-step regime. Once it falls into a loop, its predictive entropy collapses, which prematurely triggers the adaptive stopping mechanism. Figures 16 and 17 (Appendix B) provide generated samples on the GPQA-Diamond benchmark that illustrate how these degeneracies manifest: the SFT model begins with a valid, logical reasoning trace but suddenly collapses into a token repetition loop. In contrast, the samples post-SDRL avoid these degenerative traps to sustain coherent reasoning at minimal latency.
SDRL specialization in the few-step regime.
For the SFT checkpoint, downstream performance scales consistently with the maximum number of denoising steps up to 192, at which point denoising is roughly any-order autoregressive. Following SDRL, the scaling behavior improves faster in and plateaus earlier: performance improves steadily up to , but exhibits diminishing returns thereafter (Figure 10). This early saturation emerges because the SDRL objective explicitly specializes the model for the few-step regime by aggressively minimizing predictive entropy.
Emergent conciseness.
An emergent property of our SDRL optimization is that it encourages the model to produce concise, token-efficient outputs. This contrasts with RL for AR models, which often maximizes reward by inducing longer reasoning traces. Our final checkpoint produces generations nearly shorter than the SFT checkpoint (Figure 9). While this means the model forgoes some capability gains typically associated with extended reasoning, it acts as a multiplier on inference speed gains. Compounding fewer total tokens with fewer effective denoising steps per canvas directly drives exceptionally low end-to-end latency: DiffusionGemma requires less than of the total forward passes used by the Gemma 4 AR baseline across our eval suite.
6 Inference Optimizations
The preceding sections focused on maximizing the number of tokens produced per forward pass through our SFT and SDRL pipeline. We now turn to the complementary axis: minimizing the wall-clock cost of each forward pass through targeted GPU-level optimizations. Fundamentally, the throughput advantage of text diffusion over AR decoding is dictated by two competing quantities: on one hand, each denoising step decodes tokens, and thus requires times fewer forward passes than an AR baseline. On the other hand, because each forward pass processes a canvas of 256 tokens, each such step is times slower, and so the overall throughput relative to the AR baseline becomes . The forward pass overhead can be substantially reduced by hardware optimizations.
Low batch size serving.
While text diffusion inference requires more floating-point operations (FLOPs) per generated token than AR models, it relies on significantly fewer forward passes. Because LLM serving on modern hardware accelerators is typically memory-bound—largely dictated by KV cache capacity and memory bandwidth (69; 95)—this reduction in memory transfers creates a latency advantage that outweighs the higher computational cost. As a result, text diffusion is highly effective in low-batch-size scenarios, leveraging available compute capacity to minimize per-request latency. For simplicity, our analysis focuses on the single-request inference throughput (a batch size of 1) of DiffusionGemma, comparing it directly to its AR counterpart, Gemma 4 26B A4B. Reference inference implementations are available in HuggingFace Transformers (45) and vLLM (124).
GPU time breakdown.
Figure 11 presents the per-step GPU kernel time breakdown for both models; we focus on GPU kernel time rather than end-to-end latency to isolate model-specific bottlenecks. For each model individually, end-to-end latency exceeds GPU kernel time by approximately 1 ms due to detokenization and other CPU-side serving overhead, with this gap being similar for both the Gemma 4 AR and DiffusionGemma models. Each DiffusionGemma step processes more tokens, yet is only slower than the single-token AR step. The time difference can be mainly attributed to three operations: mixture-of-experts (MoE), sampling, and attention. Other operations (e.g., shared expert, attention output projection, etc.) are at most slower.
- topsep=0pt
MoE. When serving a single request, the MoE layer computation is memory-bound, with its running time dominated by the transfer of expert weights from high-bandwidth memory, a well-documented bottleneck when serving sparse MoE models (101; 60). For the Gemma 4 AR model, only 8 unique experts are activated per token per MoE layer. For the DiffusionGemma model, on average, approximately 84 unique experts are activated per canvas of 256 tokens per MoE layer, as measured on the PG-19 benchmark (99).44 4 Dataset available at https://github.com/google-deepmind/pg19. Activating more experts per forward pass results in a slower MoE kernel. It is the same type of penalty incurred by verification in speculative decoding, but scaled to larger token parallelism. For a dense architecture, this overhead would be eliminated, reducing the per-step feed-forward network slowdown to less than .
- topsep=0pt
Sampling. Beyond AR’s single-token softmax-and-sample, text diffusion sampling requires additional operations, most notably a self-conditioning embedding matmul and softmax over the full canvas of 256 tokens (see Algorithm 1). These operations are performed in full precision with a vocabulary dimension of 262k. Consequently, text diffusion sampling takes 3.06ms while AR sampling takes only 0.56ms. We implement sampling using standard PyTorch primitives optimized with torch.compile, rather than hand-written GPU kernels, to facilitate easier extensibility by the community.
- topsep=0pt
Attention. Unlike AR, DiffusionGemma uses bidirectional attention over a canvas of 256 tokens. As such, we cannot utilize the fast single-token decoding attention available to AR models, but we can take advantage of the highly-optimized FlashAttention-4 kernel (23; 139). Under these optimizations, the attention operation is slower for the DiffusionGemma model than the Gemma 4 AR model.
Eliminating CPU-GPU synchronization.
There is additional complexity when serving DiffusionGemma: denoising steps depend on adaptive stopping and there are two types of forward passes (the denoising step and the KV cache update) that require different attention masks and that can occur within the same batch. To minimize request latency, it is important that this complexity is handled solely by GPU operations without triggering any additional CPU-GPU synchronization. This is achieved by extending asynchronous scheduling to the text diffusion models and introducing a per-sequence causal attention flag (see 124 for more details).
Throughput for batch size of 1 serving.
The decoding throughput for text diffusion models is calculated by the following formula:
| (12) |
where TPS is Tokens Per Second, TPF is Tokens Per Forward (see Equation 10), and is the time needed for a single denoising step, which varies with context length (due to attention). On an H100 GPU (FP8 precision), a single denoising step of DiffusionGemma takes on average (end-to-end; the per-step GPU time is 12.63ms, see Figure 11) when serving a single request with 4096 input tokens and 1024 output tokens. TPF varies depending on the task. Assuming a TPF of 19.74 (the average TPF across the 7 benchmarks reported in Table 3), the average decoding throughput of the model is 1456 TPS—a improvement over the Gemma 4 AR model (204 TPS) and a improvement over the AR model with MTP (303 TPS), on the same device setup.
Multi-user throughput.
Figure 12 shows the trade-off between total and per-user throughput of the Gemma 4 AR model (with MTP) and DiffusionGemma depending on the number of concurrent users (i.e., batch size). Importantly, these results are without targeted optimization for batch sizes larger than 1: current kernel selection is suboptimal, and sampling has not been tuned to scale with batch size; for example, applying top- truncation to the sampling step is expected to yield significant throughput gains at higher batch sizes with negligible impact on output quality. Despite this, DiffusionGemma offers substantially higher TPS per user and higher total throughput than the Gemma 4 AR (MTP) model in the low batch size regime, with AR models beginning to gain a throughput advantage only at moderate batch sizes (around 32 concurrent requests).
Toward real traffic throughput.
Compared to the AR equivalent, DiffusionGemma changes the compute characteristics of two transformer layers: for the attention layer, it performs TPF fewer transfers of KV cache; for the MoE layer, it performs proportionally more FLOPs (scaling with the number of effective denoising steps). This has the potential to address one of the challenges in modern LLM serving: memory-bound attention limiting compute utilization in FFW/MoE layers (148; 123; 149), which is particularly relevant for agentic workflows with long context. DiffusionGemma effectively trades data movement for compute, which is favorable on modern GPU hardware where compute-to-bandwidth ratios continue to grow; a thorough empirical analysis under realistic traffic conditions is beyond the scope of this work.
7 Experimental Results
We evaluate DiffusionGemma’s capabilities and inference efficiency across four operational modes: text diffusion (TD) versus autoregressive (AR) generation, each evaluated with and without thinking enabled; unless otherwise specified, TD with thinking is enabled. We benchmark the model against its AR initialization (Gemma 4 26B A4B), contemporary open-weight text diffusion models (LLaDA 2.1 Flash 100B and Nemotron Diffusion 14B), and the proprietary Mercury 2 API.
We consider a diverse suite of benchmarks spanning core domains such as mathematical reasoning, code generation, general knowledge, multimodal understanding, and instruction following alongside agentic capabilities. Specifically, for mathematical reasoning, we utilize AIME (26), GSM8K (21), MGSM (111), Putnam (125), and HiddenMath (internal). Coding performance is measured against LiveCodeBench-v6 (64), Codeforces (98), HumanEval (16), BigCodeBench (150), LBPP (v2) (86), and Natural2Code (internal). Broad and expert-level general knowledge is measured against GPQA-Diamond (103), BIG-Bench (122), MMMLU (92), and MMLU-Pro (130), while multimodal reasoning is evaluated on MMMU-Pro (138). Finally, strict instruction following is assessed via IFEval (147), and agentic task completion is evaluated through the Tau-bench suite, encompassing the Retail, Airline, and Telecom environments (133).
The complete per-benchmark results for all models and inference configurations are reported in Table 3. Table 4 provides a complementary analysis of DiffusionGemma’s decoding efficiency, reporting Tokens Per Forward (TPF; Equation 10), Tokens Per Second (TPS; Equation 12), effective denoising steps (Equation 9), total generated tokens (Equation 7), and end-to-end generation latency, excluding prefill time. For a higher-level comparison, Figure 13 groups the benchmarks into three capability areas—reasoning and knowledge, coding, and instruction following and agentic behaviour—and reports the unweighted mean of the 0–100 benchmark scores within each area, together with output throughput. A model is shown for a capability area only if it completed every constituent benchmark; missing bars therefore indicate incomplete benchmark coverage rather than a score of zero. Hatched bars denote the no-think variants.
DiffusionGemma sets a new performance frontier for text diffusion models, substantially outperforming existing open-weight diffusion baselines while increasing TPF by approximately an order of magnitude. In terms of quality it is highly competitive with Mercury 2, a closed-weight text-diffusion model, while reaching roughly 1,500 output tokens per second on a single previous-generation H100 GPU, a roughly speedup over Mercury 2.
Relative to the AR model used for initialization, DiffusionGemma in text-diffusion (TD) mode trades some absolute benchmark performance for substantially greater decoding speed. Although the conversion reduces performance across the three capability areas, TD mode delivers nearly the output throughput of the original Gemma 4 AR baseline under heavily optimized MTP serving: 1,479 tokens per second compared with 303 tokens per second. The two-stage training pipeline nevertheless retains support for autoregressive decoding. When run in standard left-to-right AR mode, DiffusionGemma recovers part of the performance gap observed in TD mode and narrows the capability gap to the original baseline, albeit at lower throughput. This dual-mode capability could enable requests to be routed dynamically according to latency requirements and task complexity.

* Benchmarks are grouped into: reasoning and knowledge (AIME 2026, GPQA Diamond, BigBench EH, GSM8K, MGSM, MMMLU, Putnam, MMLU-Pro, and HiddenMath); coding (LiveCodeBench V6, HumanEval, BigCodeBench, LBPP, and Natural2Code); and instruction following and agentic behaviour (IFEval, Tau2 Retail, Tau2 Airline, and Tau2 Telecom).
| Open-weight Models | Closed-weight Model | |||||||||
| DiffusionGemma | Gemma 4 | LLaDA 2.1 Flash | Nemotron Diffusion | Mercury 2 | ||||||
| 26B A4B | 26B A4B | 100B | 14B | Unknown | ||||||
| Mode | TD | TD (No-think) | AR | AR (No-think) | AR (MTP) | AR (MTP, No-think) | TD (S Mode) | TD (Diffusion Mode) | High | Medium |
| AIME 2026 | 69.1 | 50.8 | 84.2 | 57.5 | 88.3 | 80.0 | 80.0 | 40.0 | 91.7 | 82.5 |
| GPQA Diamond | 73.2 | 64.6 | 79.8 | 67.2 | 82.3 | 73.7 | 68.7 | 47.0 | 75.2 | 66.7 |
| LiveCodeBench-V6 | 69.1 | 60.6 | 71.4 | 58.3 | 77.1 | 72.6 | 39.4 | 28.6 | 79.4 | 74.9 |
| Codeforces ELO | 1429 | 959 | 1569 | 1059 | 1718 | 1529 | 718 | - | 1986 | 1629 |
| BigBench EH | 47.6 | 40.0 | 59.1 | 42.2 | 64.8 | 56.2 | - | - | 48.9 | 43.8 |
| GSM8K | 96.3 | 95.8 | 96.6 | 96.1 | 96.7 | 96.4 | 45.0 | - | 96.5 | 95.8 |
| MGSM | 84.8 | 80.7 | 87.9 | 84.3 | 92.9 | 91.5 | 6.8 | 69.3 | 91.9 | 91.2 |
| MMMLU | 81.5 | 76.3 | 82.2 | 78.0 | 86.3 | 78.0 | - | - | 81.9 | 80.6 |
| MMMU Pro | 54.3 | 66.0 | 63.3 | 66.7 | 73.8 | 72.5 | - | - | - | - |
| Putnam | 67.4 | 57.1 | 74.7 | 59.7 | 81.0 | 72.9 | - | 45.8 | 73.6 | 73.6 |
| HumanEval | 94.5 | 92.7 | 98.2 | 97.6 | 98.8 | 97.6 | 90.2 | 86.0 | 98.2 | 98.2 |
| BigCodeBench | 46.0 | 41.9 | 47.7 | 45.9 | 50.2 | 48.1 | - | 33.5 | 47.6 | 45.3 |
| LBPP | 81.0 | 68.9 | 86.3 | 74.1 | 89.5 | 77.3 | 45.7 | 40.7 | 89.2 | 85.0 |
| IFEval | 97.4 | 94.5 | 97.2 | 95.7 | 98.7 | 97.8 | - | 72.1 | 97.0 | 94.5 |
| Tau2 Retail | 71.5 | 57.5 | 75.4 | 61.0 | 85.5 | 79.0 | - | - | - | - |
| Tau2 Airline | 69.0 | 49.0 | 72.0 | 50.0 | 76.0 | 51.0 | - | - | - | - |
| Tau2 Telecom | 28.1 | 32.0 | 33.8 | 32.0 | 43.0 | 34.2 | - | - | - | - |
| MMLU-Pro | 77.6 | 77.9 | 78.8 | 79.1 | 82.6 | 82.6 | - | - | 77.6 | 75.5 |
| Natural2Code | 94.0 | 90.1 | 96.2 | 92.3 | 96.3 | 94.7 | 86.9 | 73.3 | 79.1 | 71.3 |
| HiddenMath | 80.6 | 74.3 | 85.4 | 77.5 | 87.2 | 81.6 | - | 44.3 | 82.7 | 82.3 |
| Output Speed (TPS) | 1479 | 1512 | 204 | 204 | 303 | 303 | 375 | 49 | 600 | 547 |
| Tokens Per Forward (TPF) | 19.74 | 18.76 | 1.00 | 1.00 | 1.40 | 1.40 | 4.63 | 1.79 | - | - |
| Average Total Tokens | 4,001 | 829 | 5,184 | 1,025 | 7,207 | 1,816 | 4,371 | 941 | 3,882 | 1,222 |
| Score () | TPF () | TPS () | Effective DNS () | Total Forwards () | Total Tokens | E2E Time (s) () | ||||||||
|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|
| Benchmark | Think | No-Think | Think | No-Think | Think | No-Think | Think | No-Think | Think | No-Think | Think | No-Think | Think | No-Think |
| AIME 2026 | 69.1 | 50.8 | 19.3 | 16.7 | 1365.4 | 1333.0 | 12.6 | 14.1 | 390.6 | 91.1 | 6,445 | 1,309 | 4.72 | 0.98 |
| GPQA Diamond | 73.2 | 64.6 | 16.7 | 16.5 | 1207.8 | 1330.2 | 15.1 | 13.4 | 443.4 | 48.1 | 5,647 | 726 | 4.68 | 0.55 |
| LiveCodeBench-V6 | 69.1 | 60.6 | 18.5 | 16.9 | 1278.3 | 1333.4 | 13.8 | 14.0 | 581.8 | 195.7 | 7,534 | 1,847 | 5.89 | 1.39 |
| Codeforces ELO | 1429 | 959 | 15.1 | 14.0 | 950.5 | 1040.3 | 17.1 | 18.5 | 959.6 | 521.1 | 11,622 | 4,279 | 12.23 | 4.11 |
| BigBench EH | 47.6 | 40.0 | 20.8 | 17.7 | 1390.2 | 1415.1 | 11.9 | 12.8 | 434.9 | 68.1 | 9,062 | 1,233 | 6.52 | 0.87 |
| GSM8K | 96.3 | 95.8 | 23.2 | 24.1 | 1866.2 | 1966.4 | 9.1 | 7.5 | 43.4 | 13.2 | 883 | 298 | 0.47 | 0.15 |
| MGSM | 84.8 | 80.7 | 19.0 | 16.8 | 1526.7 | 1367.5 | 11.5 | 11.9 | 63.6 | 19.5 | 1,085 | 291 | 0.71 | 0.21 |
| MMMU Pro | 54.3 | 66.0 | 17.7 | 15.4 | 1351.3 | 1255.1 | 13.8 | 15.3 | 191.6 | 31.6 | 3,178 | 472 | 2.35 | 0.38 |
| Putnam | 67.4 | 57.1 | 18.1 | 16.0 | 1330.8 | 1282.4 | 13.4 | 14.4 | 303.8 | 77.4 | 4,725 | 1,103 | 3.55 | 0.86 |
| HumanEval | 94.5 | 92.7 | 23.0 | 24.3 | 1838.2 | 1981.2 | 9.4 | 8.0 | 55.6 | 14.3 | 1,174 | 305 | 0.64 | 0.15 |
| BigCodeBench | 46.0 | 41.9 | 19.6 | 19.4 | 1560.1 | 1579.0 | 11.3 | 10.1 | 77.3 | 21.8 | 1,410 | 394 | 0.90 | 0.25 |
| LBPP | 81.0 | 68.9 | 20.5 | 19.2 | 1509.8 | 1545.4 | 11.6 | 10.9 | 264.3 | 79.4 | 4,730 | 859 | 3.13 | 0.56 |
| IFEval | 97.4 | 94.5 | 17.2 | 9.0 | 1368.3 | 732.1 | 13.0 | 14.4 | 100.8 | 24.0 | 1,464 | 239 | 1.07 | 0.33 |
| Natural2Code | 94.0 | 90.1 | 21.1 | 21.0 | 1682.7 | 1706.5 | 10.5 | 9.6 | 70.5 | 24.7 | 1,391 | 465 | 0.83 | 0.27 |
| HiddenMath | 80.6 | 74.3 | 21.0 | 19.4 | 1591.2 | 1564.7 | 11.3 | 11.5 | 206.4 | 49.7 | 3,501 | 844 | 2.20 | 0.54 |
8 Open-Source Downstream SFT
Alongside DiffusionGemma, we release an open-source finetuning toolkit that allows practitioners to adapt the model to their own domain-specific datasets. We build on top of Hackable Diffusion (22), a modular open-sourced research toolbox for generative modeling. We provide Low-Rank Adaptation (LoRA) recipes (58) to enable finetuning on consumer hardware.
Finetuning procedure.
Our open-source SFT toolkit includes both a causal encoder and a diffusion decoder objective. Training sequences are of length where is the number of prompt tokens, is the number of canvases and is the canvas size. To compute the total loss, the encoder first processes all tokens in the entire sequence, populates a KV cache , and provides next token predictions that are fed into a standard cross-entropy loss for the encoder. The decoder loss is computed by uniformly sampling a canvas from the canvases available. For canvas , we evaluate a denoising cross-entropy loss using the decoder’s predicted logits given the current noisy state, , the KV cache for the prompt and any prior canvases in the sequence (i.e., canvas , , …, ); for of the data-points in a batch, the decoder is also conditioned on a self-conditioning state computed from a previous forward pass. The other have . Formally, we write the losses as
| (13) |
For the encoder loss, indexes along all tokens in the sequence (prompt and canvases); for the decoder loss, indexes along tokens in the given canvas. The final loss is the sum of the two losses.
LoRA for parameter-efficient finetuning.
LoRA is applied to all linear operations (attention projections, MLP gates, MoE routers, and the self-conditioning feedforward block). This allows us to achieve strong downstream performance while training only a small fraction of the model’s parameters, using 2 A100 80GB GPUs. All of our training details are reported in Appendix C.
| Model | Denoising Steps | Accuracy (%) |
|---|---|---|
| DiffusionGemma | 40.65 | 0.00 |
| + LoRA finetuning | 10.72 | 84.40 |
Case study: Sudoku puzzle solving.
Solving Sudoku puzzles is a compelling testbed for discrete diffusion due to the non-autoregressive nature of the task. We finetune DiffusionGemma on an open-source dataset of Sudoku puzzles.55 5 https://www.kaggle.com/datasets/rohanrao/sudoku With full finetuning, the sampler (Algorithm 1) achieves >85% puzzle-level accuracy evaluated on a held out set of puzzles (Figure 14). Decreasing the LoRA rank trades-off accuracy and compute. In Table 5, we report performance of the original model as well as the finetuned model. See Appendix C for additional results on PubMedQA (65).
9 Practical Advantages of Text Diffusion
In this manuscript, we have primarily emphasized low latency as the principal advantage of text diffusion over standard AR language modeling (42; 44; 75; 33). However, the architectural paradigm of text diffusion offers several benefits that extend beyond computational efficiency. Here, we demonstrate the practical advantages through concrete examples and qualitative analysis of samples generated by the model. To isolate the intrinsic capabilities of the architecture, we disable explicit thinking modes in both DiffusionGemma and the baseline Gemma AR model. This allows us to observe and evaluate the underlying generative process.
9.1 Bidirectional Reasoning and Self-Correction
AR next-token prediction is inherently causal; during the generation of a given token, the model can only attend to the preceding context. It fundamentally lacks the capacity to condition upon tokens that have yet to be generated. By contrast, text diffusion operates with full bidirectional attention across the canvas. This non-causal property allows tokens at arbitrary positions across the canvas to attend simultaneously to both past and future representations—a critical capability for complex planning and reasoning tasks where early decisions depend on eventual outcomes (94; 68; 142; 90, e.g.,). Consequently, locally within a canvas, future tokens can directly influence the formation of earlier tokens.
Because text diffusion employs an iterative refinement process, it possesses a built-in mechanism for self-correction. Any premature commitments generated in earlier denoising steps can be revised during subsequent denoising iterations (102; 51). While we have previously demonstrated the efficacy of bidirectional reasoning and self-correction in structured logic puzzles like Sudoku, we demonstrate these mechanics in two reasoning examples.
Consider the multi-step arithmetic problem detailed in Figure 15. Constrained by causal generation, the AR Gemma model must commit to the first token of the final answer before articulating the intermediate calculations. This forces an incorrect initial prediction () that the model must later correct. DiffusionGemma, conversely, leverages its bidirectional attention canvas to simultaneously evolve the final answer and its underlying logic. As visualized in the accompanying denoising trace, the parallel diffusion process explores incorrect intermediate states but uses the emerging reasoning tokens to course-correct, seamlessly converging on the correct answer (). See Appendix G.1 for the second example of logical reasoning and correction via bidirectional attention and denoising.

9.2 Dynamic and Adaptive Computation
Unlike AR models, which inherently allocate a fixed amount of computation per generated token, text diffusion facilitates dynamic test-time compute. Text diffusion models can autonomously calibrate the computational effort expended on a given prompt, trading increased inference time for enhanced generative performance based on the inherent difficulty of the task (135). DiffusionGemma automatically adapts to task difficult via adaptive stopping. As illustrated in Figure 5, tasks of varying complexity organically elicit different numbers of effective denoising steps. This allows the model to conserve compute on easier queries while expending more compute on complex reasoning. In Appendix G.2 we concretely illustrate the adaptive behavior of text diffusion by contrasting a structurally “hard” generation task against a structurally “easy” task and show that the easy task requires fewer denoising steps, as well as showing how the information propagates differently across the canvas of tokens in these two cases.
Furthermore, the maximum number of denoising steps serves as an explicit configuration parameter to manage the latency-quality tradeoff. A lower step count forces the model to traverse the reverse process more coarsely, yielding faster results with a corresponding reduction in output precision. Expanding the step count allows for a finer resolution during generation, maximizing quality while extending the required compute time. Figure 10 plots this continuous relationship, demonstrating how the model can be dynamically calibrated to suit varied operational constraints.
9.3 Structured and Constrained Outputs
In many practical applications, the desired output adheres to a rigid, highly structured format (e.g., JSON schemas) or exhibits strong lexical dependence on the input prompt, such as in optical character recognition (OCR), code editing tasks, or fine-grained syntactic control (15; 75). Because text diffusion generates and refines all tokens in parallel, it seamlessly exploits these structural priors to accelerate convergence. AR models lack this capability; constrained by strict sequential decoding, they must incur the same computational cost to generate tokens, even when those tokens consist of rigid boilerplate or verbatim copies of the input context. By contrast, DiffusionGemma can identify and lock in predictable syntactic structures across the entire sequence simultaneously. We highlight this efficiency through two real-world examples: strict JSON extraction (Appendix G.3, Figures 27 and 27) and Python code debugging (Appendix G.3, Figures 29 and 29). Both cases clearly illustrate that the highly constrained output allows the diffusion process to converge in merely two to three steps, drastically reducing latency compared to sequential decoding.
10 Limitations & Known Issues
In the previous section, we discussed new emergent properties of text diffusion and advantages of our approach relative to AR language modeling. While DiffusionGemma establishes a new Pareto frontier for generative text modeling and inference efficiency, the current experimental release has these known limitations:
- topsep=0pt
Performance gap relative to the AR baseline: Lower absolute performance than its AR initialization (Gemma 4 26B A4B) stems from several practical constraints: bypassing native diffusion pretraining to warm-start from AR weights; relying on a comparatively short SFT phase due to compute budget constraints; using an online learning algorithm (SDRL) that explicitly targets ultra-low latency, intrinsically trading off asymptotic performance; and inheriting architectural, optimization, and data-mixture decisions from the AR baseline that may be suboptimal for the discrete diffusion paradigm.
- topsep=0pt
Generation length and conciseness: As mentioned in Section 5, our final checkpoint produces highly concise outputs. While this emergent brevity acts as a multiplier for inference speed, it precludes the model from leveraging the quality improvements typically unlocked by longer, more elaborate reasoning traces.
- topsep=0pt
Occasional token stuttering: In rare instances, the model’s output degenerates into repetitive loops or localized stuttering (e.g., endlessly repeating a common token like “the the the”). While our SDRL training successfully mitigates the vast majority of such instances, this uncommon artifact remains a direct consequence of operating in an ultra-low latency regime, where the aggressively reduced number of denoising steps can occasionally compromise the robustness of the generation process.
- topsep=0pt
Occasional omission of closing thought tags in multimodal tasks: When processing multimodal prompts, the model does not always reliably generate a closing thought tag (even when the reasoning is correct). This can artificially drag down performance in thinking mode on specific benchmarks; for example, on MMMU-Pro, the thinking score drops below the non-thinking score (54.3 vs. 66.0). This was identified too late in the pipeline to apply a fix for this release.
- topsep=0pt
Throughput limits at high batch sizes: DiffusionGemma excels at low batch sizes by trading memory-bandwidth costs for compute, outperforming Gemma 4 AR (with MTP) in both per-user and total throughput for up to 32 concurrent users (Figure 12). Beyond this point, the higher per-token compute cost causes AR models to gain a throughput advantage. As noted in Section 6, these results are obtained without targeted batch-size optimization; a thorough empirical analysis under realistic traffic conditions remains future work.
11 Conclusion
DiffusionGemma demonstrates a practical, compute-efficient path to ultra-fast text generation. By finetuning the existing Gemma 4 26B A4B AR model to perform text diffusion through our two-stage training pipeline (SFT and SDRL), it establishes a new Pareto frontier for the speed-to-intelligence tradeoff—achieving around 1,500 tokens per second on a single H100 while retaining highly competitive reasoning and multimodal capabilities. By releasing DiffusionGemma as an experimental open-weight model—alongside reference implementations in HuggingFace Transformers and vLLM—we aim to empower the open-source community to push the boundaries of text diffusion. We hope researchers and practitioners will build upon this approach, whether by finetuning for specialized tasks, exploring novel sampling algorithms, or further optimizing inference efficiency.
References
- Abramovich et al. (2026) T. Abramovich, M. Ashkenazi, I. Putterman, B. Chislett, T. Mitra, B. D. Rouhani, R. Zilberstein, and Y. Geifman SPEED-Bench: a unified and diverse benchmark for speculative decoding. In Proceedings of the International Conference on Machine Learning, Cited by: Table 3, Table 3.
- Arriola et al. (2025) M. Arriola, A. K. Gokaslan, J. T. Chiu, Z. Yang, Z. Qi, J. Han, S. S. Sahoo, and V. Kuleshov Block diffusion: interpolating between autoregressive and diffusion language models. In Proceedings of the International Conference on Learning Representations, Cited by: §3.1.
- Asaria et al. (2026) A. Asaria, T. Salomone, and D. Gandhi Neither parallel nor sequential: how DiffusionGemma actually commits tokens. arXiv preprint arXiv:2606.14620. Cited by: §3.2.
- Austin et al. (2021) J. Austin, D. D. Johnson, J. Ho, D. Tarlow, and R. Van Den Berg Structured denoising diffusion models in discrete state-spaces. In Advances in Neural Information Processing Systems, Cited by: §2.1.1, §2, §3.2, §4.
- Ben-Hamu et al. (2026) H. Ben-Hamu, I. Gat, D. Severo, N. S. Nolte, and B. Karrer Accelerated sampling from masked diffusion models via entropy bounded unmasking. In Advances in Neural Information Processing Systems, Cited by: §3.3, §3.3.
- Bengio et al. (2003) Y. Bengio, R. Ducharme, P. Vincent, and C. Jauvin A neural probabilistic language model. Journal of Machine Learning Research 3, pp. 1137–1155. Cited by: §2.
- Bie et al. (2025) T. Bie, M. Cao, K. Chen, L. Du, M. Gong, Z. Gong, Y. Gu, J. Hu, Z. Huang, Z. Lan, et al. LLaDA 2.0: scaling up diffusion language models to 100b. arXiv preprint arXiv:2512.15745. Cited by: §1.
- Black et al. (2024) K. Black, M. Janner, Y. Du, I. Kostrikov, and S. Levine Training diffusion models with reinforcement learning. In Proceedings of the International Conference on Learning Representations, Cited by: item 1.
- Cai et al. (2024) T. Cai, Y. Li, Z. Geng, H. Peng, J. D. Lee, D. Chen, and T. Dao MEDUSA: simple LLM inference acceleration framework with multiple decoding heads. In Proceedings of the International Conference on Machine Learning, Cited by: §A.2.
- Campbell et al. (2022) A. Campbell, J. Benton, V. De Bortoli, T. Rainforth, G. Deligiannidis, and A. Doucet A continuous time framework for discrete denoising models. In Advances in Neural Information Processing Systems, Cited by: §2.1.
- Campbell et al. (2024) A. Campbell, J. Yim, R. Barzilay, T. Rainforth, and T. Jaakkola Generative flows on discrete state-spaces: enabling multimodal flows with applications to protein co-design. In Proceedings of the International Conference on Machine Learning, Cited by: §2.1.2, §2.1.
- Chang et al. (2022) H. Chang, H. Zhang, L. Jiang, C. Liu, and W. T. Freeman MaskGIT: masked generative image transformer. In Proceedings of the IEEE/CVF Conference on Computer Vision and Pattern Recognition, Cited by: §3.3.
- Chen et al. (2023a) C. Chen, S. Borgeaud, G. Irving, J. Lespiau, L. Sifre, and J. Jumper Accelerating large language model decoding with speculative sampling. arXiv preprint arXiv:2302.01318. Cited by: §A.2, §1.
- Chen et al. (2026) J. Chen, Y. Liang, and Z. Liu DFlash: block diffusion for flash speculative decoding. In Proceedings of the International Conference on Machine Learning, Cited by: §A.2.
- Chen et al. (2023b) J. Chen, Y. Huang, T. Lv, L. Cui, Q. Chen, and F. Wei TextDiffuser: diffusion models as text painters. In Advances in Neural Information Processing Systems, Vol. 36. Cited by: §9.3.
- Chen et al. (2021) M. Chen, J. Tworek, H. Jun, Q. Yuan, H. P. D. O. Pinto, J. Kaplan, H. Edwards, Y. Burda, N. Joseph, G. Brockman, et al. Evaluating large language models trained on code. arXiv preprint arXiv:2107.03374. Cited by: §7.
- Chen et al. (2023c) T. Chen, R. Zhang, and G. E. Hinton Analog bits: generating discrete data using diffusion models with self-conditioning. In Proceedings of the International Conference on Learning Representations, Cited by: §3.2.
- Cheng et al. (2026) X. Cheng, X. Yu, C. Shao, J. Li, Y. Xiong, Y. Qian, J. Zhu, S. Ma, X. Zhang, J. Ye, Q. Chen, C. Deng, J. Yu, D. Dai, Z. Zhang, Y. Wei, Y. Tan, W. Yang, R. Xu, Y. Wu, Z. Xu, X. Wang, M. Chen, R. Tian, X. Bi, Z. Hao, S. Chen, H. Cao, W. Zhang, A. Xu, H. Zhang, D. Zhao, and W. Liang DSpark: confidence-scheduled speculative decoding with semi-autoregressive generation. arXiv. Cited by: §A.2, §1.
- Clark et al. (2020) K. Clark, M. Luong, Q. V. Le, and C. D. Manning ELECTRA: pre-training text encoders as discriminators rather than generators. In Proceedings of the International Conference on Learning Representations, Cited by: §2.
- Clark et al. (2024) K. Clark, P. Vicol, K. Swersky, and D. J. Fleet Directly fine-tuning diffusion models on differentiable rewards. In Proceedings of the International Conference on Learning Representations, Cited by: item 1.
- Cobbe et al. (2021) K. Cobbe, V. Kosaraju, M. Bavarian, M. Chen, H. Jun, L. Kaiser, M. Plappert, J. Tworek, J. Hilton, R. Nakano, C. Hesse, and J. Schulman Training verifiers to solve math word problems. arXiv preprint arXiv:2110.14168. Cited by: §7.
- Crepy et al. (2026) C. Crepy, V. De Bortoli, A. Galashov, K. Greff, and I. Korshunova Hackable Diffusion: a modular toolbox written in jax to experiment and educate around diffusion modeling. Note: Sponsors: A. Doucet and R. Elie External Links: Link Cited by: §8.
- Dao et al. (2022) T. Dao, D. Fu, S. Ermon, A. Rudra, and C. Ré FlashAttention: fast and memory-efficient exact attention with IO-awareness. In Advances in Neural Information Processing Systems, Vol. 35. Cited by: 3rd item.
- De Bortoli et al. (2021) V. De Bortoli, J. Thornton, J. Heng, and A. Doucet Diffusion Schrödinger bridge with applications to score-based generative modeling. In Advances in Neural Information Processing Systems, Vol. 34. Cited by: §2.
- DeepSeek-AI (2024) DeepSeek-AI DeepSeek-v3 technical report. arXiv preprint arXiv:2412.19437. Cited by: §1.
- Dekoninck et al. (2026) J. Dekoninck, N. Jovanović, T. Gehrunger, K. Rögnvaldsson, I. Petrov, C. Sun, and M. Vechev Beyond benchmarks: matharena as an evaluation platform for mathematics with LLMs. In 3rd AI for Math Workshop at the International Conference on Machine Learning (ICML), External Links: Link Cited by: §7.
- Deschenaux et al. (2026) J. Deschenaux, C. Gulcehre, and S. S. Sahoo The diffusion duality, chapter II: -samplers. In Proceedings of the International Conference on Learning Representations, Cited by: §3.3.
- Deschenaux and Gulcehre (2024) J. Deschenaux and C. Gulcehre Promises, outlooks and challenges of diffusion language modeling. arXiv preprint arXiv:2406.11473. Cited by: §1.
- Deschenaux and Gulcehre (2025) J. Deschenaux and C. Gulcehre Beyond autoregression: fast LLMs via self-distillation through time. In Proceedings of the International Conference on Learning Representations, Cited by: item 2.
- Deschenaux and Gulcehre (2026a) J. Deschenaux and C. Gulcehre BlockGen: flexible blockwise sequence modeling with hybrid samplers. In Proceedings of the International Conference on Learning Representations, Cited by: §3.1.
- Deschenaux and Gulcehre (2026b) J. Deschenaux and C. Gulcehre Language modeling with hyperspherical flows. arXiv preprint arXiv:2605.11125. Cited by: §A.1.
- Devlin et al. (2019) J. Devlin, M. Chang, K. Lee, and K. Toutanova BERT: pre-training of deep bidirectional transformers for language understanding. In Proceedings of the Annual Conference of the North American Chapter of the Association for Computational Linguistics, Cited by: §2.
- Dieleman et al. (2022) S. Dieleman, L. Sartran, A. Roshannai, N. Savinov, Y. Ganin, P. H. Richemond, A. Doucet, R. Strudel, C. Dyer, C. Durkan, C. Hawthorne, R. Leblond, W. Grathwohl, and J. Adler Continuous diffusion for categorical data. arXiv preprint arXiv:2211.15089. Cited by: §2, §9.
- Dong et al. (2023) H. Dong, W. Xiong, D. Goyal, R. Pan, S. Diao, J. Zhang, K. Shum, and T. Zhang RAFT: reward ranked finetuning for generative foundation model alignment. Transactions on Machine Learning Research. Cited by: item 1.
- Engels et al. (2026) J. Engels, C. McDougall, B. Chughtai, J. Kramar, S. Rajamanoharan, C. Wu, A. Conmy, A. Q. Chen, J. Tarbouriech, M. Ma, B. O’Donoghue, J. G. L. de Oliveira, R. Shah, and N. Nanda How transparent is DiffusionGemma?. arXiv preprint arXiv:2606.20560. Cited by: §3.2.
- Fan et al. (2023) Y. Fan, O. Watkins, Y. Du, H. Liu, K. Moon, C. Boutilier, P. Abbeel, B. Lin, and H. Lee DPOK: reinforcement learning for fine-tuning text-to-image diffusion models. In Advances in Neural Information Processing Systems, Vol. 36. Cited by: item 1.
- Fu et al. (2025) F. Fu, T. Guo, and Z. Liu Learnable sampler distillation for discrete diffusion models. In Advances in Neural Information Processing Systems, Cited by: item 2.
- Fu et al. (2026) Y. Fu, L. Whalen, A. Garg, C. Wu, M. Khadkevich, N. Oswald, E. Xie, D. Egert, S. T. Sreenivas, S. Diao, C. Yu, Y. Yu, W. Chen, S. Norouzi, J. Liu, S. Lan, L. Zhu, J. Wang, J. Jiang, M. Mardani, M. Maghoumi, S. Han, A. Jukic, N. Tajbakhsh, J. Kautz, and P. Molchanov Nemotron-Labs-Diffusion: a tri-mode language model unifying autoregressive, diffusion, and self-speculation decoding. Technical report NVIDIA. Note: Technical report Cited by: §1.
- Gat et al. (2024) I. Gat, T. Remez, N. Shaul, F. Kreuk, R. T. Chen, G. Synnaeve, Y. Adi, and Y. Lipman Discrete flow matching. In Advances in Neural Information Processing Systems, Cited by: §2.1.2, §2.1, §2, §4, footnote 1.
- Gemini Team (2025) Gemini Team Gemini 2.5: pushing the frontier with advanced reasoning, multimodality, long context, and next generation agentic capabilities. arXiv preprint arXiv:2507.06261. Cited by: §1.
- Gemma Team et al. (2026) Gemma Team, S. E. Abd, V. Aggarwal, R. Algayres, A. Andreev, O. Bachem, I. Ballantyne, C. Brick, V. Cărbune, M. Casbon, et al. Gemma 4 technical report. arXiv preprint arXiv:2607.02770. Cited by: §1, §1, §3, §4, §5.
- Ghazvininejad et al. (2019) M. Ghazvininejad, O. Levy, Y. Liu, and L. Zettlemoyer Mask-predict: parallel decoding of conditional masked language models. In Proceedings of the Conference on Empirical Methods in Natural Language Processing, Cited by: §9.
- Gong et al. (2025) S. Gong, S. Agarwal, Y. Zhang, J. Ye, L. Zheng, M. Li, C. An, P. Zhao, W. Bi, J. Han, H. Peng, and L. Kong Scaling diffusion language models via adaptation from autoregressive models. In Proceedings of the International Conference on Learning Representations, Cited by: §1.
- Gong et al. (2023) S. Gong, M. Li, J. Feng, Z. Wu, and L. Kong DiffuSeq: sequence to sequence text generation with diffusion models. In Proceedings of the International Conference on Learning Representations, Cited by: §9.
- Google DeepMind Team (2026) Google DeepMind Team DiffusionGemma implementation in HuggingFace transformers. Note: https://github.com/huggingface/transformers/pull/46540Pull Request Cited by: §6.
- Google DeepMind (2025) Google DeepMind Gemini diffusion. External Links: Link Cited by: §1.
- Google DeepMind (2026) Google DeepMind Accelerating gemma 4: faster inference with multi-token prediction drafters. External Links: Link Cited by: §1.
- Graves (2013) A. Graves Generating sequences with recurrent neural networks. arXiv preprint arXiv:1308.0850. Cited by: §2.
- Gu et al. (2018) J. Gu, J. Bradbury, C. Xiong, V. O.K. Li, and R. Socher Non-autoregressive neural machine translation. In Proceedings of the International Conference on Learning Representations, Cited by: §2.
- Han et al. (2024) K. Han, K. Kenealy, A. Barua, N. Fiedel, and N. Constant Transfer learning for text diffusion models. arXiv preprint arXiv:2401.17181. Cited by: §1.
- Han et al. (2023) X. Han, S. Finkelstein, S. Sharma, Y. Chen, and H. He SSD-LM: semi-autoregressive simplex-based diffusion language model for text generation and modular control. In Proceedings of the Annual Meeting of the Association for Computational Linguistics, Cited by: §9.1.
- He et al. (2024) Y. He, N. Murata, C. Lai, Y. Takida, T. Uesaka, D. Kim, W. Liao, Y. Mitsufuji, J. Z. Kolter, R. Salakhutdinov, and S. Ermon Manifold preserving guided diffusion. In Proceedings of the International Conference on Learning Representations, Cited by: §A.1.
- Ho et al. (2020) J. Ho, A. Jain, and P. Abbeel Denoising diffusion probabilistic models. In Advances in Neural Information Processing Systems, Cited by: §2.
- Holderrieth and Erives (2025) P. Holderrieth and E. Erives An introduction to flow matching and diffusion models. arXiv preprint arXiv:2506.02070. Cited by: §2.
- Hoogeboom et al. (2022) E. Hoogeboom, A. A. Gritsenko, J. Bastings, B. Poole, R. v. d. Berg, and T. Salimans Autoregressive diffusion models. In Proceedings of the International Conference on Learning Representations, Cited by: §2.1.
- Hoogeboom et al. (2021) E. Hoogeboom, D. Nielsen, P. Jaini, P. Forré, and M. Welling Argmax flows and multinomial diffusion: learning categorical distributions. In Advances in Neural Information Processing Systems, Vol. 34. Cited by: §2.1.1, §3.2, §4.
- Hoogeboom et al. (2026) E. Hoogeboom, D. Ruhe, J. Heek, T. Mensink, and T. Salimans Beyond single tokens: distilling discrete diffusion models via discrete MMD. arXiv preprint arXiv:2603.20155. External Links: Document Cited by: item 2.
- Hu et al. (2022) E. J. Hu, yelong shen, P. Wallis, Z. Allen-Zhu, Y. Li, S. Wang, L. Wang, and W. Chen LoRA: low-rank adaptation of large language models. In Proceedings of the International Conference on Learning Representations, Cited by: §8.
- Hu et al. (2026) K. Hu, L. Qiu, Y. Lu, H. Zhao, T. Li, Y. Kim, J. Andreas, and K. He ELF: embedded language flows. arXiv preprint arXiv:2605.10938. Cited by: §A.1, §2.
- Huang et al. (2024) H. Huang, N. Ardalani, A. Sun, L. Ke, S. Bhosale, H. S. Lee, C. Wu, and B. Lee Toward efficient inference for mixture of experts. In Advances in Neural Information Processing Systems, Cited by: 1st item.
- Inception Labs et al. (2025) Inception Labs, S. Khanna, S. Kharbanda, S. Li, H. Varma, E. Wang, S. Birnbaum, Z. Luo, Y. Miraoui, A. Palrecha, et al. Mercury: ultra-fast language models based on diffusion. arXiv preprint arXiv:2506.17298. Cited by: §1.
- Inception Labs (2026) Inception Labs Introducing Mercury 2. Note: https://www.inceptionlabs.ai/blog/introducing-mercury-2Accessed: 2026-07-22 Cited by: Appendix E.
- Interfaze (2026) Interfaze The first open source diffusion audio asr model. Note: https://interfaze.ai/blog/the-first-open-source-diffusion-audio-asr-modelBlog post Cited by: §1.
- Jain et al. (2025) N. Jain, A. Gu, W. Li, F. Yan, T. Zhang, S. Wang, A. Solar-Lezama, K. Sen, and I. Stoica LiveCodeBench: holistic and contamination free evaluation of large language models for code. In Proceedings of the International Conference on Learning Representations, Cited by: §7.
- Jin et al. (2019) Q. Jin, B. Dhingra, Z. Liu, W. Cohen, and X. Lu PubMedQA: a dataset for biomedical research question answering. In Proceedings of the Conference on Empirical Methods in Natural Language Processing, Cited by: Appendix C, Appendix C, §8.
- Jo et al. (2026) M. Jo, J. Yoon, J. Deschenaux, C. Gulcehre, and S. Ahn Loopholing discrete diffusion: deterministic bypass of the sampling wall. In Proceedings of the International Conference on Learning Representations, Cited by: §3.2.
- Kingma et al. (2021) D. P. Kingma, T. Salimans, B. Poole, and J. Ho Variational diffusion models. In Advances in Neural Information Processing Systems, Vol. 34. Cited by: §2.
- Kitouni et al. (2024) O. Kitouni, N. Nolte, A. Williams, M. Rabbat, D. Bouchacourt, and M. Ibrahim The factorization curse: which tokens you predict underlie the reversal curse and more. In Advances in Neural Information Processing Systems, Cited by: §9.1.
- Kwon et al. (2023) W. Kwon, Z. Li, S. Zhuang, Y. Sheng, L. Zheng, C. H. Yu, J. E. Gonzalez, H. Zhang, and I. Stoica Efficient memory management for large language model serving with PagedAttention. In Proceedings of the 29th Symposium on Operating Systems Principles (SOSP), Cited by: §6.
- Lee et al. (2026) C. Lee, J. Yoo, M. Agarwal, S. Shah, J. Huang, A. Raghunathan, S. Hong, N. M. Boffi, and J. Kim Flow map language models: one-step language modeling via continuous denoising. arXiv preprint arXiv:2602.16813. Cited by: §A.1.
- Lee et al. (2023) K. Lee, H. Liu, M. Ryu, O. Watkins, Y. Du, C. Boutilier, and P. Abbeel Aligning text-to-image models using human feedback. arXiv preprint arXiv:2302.12192. Cited by: item 1.
- Leviathan et al. (2023) Y. Leviathan, M. Kalman, and Y. Matias Fast inference from transformers via speculative decoding. In Proceedings of the International Conference on Machine Learning, Cited by: §A.2, §1, §2.
- Lewis et al. (2020) M. Lewis, Y. Liu, N. Goyal, M. Ghazvininejad, A. Mohamed, O. Levy, V. Stoyanov, and L. Zettlemoyer BART: denoising sequence-to-sequence pre-training for natural language generation, translation, and comprehension. In Proceedings of the Annual Meeting of the Association for Computational Linguistics, Cited by: §3.1.
- Lezama et al. (2023) J. Lezama, T. Salimans, L. Jiang, H. Chang, J. Ho, and I. Essa Predictor-corrector sampling for discrete diffusion models. In Proceedings of the International Conference on Learning Representations, Cited by: §3.3.
- Li et al. (2022) X. L. Li, J. Thickstun, I. Gulrajani, P. Liang, and T. B. Hashimoto Diffusion-LM improves controllable text generation. In Advances in Neural Information Processing Systems, Cited by: §2, §9.3, §9.
- Li et al. (2026) Y. Li, F. Wei, C. Zhang, and H. Zhang EAGLE-3: scaling up inference acceleration of large language models via training-time test. In Advances in Neural Information Processing Systems, Cited by: §A.2, §1.
- Lipman et al. (2023) Y. Lipman, R. T. Q. Chen, H. Ben-Hamu, M. Nicklas, and M. Le Flow matching for generative modeling. In Proceedings of the International Conference on Learning Representations, Cited by: §2.
- Liu et al. (2026a) E. Liu, X. Ning, Y. Wang, and Z. Lin NI sampling: accelerating discrete diffusion sampling by token order optimization. In Proceedings of the International Conference on Learning Representations, Cited by: §3.3.
- Liu et al. (2025) J. Liu, G. Liu, J. Liang, Y. Li, J. Liu, X. Wang, P. Wan, D. Zhang, and W. Ouyang Flow-GRPO: training flow matching models via online RL. In Advances in Neural Information Processing Systems, Cited by: item 1.
- Liu et al. (2026b) J. Liu, X. Dong, Z. Ye, R. Mehta, Y. Fu, V. Singh, C. Zhang, and P. Molchanov TiDAR: think in diffusion, talk in autoregression. In Proceedings of Machine Learning and Systems, Cited by: §A.2.
- Liu et al. (2024) X. Liu, X. Zhang, J. Ma, J. Peng, and Q. Liu InstaFlow: one step is enough for high-quality diffusion-based text-to-image generation. In Proceedings of the International Conference on Learning Representations, Cited by: item 2.
- Liu et al. (2019) Y. Liu, M. Ott, N. Goyal, J. Du, M. Joshi, D. Chen, O. Levy, M. Lewis, L. Zettlemoyer, and V. Stoyanov RoBERTa: a robustly optimized bert pretraining approach. arXiv preprint arXiv:1907.11692. Cited by: §2.
- Lou et al. (2024) A. Lou, C. Meng, and S. Ermon Discrete diffusion modeling by estimating the ratios of the data distribution. In Proceedings of the International Conference on Machine Learning, Cited by: §A.1, §2.
- Luo et al. (2023) S. Luo, Y. Tan, L. Huang, J. Li, and H. Zhao Latent consistency models: synthesizing high-resolution images with few-step inference. In Advances in Neural Information Processing Systems, Vol. 36. Cited by: item 2.
- Ma et al. (2026) H. Ma, O. Nabati, A. Rosenberg, B. Dai, O. Lang, C. Boutilier, N. Li, S. Mannor, L. Shani, and G. Tenneholtz Reinforcement learning with discrete diffusion policies for combinatorial action spaces. In Proceedings of the International Conference on Machine Learning, Cited by: item 1.
- Matton et al. (2024) A. Matton, T. Sherborne, D. Aumiller, E. Tommasone, M. Alizadeh, J. He, R. Ma, M. Voisin, E. Gilsenan-McMahon, and M. Gallé On leakage of code generation evaluation datasets. In Findings of the Association for Computational Linguistics: EMNLP, Cited by: §7.
- Meng et al. (2022) C. Meng, Y. He, Y. Song, J. Song, J. Wu, J. Zhu, and S. Ermon SDEdit: guided image synthesis and editing with stochastic differential equations. In Proceedings of the International Conference on Learning Representations, Cited by: §2.
- Meshchaninov et al. (2025) V. Meshchaninov, E. Chimbulatov, A. Shabalin, A. Abramov, and D. Vetrov Cosmos: compressed and smooth latent space for text diffusion modeling. In Advances in Neural Information Processing Systems, Cited by: §A.1, §2.
- Mikolov et al. (2010) T. Mikolov, M. Karafiát, L. Burget, J. Černockỳ, and S. Khudanpur Recurrent neural network based language model. In Interspeech, Vol. 2. Cited by: §2.
- Nagarajan et al. (2025) V. Nagarajan, C. H. Wu, C. Ding, and A. Raghunathan Roll the dice & look before you leap: going beyond the creative limits of next-token prediction. In Proceedings of the International Conference on Machine Learning, Cited by: §9.1.
- Nie et al. (2026) S. Nie, F. Zhu, Z. You, X. Zhang, J. Ou, J. Hu, J. Zhou, Y. Lin, J. Wen, and C. Li Large language diffusion models. In Advances in Neural Information Processing Systems, Cited by: §1.
- OpenAI (2024) OpenAI Multilingual massive multitask language understanding (MMMLU). Note: https://huggingface.co/datasets/openai/MMMLU Cited by: §7.
- Ou et al. (2025) J. Ou, S. Nie, K. Xue, F. Zhu, J. Sun, Z. Li, and C. Li Your absorbing discrete diffusion secretly models the conditional distributions of clean data. In Proceedings of the International Conference on Learning Representations, Cited by: §2.1.2.
- Papadopoulos et al. (2024) V. Papadopoulos, J. Wenger, and C. Hongler Arrows of time for large language models. In Proceedings of the International Conference on Machine Learning, Cited by: §9.1.
- Pope et al. (2023) R. Pope, S. Douglas, A. Chowdhery, J. Devlin, S. Ghemawat, J. He, D. Maher, S. Narang, S. Mishra, A. Ni, et al. Efficiently scaling transformer inference. In Proceedings of Machine Learning and Systems (MLSys), Vol. 5. Cited by: §6.
- Potaptchik et al. (2026) P. Potaptchik, J. Yim, A. Saravanan, P. Holderrieth, E. Vanden-Eijnden, and M. S. Albergo Discrete flow maps. arXiv preprint arXiv:2604.09784. Cited by: §A.1.
- Pynadath et al. (2026) P. Pynadath, J. Shi, and R. Zhang CANDI: hybrid discrete-continuous diffusion models. In Proceedings of the International Conference on Machine Learning, Cited by: §A.1.
- Quan et al. (2025) S. Quan, J. Yang, B. Yu, B. Zheng, D. Liu, A. Yang, X. Ren, B. Gao, Y. Miao, Y. Feng, et al. CodeElo: benchmarking competition-level code generation of llms with human-comparable elo ratings. arXiv preprint arXiv:2501.01257. Cited by: §7.
- Rae et al. (2020) J. W. Rae, A. Potapenko, S. M. Jayakumar, C. Hillier, and T. P. Lillicrap Compressive transformers for long-range sequence modelling. In Proceedings of the International Conference on Learning Representations, Cited by: 1st item.
- Raffel et al. (2020) C. Raffel, N. Shazeer, A. Roberts, K. Lee, S. Narang, M. Matena, Y. Zhou, W. Li, and P. J. Liu Exploring the limits of transfer learning with a unified text-to-text transformer. Journal of Machine Learning Research. Cited by: §3.1.
- Rajbhandari et al. (2022) S. Rajbhandari, C. Li, Z. Yao, M. Zhang, R. Y. Aminabadi, A. A. Awan, J. Rasley, and Y. He DeepSpeed-MoE: advancing mixture-of-experts inference and training to power next-generation AI scale. In Proceedings of the International Conference on Machine Learning, Cited by: 1st item.
- Reid et al. (2022) M. Reid, E. Marrese-Taylor, and Y. Matsuo DiffusER: discrete diffusion via edit-based reconstruction. In Proceedings of the 2nd Conference of the Asia-Pacific Chapter of the Association for Computational Linguistics and the 12th International Joint Conference on Natural Language Processing (AACL-IJCNLP), Cited by: §9.1.
- Rein et al. (2024) D. Rein, B. L. Hou, A. C. Stickland, J. Petty, R. Y. Pang, J. Dirani, J. Michael, and S. R. Bowman GPQA: a graduate-level google-proof q&a benchmark. In Proceedings of the Conference on Language Modeling, Cited by: §7.
- Ren et al. (2025) Y. Ren, H. Chen, Y. Zhu, W. Guo, Y. Chen, G. M. Rotskoff, M. Tao, and L. Ying Fast solvers for discrete diffusion models: theory and applications of high-order algorithms. In Advances in Neural Information Processing Systems, Cited by: §3.3.
- Sahoo et al. (2024) S. S. Sahoo, M. Arriola, Y. Schiff, A. Gokaslan, E. Marroquin, J. T. Chiu, A. Rush, and V. Kuleshov Simple and effective masked diffusion language models. In Advances in Neural Information Processing Systems, Cited by: §2.
- Salimans and Ho (2022) T. Salimans and J. Ho Progressive distillation for fast sampling of diffusion models. In Proceedings of the International Conference on Learning Representations, Cited by: item 2.
- Sanh et al. (2019) V. Sanh, L. Debut, J. Chaumond, and T. Wolf DistilBERT, a distilled version of BERT: smaller, faster, cheaper and lighter. arXiv preprint arXiv:1910.01108. Cited by: §2.
- Sauer et al. (2024) A. Sauer, D. Lorenz, A. Blattmann, and R. Rombach Adversarial diffusion distillation. In Proceedings of the IEEE/CVF Conference on Computer Vision and Pattern Recognition, Cited by: item 2.
- Savinov et al. (2022) N. Savinov, J. Chung, M. Binkowski, E. Elsen, and A. van den Oord Step-unrolled denoising autoencoders for text generation. In Proceedings of the International Conference on Learning Representations, Cited by: §2.
- Shabalin et al. (2025) A. Shabalin, V. Meshchaninov, E. Chimbulatov, V. Lapikov, R. Kim, G. Bartosh, and D. Vetrov TEncDM: understanding the properties of the diffusion model in the space of language model encodings. In Proceedings of the AAAI Conference on Artificial Intelligence, Cited by: §A.1, §2.
- Shi et al. (2023) F. Shi, M. Suzgun, M. Freitag, X. Wang, S. Srivats, S. Vosoughi, H. W. Chung, Y. Tay, S. Ruder, D. Zhou, D. Das, and J. Wei Language models are multilingual chain-of-thought reasoners. In Proceedings of the International Conference on Learning Representations, Cited by: §7.
- Sohl-Dickstein et al. (2015) J. Sohl-Dickstein, E. Weiss, N. Maheswaranathan, and S. Ganguli Deep unsupervised learning using nonequilibrium thermodynamics. In Proceedings of the International Conference on Machine Learning, Cited by: §2.
- Song et al. (2021a) J. Song, C. Meng, and S. Ermon Denoising diffusion implicit models. In Proceedings of the International Conference on Learning Representations, Cited by: §2.
- Song et al. (2023) Y. Song, P. Dhariwal, M. Chen, and I. Sutskever Consistency models. In Proceedings of the International Conference on Machine Learning, Cited by: item 2.
- Song et al. (2021b) Y. Song, C. Durkan, I. Murray, and S. Ermon Maximum likelihood training of score-based diffusion models. In Advances in Neural Information Processing Systems, Vol. 34. Cited by: §2.
- Song and Ermon (2019) Y. Song and S. Ermon Generative modeling by estimating gradients of the data distribution. In Advances in Neural Information Processing Systems, Vol. 32. Cited by: §2.
- Song et al. (2021c) Y. Song, J. Sohl-Dickstein, D. P. Kingma, A. Kumar, S. Ermon, and B. Poole Score-based generative modeling through stochastic differential equations. In Proceedings of the International Conference on Learning Representations, Cited by: §2.
- Song et al. (2025) Y. Song, Z. Zhang, C. Luo, P. Gao, F. Xia, H. Luo, Z. Li, Y. Yang, H. Yu, X. Qu, et al. Seed diffusion: a large-scale diffusion language model with high-speed inference. arXiv preprint arXiv:2508.02193. Cited by: §1.
- Stern et al. (2018) M. Stern, N. Shazeer, and J. Uszkoreit Blockwise parallel decoding for deep autoregressive models. In Advances in Neural Information Processing Systems, Vol. 31. Cited by: §1.
- Strudel et al. (2022) R. Strudel, C. Tallec, F. Altché, Y. Du, Y. Ganin, A. Mensch, W. Grathwohl, N. Savinov, S. Dieleman, L. Sifre, and R. Leblond Self-conditioned embedding diffusion for text generation. arXiv preprint arXiv:2211.04236. Cited by: §2, §3.2.
- Sutskever et al. (2014) I. Sutskever, O. Vinyals, and Q. V. Le Sequence to sequence learning with neural networks. In Advances in Neural Information Processing Systems, Cited by: §2.
- Suzgun et al. (2023) M. Suzgun, N. Scales, N. Schärli, S. Gehrmann, Y. Tay, H. W. Chung, A. Chowdhery, Q. Le, E. Chi, D. Zhou, and J. Wei Challenging BIG-Bench tasks and whether chain-of-thought can solve them. In Findings of the Association for Computational Linguistics: ACL 2023, Cited by: §7.
- Tang et al. (2024) J. Tang, Y. Zhao, K. Zhu, G. Xiao, B. Kasikci, and S. Han Quest: query-aware sparsity for efficient long-context LLM inference. In Proceedings of the International Conference on Machine Learning, Cited by: §6.
- The vLLM Team and Google DeepMind Team (2026) The vLLM Team and Google DeepMind Team DiffusionGemma: the first diffusion LLM (dLLM) natively supported in vLLM. Note: https://vllm.ai/blog/2026-06-10-diffusion-gemmavLLM Blog. Implementation: https://github.com/vllm-project/vllm/pull/45163 Cited by: §6, §6.
- Tsoukalas et al. (2024) G. Tsoukalas, J. Lee, J. Jennings, J. Xin, M. Ding, M. Jennings, A. Thakur, and S. Chaudhuri PutnamBench: evaluating neural theorem-provers on the Putnam mathematical competition. In Advances in Neural Information Processing Systems, Cited by: §7.
- Unsloth (2026) Unsloth DiffusionGemma. Note: https://unsloth.ai/docs/models/diffusiongemmaAccessed: 2026-06-11 Cited by: §1.
- Van Puyvelde et al. (2026) M. Van Puyvelde, H. I. Gulluk, W. Van Criekinge, and O. Gevaert Discrete diffusion language models for interactive radiology report drafting. arXiv preprint arXiv:2607.01436. Cited by: §1.
- Vaswani et al. (2017) A. Vaswani, N. Shazeer, N. Parmar, J. Uszkoreit, L. Jones, A. N. Gomez, Ł. Kaiser, and I. Polosukhin Attention is all you need. In Advances in Neural Information Processing Systems, Cited by: §2, §3.
- Wallace et al. (2024) B. Wallace, M. Dang, R. Rafailov, L. Zhou, A. Lou, S. Purushwalkam, S. Ermon, C. Xiong, S. Joty, and N. Naik Diffusion model alignment using direct preference optimization. In Proceedings of the IEEE/CVF Conference on Computer Vision and Pattern Recognition, Cited by: item 1.
- Wang et al. (2024) Y. Wang, X. Ma, G. Zhang, Y. Ni, A. Chandra, S. Guo, W. Ren, A. Arulraj, X. He, Z. Jiang, T. Li, M. Ku, K. Wang, A. Zhuang, R. Fan, X. Yue, and W. Chen MMLU-Pro: a more robust and challenging multi-task language understanding benchmark. In Advances in Neural Information Processing Systems, Cited by: §7.
- Wu et al. (2025) C. Wu, H. Zhang, S. Xue, S. Diao, Y. Fu, Z. Liu, P. Molchanov, P. Luo, S. Han, and E. Xie FastDLLM v2: efficient block-diffusion LLM. arXiv preprint arXiv:2509.26328. Cited by: §3.1.
- Xia et al. (2024) H. Xia, Z. Yang, Q. Dong, P. Wang, Y. Li, T. Ge, T. Liu, W. Li, and Z. Sui Unlocking efficiency in large language model inference: a comprehensive survey of speculative decoding. In Findings of the Association for Computational Linguistics: ACL 2024, Cited by: §A.2, §1.
- Yao et al. (2024) S. Yao, N. Shinn, P. Razavi, and K. Narasimhan -Bench: a benchmark for tool-agent-user interaction in real-world domains. arXiv preprint arXiv:2406.12045. Cited by: §7.
- Yao et al. (2026) Y. Yao, H. Zhou, A. Han, W. Huang, and M. Sugiyama Accelerating discrete diffusion models with parallel-in-time sampling. arXiv preprint arXiv:2607.00773. Cited by: §3.3.
- Ye et al. (2024) J. Ye, S. Gong, L. Chen, L. Zheng, J. Gao, H. Shi, C. Wu, X. Jiang, Z. Li, W. Bi, and L. Kong Diffusion of thought: chain-of-thought reasoning in diffusion language models. In Advances in Neural Information Processing Systems, Cited by: §9.2.
- Yi et al. (2024) Q. Yi, X. Chen, C. Zhang, Z. Zhou, L. Zhu, and X. Kong Diffusion models in text generation: a survey. PeerJ Computer Science. Cited by: §2.
- Yin et al. (2024) T. Yin, M. Gharbi, R. Zhang, E. Shechtman, F. Durand, and T. Park One-step image translation with text-to-image models. In Proceedings of the IEEE/CVF Conference on Computer Vision and Pattern Recognition, Cited by: item 2.
- Yue et al. (2025) X. Yue, T. Zheng, Y. Ni, Y. Wang, K. Zhang, S. Tong, Y. Sun, B. Yu, G. Zhang, H. Sun, Y. Su, W. Chen, and G. Neubig MMMU-Pro: a more robust multi-discipline multimodal understanding benchmark. In Proceedings of the Annual Meeting of the Association for Computational Linguistics, Cited by: §7.
- Zadouri et al. (2026) T. Zadouri, M. Hoehnerbach, J. Shah, V. Thakkar, and T. Dao FlashAttention-4: algorithm and kernel pipelining co-design for asymmetric hardware scaling. In Proceedings of Machine Learning and Systems, Cited by: 3rd item.
- Zelikman et al. (2024) E. Zelikman, G. Harik, Y. Shao, V. Jayasiri, N. Haber, and N. D. Goodman Quiet-STaR: language models can teach themselves to think before speaking. In Proceedings of the Conference on Language Modeling, Cited by: §4.
- Zhang et al. (2024) S. Zhang, Y. Bao, and S. Huang EDT: improving large language models’ generation by entropy-based dynamic temperature sampling. arXiv preprint arXiv:2403.14541. Cited by: §3.3.
- Zhang-Li et al. (2024) D. Zhang-Li, N. Lin, J. Yu, Z. Zhang, Z. Yao, X. Zhang, L. Hou, J. Zhang, and J. Li Reverse that number! Decoding order matters in arithmetic learning. arXiv preprint arXiv:2403.05845. Cited by: §9.1.
- Zhao et al. (2025) L. Zhao, X. Ding, L. Yu, and L. Akoglu Unified discrete diffusion for categorical data. Journal of Machine Learning Research 26 (215), pp. 1–49. Cited by: §2.
- Zhao et al. (2026) S. Zhao, D. Gupta, Q. Zheng, and A. Grover D1: scaling reasoning in diffusion large language models via reinforcement learning. In Advances in Neural Information Processing Systems, Cited by: item 1.
- Zhao et al. (2024) Y. Zhao, Z. Xie, C. Liang, C. Zhuang, and J. Gu Lookahead: an inference acceleration framework for large language model with lossless generation accuracy. In Proceedings of the 30th ACM SIGKDD Conference on Knowledge Discovery and Data Mining, Cited by: §1.
- Zheng et al. (2026) K. Zheng, H. Chen, H. Ye, H. Wang, Q. Zhang, K. Jiang, H. Su, S. Ermon, J. Zhu, and M. Liu DiffusionNFT: online diffusion reinforcement with forward process. In Proceedings of the International Conference on Machine Learning, Cited by: item 1.
- Zhou et al. (2023) J. Zhou, T. Lu, S. Mishra, S. Brahma, S. Basu, Y. Luan, D. Zhou, and L. Hou Instruction-following evaluation for large language models. arXiv preprint arXiv:2311.07911. Cited by: §7.
- Zhu et al. (2025a) K. Zhu, Y. Gao, Y. Zhao, L. Zhao, G. Zuo, Y. Gu, D. Xie, T. Tang, Q. Xu, Z. Ye, K. Kamahori, C. Lin, Z. Wang, S. Wang, A. Krishnamurthy, and B. Kasikci NanoFlow: towards optimal large language model serving throughput. In Proceedings of the 19th USENIX Conference on Operating Systems Design and Implementation, Cited by: §6.
- Zhu et al. (2025b) R. Zhu, Z. Jiang, C. Jin, P. Wu, C. A. Stuardo, D. Wang, X. Zhang, H. Zhou, H. Wei, Y. Cheng, J. Xiao, X. Zhang, L. Liu, H. Lin, L. Chang, J. Ye, X. Yu, X. Liu, X. Jin, and X. Liu MegaScale-Infer: efficient mixture-of-experts model serving with disaggregated expert parallelism. In Proceedings of the ACM SIGCOMM 2025 Conference, Cited by: §6.
- Zhuo et al. (2025) T. Y. Zhuo, V. M. Chien, J. Chim, H. Hu, W. Yu, R. Widyasari, I. N. B. Yusuf, H. Zhan, J. He, I. Paul, S. Brunner, C. GONG, J. Hoang, A. R. Zebaze, X. Hong, W. Li, J. Kaddour, M. Xu, Z. Zhang, P. Yadav, N. Jain, A. Gu, Z. Cheng, J. Liu, Q. Liu, Z. Wang, D. Lo, B. Hui, N. Muennighoff, D. Fried, X. Du, H. de Vries, and L. V. Werra BigCodeBench: benchmarking code generation with diverse function calls and complex instructions. In Proceedings of the International Conference on Learning Representations, Cited by: §7.
Contributions and Acknowledgments (listed alphabetically)
Core contributors (workstream leads marked with ‘*’)
Adrien Ali Taïga
James Assiene
Daniele Calandriello*
Rahma Chaabouni
João Gante*
Tamara von Glehn*
Nate Keating
Chris Knutsen
Martin Kukla*
Tianlin Liu
Ivan Lobov*
Ofir Nabati
João Gabriel Oliveira
Nicolas Perez-Nieves*
Nastasia Prutianova
Bobak Shahriari*
Jean Tarbouriech*
Pavel Tyletski
Çağlar Ünlü
Cindy Wu
Glenn Cameron
Jerome Connor
Sertan Girgin
Maarten Grootendorst
Alon Levkovitch
Eliya Nachmani
Omar Sanseviero
Piotr Stanczyk
Finetuning framework
Quentin Berthet
Andrew Campbell
Clément Crepy
Valentin De Bortoli
Arnaud Doucet
Romuald Elie
Alexandre Galashov
Klaus Greff
Alexis Jacq
David Ruhe
Yu-Han Wu
Leads
Sebastian Flennerhag
Brendan O’Donoghue
George Scrivener
Shantanu Thakoor
Acknowledgements
Sander Dieleman
Lucas Dixon
Johan Ferret
Parnian Kassraie
Preethi Lahoti
Gaël Liu
Sarah Perrin
Angéline Pouget
Louis Rouillard
Pier Giuseppe Sessa
Danilla Sinopalnikov
Gemma Team
Sponsors
Olivier Bachem
Jeff Dean
Zoubin Ghahramani
Raia Hadsell
Demis Hassabis
Prateek Jain
Armand Joulin
Koray Kavukcuoglu
Marc’Aurelio Ranzato
Oriol Vinyals
Appendix A Related work
A.1 Continuous Diffusion for Text
While discrete diffusion remains highly effective, recent advances indicate a resurgence of continuous and hybrid approaches. Flow-matching frameworks like Embedded Language Flows have demonstrated that by abandoning per-step token supervision and remaining in an unrestricted continuous embedding space until a final discretization step, continuous models can substantially outperform discrete baselines (59). Building on this continuous paradigm, recent advances in flow maps for discrete data have shown that by aligning training dynamics with the geometry of the probability simplex, these generative trajectories can be compressed into single-step mappings, achieving high-quality parallel language generation in one or a few steps (70; 96). Similarly, models utilizing pretrained contextual autoencoders (e.g., Cosmos, TEncDM) map text into compressed, smooth latent spaces where Gaussian diffusion operates efficiently without rounding errors, providing a continuous manifold that lends itself well to advanced guidance techniques (52; 88; 110), while recent approaches like hyperspherical flows avoid Gaussian corruption by rotating token embeddings on a hypersphere to better match the geometric structure of language (31). Other hybrid frameworks, such as CANDI (97), address the “temporal dissonance” of applying Gaussian noise to discrete data by decoupling discrete and continuous corruption, allowing the model to simultaneously learn conditional structure and continuous geometry. Concurrently, Score Entropy Discrete Diffusion has bridged these domains by applying continuous-time Markov chains to learn the probability ratios of discrete data distributions (83). These breakthroughs suggest that the initial failures of continuous text diffusion may have been artifacts of sub-optimal spatial geometries and restrictive training objectives rather than inherent modality limitations.
A.2 Speculative Decoding
Speculative decoding (72; 13; 132) reduces serving latency by utilizing a smaller draft model to propose token sequences that are verified in parallel by a larger target model. The overall latency depends on the generation time of both the draft and target models. AR drafters (76) are fundamentally constrained by sequential generation: increasing draft quality requires more parameters, which increases per-token-latency and diminishes end-to-end gains. Parallel drafters such as Medusa (9) circumvent this by generating many tokens at once, but do so independently, yielding suboptimal acceptance rates. Diffusion-based drafters recover inter-token dependencies by instead modeling the joint distribution over draft tokens. TiDAR (80) uses a single model for diffusion-based drafting, and AR verification—a configuration that DiffusionGemma also supports—while DFlash (14) employs a separate model as the drafter. However, it exhibits suffix decay, with acceptance rates declining at later draft positions (18). DSpark (18) addresses this by adding a lightweight AR module on top of the parallel backbone. In contrast, DiffusionGemma operates as a standalone diffusion model, eliminating the verification bottleneck and scaling to longer generated canvases than draft-then-verify approaches.
Appendix B Samples Before and After SDRL Training
To illustrate the impact of our SDRL phase, Figures 16, 17 contrast representative generations from the SFT model and the final checkpoint. They show how SDRL training resolves the severe repetitive looping observed in the SFT baseline, allowing the model to complete complex reasoning traces.
)))))))))))))))))))))))))))))))))))))))))))))))))
[…repeated closing-parenthesis until max token budget.] Response: [empty — no response produced]
Appendix C Additional Open-Source Downstream Finetuning Results
In Section 8, we describe our finetuning strategy as well as our main results on Sudoku puzzle solving. We now provide full training recipes as well as additional results for PubMedQA (65).
Sudoku solving trace summary.
In Figure 18, we present one trace summary for a successful solving of a Sudoku puzzle.
Practical recipe summary.
Table 7 summarizes the key hyperparameters used in Sudoku and PubMedQA. Full training and evaluation code is available open-source via the Hackable Diffusion adapter. For our LoRA strategy to update all the linear layers, using rank 8 for Sudoku solving problem, we only finetune 8M parameters.
Case study: PubMedQA.
To demonstrate applicability beyond structured reasoning, we finetune DiffusionGemma on PubMedQA (65), a biomedical question-answering benchmark where the model must read a medical research abstract and produce both a categorical answer (yes, no, or maybe) and a detailed explanatory paragraph. The model is evaluated only on the long task using BLEU score against reference explanations, showing that DiffusionGemma can be effectively adapted to domain-specific natural language generation tasks with minimal data and compute.
| Model | Effective Denoising Steps | Accuracy (%) | BLEU |
|---|---|---|---|
| DiffusionGemma | 18.09 | 75.6 | 10.76 |
| + LoRA finetuning | 31.57 | 76.62 | 20.67 |
| Hyperparameter | Sudoku (LoRA) | Sudoku (Full) | PubMedQA |
|---|---|---|---|
| LoRA rank | 8 | — | 4 |
| Canvas size | 256 | 256 | 128 |
| Number of canvases | 1 | 1 | 2 |
| Prompt length | 256 | 256 | 1024 |
| Batch size | 2 | 8 | 2 |
| Peak learning rate | |||
| End learning rate | |||
| Training steps | 8,000 | 2,000 | 2,000 |
| Optimizer | Adam | Adafactor | Adam |
| LR schedule | Cosine with warmup | Cosine with warmup | Cosine with warmup |
| Warmup iterations | 400 | 100 | 100 |
| Weight decay | |||
| Min. hardware | 2 A100 80GB | 8 A100 80GB | 2 A100 80GB |
<|channel>thought
<channel|>4 8 3 7 5 1 9 2 6
7 2 1 8 6 9 5 3 4
6 9 5 4 3 2 8 1 7
1 4 8 9 9 6 3 7 5
3 5 6 2 7 4 1 9 8
9 7 2 5 1 3 4 6 1
2 3 9 1 4 5 7 8 6
5 6 7 1 2 8 4 4 3
8 1 4 6 7 6 2 9 5
Wait, let me re-solve that carefully as the input string was a bit fragmented.
Input:
4 0 0 | 0 0 1 | 0 0 6
0 2 1 | 8 0 9 | 0 0 0
0 9 0 | 4 0 2 | 0 0 0
0 0 0 | 0 […truncated] Response: [empty — answer cut]
3 2 1 8 6 9 7 4 5
7 9 6 4 5 2 8 3 1
1 3 2 9 4 8 6 5 7
8 6 5 3 2 7 4 1 9
9 4 7 5 1 6 3 8 2
6 1 3 2 9 4 5 7 8
5 7 9 1 8 3 2 6 4
2 8 4 6 7 5 1 9 3
Appendix D Prompt Formatting
To facilitate complex, multi-turn interactions, multimodal inputs, and agentic workflows, the model employs a structured Jinja2-based chat template. This template serializes the conversation history, system instructions, and tool schemas into a standardized string format using specialized control tokens. Explicit formatting ensures the model can accurately distinguish between user inputs, internal reasoning, tool invocations, and system-level contexts. What follows is a summary of the main features, but please refer to the implementation66 6 https://huggingface.co/google/diffusiongemma-26B-A4B-it/blob/main/chat_template.jinja for full details.
D.1 BOS and EOS Special Tokens
As in other Gemma models, every conversation must start with a special BOS token, which has no text rendering but corresponds to token integer 2. The BOS special token must either be manually prepended to the tokenized input or usually by the tokenizer via an
add_bos=Truekeyword argument. At the other end, when a block-AR generation completes, it ends in the usual special token
<turn|>followed by padding with the EOS token. Similarly, the EOS token corresponds to the integer 1 but has no text rendering when detokenized.
D.2 Conversational Structuring
The template strictly delineates conversation turns using opening and closing tags.
<|turn>and
<turn|>tokens encapsulate individual messages, and the opening token is appended with the specific role (e.g.,
<|turn>system\n). The model expects four roles:
user,
model, and
toolfor tool call responses.
The template natively supports multimodal routing by parsing content arrays for specific media types, injecting
<|image|>tokens into the context stream where appropriate. In the forward pass of the model, these tokens are replaced by the input image features, as opposed to the corresponding token embedding.
D.3 Thinking Channels
As with the Gemma 4 models, DiffusionGemma supports thinking mode, which can be enabled by adding the thinking token
<|think|>to the system instruction. When thinking is enabled, the model will emit an internal reasoning channel (which could technically still be empty) followed by the final answer:
Importantly, even when the
<|think|>token is not present in the system instruction, the model will still emit an empty thought channel as follows:
channel
thought
channel
final
For multi-turn conversations, do not include previous hidden thoughts in the conversation history. Only include the final assistant response before the next user turn.
D.4 Tool and Function Calling Serialization
A significant portion of the template is dedicated to parsing and serializing JSON-like tool schemas into a compact, token-efficient format. All JSON-like schemas, e.g. tool definitions or tool responses, rely on the custom delimiter
<|"|>(as opposed to a plain
") for clarity.
- topsep=0pt
<|tool>and
<tool|>: Used within the system prompt to define available function schemas, including their descriptions, parameters, and required arguments.
- topsep=0pt
<|tool_call>and
<tool_call|>: Model requests to invoke tools are formatted as
<|tool_call>call:function_name{arguments}<tool_call|>.
- topsep=0pt
<|tool_response>and
<tool_response|>: Results returned from external tools are appended to the context window wrapped by these tokens, allowing the model to seamlessly integrate external data into its subsequent turns.
Appendix E Mercury 2 Speed Estimation
Estimation data.
As Mercury 2 (62) is a closed source model, we do not have direct access to generate speed metrics such as TPF and TPS. We take a black-box approach and estimate TPS by querying OpenRouter’s API 77 7 https://openrouter.ai with the default maximum sequence (input+output) length of 50,000. We ran two independent rounds of queries — the first on July 9–10, 2026 (with a small number of retries on July 11), the second round between July 25–26, 2026 — and obtained consistent results across both measurements. Each API response includes the following metadata:
- topsep=0pt
the number of input tokens (prompt tokenization);
- topsep=0pt
how many prompt tokens were cached (KV-cache hits vs. fresh prefill);
- topsep=0pt
total output tokens (split into thinking tokens and answer tokens);
- topsep=0pt
the wall-clock time for the request (including network latencies and other overheads).
Response metadata does not include a breakdown of generation speed. We estimate generate TPS via a least-squares model, detailed below.
Estimation model.
We estimate per-token generation speed by fitting the following model via non-negative least-squares (NNLS):
| (14) |
where is the number of tokens requiring fresh computation, is the per-token prefill time, is the per-token generation time, and captures constant per-request overhead (network latency, etc.). From the fitted , we obtain the generation speed as TPS. The non-negativity constraint reflects that processing tokens, generating tokens, and per-request overhead can only add time. In practice, we disable caching across queries.
In order to capture any potential per-task variation in generation speed (e.g. from adaptive computation methods), we fit Equation (14) independently per benchmark, before taking an arithmetic average. Similarly, for open weight models we compute aggregate TPS measurements by first measuring per-task generative speed and then taking the arithmetic average.
Speed estimates.
Our speed measurements for Figure 1 are based on the GPQA-Diamond and LiveCodeBench-v6 datasets. For Mercury 2, we estimate the generative speed per task using the above methodology. Figure 19 shows the corresponding analysis; we obtain a TPS of 452.6 for GPA Diamond and 525.5 TPS for LiveCodeBench-v6, which translates into an average speed of 489 TPS.
Our speed measurements for Table 3 are based on seven benchmarks where we have measurements for all models: AIME 2026, GPQA Diamond, HumanEval, LBPP, LiveCodeBench-v6, MGSM, and Natural2Code. Again, for Mercury 2 we fit our speed estimation model on each task separately first before taking an arithmetic average. Figures 20 and 21 report the corresponding analysis; we obtain average TPS estimates of 600 TPS for high reasoning effort and 547 TPS for medium reasoning effort. We note that some evals (notably HumanEval and Natural2Code) have outliers that generate 50,000 tokens at extremely high speeds. These give a slightly favorable bias to our generation speed estimates and also explain why high reasoning effort have a higher TPS than medium reasoning effort. These outliers represent corrupted outputs where the model gets stuck in a thinking loop and exhaust the maximum generation length without returning a valid response.
Inception reports 1000 TPS on NVIDIA Blackwell GPUs88 8 https://www.inceptionlabs.ai/blog/introducing-mercury-2, retrieved July 28, 2026. while Artificial Analysis99 9 https://artificialanalysis.ai/models/mercury-2, retrieved July 28, 2026. reports a median of 987 TPS on undisclosed hardware. The difference to our estimate can be due to a number of reasons—in particular different hardware, serving optimizations, and/or different datasets used for measurement (this may have a large impact due to adaptive computation). It is worth noting that Artificial Analysis also reports substantial variance. Our estimate reflects the average speed a user would experience via the OpenRouter API.
Appendix F Denoising trajectory sampled from DiffusionGemma
Appendix G More on Practical Advantages of Text Diffusion
G.1 Bidirectional Reasoning and Self-Correction
Consider the frog crossing puzzle in Figure 23. This example highlights the necessity of self-correction in logical deduction. The prompt introduces a deceptive mathematical trap—an infinite loop—that the AR baseline blindly falls into, generating a contradictory “Yes”. DiffusionGemma’s parallel generation exhibits a distinct self-correction trajectory. While it initially assigns high probability to the intuitive but incorrect “Yes”, the bidirectional propagation of the logical constraints across the sequence enables the model to revise its stance and cleanly output “No” before the final tokens are sampled.

G.2 More on Dynamic and Adaptive Computation
To concretely demonstrate the adaptive behavior of text diffusion, we contrast a structurally “hard” generation task against an “easy” task in Figures 24 and 25. Both tasks involve generating a sequence of binary digits governed by identical local logical rules. However, in the structurally hard variant (Figure 24), each new token strictly depends on the two immediately preceding generated tokens. This causal dependency requires sequential reasoning, forcing the model to resolve the logic in a predominantly left-to-right manner. Consequently, the diffusion process adaptively expends more computational effort, requiring 7 denoising steps to fully resolve the sequence. It is crucial to note, however, that even on this structurally difficult, sequential problem, DiffusionGemma successfully decodes the entire sequence of 40 tokens (20 binary digits and 20 delimiting spaces) in only 7 denoising steps—a substantial acceleration compared to the 40 discrete sequential steps an AR model would require.
Conversely, the “easy” convolutional variant (Figure 25) asks the model to apply the exact same logic rules over a statically provided input string. Because the causal dependency on the model’s own dynamic output is removed, the task lacks sequential structure. DiffusionGemma immediately leverages its bidirectional attention to independently resolve all local rules in parallel, allowing the entire output sequence to converge simultaneously in merely 4 denoising steps.


G.3 Structured and Constrained Outputs