Rethinking Output Alignment For 1-bit Post-Training Quantization of Large Language Models
Dung Anh Hoang, Cuong Pham, Cuong Nguyen, Trung le, Jianfei Cai, Thanh-Toan Do
TL;DR
This work tackles the challenge of 1-bit post-training quantization for large language models, where naive output alignment often underperforms due to inter-layer error accumulation and disruption of attention patterns. It introduces a data-aware, selective layer-wise output matching framework and Attention Matrix Preservation (AMP) to explicitly align the true target output $WX$ with the quantized output while preserving token interactions. The method derives closed-form updates for quantization parameters and employs a block-wise strategy that applies output matching only to the last layer of each block, while using weight alignment for other layers. Empirical results on OPT and LLaMA demonstrate consistent gains over state-of-the-art 1-bit PTQ baselines with modest overhead, enabling more reliable deployment of 1-bit quantized LLMs.
Abstract
Large Language Models (LLMs) deliver strong performance across a wide range of NLP tasks, but their massive sizes hinder deployment on resource-constrained devices. To reduce their computational and memory burden, various compression techniques have been proposed, including quantization, pruning, and knowledge distillation. Among these, post-training quantization (PTQ) is widely adopted for its efficiency, as it requires no retraining and only a small dataset for calibration, enabling low-cost deployment. Recent advances for post-training quantization have demonstrated that even sub-4-bit methods can maintain most of the original model performance. However, 1-bit quantization that converts floating-point weights to \(\pm\)1, remains particularly challenging, as existing 1-bit PTQ methods often suffer from significant performance degradation compared to the full-precision models. Specifically, most of existing 1-bit PTQ approaches focus on weight alignment, aligning the full-precision model weights with those of the quantized models, rather than directly aligning their outputs. Although the output-matching approach objective is more intuitive and aligns with the quantization goal, naively applying it in 1-bit LLMs often leads to notable performance degradation. In this paper, we investigate why and under what conditions output-matching fails, in the context of 1-bit LLM quantization. Based on our findings, we propose a novel data-aware PTQ approach for 1-bit LLMs that explicitly accounts for activation error accumulation while keeping optimization efficient. Empirical experiments demonstrate that our solution consistently outperforms existing 1-bit PTQ methods with minimal overhead.
