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

TL;DR

CAT-Q enables ultra-efficient ternary quantization of large language models using only 512 calibration samples, outperforming state-of-the-art QAT methods on models up to 235B parameters.

cs.CL 🔴 Advanced 2026-06-25 37 views
Shigeng Wang Chao Li Yangyuxuan Kang Jiawei Fan Anbang Yao
model compression quantization LLMs post-training quantization deep learning

Key Findings

Methodology

CAT-Q integrates learnable modulation (LM) and softened ternarization (ST). LM adaptively adjusts weight distributions via learnable parameters, reducing information loss during quantization. ST employs a differentiable transition function to guide the model from continuous to discrete ternary states, ensuring stable convergence. The approach uses a sliding-layer optimization to jointly refine multiple layers, enabling high performance with minimal calibration data. Experiments on models from 1.7B to 235B parameters demonstrate superior accuracy over existing QAT methods, with quantization times of 8-60 hours on 8 A100 GPUs, significantly reducing training costs.

Key Results

  • Across diverse architectures, CAT-Q achieves less than 2% performance gap compared to full-precision models, with only 512 calibration samples. For example, on Qwen3-30B, accuracy on PIQA is 68.4%, just 2% below the unquantized baseline. On 235B models, performance drops by only 3%, with quantization completed within a few hours. Results surpass prior PTQ methods, which require hundreds of billions of tokens for training, demonstrating the method's efficiency and scalability.

Significance

This work addresses the critical challenge of deploying massive language models efficiently by providing a practical, data-efficient PTQ approach. It reduces reliance on extensive retraining, lowers hardware costs, and accelerates deployment, thus broadening the accessibility of advanced AI. The ability to quantize models with minimal data and time opens new avenues for AI democratization and edge deployment, making powerful models more affordable and widespread.

Technical Contribution

The paper introduces a novel framework combining learnable modulation and soft transition functions, backed by theoretical guarantees for convergence. The sliding-layer optimization further enhances performance by leveraging inter-layer dependencies. These innovations collectively enable high-accuracy ternary quantization with minimal calibration data, setting a new standard for practical large-scale model compression.

Novelty

This is the first work to successfully perform PTQ of models up to 235B parameters into ternary weights with only 512 samples, leveraging a combined modulation and soft transition approach. Unlike prior QAT-based methods requiring extensive retraining, this approach offers a lightweight, scalable solution with theoretical convergence guarantees, representing a significant leap in low-bit model deployment.

Limitations

  • The method primarily targets linear layers; effectiveness on nonlinear modules like activation functions remains to be validated. Performance in extremely sparse or specialized architectures is uncertain.
  • While efficient, the approach may still face accuracy degradation in certain tasks under ultra-low-bit settings. Further robustness testing is needed.

Future Work

Future directions include extending the framework to nonlinear modules, exploring hardware-aware optimizations, and applying the method to multi-modal models. Additionally, integrating adaptive layer-wise strategies could further improve performance and robustness across diverse tasks.

AI Executive Summary

Large language models (LLMs) such as GPT and BERT have revolutionized NLP but face significant deployment hurdles due to their enormous size. Traditional quantization techniques like QAT, while effective, require extensive retraining on massive datasets, making them costly and impractical for rapid deployment. In response, this paper introduces CAT-Q, a post-training quantization method that achieves ultra-efficient ternary compression using only 512 calibration samples. By combining learnable modulation (LM) and softened ternarization (ST), CAT-Q effectively aligns weight distributions and guides the quantization process toward stable convergence. The core innovation lies in the soft transition function, which smoothly approximates hard ternarization, ensuring optimization stability. Extensive experiments across models from 1.7B to 235B parameters demonstrate that CAT-Q outperforms existing QAT-based methods, reducing training tokens by over 100,000 times while maintaining near-original performance. For instance, on the 30B model, accuracy on five reasoning benchmarks drops by less than 2%, with quantization completed within hours. This breakthrough paves the way for deploying massive models on resource-constrained devices, significantly lowering hardware costs and energy consumption. The approach's scalability and efficiency make it a promising solution for democratizing AI, enabling broader access and real-world application of large models. Despite current limitations in nonlinear module quantization and ultra-low-bit robustness, future work aims to extend the framework, optimize hardware integration, and explore multi-modal applications, further democratizing AI technology.

