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

梯度对齐校准用于扩散模型的后训练量化

Gradient-Aligned Calibration for Post-Training Quantization of Diffusion Models

Department of Data Science and AI, Monash University Australia(数据科学与人工智能系,墨尔本大学)

Dung Anh Hoang, Cuong Pham anh Trung Le, Jianfei Cai, Thanh-Toan Do

AI总结:

本文提出了一种梯度对齐校准的后训练量化方法,通过为校准样本分配最优权重,提升扩散模型的量化性能。

摘要:

扩散模型通过逐步估计从高斯噪声分布到真实图像的平滑过渡,在图像合成中表现出显著的性能。不幸的是,它们的实际部署受到缓慢的推理速度、高内存使用和噪声估计过程的计算需求的限制。后训练量化(PTQ)出现作为加速采样和减少内存开销的有希望的解决方案。现有的扩散模型PTQ方法通常在时间步长上对校准样本应用均匀权重,这在子优,因为不同时间步长的数据可能对扩散过程有不同的贡献。此外,由于不同时间步长的激活分布和梯度不同,均匀量化方法也是次优的。每个时间步长需要不同的梯度方向以实现最佳量化,将它们视为同等处理会导致冲突的梯度,从而降低性能。在本文中,我们提出了一种新的PTQ方法,通过为校准样本分配适当的权重来解决这些挑战。具体而言,我们的方法学习将最优权重分配给校准样本,以在时间步长上对齐量化模型的梯度,从而促进量化过程。在CIFAR-10、LSUN-Bedrooms和ImageNet上的大量实验表明,我们的方法在扩散模型的PTQ方法中优于其他方法。

英文摘要:

Diffusion models have shown remarkable performance in image synthesis by progressively estimating a smooth transition from a Gaussian distribution of noise to a real image. Unfortunately, their practical deployment is limited by slow inference speed, high memory usage, and the computational demands of the noise estimation process. Post-training quantization (PTQ) emerges as a promising solution to accelerate sampling and reduce memory overhead for diffusion models. Existing PTQ methods for diffusion models typically apply uniform weights to calibration samples across timesteps, which is sub-optimal since data at different timesteps may contribute differently to the diffusion process. Additionally, due to varying activation distributions and gradients across timesteps, a uniform quantization approach is sub-optimal. Each timestep requires a different gradient direction for optimal quantization, and treating them equally can lead to conflicting gradients that degrade performance. In this paper, we propose a novel PTQ method that addresses these challenges by assigning appropriate weights to calibration samples. Specifically, our approach learns to assign optimal weights to calibration samples to align the quantized model's gradients across timesteps, facilitating the quantization process. Extensive experiments on CIFAR-10, LSUN-Bedrooms, and ImageNet demonstrate the superiority of our method compared to other PTQ methods for diffusion models.

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

↑