InfoQuant:为低比特LLM量化塑造激活分布
InfoQuant: Shaping Activation Distributions for Low-Bit LLM Quantization
AI总结:
针对低比特激活量化中分布与量化器不匹配的问题,提出基于信息论的分析和无需训练的峰值抑制正交变换(PSOT)方法,显著提升量化精度。
摘要:
低比特激活量化仍然是高效大语言模型(LLM)部署的主要瓶颈。难点不仅在于激活值包含异常值,还在于其分布通常与低比特均匀量化器不匹配。现有的训练后量化(PTQ)方法抑制峰值、平衡通道或最小化重建误差,但很少明确说明什么样的激活分布实际上易于离散化。因此,激活值可能在数值上更平滑,但仍会产生较大的量化误差,因为量化范围仍然很宽,或者大多数值坍缩到均值附近的几个水平。我们将激活变换重新表述为面向量化器的分布设计,并从信息论角度分析量化误差。我们的分析表明,有利于量化的激活值应同时具有较小的数值范围和在该范围内的足够分散性。在此分析指导下,我们提出InfoQuant,一种无需训练的方法,采用峰值抑制正交变换(PSOT)将激活值塑造成更有利于量化的分布。我们进一步引入自适应异常值标记选择,以提高PSOT在优化过程中的鲁棒性。在多个LLM家族中,InfoQuant始终优于先前的PTQ和端到端训练基线。在W4A4KV4下,它平均保留了97%的浮点精度,并将LLaMA-2 13B的性能差距较先前最先进方法缩小了42%。代码可在[https://github.com/LLIKKE/InfoQuant](https://github.com/LLIKKE/InfoQuant)获取。
英文摘要:
Low-bit activation quantization remains a major bottleneck in efficient large language model (LLM) deployment. The difficulty is not only that activations contain outliers, but that their distributions are often poorly matched to a low-bit uniform quantizer. Existing post-training quantization (PTQ) methods suppress peaks, balance channels, or minimize reconstruction error, yet they rarely specify what activation distribution is actually easy to discretize. As a result, activations may appear numerically smoother while still incurring large quantization error because the quantization range remains wide or most values collapse into a few levels near the mean. We recast activation transformation as quantizer-facing distribution design and analyze quantization error from an information-theoretic perspective. Our analysis shows that quantization-friendly activations should jointly have a smaller numerical range and sufficient dispersion within that range. Guided by this analysis, we propose InfoQuant, a train-free method that employs Peak Suppression Orthogonal Transformation (PSOT) to shape activations into more quantization-friendly distributions. We further introduce adaptive outlier-token selection to improve the robustness of PSOT during optimization. Across multiple LLM families, InfoQuant consistently outperforms prior PTQ and end-to-end training baselines. Under W4A4KV4, it preserves 97% of floating-point accuracy on average and reduces the LLaMA-2 13B performance gap by 42% over the previous state of the art. Code is available at [https://github.com/LLIKKE/InfoQuant](https://github.com/LLIKKE/InfoQuant)
机构、总结、中文摘要均由AI分析而来,可能存在错误,请以论文正文为准。