[Submitted on 1 Jun 2023 (v1), last revised 25 Apr 2026 (this version, v6)] · arXiv.org

View PDF HTML (experimental)

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. 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.
Comments: MLSys 2024 Best Paper Award. Code available at: this https URL
Subjects: Computation and Language (cs.CL)
Cite as: arXiv:2306.00978 [cs.CL]
  (or arXiv:2306.00978v6 [cs.CL] for this version)
  https://doi.org/10.48550/arXiv.2306.00978

arXiv-issued DOI via DataCite

Submission history

From: Jiaming Tang [view email]
[v1] Thu, 1 Jun 2023 17:59:10 UTC (2,783 KB)
[v2] Tue, 3 Oct 2023 18:20:01 UTC (4,384 KB)
[v3] Sun, 21 Apr 2024 03:47:49 UTC (24,553 KB)
[v4] Tue, 23 Apr 2024 19:51:53 UTC (24,552 KB)
[v5] Thu, 18 Jul 2024 17:51:33 UTC (18,170 KB)
[v6] Sat, 25 Apr 2026 06:58:16 UTC (18,182 KB)

Read the original on arxiv.org ↗