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

CAT-Q:面向LLMs的经济高效且精确的三值量化

CAT-Q: Cost-efficient and Accurate Ternary Quantization for LLMs

Intel Labs China(英特尔中国实验室)

Shigeng Wang, Chao Li, Yangyuxuan Kang, Jiawei Fan, Anbang Yao

AI总结:

提出CAT-Q后训练量化方案,通过可学习调制和软化三值化,仅用512个校准样本即可将LLMs高效量化为三值模型,性能优于使用100B tokens训练的BitNet 1.58-bit,训练token减少约100,000倍。

摘要:

在本文中,我们提出了CAT-Q(经济高效且精确的三值量化),用于压缩和加速LLMs。与现有依赖数据密集且成本高昂的量化感知训练来缓解严重性能下降的最先进三值量化方法不同,CAT-Q是一种简单而有效的后训练量化方案,可直接应用于具有不同架构和模型大小的LLMs。它有两个关键组件:可学习调制(LM)和软化三值化(ST),两者从优化角度耦合。LM利用可学习因子的组合来调制预训练高精度权重的分布和三值阈值,使其对三值化不那么敏感。ST进一步引入可微过渡函数,引导三值化过程稳定收敛。我们表明,对于1.7B到8B参数的预训练LLMs,CAT-Q仅使用512个校准样本即可高效地将它们量化为三值模型,同时性能优于使用100B tokens训练的BitNet 1.58-bit v1和v2系列(1.3B到7B参数),训练token减少约100,000倍。此外,我们首次证明CAT-Q可以在8个A100-80GB GPU上仅用8到60小时将14B到235B参数的更大预训练LLMs量化为领先的三值模型。代码可从此https URL获取。

英文摘要:

In this paper, we present CAT-Q, Cost-efficient and Accurate Ternary Quantization, for compressing and accelerating LLMs. Unlike existing state-of-the-art ternary quantization methods that rely on data-intensive and costly quantization-aware training to mitigate severe performance degradation, CAT-Q is a simple yet effective post-training quantization scheme that is readily applicable to LLMs with diverse architectures and model sizes. It has two key components, learnable modulation (LM) and softened ternarization (ST), which are coupled from an optimization perspective. LM leverages a composition of learnable factors to modulate the distribution of pre-trained high-precision weights and the ternary threshold, making them less sensitive to ternarization. ST further introduces a differentiable transition function to guide the ternarization process toward stable convergence. We show that, for pre-trained LLMs with 1.7B to 8B parameters, CAT-Q can efficiently quantize them into ternary models using only 512 calibration samples, while achieving superior performance than the seminal BitNet 1.58-bit v1 and v2 families (with 1.3B to 7B parameters) trained with 100B tokens, yielding about a 100,000X reduction in training tokens. Moreover, we show for the first time that CAT-Q can quantize much larger pre-trained LLMs having 14B to 235B parameters into leading ternary models within just 8 to 60 hours on 8 A100-80GB GPUs. Code is available at https://github.com/IntelChina-AI/BitTern.

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

↑