Speculative decoding speeds up LLM inference by using a draft model to generate tokens, with an acceptance-rejection scheme that ensures that the output matches the target distribution. Adapting this to continuous diffusions is difficult because speculative sampling requires drawing from a residual distribution. While straightforward in discrete spaces, efficiently sampling this residual in continuous space is non-trivial. Consequently, existing diffusion adaptations either use computationally inefficient sampling techniques or rely on an alternative scheme. In this work, we introduce a novel scheme that efficiently implements the original speculative sampling mechanism for diffusion models. Our approach offers a critical advantage over current methods: it enables us to adapt block verification from LLMs to diffusions -- which provably improves the acceptance rate of drafts. Furthermore, we formalize and analyze the Free Drafter, a heuristic self-speculative drafter for diffusions that requires no training. By enabling block verification, our Free Drafter yields up to a 6.3% speedup over existing speculative methods with no additional training and negligible overhead beyond the existing parallel verification pass.
翻译:推测解码通过使用草稿模型生成令牌,并采用接受-拒绝机制确保输出符合目标分布,从而加速大语言模型推理。由于推测采样需要从残差分布中抽取样本,将其适配到连续扩散过程较为困难。尽管在离散空间中该操作直观可行,但在连续空间中高效采样残差并非易事。因此,现有扩散适配方法要么采用计算效率低下的采样技术,要么依赖替代方案。本研究提出一种新颖方案,可高效实现扩散模型原始的推测采样机制。相较于现有方法,我们的方法具有关键优势:它能将大语言模型的块验证机制适配到扩散过程——这在理论上能提升草稿的接受率。此外,我们形式化并分析了无需训练的启发式自推测草稿模型Free Drafter。通过启用块验证,我们的Free Drafter在无需额外训练且开销可忽略的前提下,相比现有推测方法实现了最高6.3%的加速,且仅需在现有并行验证流程中增加极少量计算。