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

PermuQuant:通过重新排列通道降低扩散模型每组量化误差

PermuQuant: Lowering Per-Group Quantization Error by Reordering Channels for Diffusion Models

Shanghai Jiao Tong University(上海交通大学);Huawei Noah’s Ark Lab(华为诺亚实验室)

Yongsen Cheng, Kai Liu, Kaiwen Tao, Junxian Li, Zhixin Wang, Zhikai Chen, Renjing Pei, Yulun Zhang

AI总结:

提出PermuQuant框架,通过基于联合二阶矩的通道重排序和校准接受规则,降低低比特扩散模型每组量化误差,实现显著加速和内存压缩。

摘要:

大规模视觉生成模型取得了显著性能。然而,其高计算和内存成本使得在资源受限场景(如交互应用和个人单GPU使用)中部署具有挑战性。训练后量化(PTQ)通过压缩预训练模型而无需昂贵的重新训练,提供了一种实用解决方案。然而,现有的PTQ方法在极低比特设置下仍然存在严重的质量下降。在本文中,我们识别出通道排序是每组量化中一个重要但未被充分探索的因素。在此设置中,每个连续组共享一个量化尺度。当具有非常不同统计特性的通道被放置在同一个组中时,尺度可能被异常值主导,导致大的量化误差。基于这一观察,我们提出了PermuQuant,一种简单有效的低比特扩散模型PTQ框架。PermuQuant在每组量化之前通过联合二阶矩准则对通道进行排序,将具有相似激活和权重统计的通道放入同一组。它进一步使用基于校准的接受规则,仅当所选排列在校准数据上降低量化误差时才应用重排序。选定的排列被吸收到相邻模块中或离线应用于权重,避免了显式的运行时排列操作。在多个大型扩散模型上的大量实验表明,PermuQuant一致地降低了量化误差,并优于现有的PTQ基线。在搭载RTX 5090的FLUX.1-dev上,PermuQuant在W4A4 NVFP4量化下实现了高达1.7倍的单步加速,并将DiT内存占用减少了3.5倍。代码将在https://github.com/yscheng04/PermuQuant提供。

英文摘要:

Large-scale visual generative models have achieved remarkable performance. However, their high computational and memory costs make deployment challenging in resource-constrained scenarios, such as interactive applications and personal single-GPU usage. Post-training quantization (PTQ) offers a practical solution by compressing pretrained models without expensive retraining. However, existing PTQ methods still suffer from severe quality degradation under extremely low-bit settings. In this paper, we identify channel ordering as an important but underexplored factor in per-group quantization. In this setting, each contiguous group shares one quantization scale. When channels with very different statistics are placed in the same group, the scale can be dominated by outliers and cause large quantization errors. Based on this observation, we propose PermuQuant, a simple and effective PTQ framework for low-bit diffusion models. PermuQuant sorts channels by a joint second-moment criterion before per-group quantization, placing channels with similar activation and weight statistics into the same group. It further uses a calibration-based acceptance rule to apply reordering only when the selected permutation reduces quantization error on calibration data. The selected permutations are absorbed into adjacent modules or applied to weights offline, avoiding explicit runtime permutation operations. Extensive experiments on multiple large diffusion models show that PermuQuant consistently reduces quantization error and outperforms existing PTQ baselines. On FLUX.1-dev with an RTX 5090, PermuQuant achieves up to a 1.7$\times$ single step speedup and reduces the DiT memory footprint by 3.5$\times$ under W4A4 NVFP4 quantization. Code will be available at https://github.com/yscheng04/PermuQuant.

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

↑