arXivDaily arXiv每日学术速递 周一至周五更新
arXiv 2404.09532cs.CVcs.LG
收藏

TMPQ-DM: 面向高效扩散模型的时间步缩减与量化精度联合选择方法

TMPQ-DM: Joint Timestep Reduction and Quantization Precision Selection for Efficient Diffusion Models

Tsinghua University(清华大学);Shenzhen Technology University(深圳技术大学);The Chinese University of Hong Kong(香港中文大学)

Haojun Sun, Chen Tang, Zhi Wang, Yuan Meng, Jingyan jiang, Xinzhu Ma, Wenwu Zhu

AI总结:

针对扩散模型部署计算开销大的问题,提出TMPQ-DM框架,联合优化时间步非均匀缩减与逐层细粒度量化,借助超网络和无梯度进化搜索实现高效的性能-效率权衡。

摘要:

扩散模型已成为生成模型领域的主流候选方案。其独特的序列生成过程需要数百甚至数千个时间步,从纯高斯噪声逐步重建图像,且每个时间步都需要完成整个模型的完整推理,这是扩散模型的显著特征。然而,这类模型固有的巨大计算需求为部署带来了挑战,因此量化技术被广泛用于降低位宽,以减少存储和计算开销。当前的量化方法主要聚焦于模型侧的优化,忽略了时间维度(例如时间步序列的长度),导致冗余时间步持续消耗计算资源,为生成过程的加速留下了巨大空间。本文提出TMPQ-DM框架,联合优化时间步缩减与量化,从时间和模型两个优化维度入手,实现更优的性能-效率权衡。在时间步缩减方面,我们针对去噪过程的非均匀特性,设计了一种非均匀分组方案,以此缓解时间步组合爆炸的问题。在量化方面,我们采用细粒度的逐层策略,根据不同层对最终生成性能的贡献分配不同的位宽,从而修正了既往研究中出现的性能下降问题。为加快细粒度量化的评估速度,我们进一步设计了一个超网络,利用共享的量化结果作为精度求解器。这两个设计组件在我们的框架中无缝集成,可通过无梯度进化搜索算法,在指数级规模的决策空间中实现快速的联合探索。

英文摘要:

Diffusion models have emerged as preeminent contenders in the realm of generative models. Distinguished by their distinctive sequential generative processes, characterized by hundreds or even thousands of timesteps, diffusion models progressively reconstruct images from pure Gaussian noise, with each timestep necessitating full inference of the entire model. However, the substantial computational demands inherent to these models present challenges for deployment, quantization is thus widely used to lower the bit-width for reducing the storage and computing overheads. Current quantization methodologies primarily focus on model-side optimization, disregarding the temporal dimension, such as the length of the timestep sequence, thereby allowing redundant timesteps to continue consuming computational resources, leaving substantial scope for accelerating the generative process. In this paper, we introduce TMPQ-DM, which jointly optimizes timestep reduction and quantization to achieve a superior performance-efficiency trade-off, addressing both temporal and model optimization aspects. For timestep reduction, we devise a non-uniform grouping scheme tailored to the non-uniform nature of the denoising process, thereby mitigating the explosive combinations of timesteps. In terms of quantization, we adopt a fine-grained layer-wise approach to allocate varying bit-widths to different layers based on their respective contributions to the final generative performance, thus rectifying performance degradation observed in prior studies. To expedite the evaluation of fine-grained quantization, we further devise a super-network to serve as a precision solver by leveraging shared quantization results. These two design components are seamlessly integrated within our framework, enabling rapid joint exploration of the exponentially large decision space via a gradient-free evolutionary search algorithm.

机构、总结、中文摘要均由AI分析而来,可能存在错误,请以论文正文为准。

↑