GPTQT: Quantize Large Language Models Twice to Push the Efficiency

Yipin Guo, Yilin Lang, Qinyuan Ren

Abstract

Large Language Models (LLMs) face significant deployment challenges due to their immense memory requirements. While 4-bit quantization has become a standard for consumer hardware, pushing to 2-bit or 3-bit typically results in a "perplexity cliff"—a catastrophic drop in model intelligence. This paper introduces GPTQT, a novel post-training quantization (PTQ) framework that achieves state-of-the-art accuracy at ultra-low bit-widths. By rethinking weight representation through a two-stage process—mapping weights first to a high-bit linear format and then converting them into low-bit binary coding—GPTQT maintains model performance where other methods fail, while offering up to a 1.24× speedup during inference.

Introduction

As LLMs grow in parameter count, the demand for efficient compression techniques has never been higher. Post-training quantization (PTQ) is the preferred method for reducing memory footprints without the prohibitive cost of retraining. However, the industry standard methods, such as GPTQ, struggle at ultra-low bit-widths (2-3 bits). The primary obstacle is overfitting: when minimizing the Mean Squared Error (MSE) between original and quantized weights at such low resolutions, models often lose their ability to generalize, leading to high perplexity.

Existing approaches generally utilize either Linear Quantization, which is stable but lacks flexibility at low bits, or Binary Coding, which offers higher representational power but is highly sensitive to initialization. GPTQT bridges this gap by providing a progressive framework that combines the stability of linear methods with the capacity of binary coding.

The GPTQT Framework

The core innovation of GPTQT is its "quantize twice" strategy. Rather than attempting to map high-precision floating-point weights directly to 2-bit representations, the framework employs a multi-step refinement process:

  1. High-Bit Linear Quantization: Weights are initially quantized to a 5-bit linear format. This intermediate step acts as a regularizer, preserving the generalizability of the weights and providing a stable foundation for further compression.
  2. Binary Coding Conversion: The 5-bit integers are then compressed into 2-bit or 3-bit binary-coded weights. This non-uniform representation better captures the underlying distribution of the model's weights compared to a standard linear "ruler."
  3. Scaling Factor Re-exploration: Because the representation range shifts during conversion, GPTQT utilizes a grid search strategy to optimize scaling factors. By treating the scale like a flexible parameter, the framework finds the optimal value that minimizes output error for the new binary format.
  4. Inference Fusion: For deployment, these steps are mathematically fused into a single binary coding expression. This allows the model to leverage efficient kernels like LUT-GEMM, accelerating matrix multiplication on general-purpose GPUs.

Experimental Evaluation

The researchers evaluated GPTQT across several prominent LLM families, including OPT (125M to 66B parameters), Llama2 (7B, 13B), and BLOOM (560M to 7.1B). Performance was measured using WikiText2 and Penn Treebank (PTB) to calculate perplexity, a standard proxy for language modeling capability. Hardware testing was conducted on NVIDIA A100 and A5000 GPUs.

Key Results

  • Resilience at 2-Bits: GPTQT demonstrates remarkable stability at ultra-low bit-widths. On the OPT-30B model, GPTQT achieved a perplexity of 13.26, whereas the standard GPTQ method collapsed to a perplexity of 71.70.
  • State-of-the-Art Accuracy: In 3-bit quantization for the OPT-66B model, GPTQT reduced perplexity by 4.01 compared to GPTQ.
  • Llama2 Optimization: GPTQT currently stands as the best-performing binary coding method for Llama2-based models at 3 bits, significantly outperforming Binary Coding Quantization (BCQ).
  • Hardware Acceleration: By utilizing fused binary calculation methods, GPTQT achieved a 1.24× inference speedup on the OPT-30B model compared to standard implementations.

Discussion and Insights

The success of GPTQT suggests a "Quantize Twice Paradox": adding an intermediate high-bit step actually improves the final low-bit result. The 5-bit linear stage prevents the binary coding from overfitting to the noise inherent in the original floating-point weights. Furthermore, the research highlights that the scaling factor of quantized weights is often more critical to model performance than the exact bit-representation of the weights themselves.

Limitations and Future Work

Currently, GPTQT focuses exclusively on weight quantization, leaving activations in FP16. While this significantly reduces the memory footprint, the model remains limited by the computational overhead of high-precision activations. Future research may extend this progressive approach to activations or explore even lower bit-widths (e.g., sub-2-bit) while maintaining the benefits of inference fusion. Additionally, while GPTQT excels in memory-constrained environments, its reliance on FP16 activations may make it less ideal for high-throughput server scenarios where W8A8 quantization is preferred.

Summary updated

BibTeX
@inproceedings{guo2024gptqt,
  author = {Yipin Guo and Yilin Lang and Qinyuan Ren},
  title = {{GPTQT: Quantize Large Language Models Twice to Push the Efficiency}},
  booktitle = {CIS-RAM},
  year = {2024},
  doi = {10.1109/cis-ram61939.2024.10672819},
}
Figure