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, Llama-1/2, Falcon, Mistral, and Mixtral models. 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 https://github.com/mit-han-lab/smoothquant.
An Empirical Study of openPangu Quantization on Ascend NPUs
State Key Laboratory of Complex & Critical Software Environment, Beihang University(北京航空航天大学复杂关键软件环境国家重点实验室);School of Computer Science and Engineering, Beihang University(北京航空航天大学计算机科学与工程学院);School of Artificial Intelligence, Beihang University(北京航空航天大学人工智能学院)
Art and Science of Quantizing Large-Scale Models: A Comprehensive Overview
Peking University(北京大学);Nankai University(南开大学);Beijing Institute of Technology(北京理工大学);University of Leeds(利兹大学);Harbin University of Commerce(哈尔滨商业大学)
AWEQ: Post-Training Quantization with Activation-Weight Equalization for Large Language Models
School of Computer Science and Technology, Jilin University(吉林大学计算机科学与技术学院);Key Laboratory of Symbolic Computation and Knowledge Engineering of Ministry of Education, Jilin University(吉林大学符号计算与知识工程教育部重点实验室)
Quantization Meets Reasoning: Exploring and Mitigating Degradation of Low-Bit LLMs in Mathematical Reasoning
The Hong Kong Polytechnic University(香港理工大学);University of California, Santa Barbara(加州大学圣芭芭拉分校);Peking University(北京大学);The Hong Kong University of Science and Technology(香港科学与技术大学);The University of Hong Kong(香港大学)
Memory- and Latency-Constrained Inference of Large Language Models via Adaptive Split Computing
Department of Artificial Intelligence, Kyungpook National University(人工智能系,庆北国立大学);Department of Electrical and Computer Engineering, Queen’s University(电气与计算机工程系,皇后大学);Department of Information and Communications Engineering, Pukyong National University(信息与通信工程系,浦项国立大学)
Achieving binary weight and activation for LLMs using Post-Training Quantization
MAIS, Institute of Automation, Chinese Academy of Sciences(自动化研究所,中国科学院);School of Artificial Intelligence, University of Chinese Academy of Sciences(中国科学院大学人工智能学院);Central Media Technology Institute, Huawei Technologies Ltd.(华为技术有限公司媒体技术研究所)
RaanA: A Fast, Flexible, and Data-Efficient Post-Training Quantization Algorithm
Computer Science and Engineering, University of Michigan(密歇根大学计算机科学与工程系);College of Computing and Data Science, Nanyang Technological University(南洋理工大学计算机科学与数据科学学院);Physics of Artificial Intelligence Group, NTT Research, Inc.(NTT研究所人工智能物理组)
Fine-Grained Post-Training Quantization for Large Vision Language Models with Quantization-Aware Integrated Gradients
State Key Laboratory of Multimodal Artificial Intelligence Systems, CASIA(多模态人工智能系统国家重点实验室,中国科学院自动化所);School of Artificial Intelligence, UCAS(人工智能学院,中国科学院大学);Beijing National Research Center for Information Science and Technology(北京信息科学研究中心);Institute of Artificial Intelligence, USTB(信息科学技术大学人工智能学院);School of Artificial Intelligence, Beihang University(北京航空航天大学人工智能学院);Zhongguancun Academy(中关村学院)
Multidisciplinary Faculty of Nador, Mohammed Premier University, Oujda 60000, Morocco(摩洛哥奥伊达大学多学科学院);Laboratory LaSTI, ENSAK, Sultan Moulay Slimane University, Khouribga 54000, Morocco(摩洛哥库尔希布加大学LaSTI实验室)