Distilled Decoding 1: One-step Sampling of Image Auto-regressive Models with Flow Matching
该论文提出了一种名为Distilled Decoding(DD)的新方法,通过流匹配技术,能够将预训练的图像自回归模型在几步内完成样本生成,显著提高了生成速度。
更新于 2024-12-24。作者:Enshu Liu、Xuefei Ning、Yu Wang、Zinan Lin。
中文摘要
自回归(AR)模型在文本和图像生成方面取得了最先进的性能,但由于逐个标记的过程,生成速度较慢。我们提出了一个雄心勃勃的问题:预先训练的AR模型是否可以被调整为仅通过一两个步骤生成输出?如果成功,这将显著推进AR模型的发展和部署。我们注意到,现有尝试通过一次性生成多个标记来加速AR生成的工作,由于标记之间的条件依赖关系,无法捕捉输出分布,这限制了它们在少步骤生成中的有效性。为了解决这个问题,我们提出了蒸馏解码(DD),它使用流匹配来创建从高斯分布到预先训练的AR模型输出分布的确定性映射。然后我们训练一个网络来蒸馏这个映射,实现少步骤生成。DD不需要原始AR模型的训练数据,这使得它更加实用。我们在最先进的图像AR模型上评估了DD,并在ImageNet-256上展示了有希望的结果。对于需要10步生成的VAR,DD实现了一步生成(速度提高了6.3倍),FID从4.19增加到9.96,增幅可接受。对于LlamaGen,DD将生成从256步减少到1步,速度提高了217.8倍,FID从4.11增加到11.35,增幅相当。在两种情况下,基线方法都完全失败,FID大于100。DD在文本到图像生成方面也表现出色,对于LlamaGen,它将生成从256步减少到2步,FID仅从25.70增加到28.95。作为第一个展示图像AR模型一步生成可能性的工作,DD挑战了AR模型本质上速度慢的普遍观念,并为高效AR生成开辟了新的机会。项目网站为https://imagination-research.github.io/distilled-decoding。
英文摘要
Autoregressive (AR) models have achieved state-of-the-art performance in text and image generation but suffer from slow generation due to the token-by-token process. We ask an ambitious question: can a pre-trained AR model be adapted to generate outputs in just one or two steps? If successful, this would significantly advance the development and deployment of AR models. We notice that existing works that try to speed up AR generation by generating multiple tokens at once fundamentally cannot capture the output distribution due to the conditional dependencies between tokens, limiting their effectiveness for few-step generation. To address this, we propose Distilled Decoding (DD), which uses flow matching to create a deterministic mapping from Gaussian distribution to the output distribution of the pre-trained AR model. We then train a network to distill this mapping, enabling few-step generation. DD doesn't need the training data of the original AR model, making it more practical.We evaluate DD on state-of-the-art image AR models and present promising results on ImageNet-256. For VAR, which requires 10-step generation, DD enables one-step generation (6.3times speed-up), with an acceptable increase in FID from 4.19 to 9.96. For LlamaGen, DD reduces generation from 256 steps to 1, achieving an 217.8times speed-up with a comparable FID increase from 4.11 to 11.35. In both cases, baseline methods completely fail with FID>100. DD also excels on text-to-image generation, reducing the generation from 256 steps to 2 for LlamaGen with minimal FID increase from 25.70 to 28.95. As the first work to demonstrate the possibility of one-step generation for image AR models, DD challenges the prevailing notion that AR models are inherently slow, and opens up new opportunities for efficient AR generation. The project website is at https://imagination-research.github.io/distilled-decoding.
解读
一句话总结
该论文提出了一种名为Distilled Decoding(DD)的新方法,通过流匹配技术,能够将预训练的图像自回归模型在几步内完成样本生成,显著提高了生成速度。
问题1:这篇论文想要解决什么具体问题?
• 问题背景:自回归模型在文本和图像生成方面取得了显著成果,但其主要局限性是生成速度慢,因为它们是逐个标记进行生成的。 • 现有方案不足:现有的加速自回归生成的方法通常无法同时生成多个标记,因为它们无法捕捉标记之间的条件依赖关系,从而限制了其在少步生成中的有效性。 • 研究目标:提出一种方法,使得预训练的自回归模型能够在仅一步或两步内生成输出,从而显著提高生成速度。
问题2:论文的核心创新点是什么?
• 技术创新:利用流匹配技术创建从高斯分布到预训练自回归模型输出分布的确定性映射。 • 方法改进:通过训练网络来提炼这种映射,从而实现少步生成。 • 优势:不需要原始自回归模型的训练数据,使其更实用;通过流匹配和自回归模型的深度协同,可以灵活地使用额外的生成步骤来提高数据质量。
问题3:实验结果如何验证了方法的有效性?
• 关键实验:在VAR和LlamaGen等最先进的图像自回归模型上评估DD。 • 性能提升:对于VAR,DD将生成步骤从10步减少到1步(速度提高6.3倍),在ImageNet-256上的FID从4.19增加到9.96;对于LlamaGen,DD将生成步骤从256步减少到1步(速度提高217.8倍),在ImageNet-256上的FID从4.11增加到11.35。 • 对比结果:基线方法在一步生成中完全失败,FID得分超过100。
问题4:这个研究的实际应用价值是什么?
• 应用场景:图像生成、文本生成等。 • 实施建议:使用DD可以显著提高生成速度,降低测试和部署成本,提高用户体验。 • 局限与展望:DD目前主要针对图像自回归模型,未来可以扩展到其他类型的自回归模型,如大型语言模型。