Deep Analysis

Background

Recent years have seen exponential growth in large language models (LLMs) like GPT-3, BERT, and their variants, achieving remarkable performance across NLP tasks. However, their enormous parameter counts—ranging from billions to hundreds of billions—bring prohibitive storage, computational, and energy costs, hindering widespread deployment. Early compression techniques such as weight pruning and knowledge distillation provided some relief but were limited in compression ratio and efficiency. Quantization emerged as a promising solution, reducing precision from FP32 to INT8, INT4, or even binary/ternary formats. Quantization-aware training (QAT) methods, like BitNet and TriLM, achieved high accuracy but require extensive retraining on massive datasets, often involving hundreds of billions of tokens. Post-training quantization (PTQ), which uses minimal calibration data, offers a practical alternative but struggles with ultra-low-bit accuracy, especially in models exceeding tens of billions of parameters. Existing PTQ methods are limited in scalability and performance, motivating the need for novel approaches that combine efficiency with accuracy.

Core Problem

Deploying super-large models efficiently remains a major challenge. The core issues include the difficulty of maintaining model fidelity when reducing weights to only three states ({-1, 0, 1}), which risks severe information loss. Additionally, the optimization process for ternary weights is inherently non-differentiable and prone to convergence issues, especially under PTQ constraints with limited calibration data. Existing solutions like QAT are resource-intensive and not scalable for models beyond a few billion parameters. Therefore, developing a method that can perform accurate, stable, and fast PTQ with minimal data and computational overhead is critical for practical large-model deployment.

Innovation

The paper introduces CAT-Q, which innovates through: 1) Learnable modulation (LM), adjusting weight distributions via learnable parameters to reduce distribution mismatch; 2) Softened ternarization (ST), employing a novel transition function that smoothly approximates hard ternarization, ensuring stable convergence; 3) Sliding-layer optimization, jointly refining multiple layers to leverage inter-layer dependencies and reduce quantization errors. This integrated framework enables high-precision, low-cost PTQ for models up to 235B parameters, a feat previously unattainable with minimal calibration data. The combination of theoretical guarantees and practical efficiency marks a significant advance in model compression.

Methodology

  • �� Start with pre-trained high-precision weights W. • Apply LM by introducing learnable parameters (δμ, δα, δ∆) to adjust the mean, scale, and threshold, producing transformed weights ˆW. • Use a differentiable transition function f(W; s, Δ) that gradually shifts from identity to ternarization, controlled by a schedule parameter t. • During calibration, perform a two-stage process: first, asymptotic ternarization with continuous mapping; second, hard ternarization for final weights. • Optimize multiple layers jointly via sliding-layer output matching, minimizing the L2 loss between high-precision and quantized outputs. • Use gradient-based updates to refine learnable parameters, ensuring convergence and performance stability.

Experiments

The evaluation spans models from 1.7B to 235B parameters, including dense and MoE architectures (Qwen3, Llama2, Ring-flash). Using only 512 samples (~1 million tokens), the method quantizes models into ternary weights. Performance is tested on five zero-shot reasoning benchmarks, comparing against QAT and other PTQ methods. Ablation studies verify the contributions of LM and ST components. Results show less than 2% accuracy loss on 30B models, and only 3% on 235B models, with quantization times under 60 hours on 8 GPUs. The experiments demonstrate scalability, efficiency, and superior accuracy retention.

Results

