[论文解读] MixQuant: Pushing the Limits of Block Rotations in Post-Training Quantization
MixQuant 引入基于置换的质量均衡,以改进块 Hadamard 旋转在 PTQ 中的异常值抑制,在不同分块大小下实现接近全向量旋转的精度,无额外推理成本。
Recent post-training quantization (PTQ) methods have adopted block rotations to diffuse outliers prior to rounding. While this reduces the overhead of full-vector rotations, the effect of block structure on outlier suppression remains poorly understood. To fill this gap, we present the first systematic, non-asymptotic analysis of outlier suppression for block Hadamard rotations. Our analysis reveals that outlier suppression is fundamentally limited by the geometry of the input vector. In particular, post-rotation outliers are deterministically minimized when the pre-rotation $\ell_1$ norm mass is evenly distributed across blocks. Guided by these insights, we introduce MixQuant, a block rotation-aware PTQ framework that redistributes activation mass via permutations prior to rotation. We propose a greedy mass diffusion algorithm to calibrate permutations by equalizing the expected blockwise $\ell_1$ norms. To avoid adding inference overhead, we identify permutation-equivariant regions in transformer architectures to merge the resulting permutations into model weights before deployment. Experiments show that MixQuant consistently improves accuracy across all block sizes, recovering up to 90% of the full-vector rotation perplexity when quantizing Llama3 1B to INT4 with block size 16, compared to 46% without permutations.
研究动机与目标
- 降低在 LLMs 中限制少位 PTQ 精度的激活异常值动机。
- 理解分块 Hadamard 旋转在计算效率与异常值抑制之间的权衡。
- 开发一种基于置换的均衡方法,在分块结构下保持异常值抑制。
- 将置换效应合并入权重以避免额外的推理时开销。
- 在 Llama3 和 Qwen3 模型上跨多种分块大小对 MixQuant 进行经验性验证。
提出的方法
- 给出全向量与分块 Hadamard 旋转的异常值抑制理论分析(确定性与概率性界限)。
- 提出 MassDiff,一种贪心置换算法,用于在旋转前对每块的 L1 质量进行均衡以最小化每块的最大 L1 范数。
- 识别置换不变区域,将置换融合到周边层中,从而不产生额外的推理时开销。
- 将 MassDiff 与分块 Hadamard 旋转结合,并与基线方法(MR-GPTQ 与 BRQ)在 Qronos/RTN/GPTQ 作为舍入后端进行比较。
- 在对 Llama3 与 Qwen3 进行 INT4 quantization 的多种分块大小上评估 MixQuant,测量困惑度与零-shot 推理性能。
实验结果
研究问题
- RQ1当分块大小变化时,分块 Hadamard 旋转如何影响异常值抑制?
- RQ2置换均衡(MassDiff)是否能改善每块的质量分布,以在较小块上恢复全向量旋转的好处?
- RQ3置换是否能合并到周围权重中以避免推理时开销,同时保持异常值抑制?
- RQ4MixQuant 对 4 位量化的 LLM 在不同分块大小下的困惑度与零-shot 推理任务的经验影响如何?
主要发现
- 分块尺寸的减小可能加剧旋转后最坏情况的异常值,导致效率与精度之间出现权衡。
- 可将激活质量在块之间均衡的置换显著改善分块旋转的异常值抑制。
- MixQuant 在不同模型与分块大小上持续提升困惑度表现,在分块大小为 128 或更大时基本恢复了接近全向量旋转的精度。
- 对于 Llama3 1B,MixQuant 在分块大小为 16 时恢复约 90% 的全向量旋转精度;对更大模型的可扩展性显示出较低但仍显著的增益。
- 当将 Llama3 与 Qwen3 量化为 INT4 时,MixQuant 大幅缩小与全向量旋转的差距,在分块大小越小,增益越明显。
阅读本论文
在 Nubint 阅读器中打开原文,边读边就任意段落提问。
在 Nubint 中阅读本论文本解读由 AI 根据论文原文生成,引用前请核对原文。