arXiv:2511.19705cs.LG2025-11被引 1

无需校准数据的量化方法,提升大模型推理效率与精度

CafeQ: Calibration-free Quantization via Learned Transformations and Adaptive Rounding

  • 设计代理损失函数,无校准数据下优化量化变换和自适应舍入
  • 3比特量化性能从52.0提升至60.6,4比特从61.9升至62.4
  • 适用于无校准数据场景,适合部署在隐私敏感或数据受限环境

后训练量化是降低大语言模型部署成本的有效方法,传统方法采用四舍五入到最近量化级的方案,但权重中的异常值常导致较大误差。现有缓解方法包括自适应舍入、随机旋转变换或依赖校准数据设定目标。然而,在某些真实场景中,校准数据可能不可用或受隐私法规限制。本文提出算法,在不使用任何校准数据的情况下优化变换和自适应舍入。通过设计合适的量化损失代理函数实现优化。为保持推理效率,对单个矩阵采用结构化变换;对计算图中直接交互的成对权重,使用双矩阵变换与自适应舍入。在Gemma 2模型上实验显示,3比特量化平均基准分从52.0提升至60.6,4比特从61.9提升至62.4,计算开销增加不足3%。性能接近需校准数据的GPTQ方法。

原文摘要 · Abstract (English)

Post-training quantization is an effective method for reducing the serving cost of large language models, where the standard approach is to use a round-to-nearest quantization level scheme. However, this often introduces large errors due to outliers in the weights. Proposed mitigation mechanisms include applying adaptive rounding, random rotation transformations or committing to a post-training target using calibration data. Unfortunately, this reliance on calibration data can be severely limiting in some real-world scenarios as such data may be unavailable or subject to privacy regulations. In this paper, we propose algorithms to optimize transformations and adaptive rounding without access to any calibration data. The optimization is achieved by designing a suitable proxy function for the quantization loss without calibration data. To maintain inference efficiency, we perform structured matrix transformations for single matrices. For paired weights that interact directly in the computation graph, we use dual matrix transformations and adaptive rounding methods. We conduct experiments on Gemma 2 models, and observe consistent improvement over the baselines. For Gemma 2 9B quantization, our method improves the average benchmark score from 61.9 to 62.4 for 4-bit quantization and from 52.0 to 60.6 for 3-bit quantization, while adding less than 3% of computation overhead. Furthermore, our method achieves performance comparable to the commonly used GPTQ method, which requires calibration data.

量化大模型无校准推理优化

Thank you to arXiv for use of its open access interoperability. PaperDance 不是 arXiv 官方产品;中文卡片由大模型生成,请以原文为准。