🤖 AI Summary
This work addresses the performance degradation in ternary quantization of large language models (LLMs) caused by scarce training data and prohibitive computational costs. To this end, we propose CAT-Q, an efficient post-training ternary quantization method that integrates learnable modulation (LM) to dynamically adjust weight distributions and thresholds, along with differentiable softened ternarization (ST) to enhance optimization stability. CAT-Q requires no extensive retraining and generalizes across diverse LLM architectures and scales. Using only 512 calibration samples, it quantizes models ranging from 14B to 235B parameters within 8–60 hours on eight A100 GPUs, reducing training overhead by up to 10⁵-fold compared to conventional approaches. On 1.7B–8B models, CAT-Q outperforms the BitNet 1.58-bit series, significantly advancing the efficient deployment of large-scale models.
📝 Abstract
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.