SpecFold:折叠多分支计算冗余加速扩散大语言模型推测解码
SpecFold: Folding Multi-Branch Redundancy for Faster Speculative Decoding in Diffusion Language Models
文章背景与核心概要
扩散大语言模型 (Diffusion Large Language Model, DLLM) 凭借独特的迭代块去噪 (Block Denoising) 机制展现出巨大的生成潜力,而多分支推测解码 (Multi-Branch Speculative Decoding) 则通过在单次前向传播中同时验证主分支与多个草稿分支,成为当下备受关注的推理加速利器。然而,现有加速手段大多聚焦于挖掘不同去噪步之间的“时间冗余”,却忽视了单次验证步内部各草稿分支间普遍存在的高度重叠——绝大部分 Token 都直接承袭自父分支,造成了极为严重的“多分支计算冗余” (Multi-Branch Computational Redundancy) 。为此,研究团队提出了软硬件协同设计的全新加速框架 SpecFold:在算法层通过 Token 级残差门控、折叠注意力机制与 FFN 选择性复用父分支的计算结果,在系统层借助定制的高性能稀疏 Triton 算子将细粒度复用转化为切实的端到端吞吐提升。在跨越两大 DLLM 家族、五款主流模型和五大权威基准的测试中,SpecFold 实现了相较于 Spiffy 高达 1.64 倍、相较于原生解码高达 1.99 倍的吞吐量飞跃,且全程保持无损的生成质量。
内容概要
Summary
扩散大语言模型 (DLLM) 借助迭代的块去噪逐步消除噪声来生成文本,而多分支推测解码技术通过在单次前向传播中同时校验主分支与多个候选草稿分支,极大地加速了文本生成。现有加速方案大多将目光投向去噪步骤间的时间冗余,而本文则另辟蹊径,首次提出了算法与系统协同设计的 SpecFold 框架,深入挖掘并利用了一个此前被长期忽略的关键优化维度——多分支计算冗余 (Multi-Branch Computational Redundancy) 。作者团队观察到,各个草稿分支其实继承了父分支的绝大部分 Token ,仅仅针对极少数位置进行了揭示与解掩码预测;据此,SpecFold 通过创新性的折叠注意力、FFN 以及定制的 Triton 算子内核,高度选择性地复用父分支计算。这一软硬件协同方案在多款模型和主流基准测试上,相较于前沿的 Spiffy 斩获了高达 1.64 倍的吞吐量提升,相较于原生常规解码实现了 1.99 倍的显著加速,同时完全不牺牲任何下游任务表现。
Diffusion large language models (DLLMs) generate text iteratively through block denoising, a process that multi-branch speculative decoding accelerates by verifying a main branch alongside multiple draft branches simultaneously. While existing methods focus on temporal redundancy, this paper introduces SpecFold, an algorithm-system co-design that exploits a previously overlooked axis: multi-branch computational redundancy. By observing that draft branches inherit most parent tokens while unmasking a small set of positions, SpecFold selectively reuses parent computations using folded attention, FFN, and a custom Triton kernel. This approach achieves up to 1.64× throughput over Spiffy and 1.99× over vanilla decoding across multiple models and benchmarks without compromising task performance.
论文信息
Paper Information
- arXiv 编号 (arXiv ID) : arXiv:2610.04875
- 主要学科领域 (Primary Subject) : 人工智能 (Artificial Intelligence,
cs.AI) - 其他学科领域 (Other Subjects) : 计算与语言 (Computation and Language,
cs.CL)、机器学习 (Machine Learning,cs.LG) - 提交时间 (Submission Date) : 2026 年 10 月 4 日 (最后修订于 2026 年 10 月 6 日)
- 论文作者 (Authors) : Chung-En Ho, Weiyu Sun, Cheng-Jhih Shih, He Li, Yong Liu, Yingyan Celine Lin
- arXiv ID: arXiv:2610.04875
- Primary Subject: Artificial Intelligence (
cs.AI)- Other Subjects: Computation and Language (
cs.CL), Machine Learning (cs.LG)- Submission Date: October 4, 2026 (Last revised October 6, 2026)
- Authors: Chung-En Ho, Weiyu Sun, Cheng-Jhih Shih, He Li, Yong Liu, Yingyan Celine Lin
论文摘要
Abstract
扩散大语言模型 (DLLM) 通过迭代的块去噪过程生成文本,而多分支推测解码则通过在单次前向传播中同时对一个主分支与多个草稿分支进行验证,从而大幅加快了这一生成流程。
Diffusion large language models (DLLMs) generate text through iterative block denoising, and multi-branch speculative decoding accelerates this process by verifying a main branch together with multiple draft branches in a single forward pass.
以往针对 DLLM 的加速方案主要致力于发掘跨去噪步骤之间的时间冗余,而我们敏锐地发现,在每一个推测验证步骤内部,还潜藏着另一个高度互补的冗余维度——多分支计算冗余 (Multi-Branch Computational Redundancy) 。在推测验证期间,各个草稿分支绝大多数 Token 均承袭自父分支,仅仅对极少数额外位置进行了去掩码揭示,这导致不同分支之间绝大部分的隐层状态保持着极高的相似性,存在严重的重复计算。
While prior DLLM acceleration methods primarily exploit temporal redundancy across denoising steps, we identify a complementary redundancy axis within each speculative verification step: multi-branch computational redundancy. During speculative verification, draft branches inherit most tokens from their parents while unmasking a small set of additional positions, causing large portions of hidden states to remain highly similar across branches.
为此,我们提出了 SpecFold——一种融合算法与系统的协同设计方案,旨在充分挖掘并利用这种多分支冗余,大幅压降多分支推测验证的计算开销:
- 在算法层面 (Algorithmically) : SpecFold 执行 Token 级别的残差门控,在保留残差隐层状态的同时,通过折叠注意力 (Folded Attention) 与 FFN 机制高度选择性地复用父分支的计算成果。
- 在系统层面 (Systemically) : 通过高效的稀疏多分支执行定制了 Triton 算子内核实现,将这种细粒度的计算复用实打实地转化为端到端的系统吞吐量飞跃。
We propose SpecFold, an algorithm-system co-design that exploits this multi-branch redundancy to reduce the cost of multi-branch speculative verification: * Algorithmically: SpecFold performs token-level residual gating and selectively reuses parent computation through folded attention and FFN while preserving residual hidden states. * Systemically: A Triton kernel implementation translates this fine-grained reuse into end-to-end throughput gains through efficient sparse multi-branch execution.
SpecFold 与现有的时间缓存技术呈现出良好的正交特性,能够无缝兼容现有的各类 DLLM 推测解码策略。在涵盖两大 DLLM 架构家族、五款不同模型以及五个权威标准基准测试的广泛评测中,SpecFold 相较于前沿基线 Spiffy 斩获了高达 1.64 倍的吞吐量,相较于原生常规解码提升高达 1.99 倍,同时完美保持了同等水准的下游任务表现。
SpecFold is orthogonal to temporal caching and compatible with existing DLLM speculation strategies. Across two DLLM families, five models, and five standard benchmarks, SpecFold achieves up to 1.64× throughput over Spiffy and up to 1.99× over vanilla decoding, while maintaining comparable task performance.
访问链接与资源
Access Links & Resources
- PDF 论文全文 (PDF) : 查看 PDF (View PDF)
- HTML 网页版 (Experimental) : arXiv HTML 页面
- TeX 源码工程 (TeX Source) : 查看源码包 (Source Files)
- 数字对象唯一标识符 (DOI) : 10.48550/arXiv.2610.04875
- PDF: View PDF
- HTML (Experimental): arXiv HTML
- TeX Source: Source Files
- DOI: 10.48550/arXiv.2610.04875