arXiv:2410.03355cs.CVcs.AI2024-10ICLR被引 55

提出LANTERN加速视觉自回归模型生成,解决采样时令牌选择模糊问题。

LANTERN: Accelerating Visual Autoregressive Models with Relaxed Speculative Decoding

  • 引入宽松接受条件,利用潜在空间令牌可互换性提升推测解码效率
  • 在LlamaGen上实现1.75倍至1.82倍的生成速度提升
  • 适合追求高效率图像生成且关注质量稳定的开发者

自回归(AR)模型在图像生成中表现突出,常与甚至超越扩散模型。但其逐个处理令牌的串行特性导致生成速度慢于GAN或扩散方法。尽管推测解码在大语言模型中有效,但在视觉AR模型中应用仍不充分。本文识别出该场景中的核心挑战——‘令牌选择模糊’,即视觉模型常对多个令牌赋予相近低概率,阻碍推测解码性能。为此,提出名为LANTERN的宽松接受机制,利用潜在空间中令牌的可互换性,允许原本被过早拒绝的候选令牌更灵活使用,恢复推测解码有效性。进一步结合总变差距离约束,确保加速不显著损害图像质量或语义一致性。实验表明,相较于现有最优推测解码方法,LANTERN在LlamaGen上分别实现1.75倍和1.82倍的速度提升,相比贪婪解码与随机采样。代码已开源。

原文摘要 · Abstract (English)

Auto-Regressive (AR) models have recently gained prominence in image generation, often matching or even surpassing the performance of diffusion models. However, one major limitation of AR models is their sequential nature, which processes tokens one at a time, slowing down generation compared to models like GANs or diffusion-based methods that operate more efficiently. While speculative decoding has proven effective for accelerating LLMs by generating multiple tokens in a single forward, its application in visual AR models remains largely unexplored. In this work, we identify a challenge in this setting, which we term \textit{token selection ambiguity}, wherein visual AR models frequently assign uniformly low probabilities to tokens, hampering the performance of speculative decoding. To overcome this challenge, we propose a relaxed acceptance condition referred to as LANTERN that leverages the interchangeability of tokens in latent space. This relaxation restores the effectiveness of speculative decoding in visual AR models by enabling more flexible use of candidate tokens that would otherwise be prematurely rejected. Furthermore, by incorporating a total variation distance bound, we ensure that these speed gains are achieved without significantly compromising image quality or semantic coherence. Experimental results demonstrate the efficacy of our method in providing a substantial speed-up over speculative decoding. In specific, compared to a naïve application of the state-of-the-art speculative decoding, LANTERN increases speed-ups by $\mathbf{1.75}\times$ and $\mathbf{1.82}\times$, as compared to greedy decoding and random sampling, respectively, when applied to LlamaGen, a contemporary visual AR model. The code is publicly available at https://github.com/jadohu/LANTERN.

视觉生成推测解码加速生成自回归模型

Thank you to arXiv for use of its open access interoperability. PaperDance 不是 arXiv 官方产品;中文卡片由大模型生成,请以原文为准。