PrismQuant:面向分组量化器的最优零空间旋转
研究论文 · 2026/09/30
较小的激活离群值不一定意味着更好的低位量化:它们与量化器的对齐方式很重要。我们提出了 PrismQuant,一种量化器感知的旋转框架,它将主导激活特征空间与非对称分组 INT4 的常量组子空间对齐。仿射偏移表示该子空间中的能量,而不会扩大组内的范围。我们将旋转设计表述为 Ky Fan 迹最大化,并推导出一个闭式解,该解在该对齐目标下可证明是最优的。紧凑的 Householder 变换及其 compact-WY 表示支持无梯度构建,并在可折叠和在线位置高效应用。一个预测性范围定律进一步将未对齐的激活能量和组大小与量化相关变化联系起来。在 Llama、Qwen 和 Mistral 上的实验涵盖了高达 700 亿参数的密集模型和一个 300 亿参数的混合专家模型。在 W4A4KV4 下,PrismQuant 在 Llama-3.2-3B 上在困惑度和准确率方面均优于所比较的方法,达到最先进水平。在 Llama-3.1-70B 上,它实现了 3.85 的困惑度和 72.46% 的平均零样本准确率,仅比全精度低 0.22 个百分点。在 Llama-3.1-8B 的部署研究中,我们的优化实现相比匹配的 FP16 基线实现了 1.51 倍的预填充和 1.22 倍的 CUDA Graph 解码加速,解码峰值内存降低 56.34%,相比 Hadamard 仅增加 2.35% 的 Graph 解码延迟。代码可在 https://github.com/ForeverBlue816/PrismQuant 获取。
该论文提出了一种新颖的量化感知旋转方法,在低位量化中显著提升模型性能,并在大规模模型上验证了其有效性和部署效率,对高效推理有重要价值。
Smaller activation outliers do not necessarily imply better low-bit quantization: their alignment with the quantizer matters. We introduce PrismQuant, a quantizer-aware rotation framework that aligns the leading activation eigenspace with the constant group subspace of asymmetric grouped INT4. The affine offsets represent the energy in this subspace without widening the range within the group. We formulate rotation design as a Ky Fan trace maximization and derive a closed-form solution that is provably optimal for this alignment objective. Compact Householder transformations and their compact-WY representation enable gradient-free construction and efficient application at both foldable and online sites. A predictive range law further connects unaligned activation energy and group size to quantization-relevant variation. Experiments on Llama, Qwen, and Mistral span dense models up to 70B parameters and a 30B mixture-of-experts model. Under W4A4KV4, PrismQuant sets the state of the art on Llama-3.2-3B among the compared methods in both perplexity and accuracy. On Llama-3.1-70B, it attains 3.85 perplexity and 72.46% average zero-shot accuracy, only 0.22 percentage points below full precision. In the deployment study on Llama-3.1-8B, our optimized implementation achieves 1.51x prefill and 1.22x CUDA Graph decode speedups over matched FP16 baselines, with 56.34% lower decode peak memory and only 2.35% additional Graph decode latency over Hadamard. Code is available at https://github.com/ForeverBlue816/PrismQuant.