arXivDaily arXiv每日学术速递 周一至周五更新
arXiv 2412.11549cs.CV
收藏

MPQ-DM:面向极低位扩散模型的混合精度量化

MPQ-DM: Mixed Precision Quantization for Extremely Low Bit Diffusion Models

Institute of Computing Technology, Chinese Academy of Sciences(中国科学院计算技术研究所);University of Chinese Academy of Sciences(中国科学院大学);ETH Zurich(苏黎世联邦理工学院);Beijing Jiaotong University(北京交通大学)

Weilun Feng, Haotong Qin, Chuanguang Yang, Zhulin An, Libo Huang, Boyu Diao, Fei Wang, Renshuai Tao, Yongjun Xu, Michele Magno

AI总结:

针对扩散模型极低位量化性能严重下降问题,提出混合精度量化方法MPQ-DM,结合异常驱动混合量化与时间平滑关系蒸馏,在W2A4下FID降低58%。

摘要:

扩散模型在生成任务中受到了广泛关注。然而,昂贵的计算成本阻碍了扩散模型在资源受限场景中的应用。量化作为一种实用的解决方案,通过降低参数的位宽来显著节省存储和计算。然而,现有的扩散模型量化方法仍然会导致性能严重下降,尤其是在极低位宽(2-4位)下。性能下降的主要来源是低比特量化时激活值的显著离散化。过少的激活候选对于异常显著权重通道的量化不友好,且离散化的特征阻碍了扩散模型在不同时间步上的稳定学习。本文提出了MPQ-DM,一种用于扩散模型的混合精度量化方法。所提出的MPQ-DM主要依赖两种技术:(1)为减轻由异常严重权重通道引起的量化误差,我们提出了一种异常驱动混合量化(OMQ)技术,该技术使用峰度(Kurtosis)来量化异常显著通道,并应用优化的层内混合精度位宽分配,以在目标效率内恢复精度性能。(2)为稳健地学习跨时间步的表示,我们构建了一种时间平滑关系蒸馏(TRD)方案,在量化扩散模型与其全精度对应模型之间,将离散和连续潜变量转移到统一的关系空间,以减少表示不一致性。综合实验表明,与最先进的量化方法相比,MPQ-DM在极低位宽下实现了显著的精度提升。在W2A4设置下,MPQ-DM相比基线实现了58%的FID降低,而所有其他方法甚至崩溃。

英文摘要:

Diffusion models have received wide attention in generation tasks. However, the expensive computation cost prevents the application of diffusion models in resource-constrained scenarios. Quantization emerges as a practical solution that significantly saves storage and computation by reducing the bit-width of parameters. However, the existing quantization methods for diffusion models still cause severe degradation in performance, especially under extremely low bit-widths (2-4 bit). The primary decrease in performance comes from the significant discretization of activation values at low bit quantization. Too few activation candidates are unfriendly for outlier significant weight channel quantization, and the discretized features prevent stable learning over different time steps of the diffusion model. This paper presents MPQ-DM, a Mixed-Precision Quantization method for Diffusion Models. The proposed MPQ-DM mainly relies on two techniques:(1) To mitigate the quantization error caused by outlier severe weight channels, we propose an Outlier-Driven Mixed Quantization (OMQ) technique that uses $Kurtosis$ to quantify outlier salient channels and apply optimized intra-layer mixed-precision bit-width allocation to recover accuracy performance within target efficiency.(2) To robustly learn representations crossing time steps, we construct a Time-Smoothed Relation Distillation (TRD) scheme between the quantized diffusion model and its full-precision counterpart, transferring discrete and continuous latent to a unified relation space to reduce the representation inconsistency. Comprehensive experiments demonstrate that MPQ-DM achieves significant accuracy gains under extremely low bit-widths compared with SOTA quantization methods. MPQ-DM achieves a 58\% FID decrease under W2A4 setting compared with baseline, while all other methods even collapse.

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

↑