arXivDaily arXiv每日学术速递 周一至周五更新
arXiv 2602.02546cs.LGcs.AI
收藏

D$^2$Quant: 高精度低比特后训练权重量化用于大语言模型

D$^2$Quant: Accurate Low-bit Post-Training Weight Quantization for LLMs

Shanghai Jiao Tong University(上海交通大学);Tencent Hunyuan(腾讯文心)

Xianglong Yan, ChengZhu Bao, Zhiteng Li, Tianao Zhang, Shaoqiu Zhang, Ruobing Xie, Samm Sun, Yulun Zhang

AI总结:

D$^2$Quant通过双尺度量化器和偏差感知修正提升低比特权重量化精度,实现更高效的LLM部署。

摘要:

大型语言模型(LLMs)表现出强大的性能,但其高计算和内存成本使得在资源受限的场景下部署变得困难。权重-only后训练量化(PTQ)具有吸引力,因为它可以减少内存使用并实现实际的速度提升,而无需低比特运算器或专用硬件。然而,在子4比特精度下,权重-only PTQ的准确性往往会显著下降,我们的分析指出有两个主要原因:(1)下投影矩阵是已知的量化瓶颈,但保持其保真度通常需要额外的比特宽度;(2)权重量化会引起激活偏差,但有效的修正策略仍处于探索阶段。为了解决这些问题,我们提出了D$^2$Quant,一种新的权重-only PTQ框架,从权重和激活两个方面提高量化效果。在权重方面,我们设计了双尺度量化器(DSQ),专门针对下投影矩阵,具有可吸收的缩放因子,显著提高了准确性而不增加比特预算。在激活方面,我们提出了偏差感知修正(DAC),在LayerNorm中引入均移修正以缓解量化引起的激活分布偏移。在多个LLM家族和评估指标上的广泛实验表明,D$^2$Quant在子4比特精度下为权重-only PTQ提供了优越的性能。代码和模型将在https://github.com/XIANGLONGYAN/D2Quant上提供。

英文摘要:

Large language models (LLMs) deliver strong performance, but their high compute and memory costs make deployment difficult in resource-constrained scenarios. Weight-only post-training quantization (PTQ) is appealing, as it reduces memory usage and enables practical speedup without low-bit operators or specialized hardware. However, accuracy often degrades significantly in weight-only PTQ at sub-4-bit precision, and our analysis identifies two main causes: (1) down-projection matrices are a well-known quantization bottleneck, but maintaining their fidelity often requires extra bit-width; (2) weight quantization induces activation deviations, but effective correction strategies remain underexplored. To address these issues, we propose D$^2$Quant, a novel weight-only PTQ framework that improves quantization from both the weight and activation perspectives. On the weight side, we design a Dual-Scale Quantizer (DSQ) tailored to down-projection matrices, with an absorbable scaling factor that significantly improves accuracy without increasing the bit budget. On the activation side, we propose Deviation-Aware Correction (DAC), which incorporates a mean-shift correction within LayerNorm to mitigate quantization-induced activation distribution shifts. Extensive experiments across multiple LLM families and evaluation metrics show that D$^2$Quant delivers superior performance for weight-only PTQ at sub-4-bit precision. The code and models will be available at https://github.com/XIANGLONGYAN/D2Quant.

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

↑