Skip to main content
QUICK REVIEW

[Paper Review] SqueezeLLM: Dense-and-Sparse Quantization

Sehoon Kim, Coleman Hooper|arXiv (Cornell University)|Jun 13, 2023
Topic ModelingComputer Science23 citations
TL;DR

SqueezeLLM introduces sensitivity-based non-uniform quantization and Dense-and-Sparse decomposition to achieve ultra-low-bit (as low as 3-bit) post-training quantization of LLMs with minimal performance loss and notable speedups, addressing memory-bandwidth bottlenecks in single-batch generative inference.

ABSTRACT

Generative Large Language Models (LLMs) have demonstrated remarkable results for a wide range of tasks. However, deploying these models for inference has been a significant challenge due to their unprecedented resource requirements. This has forced existing deployment frameworks to use multi-GPU inference pipelines, which are often complex and costly, or to use smaller and less performant models. In this work, we demonstrate that the main bottleneck for generative inference with LLMs is memory bandwidth, rather than compute, specifically for single batch inference. While quantization has emerged as a promising solution by representing weights with reduced precision, previous efforts have often resulted in notable performance degradation. To address this, we introduce SqueezeLLM, a post-training quantization framework that not only enables lossless compression to ultra-low precisions of up to 3-bit, but also achieves higher quantization performance under the same memory constraint. Our framework incorporates two novel ideas: (i) sensitivity-based non-uniform quantization, which searches for the optimal bit precision assignment based on second-order information; and (ii) the Dense-and-Sparse decomposition that stores outliers and sensitive weight values in an efficient sparse format. When applied to the LLaMA models, our 3-bit quantization significantly reduces the perplexity gap from the FP16 baseline by up to 2.1x as compared to the state-of-the-art methods with the same memory requirement. Furthermore, when deployed on an A6000 GPU, our quantized models achieve up to 2.3x speedup compared to the baseline. Our code is available at https://github.com/SqueezeAILab/SqueezeLLM.

Motivation & Objective

  • Identify memory-bandwidth as the main bottleneck in single-batch LLM inference and quantify its impact on quantization strategies.
  • Develop a post-training quantization framework that achieves ultra-low precision with negligible loss in generation quality.
  • Propose a sensitivity-based non-uniform quantization method to allocate quantization bins around sensitive weight values.
  • Introduce Dense-and-Sparse decomposition to separately store outliers and sensitive weights for efficient sparse representation.
  • Demonstrate performance gains in perplexity, model size, and latency across multiple LLaMA-based models and benchmarks.

Proposed method

  • Sensitivity-based non-uniform quantization that uses a weighted k-means objective informed by second-order (Fisher information) guidance to place quantization centroids near sensitive weights.
  • Approximation of the Hessian via the diagonal Fisher information matrix to weight weight perturbations in the quantization objective.
  • Dense-and-Sparse decomposition W = D + S to separate dense weights from outliers, storing S in sparse format and quantizing D with reduced range.
  • Evaluation across LLaMA, LLaMA-2, OPT, Vicuna models on C4, WikiText2, MMLU, and Vicuna benchmarks; comparison against RTN, GPTQ, AWQ, and SpQR.
  • GPU-oriented Dense-and-Sparse kernels using LUT-based 3/4-bit quantization with FP16 arithmetic; CSR-based sparse multiplication to exploit outliers.

Experimental results

Research questions

  • RQ1How far can LLM weights be quantized to ultra-low bit precision (e.g., 3-bit) without compromising end-to-end performance on generative tasks?
  • RQ2Does placing quantization centroids near weight values that strongly affect final loss (via Fisher information) improve end-to-end quantization performance over uniform or naïve non-uniform methods?
  • RQ3Can a dense-and-sparse decomposition effectively isolate outliers and highly sensitive weights to enable both smaller models and faster inference?
  • RQ4What are the practical latency and memory-bandwidth benefits of SqueezeLLM on real hardware (e.g., A6000) compared to existing PTQ methods?
  • RQ5Do the proposed methods generalize to instruction-following and domain knowledge benchmarks (e.g., MMLU, Vicuna) and larger model families?

Key findings

  • 3-bit SqueezeLLM reduces perplexity gap from FP16 baseline by up to 2.1x compared to state-of-the-art methods at the same memory budget for LLaMA-7B.
  • Dense-and-Sparse decomposition removes around 0.45% of weights as sparse/outliers, yielding additional perplexity improvements (e.g., from 7.75 to 7.58 on C4 for LLaMA-7B).
  • On A6000 GPUs, SqueezeLLM achieves up to 2.4x latency speedup over FP16 for generated tokens, with competitive or better memory usage compared to grouped GPTQ/AWQ setups.
  • For instruction-following models (Vicuna) in zero-shot MMLU, 3-bit SqueezeLLM outperforms AWQ and preserves FP16 accuracy with 4-bit quantization; 5-shot results align with improved robustness.
  • Across LLaMA and larger models (13B, 30B, 65B), SqueezeLLM consistently outperforms GPTQ and AWQ in perplexity at similar model sizes and bit-widths.
  • Dense-only (0% sparsity) SqueezeLLM already approaches FP16 performance at 4-bit, and shows substantial gains at 3-bit, highlighting memory-bound inference benefits of weight quantization.

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.