扩散式 LLM 可能会使大部分 AI 工程堆栈过时
2 分•作者: victorpiles99•5 个月前
这周我一直在深入研究扩散语言模型,我认为这是目前 AI 领域被低估的方向。<p>自回归 LLM 的核心问题:<p>当今所有主流模型(GPT、Claude、Gemini)都一次生成一个 token,从左到右。每个 token 都依赖于前一个。这种单一的架构约束塑造了整个 AI 行业:<p>- 模型无法修改已写内容 → 我们构建了思维链、反思和多轮推理,迫使它们“三思而后行”
- 每个 token 都需要一次前向传播 → 我们大力投资于推测性解码、KV 缓存和量化,以使生成过程可以接受
- 无法在输出中间进行编辑 → 我们构建了带有重试循环、工具调用和规划层的代理框架来解决这个问题
- 无法并行生成 → 我们构建了编排系统,将多个缓慢的调用链接在一起<p>我们今天所称的“AI 工程”的大部分工作都是在修补一件事:模型无法回溯。<p>扩散 LM 颠覆了这种范式。从一个被掩码的 token 画布开始,迭代地并行优化整个输出。每个位置同时更新,模型在每一步都能看到并编辑其所有输出。这与图像扩散(Stable Diffusion、DALL-E)的原理相同,应用于文本。<p>为什么我认为这个理论实际上是成立的:<p>1. 并行性是真实的,而非理论上的。Inception Labs 的 Mercury 2(闭源,基于扩散)在 MMLU、HumanEval、MATH 上的质量与 GPT-4o mini 相当,速度已达到约 1000 tok/s。这并非基准测试的技巧——这是没有被顺序生成所限制的直接结果。
2. 复杂性降低是巨大的。如果一个模型可以一次查看并编辑其所有输出,那么你就不需要我们构建的一半脚手架:反思提示变得原生(模型已经在迭代自己的输出),重试循环变得不必要(就地编辑),规划代理变得更简单(模型可以重组,而不仅仅是追加)。整个堆栈被简化。
3. 转换路径是存在的。你可以使用现有的预训练 AR 模型,仅通过微调将其转换为扩散模型——无需从头开始预训练。这意味着已经投入数十亿美元用于 AR 预训练的资金不会被浪费。这是一个升级路径,而不是重新开始。<p>目前的主要限制:固定输出长度。你必须在生成开始之前预先分配画布大小。块扩散(在每个块内进行扩散,顺序生成块)是一种解决方法。分层生成——先概述,然后并行展开各部分——是另一种方法。具有讽刺意味的是,编排它需要一个代理,所以扩散并没有杀死代理——它改变了它们的工作方式。<p>诚实地说:在可比规模下,开放扩散 LM 在知识和推理方面仍然落后于顶级的 AR 模型。但 Mercury 2 表明上限很高,转换结果出奇地好,并且该架构消除了整个类别的工程复杂性。我认为在一年之内,我们将看到扩散模型与前沿的 AR 模型竞争,当这种情况发生时,许多当前的工具(代理框架、提示工程技术、推理优化堆栈)将变得非常简单或不必要。<p>在研究这一切的过程中,我发现了 dLLM,这是一个开源库,它统一了扩散 LM 的训练、推理和评估。它有 LLaDA、Dream、块扩散的配方,以及将任何 AR 模型转换为扩散模型的方法。如果你想尝试,这是一个很好的起点。<p>论文:https://arxiv.org/abs/2602.22661<p>代码:https://github.com/ZHZisZZ/dllm<p>模型:https://huggingface.co/dllm-hub<p>你有什么看法?
查看原文
I've been deep-diving into diffusion language models this week and I think this is the most underrated direction in AI right now.<p>The core issue with autoregressive LLMs:<p>Every major model today (GPT, Claude, Gemini) generates one token at a time, left to right. Each token depends on the previous one. This single architectural constraint has shaped the entire AI industry:<p>- Models can't revise what they already wrote → we build chain-of-thought, reflection, and multi-pass reasoning to force them to "think before committing"
- One forward pass per token → we invest heavily in speculative decoding, KV-caches, and quantization to make generation tolerable
- Can't edit mid-output → we build agent frameworks with retry loops, tool calls, and planning layers to work around it
- Can't generate in parallel → we build orchestration systems that chain multiple slow calls together<p>Most of what we call "AI engineering" today is patching around one thing: the model can't look back.<p>Diffusion LMs flip the paradigm. Start with a canvas of masked tokens, iteratively refine the entire output in parallel. Every position updated simultaneously, the model sees and edits all of its output at every step. Same principle as image diffusion (Stable Diffusion, DALL-E), applied to
text.<p>Why I think the theory actually holds:<p>1. Parallelism is real, not theoretical. Inception Labs' Mercury 2 (closed-source, diffusion-based) already hits ~1000 tok/s with quality competitive with GPT-4o mini on MMLU, HumanEval, MATH. That's not a benchmark trick — it's a direct consequence of not being bottlenecked by sequential
generation.
2. The complexity reduction is massive. If a model can see and edit its entire output at once, you don't need half the scaffolding we've built: reflection prompting becomes native (the model already iterates on its own output), retry loops become unnecessary (edit in place), planning agents
get simpler (the model can restructure, not just append). The whole stack flattens.
3. The conversion path exists. You can take an existing pretrained AR model and convert it to diffusion via fine-tuning alone — no pretraining from scratch. This means the billions already invested in AR pretraining aren't wasted. It's an upgrade path, not a restart.<p>The main limitation today: fixed output length. You must pre-allocate the canvas size before generation starts. Block Diffusion (generating in sequential chunks, diffusing within each chunk) is one workaround. Hierarchical generation — outline first, expand sections in parallel — is another.
Ironically, orchestrating that requires an agent, so diffusion doesn't kill agents — it changes what they do.<p>Honest take: Open diffusion LMs still trail top AR models on knowledge and reasoning at comparable scale. But Mercury 2 shows the ceiling is high, the conversion results are surprisingly good, and the architecture eliminates entire categories of engineering complexity. I think within a year
we'll see diffusion models competitive with frontier AR models, and when that happens, a lot of the current tooling (agent frameworks, prompt engineering techniques, inference optimization stacks) gets dramatically simpler or unnecessary.<p>While researching all this I found dLLM, an open-source library that unifies training, inference, and evaluation for diffusion LMs. It has recipes for LLaDA, Dream, Block Diffusion, and converting any AR model to diffusion. Good starting point if you want to experiment.<p>Paper: https://arxiv.org/abs/2602.22661<p>Code: https://github.com/ZHZisZZ/dllm<p>Models: https://huggingface.co/dllm-hub<p>What is your opinion?