CentriQ:通过精确均值中心化实现扩散Transformer的无校准量化
CentriQ: Calibration-Free Quantization of Diffusion Transformers via Exact Mean Centering
- Tenstorrent
- EPFL(瑞士洛桑联邦理工学院)
机构由 AI 辅助整理,请以论文原文为准。
AI总结:
针对扩散Transformer量化中校准依赖与数据无关旋转失效的问题,提出CentriQ无校准量化器,通过精确均值中心化与秩1全精度分支恢复均值,在4比特匹配校准方法,并首次实现2比特激活可用质量。
AI中文摘要:
扩散Transformer(DiTs)实现了最先进的图像生成,但其采样成本限制了部署。将权重和激活均量化为4比特可降低此成本,然而现有方法在以下两方面之一存在不足。基于校准的方法受限于特定检查点和提示分布,而数据无关的Hadamard旋转(对LLM有效)在DiTs上会损失质量。我们证明这一损失具有结构性原因。自适应层归一化条件化会为激活添加逐令牌均值,而在所评估DiTs的宽度下,数据无关方法所用的Hadamard旋转无法将此均值均匀分布在各个坐标上。因此,一个主导方向在旋转后仍然存在,并决定了量化范围。我们提出CentriQ,一种无校准量化器,它在旋转前对每个令牌进行中心化,并通过秩为1的全精度分支精确恢复均值,从而无需数据即可以闭式获得逐令牌缩放因子。权重在鲁棒的ℓ_p目标下进行拟合,该目标跟踪每组权重的密集模式并削弱重尾。在三种DiTs上,CentriQ在4比特下匹配了校准的SVDQuant的质量,而采用普通逐令牌激活量化的无校准权重量化器则崩溃或显著退化。CentriQ在2比特权重下优于迄今报告的最强无校准方法。它也是首个在2比特激活下保持可用图像质量的无校准方法。
英文摘要:
Diffusion transformers (DiTs) achieve state-of-the-art image generation, but their sampling cost limits deployment. Quantizing both weights and activations to 4 bits reduces this cost, yet existing methods fall short in one of two ways. Calibration-based methods are tied to a specific checkpoint and prompt distribution, whereas data-free Hadamard rotation, effective for LLMs, loses quality on DiTs. We show that this loss has a structural cause. Adaptive layer-norm conditioning adds a per-token mean to the activations, and at the widths of the evaluated DiTs, the Hadamard rotations used by data-free methods cannot spread this mean uniformly across coordinates. A single dominant direction therefore survives the rotation and sets the quantization range. We introduce CentriQ, a calibration-free quantizer that centers each token before rotation and restores the mean exactly through a rank-1 full-precision branch, so that per-token scales follow in closed form without data. Weights are fitted under a robust $\ell_p$ objective that tracks the dense mode of each group and discounts heavy tails. Across three DiTs, CentriQ matches the quality of calibrated SVDQuant at 4 bits, whereas calibration-free weight quantizers with plain per-token activation quantization collapse or degrade substantially. CentriQ outperforms the strongest calibration-free method reported to date at 2-bit weights. It is also the first calibration-free method to retain usable image quality at 2-bit activations.