2024-11-20 · 专家 · 计算机视觉 · 机器学习

Continuous Speculative Decoding for Autoregressive Image Generation

该论文提出了一种名为“连续推测解码”的新方法,用于加速自回归图像生成模型的推理速度,同时保持生成质量。

更新于 2024-11-20。作者:Zili Wang、Robert Zhang、Kun Ding、Qi Yang、Fei Li、Shiming Xiang。

中文摘要

连续值自回归(AR)图像生成模型在性能上显著优于它们的离散标记同类模型,展现出相当高的重建质量和生成保真度。然而,自回归框架的计算需求导致显著的推理开销。虽然推测解码已被证明在加速大型语言模型(LLMs)方面是有效的,但它们在连续值视觉自回归模型上的应用尚未得到探索。这项工作将推测解码算法从离散标记泛化到连续空间。通过分析输出分布的内在属性,我们为这类模型中普遍存在的扩散分布建立了一个定制的接受标准。为了克服推测解码输出分布中出现的不一致性,我们引入了去噪轨迹对齐和标记预填充方法。此外,我们确定了拒绝阶段中难以采样的分布。为了缓解这一问题,我们提出了一种具有适当上限的细致接受-拒绝采样方法,从而避免了复杂的积分。实验结果表明,我们的连续推测解码在保持输出分布的同时,在现成模型上实现了惊人的2.33倍速度提升。代码将在https://github.com/MarkXCloud/CSpD处提供。

英文摘要

Continuous-valued Autoregressive (AR) image generation models have demonstrated notable superiority over their discrete-token counterparts, showcasing considerable reconstruction quality and higher generation fidelity. However, the computational demands of the autoregressive framework result in significant inference overhead. While speculative decoding has proven effective in accelerating Large Language Models (LLMs), their adaptation to continuous-valued visual autoregressive models remains unexplored. This work generalizes the speculative decoding algorithm from discrete tokens to continuous space. By analyzing the intrinsic properties of output distribution, we establish a tailored acceptance criterion for the diffusion distributions prevalent in such models. To overcome the inconsistency that occurred in speculative decoding output distributions, we introduce denoising trajectory alignment and token pre-filling methods. Additionally, we identify the hard-to-sample distribution in the rejection phase. To mitigate this issue, we propose a meticulous acceptance-rejection sampling method with a proper upper bound, thereby circumventing complex integration. Experimental results show that our continuous speculative decoding achieves a remarkable 2.33times speed-up on off-the-shelf models while maintaining the output distribution. Codes will be available at https://github.com/MarkXCloud/CSpD

解读

一句话总结

该论文提出了一种名为“连续推测解码”的新方法,用于加速自回归图像生成模型的推理速度,同时保持生成质量。

问题1:这篇论文想要解决什么具体问题?

• 问题背景:自回归图像生成模型虽然生成质量高,但推理速度慢,计算量大。 • 现有方案不足:现有的自回归图像生成模型在保持生成质量的同时,无法有效加速推理过程。 • 研究目标:提出一种名为“连续推测解码”的新方法,以加速自回归图像生成模型的推理速度,同时保持输出分布和生成质量。

问题2:论文的核心创新点是什么?

• 技术创新:将推测解码算法从离散空间推广到连续空间,并应用于连续值自回归图像生成。 • 方法改进:建立适当的接受标准,并通过接受-拒绝采样实现无积分采样方法。 • 优势:无需额外训练,无需修改模型架构或输出分布,即可实现高达2.33倍的加速,同时保持可比的图像质量。

问题3:实验结果如何验证了方法的有效性?

• 关键实验:在ImageNet 256×256图像生成任务上,使用开源的MAR模型进行实验。 • 性能提升:连续推测解码算法在推理速度上实现了高达2.33倍的加速,同时在FID和IS等指标上保持与原始模型可比的性能。 • 对比结果:与原始模型相比,连续推测解码算法在推理速度上有显著提升,同时在图像质量上没有明显下降。

问题4:这个研究的实际应用价值是什么?

• 应用场景:自回归图像生成模型在图像处理、计算机视觉等领域有广泛应用。 • 实施建议:该方法可以应用于需要加速推理的自回归图像生成模型,以提高效率和性能。 • 局限与展望:该研究在较小的模型上取得了显著的效果,未来可以探索在更大规模的模型上的应用,以进一步提高性能。

来源

机器可读索引:llms.txt