提出HadaNorm方法,让扩散模型在低精度下仍保持高质量生成
HadaNorm: Diffusion Transformer Quantization through Mean-Centered Transformations
- 通过均值归一化与哈达玛变换,缓解量化中的异常值问题
- 在多种Transformer组件中稳定降低量化误差,支持更高压缩比
- 适合部署高阶扩散模型的边缘设备,如手机、嵌入式系统
扩散模型代表图像生成的前沿技术,但其高昂的内存和计算开销限制了在资源受限设备上的部署。后训练量化(PTQ)通过降低矩阵运算的位宽提供了可行方案。然而,标准PTQ方法对异常值敏感,实现更高压缩率通常需在量化前对模型权重和激活值进行变换。本文提出HadaNorm,一种新型线性变换,通过同时归一化通道激活并应用哈达玛变换,有效缓解异常值影响,实现激进的激活量化。实验表明,HadaNorm在各类Transformer模块中持续降低量化误差,优于当前最先进方法。
原文摘要 · Abstract (English)
Diffusion models represent the cutting edge in image generation, but their high memory and computational demands hinder deployment on resource-constrained devices. Post-Training Quantization (PTQ) offers a promising solution by reducing the bitwidth of matrix operations. However, standard PTQ methods struggle with outliers, and achieving higher compression often requires transforming model weights and activations before quantization. In this work, we propose HadaNorm, a novel linear transformation that extends existing approaches by both normalizing channels activations and applying Hadamard transforms to effectively mitigate outliers and enable aggressive activation quantization. We demonstrate that HadaNorm consistently reduces quantization error across the various components of transformer blocks, outperforming state-of-the-art methods.
Thank you to arXiv for use of its open access interoperability. PaperDance 不是 arXiv 官方产品;中文卡片由大模型生成,请以原文为准。