AWQ: Activation-aware Weight Quantization for LLM Compression and Acceleration

Ji Lin, Jiaming Tang, Haotian Tang, Shang Yang, Wei-Ming Chen +5 more
6/1/2023
2,166 citations
cs.CL
quantization-pruning

Official code: vllm-project/vllm (96,481 stars, Python, Apache-2.0, PyTorch, last commit 2026-05-05). 2 more implementations below.

Abstract

Large language models (LLMs) have transformed numerous AI applications. On-device LLM is becoming increasingly important: running LLMs locally on edge devices can reduce the cloud computing cost and protect users' privacy.

Show full abstract

However, the astronomical model size and the limited hardware resource pose significant deployment challenges. We propose Activation-aware Weight Quantization (AWQ), a hardware-friendly approach for LLM low-bit weight-only quantization. AWQ finds that not all weights in an LLM are equally important. Protecting only 1% salient weights can greatly reduce quantization error. To identify salient weight channels, we should refer to the activation distribution, not weights. To avoid the hardware-inefficient mix-precision quantization, we mathematically derive that scaling up the salient channels can reduce the quantization error. AWQ employs an equivalent transformation to scale the salient weight channels to protect them. The scale is determined by collecting the activation statistics offline. AWQ does not rely on any backpropagation or reconstruction, so it generalizes to different domains and modalities without overfitting the calibration set. AWQ outperforms existing work on various language modeling and domain-specific benchmarks (coding and math). Thanks to better generalization, it achieves excellent quantization performance for instruction-tuned LMs and, for the first time, multi-modal LMs. Alongside AWQ, we implement TinyChat, an efficient and flexible inference framework tailored for 4-bit on-device LLM/VLMs. With kernel fusion and platform-aware weight packing, TinyChat offers more than 3x speedup over the Huggingface FP16 implementation on both desktop and mobile GPUs. It also democratizes the deployment of the 70B Llama-2 model on mobile GPUs.

View on arXivView PDF

Code Implementations(3)

Code implementations of this paper
RepositoryTypeStarsLanguageLicenseLast commit
vllm-project/vllmOfficial96,481PythonApache-2.02026-05-05
NVIDIA/TensorRT-LLMOfficial14,974Python–2026-05-03
vimarsh244/llm-awqCommunity0PythonMIT2025-07-17
vllm-project/vllmOfficial100%
PyTorchApache-2.0

A high-throughput and memory-efficient inference and serving engine for LLMs

96,48124,502Python, CudaFeb 9, 20237 months agoApache-2.0
amdblackwellcudadeepseekdeepseek-v3+15 more
PyTorch

TensorRT LLM provides users with an easy-to-use Python API to define Large Language Models (LLMs) and supports state-of-the-art optimizations to perform inference efficiently on NVIDIA GPUs. TensorRT LLM also contains components to create Python and C++ runtimes that orchestrate the inference execution in a performant way.

14,9742,884Python, C++Aug 16, 20237 months agoNOASSERTION
blackwellcudallm-servingmoepytorch
vimarsh244/llm-awqCommunity71%
MIT

[MLSys 2024 Best Paper Award] AWQ: Activation-aware Weight Quantization for LLM Compression and Acceleration

00Python, CudaSep 8, 20251 years agoMIT

Similar Papers

Cite this paper

@article{lin2023awq,
  title  = {AWQ: Activation-aware Weight Quantization for LLM Compression and Acceleration},
  author = {Ji Lin and Jiaming Tang and Haotian Tang and Shang Yang and Wei-Ming Chen and Wei-Chen Wang and Guangxuan Xiao and Xingyu Dang and Chuang Gan and Song Han},
  year   = {2023},
  eprint = {2306.00978},
  archivePrefix = {arXiv},
  url    = {http://arxiv.org/abs/2306.00978v5}
}

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

Discussion