Skip to main content
QUICK REVIEW

[Paper Review] EfficientQAT: Efficient Quantization-Aware Training for Large Language Models

Mengzhao Chen, Wenqi Shao|arXiv (Cornell University)|Jul 10, 2024
Topic ModelingComputer Science6 citations
TL;DR

EfficientQAT introduces a two-phase quantization framework (Block-AP and E2E-QP) to compress large language models efficiently, achieving strong 2-bit quantization performance on 70B models with modest accuracy loss and reduced training memory usage.

ABSTRACT

Large language models (LLMs) are crucial in modern natural language processing and artificial intelligence. However, they face challenges in managing their significant memory requirements. Although quantization-aware training (QAT) offers a solution by reducing memory consumption through low-bit representations with minimal accuracy loss, it is impractical due to substantial training resources. To address this, we propose Efficient Quantization-Aware Training (EfficientQAT), a more feasible QAT algorithm. EfficientQAT involves two consecutive phases: Block-wise training of all parameters (Block-AP) and end-to-end training of quantization parameters (E2E-QP). To the best of our knowledge, Block-AP is the first method to enable direct training of all parameters in a block-wise manner, reducing accuracy loss in low-bit scenarios by enhancing the solution space during optimization. E2E-QP then trains only the quantization parameters (step sizes) end-to-end, further improving the performance of quantized models by considering interactions among all sub-modules. Extensive experiments demonstrate that EfficientQAT outperforms previous quantization methods across a range of models, including base LLMs, instruction-tuned LLMs, and multimodal LLMs, with scales from 7B to 70B parameters at various quantization bits. For instance, EfficientQAT obtains a 2-bit Llama-2-70B model on a single A100-80GB GPU in 41 hours, with less than 3 points accuracy degradation compared to the full precision (69.48 vs. 72.41). Code is available at https://github.com/OpenGVLab/EfficientQAT.

Motivation & Objective

  • Address the high memory and training costs of quantization-aware training for large language models (LLMs).
  • Develop a two-stage, memory-efficient QAT method that initializes well and trains minimal parameters during deployment.
  • Demonstrate robustness and performance gains across base, instruction-tuned, and multimodal LLMs from 7B to 70B parameters.

Proposed method

  • Propose Block-wise Training of All Parameters (Block-AP) to train each transformer block with block-wise reconstruction, enabling full-parameter training without retraining the entire LLM.
  • Introduce End-to-End Training of Quantization Parameters (E2E-QP) that fixes quantized weights and optimizes only quantization parameters (step sizes, and optionally zero points) end-to-end.
  • Quantize weights using standard uniform quantization with learned s (scales) and z (zero points), integrated into the computation graph for gradient-based optimization.
  • Share s and z within quantization groups to reduce memory and trainable parameter count.
  • Demonstrate that Block-AP provides robust initialization, while E2E-QP tightens quantization performance with a quantized backbone.
(b) Q-PEFT comparisons
(b) Q-PEFT comparisons

Experimental results

Research questions

  • RQ1Can Block-AP provide a memory-efficient yet effective initialization for subsequent quantization-aware training of LLMs?
  • RQ2Does end-to-end training of quantization parameters (s and z) on top of a Block-AP initialized backbone offer superior accuracy and efficiency across 2-, 3-, and 4-bit quantizations?
  • RQ3How does EfficientQAT perform relative to PTQ, QAT, and Q-PEFT baselines across base, instruction-tuned, and multimodal LLMs (7B–70B)?

Key findings

  • EfficientQAT achieves strong performance at low-bit quantization, including 2-bit quantization on Llama-2-70B with around 3% accuracy degradation (from 72.41 to 69.48).
  • Block-AP provides robust initialization and, when combined with E2E-QP, yields improved quantization results over existing methods.
  • E2E-QP trains only quantization parameters, drastically reducing memory usage during training (e.g., 34.2 GB for 2-bit 70B on a single A100-80GB GPU).
  • EfficientQAT outperforms established QAT and Q-PEFT baselines across base, instruction-tuned, and multimodal LLMs at 2–4 bits.
  • Inference speedups are achieved via uniform quantization, with INT2 forward-pass speeds up to 4.4x in linear layers for large models.
(a) inference speed comparisons
(a) inference speed comparisons

Read this paper

Open the full text in the Nubint reader and ask about any passage as you read.

Read this paper on Nubint

This review was generated by AI from the original paper. Please check the paper before citing it.