Rethinking Channel Dimensions to Isolate Outliers for Low-bit Weight Quantization of Large Language Models

Jung Hwan Heo, Jeonghoon Kim, Beomseok Kwon, Byeongwook Kim, Se Jung Kwon +1 more
9/27/2023
cs.LG
quantization-pruning

Official code: johnheo/adadim-llm (5 stars, Python, last commit 2024-07-01).

Abstract

Large Language Models (LLMs) have recently demonstrated remarkable success across various tasks. However, efficiently serving LLMs has been a challenge due to the large memory bottleneck, specifically in small batch inference settings (e.g. mobile devices).

Show full abstract

Weight-only quantization can be a promising approach, but sub-4 bit quantization remains a challenge due to large-magnitude activation outliers. To mitigate the undesirable outlier effect, we first propose per-IC quantization, a simple yet effective method that creates quantization groups within each input channel (IC) rather than the conventional per-output-channel (per-OC). Our method is motivated by the observation that activation outliers affect the input dimension of the weight matrix, so similarly grouping the weights in the IC direction can isolate outliers within a group. We also find that activation outliers do not dictate quantization difficulty, and inherent weight sensitivities also exist. With per-IC quantization as a new outlier-friendly scheme, we propose Adaptive Dimensions (AdaDim), a versatile quantization framework that can adapt to various weight sensitivity patterns. We demonstrate the effectiveness of AdaDim by augmenting prior methods such as Round-To-Nearest and GPTQ, showing significant improvements across various language modeling benchmarks for both base (up to +4.7% on MMLU) and instruction-tuned (up to +10% on HumanEval) LLMs. Code is available at https://github.com/johnheo/adadim-llm

View on arXivView PDF

Code Implementations(1)

[ICLR 2024] Rethinking Channel Dimensions to Isolate Outliers for Low-bit Weight Quantization of Large Language Models

50Python, ShellSep 27, 20232 years ago

Similar Papers

Cite this paper

@article{heo2023rethinking,
  title  = {Rethinking Channel Dimensions to Isolate Outliers for Low-bit Weight Quantization of Large Language Models},
  author = {Jung Hwan Heo and Jeonghoon Kim and Beomseok Kwon and Byeongwook Kim and Se Jung Kwon and Dongsoo Lee},
  year   = {2023},
  eprint = {2309.15531},
  archivePrefix = {arXiv},
  url    = {http://arxiv.org/abs/2309.15531v4}
}

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/2309.15531.svg)](https://codeofpaper.com/paper/2309.15531)

Discussion