CAT-Q consistently outperforms prior PTQ and QAT methods, achieving near-original performance with minimal calibration data. For example, on Qwen3-30B, accuracy on PIQA is 68.4%, just 2% below the full-precision baseline, with only 512 samples. On 235B models, performance drops by less than 3%, while training time is reduced from hundreds of hours to hours. The method maintains robustness across architectures, confirming its scalability and practicality for real-world deployment.

Applications

Ideal for deploying large models in resource-constrained environments like edge devices, mobile applications, and cloud services. Its minimal data requirement and fast quantization process enable rapid adaptation, reducing hardware costs and energy consumption. The approach can facilitate widespread AI adoption, especially in scenarios demanding quick model updates or low-latency inference. Future integration with hardware accelerators could further enhance efficiency.

Limitations & Outlook

Primarily optimized for linear layers; effectiveness on nonlinear modules like activation functions remains to be validated. Performance may degrade in tasks requiring ultra-low-bit representations or in models with high sparsity. The current framework may need adaptation for specialized architectures or multi-modal models. Further research is needed to improve robustness and extend applicability to diverse model types.

Plain Language Accessible to non-experts

想象你有一个巨大的工厂,里面的机器都在生产不同的商品。为了节省能源和空间,你决定用更少、更简单的零件来替代复杂的机械。以前,每台机器都用很多零件,效果好但成本高。现在,你用一种聪明的调节器,只用三种状态(开、关、反转)就能让机器正常工作,而且还能保证产品质量。只需要几百次试验(少量样本),就能调试出这些机器,让它们在超大工厂里快速运行。这就像用最少的材料和时间,把复杂的机器变得更简单、更省钱,却还能保持原有的效率和效果。这种方法让大规模工厂变得更智能、更节能,也让更多人可以用上高品质的商品。

ELI14 Explained like you're 14

想象你在玩一个超级复杂的游戏,里面有很多角色和装备。为了让游戏跑得更快,你可以把装备简化成只有三种状态:超级强、普通、弱。以前,要调整这些装备需要花费很多时间和金币(就像训练模型那样),还要反复试验。现在,有个聪明的助手,只用几百次试验,就能帮你调好装备,让游戏既快又好玩。而且,这个方法还能用在超级大的游戏里,比如有上百亿角色的世界,只需要几小时就能搞定装备的调试。这样,游戏开发者和玩家都能省钱、省时间,体验更流畅的游戏世界。

Glossary

量化 (Quantization)

将模型参数从高精度(如FP32)压缩到低比特(如1.58-bit),以减少存储和计算需求。

描述模型压缩的核心技术。

后训练量化 (PTQ)

在模型训练完成后,只用少量校准样本快速实现参数低比特化,无需重新训练。

本文采用的主要压缩策略。

软化三值化 (Softened Ternarization)

用平滑过渡函数逐步逼近硬三值化,确保优化过程平稳收敛。

论文中的创新技术之一。

滑动层优化 (Sliding-layer Optimization)

多层联合优化策略,减少误差累积,提高整体性能。

提升模型压缩效果的关键方法。

校准样本 (Calibration Samples)

用于调节量化参数的少量代表性数据,通常数百到数千个样本。

实现PTQ的关键数据来源。

Open Questions Unanswered questions from this research

  • 1 如何进一步提升非线性模块(如激活函数)的量化效果,仍是未解难题。
  • 2 在极端低比特(如1比特)条件下,模型性能的稳定性和鲁棒性有待深入研究。
  • 3 多模态模型的量化策略尚未成熟,未来需探索跨模态的适应性问题。

Applications

Immediate Applications

边缘设备部署

用少量样本快速将大模型压缩到移动端或边缘设备,实现低延迟、低能耗的AI应用。

云端模型加速

在云端快速部署高效模型,降低计算成本,提升响应速度。

Long-term Vision

普及低成本AI

推动大模型在低端硬件上的应用,缩小数字鸿沟,促进AI普及。

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.

cs.CL cs.AI