LGJun 14, 2024

QQQ: Quality Quattuor-Bit Quantization for Large Language Models

arXiv:2406.09904v313 citations
Originality Incremental advance
AI Analysis

This work addresses the need for faster inference in large language models, offering a practical solution for deployment scenarios, though it is incremental as it builds on existing quantization techniques.

The paper tackles the problem of accelerating both prefill and decoding stages in large language model inference through quantization, presenting QQQ, a method using 4-bit weights and 8-bit activations with adaptive smoothing and Hessian-based compensation, which achieves performance on par with state-of-the-art methods while providing speed boosts up to 2.24× over FP16.

Quantization is a proven effective method for compressing large language models. Although popular techniques like W8A8 and W4A16 effectively maintain model performance, they often fail to concurrently speed up the prefill and decoding stages of inference. W4A8 is a promising strategy to accelerate both of them while usually leads to a significant performance degradation. To address these issues, we present QQQ, a Quality Quattuor-bit Quantization method with 4-bit weights and 8-bit activations. QQQ employs adaptive smoothing and Hessian-based compensation, significantly enhancing the performance of quantized models without extensive training. Furthermore, we meticulously engineer W4A8 GEMM kernels to increase inference speed. Our specialized per-channel W4A8 GEMM and per-group W4A8 GEMM achieve impressive speed increases of 3.67$\times$ and 3.29 $\times$ over FP16 GEMM. Our extensive experiments show that QQQ achieves performance on par with existing state-of-the-art LLM quantization methods while significantly accelerating inference, achieving speed boosts up to 2.24 $\times$, 2.10$\times$, and 1.25$\times$ compared to FP16, W8A8, and W4A16, respectively.

Code Implementations1 repo
Foundations

The foundational work for this paper's niche, ranked by how specifically the neighbourhood builds on it — not by global fame.

Your Notes