Accelerated Diffusion Models via Speculative Sampling

GenAI Diffusion ML DM
2025年01月09日
投机取样是一种流行的加速大型语言模型推理的技术,它通过使用快速草稿模型生成候选词,并根据目标模型的分布接受或拒绝这些候选词。尽管投机取样以前仅限于离散序列,我们将其扩展到扩散模型,这类模型通过连续的、向量值马尔可夫链生成样本。在此背景下,目标模型是一个高质量但计算成本高昂的扩散模型。我们提出了多种草稿策略,包括一种简单且有效的方法,该方法无需训练草稿模型,并且可以直接应用于任何扩散模型。我们的实验表明,在各种扩散模型上,这种方法显著提高了生成速度,将函数评估次数减少了一半,同时从目标模型生成精确样本。
Speculative sampling is a popular technique for accelerating inference in Large Language Models by generating candidate tokens using a fast draft model and accepting or rejecting them based on the target model's distribution. While speculative sampling was previously limited to discrete sequences, we extend it to diffusion models, which generate samples via continuous, vector-valued Markov chains. In this context, the target model is a high-quality but computationally expensive diffusion model. We propose various drafting strategies, including a simple and effective approach that does not require training a draft model and is applicable out of the box to any diffusion model. Our experiments demonstrate significant generation speedup on various diffusion models, halving the number of function evaluations, while generating exact samples from the target model.
许愿