about
Activation-Aware Weight Quantization for LLM Compression Outperforms GPTQ (arxiv.org)
9 points by valine on Jun 2, 2023 | hide | past | pdf | 2 comments on HN

In plain words: To shrink a language model for phones, it stores weights in 4 bits but enlarges the few channels that matter most, found from how the model activates, so rounding barely hurts them. It beat earlier compression tricks and ran over 3x faster than 16-bit code.

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

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. 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.

Ji Lin, Jiaming Tang, Haotian Tang, Shang Yang, Wei-Ming Chen, Wei-Chen Wang, Guangxuan Xiao, Xingyu Dang, Chuang Gan, Song Han
arXiv:2306.00978 · cs.CL · submitted Jun 1, 2023 · updated Apr 25, 2026
abstract · pdf · html · MLSys 2024 Best Paper Award. Code available at: https://github.com/mit-han-lab/llm-awq

add comment on HN

Better quantization will have a direct and meaningful impact for everyone running local LLMs. The technique has already been applied to both Vicuna and the multimodal LLaMA variant LLaVA.

https://github.com/mit-han-lab/llm-awq

They claim average 1.45x speedup and maximum 1.7x speedup over GPTQ.

High-level idea: About 1% of the weights contribute greatly to quantization error. So skip the quantization of these weights.