A Comprehensive Evaluation of Quantization Strategies for Large Language Models

Renren Jin, Jiangcun Du, Wuwei Huang, Wei Liu, Jian Luan +2 more
2/26/2024
cs.CLcs.AI

No official code found. Best implementation: cordercorder/quant_eval (4 stars, last commit 2024-10-15).

Abstract

Increasing the number of parameters in large language models (LLMs) usually improves performance in downstream tasks but raises compute and memory costs, making deployment difficult in resource-limited settings. Quantization techniques, which reduce the bits needed for model weights or activations with minimal performance loss, have become popular due to the rise of LLMs. However, most quantization studies use pre-trained LLMs, and the impact of quantization on instruction-tuned LLMs and the relationship between perplexity and benchmark performance of quantized LLMs are not well understood. Evaluation of quantized LLMs is often limited to language modeling and a few classification tasks, leaving their performance on other benchmarks unclear. To address these gaps, we propose a structured evaluation framework consisting of three critical dimensions: (1) knowledge \& capacity, (2) alignment, and (3) efficiency, and conduct extensive experiments across ten diverse benchmarks. Our experimental results indicate that LLMs with 4-bit quantization can retain performance comparable to their non-quantized counterparts, and perplexity can serve as a proxy metric for quantized LLMs on most benchmarks. Furthermore, quantized LLMs with larger parameter scales can outperform smaller LLMs. Despite the memory savings achieved through quantization, it can also slow down the inference speed of LLMs. Consequently, substantial engineering efforts and hardware support are imperative to achieve a balanced optimization of decoding speed and memory consumption in the context of quantized LLMs.

View on arXivView PDF

Code Implementations(1)

A Comprehensive Evaluation of Quantization Strategies for Large Language Models

40R, C++Jun 6, 20242 years ago

Similar Papers

Cite this paper

@article{jin2024comprehensive,
  title  = {A Comprehensive Evaluation of Quantization Strategies for Large Language Models},
  author = {Renren Jin and Jiangcun Du and Wuwei Huang and Wei Liu and Jian Luan and Bin Wang and Deyi Xiong},
  year   = {2024},
  eprint = {2402.16775},
  archivePrefix = {arXiv},
  url    = {http://arxiv.org/abs/2402.16775v2}
}

Add a badge to your README

Shows whether official code is linked for this paper.

Code of Paper badge
[![Code of Paper](https://codeofpaper.com/badge/2402.16775.svg)](https://codeofpaper.com/paper/2402.16775)

Discussion