SmoothQuant: Accurate and EfficientPost-Training Quantization for Large Language Models
Large language models (LLMs) show excellent performance but are compute- and memory-intensive. Quantization can reduce memory and accelerate inference. However, existing methods cannot maintain accuracy and hardware efficiency at the same time. We propose SmoothQuant, a training-free, accuracy-preserving, and general-purpose post-training quantization (PTQ) solution to enable 8-bit weight, 8-bit activation (W8A8) quantization for LLMs. Based on the fact that weights are easy to quantize while activations are not, SmoothQuant smooths the activation outliers by offline migrating the quantization difficulty from activations to weights with a mathematically equivalent transformation. SmoothQuant enables an INT8 quantization of both weights and activations for all the matrix multiplications in LLMs, including OPT, BLOOM, GLM, MT-NLG, and LLaMA family. We demonstrate up to 1.56x speedup and 2x memory reduction for LLMs with negligible loss in accuracy. SmoothQuant enables serving 530B LLM within a single node. Our work offers a turn-key solution that reduces hardware costs and democratizes LLMs. Code is available at this https URL.
SmoothQuant: Accurate and Efficient Post-Training Quantization for Large Language Models Guangxuan Xiao * 1 Ji Lin * 1 Mickael Seznec 2 Hao Wu 2 Julien Demouth 2 Song Han 1 https://github.com/mit-han-lab/smoothquant Abstract arXiv:2211.10438v7 [cs.CL] 29 Mar 2024 Large…
related reading
- A Guide to Quantization in LLMs | Symbl.aisymbl.ai
- Quantization from the ground upngrok.com
- Efficient LLM inferencefinbarrtimbers.substack.com
- 2305.14314arxiv.org
- A Visual Guide to Quantization - by Maarten Grootendorstnewsletter.maartengrootendorst.com
- AWQ: Activation-aware Weight Quantization for On-Device LLM Compression and Accelerationarxiv.org
- Quantization and Hardware Architecture Co-Design for Matrix-Vector Multiplications of Large Language Modelsieeexplore.ieee.org
- LLM Inference Performance Engineering: Best Practices | Databricks Blogdatabricks.com
- The 4-bitter Lesson | humans&humansand.ai
- LLM.int8()arxiv.org
- [2510.11696] QeRL: Beyond Efficiency -- Quantization-enhanced Reinforcement Learning for LLMsarxiv.org
- 2210.17323arxiv.org