Skip to main content
QUICK REVIEW

[Paper Review] Evaluating Quantized Large Language Models

Shiyao Li, Xuefei Ning|arXiv (Cornell University)|Feb 28, 2024
Topic ModelingComputer Science9 citations
TL;DR

The paper comprehensively evaluates post-training quantization effects on Weights, Activations, and KV Cache across 11 LLM families (125M–180B), covering basic NLP, emergent abilities, trustworthiness, dialogue, and long-context tasks, to guide practical quantization choices.

ABSTRACT

Post-training quantization (PTQ) has emerged as a promising technique to reduce the cost of large language models (LLMs). Specifically, PTQ can effectively mitigate memory consumption and reduce computational overhead in LLMs. To meet the requirements of both high efficiency and performance across diverse scenarios, a comprehensive evaluation of quantized LLMs is essential to guide the selection of quantization methods. This paper presents a thorough evaluation of these factors by evaluating the effect of PTQ on Weight, Activation, and KV Cache on 11 model families, including OPT, LLaMA2, Falcon, Bloomz, Mistral, ChatGLM, Vicuna, LongChat, StableLM, Gemma, and Mamba, with parameters ranging from 125M to 180B. The evaluation encompasses five types of tasks: basic NLP, emergent ability, trustworthiness, dialogue, and long-context tasks. Moreover, we also evaluate the state-of-the-art (SOTA) quantization methods to demonstrate their applicability. Based on the extensive experiments, we systematically summarize the effect of quantization, provide recommendations to apply quantization techniques, and point out future directions. The code can be found in https://github.com/thu-nics/qllm-eval.

Motivation & Objective

  • Assess how PTQ affects weight, activation, and KV cache tensors across a wide range of LLMs and task types.
  • Characterize how tensor type, model size, and task type influence quantization tolerance.
  • Provide practical recommendations on bit-widths and quantization strategies for different scenarios.
  • Compare state-of-the-art quantization methods and identify open directions for future work.

Proposed method

  • Evaluate three PTQ types: Weight-only, Weight-Activation, and KV Cache quantization.
  • Use asymmetric group-wise quantization for weights and K/V, symmetric per-token quantization for activations, with multiple bit-widths (e.g., W2–W8, KV2–KV8).
  • Quantize tensors with different granularities and analyze using AbsMax, Std, and Kurtosis across model sizes.
  • Benchmark across 11 model families (125M–180B) including OPT, LLaMA2, Falcon, Bloomz, Mistral, ChatGLM, Vicuna, LongChat, StableLM, Gemma, Mamba.
  • Evaluate on five task types: basic NLP, emergent abilities, trustworthiness, dialogue, and long-context processing.
  • Report qualitative trends and provide recommendations and limitations.

Experimental results

Research questions

  • RQ1How does quantization of weights, activations, and KV caches affect performance across model sizes and families?
  • RQ2What are the task- and tensor-level sensitivities to different bit-widths and quantization schemes?
  • RQ3Can SOTA quantization methods (e.g., AWQ, SmoothQuant) recover performance losses across diverse models and tasks?
  • RQ4How do quantization choices impact emergent abilities, dialogue quality, trustworthiness, and long-context processing?

Key findings

  • Model size increases tolerance to Weight and KV Cache quantization but reduces tolerance to Activation quantization.
  • Activation quantization exhibits higher kurtosis and more outliers in larger models, making it more sensitive than Weight/KV Cache quantization.
  • Most models retain acceptable performance with W4, W4A8, and KV4 (<2% loss) across many tasks; W3/W2 introduce noticeable degradation especially in smaller models.
  • MoE-based scaling (larger models) does not universally improve quantization tolerance; sensitivity can remain similar to smaller siblings.
  • Emergent abilities like Multi-Step Reasoning and Self-Calibration are more sensitive to quantization than Instruction-Following and In-Context Learning, with mathematical tasks particularly susceptible.
  • KV Cache quantization is more impactful on long-context tasks; weights-only quantization can also degrade long-context performance, with KV8 generally preferable for long texts, and KV4 for mid-length contexts.
  • Dialogue quality largely tolerates KV Cache quantization better than Weight quantization; extremely low bit-widths (W2/W4A4) with AWQ or SmoothQuant may still noticeably degrade dialogue performance, though WA quantization with SmoothQuant can recover some cases.
  • Long-context tasks show higher sensitivity to KV Cache quantization; for many models KV8 is near lossless for short contexts but KV4 can cause notable degradation for long contexts.

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.