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

CodeQuant: 一种统一的聚类和量化方法以提升低精度混合专家模型中的异常值平滑

CodeQuant: Unified Clustering and Quantization for Enhanced Outlier Smoothing in Low-Precision Mixture-of-Experts

Courant Institute of Mathematical Sciences, New York University(纽约大学库朗数学科学研究所);Tandon School of Engineering, New York University(纽约大学坦登工程学院);Cerebras Systems Inc.(Cerebras系统公司)

Xiangyang Yin, Xingyu Liu, Tianhua Xia, Bo Bao, Vithursan Thangarasa, Valavan Manohararajah, Eric Sather, Sai Qian Zhang

AI总结:

本文提出CodeQuant,通过可学习旋转平滑激活异常值并吸收权重异常值到细调的聚类中心,提升低精度混合专家模型的准确性与速度。

摘要:

异常值已成为在低精度大模型中保持精度的关键瓶颈,尤其是在混合专家(MoE)架构中,这些异常值在后训练量化(PTQ)中导致显著的量化误差,从而引起严重的精度下降。尽管最近的基于旋转的平滑技术通过重新分配异常值的幅度缓解了这一问题,但残余误差仍然存在,继续阻碍低精度部署的可靠性。在本文中,我们通过引入CodeQuant,一种统一的量化和聚类方案,通过可学习旋转平滑激活异常值,并将权重异常值吸收至细调的聚类中心,以解决这一挑战。这种设计通过将极端值拟合到聚类中心,从而降低量化误差,同时保持表达能力。结合专门设计的用于GPU和CPU的内核,CodeQuant在多样化的MoE模型上实现了高达4.15倍的速度提升,同时比最先进的量化方法具有显著更高的精度。我们的结果表明,CodeQuant是低精度约束下高效准确部署基于MoE的大型语言模型的一个有前途的方向。我们的代码可在https://github.com/SAI-Lab-NYU/CodeQuant上获取。

英文摘要:

Outliers have emerged as a fundamental bottleneck in preserving accuracy for low-precision large models, particularly within Mixture-of-Experts (MoE) architectures that are increasingly central to large-scale language modeling. Under post-training quantization (PTQ), these outliers induce substantial quantization errors, leading to severe accuracy degradation. While recent rotation-based smoothing techniques alleviate the problem by redistributing outlier magnitudes, residual errors remain and continue to impede reliable low-precision deployment. In this work, we tackle this challenge by introducing CodeQuant, a unified quantization-and-clustering scheme that contains smoothing activation outliers via learnable rotation and absorbing weight outliers into fine-tuned cluster centroids for MoE. This design reduces the influence of extreme values by fitting them within cluster centroids, thereby lowering quantization error while maintaining expressive capacity. Coupled with a dedicated kernel design for GPU and CPU, CodeQuant achieves up to $4.15\times$ speedup while delivering significantly higher accuracy than state-of-the-art quantization approaches across diverse MoE models. Our results highlight CodeQuant as a promising direction for efficient and accurate deployment of MoE-based large language models under low-precision constraints. Our code is available at https://github.com/SAI-Lab-NYU/CodeQuant.

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

↑