SliM-LLM: Salience-Driven Mixed-Precision Quantization for Large Language Models

Fuente: arXiv
Saved in:
Bibliographic Details
Main Authors: Huang, Wei, Qin, Haotong, Liu, Yangdong, Li, Yawei, Liu, Qinshuo, Liu, Xianglong, Benini, Luca, Magno, Michele, Zhang, Shiming, Qi, Xiaojuan
Format: Preprint
Published: 2024
Subjects:
Online Access:
Tags: Add Tag
No Tags, Be the first to tag this record!
_version_ 1866908376945917952
author Huang, Wei
Qin, Haotong
Liu, Yangdong
Li, Yawei
Liu, Qinshuo
Liu, Xianglong
Benini, Luca
Magno, Michele
Zhang, Shiming
Qi, Xiaojuan
author_facet Huang, Wei
Qin, Haotong
Liu, Yangdong
Li, Yawei
Liu, Qinshuo
Liu, Xianglong
Benini, Luca
Magno, Michele
Zhang, Shiming
Qi, Xiaojuan
contents Post-training quantization (PTQ) is an effective technique for compressing large language models (LLMs). However, while uniform-precision quantization is computationally efficient, it often compromises model performance. To address this, we propose SliM-LLM, a salience-driven mixed-precision quantization framework that allocates bit-widths at the group-wise. Our approach leverages the observation that important weights follow a structured distribution and introduces two key components: \textbf{1)} \textit{Salience-Determined Bit Allocation} adaptively assigns bit-widths to groups within each layer based on their salience; and \textbf{2)} \textit{Salience-Weighted Quantizer Calibration} optimizes quantizer parameters by incorporating element-level salience. With its structured partitioning, SliM-LLM provides a hardware-friendly solution that matches the efficiency of uniform quantization methods while improving accuracy. Experiments show that SliM-LLM achieves superior performance across various LLMs at low bit-widths. For example, a 2-bit quantized LLaMA-7B model reduces memory usage by nearly 6x compared to the floating-point baseline, decreases perplexity by 48\% compared to state-of-the-art gradient-free PTQ methods, and maintains GPU inference speed. Additionally, the extended version, SliM-LLM$^+$, which incorporates gradient-based quantization, further reduces perplexity by 35.1\%. Our code is available at https://github.com/Aaronhuang-778/SliM-LLM
format Preprint
id arxiv_https___arxiv_org_abs_2405_14917
institution arXiv
publishDate 2024
record_format arxiv
spellingShingle SliM-LLM: Salience-Driven Mixed-Precision Quantization for Large Language Models
Huang, Wei
Qin, Haotong
Liu, Yangdong
Li, Yawei
Liu, Qinshuo
Liu, Xianglong
Benini, Luca
Magno, Michele
Zhang, Shiming
Qi, Xiaojuan
Machine Learning
Computation and Language
Post-training quantization (PTQ) is an effective technique for compressing large language models (LLMs). However, while uniform-precision quantization is computationally efficient, it often compromises model performance. To address this, we propose SliM-LLM, a salience-driven mixed-precision quantization framework that allocates bit-widths at the group-wise. Our approach leverages the observation that important weights follow a structured distribution and introduces two key components: \textbf{1)} \textit{Salience-Determined Bit Allocation} adaptively assigns bit-widths to groups within each layer based on their salience; and \textbf{2)} \textit{Salience-Weighted Quantizer Calibration} optimizes quantizer parameters by incorporating element-level salience. With its structured partitioning, SliM-LLM provides a hardware-friendly solution that matches the efficiency of uniform quantization methods while improving accuracy. Experiments show that SliM-LLM achieves superior performance across various LLMs at low bit-widths. For example, a 2-bit quantized LLaMA-7B model reduces memory usage by nearly 6x compared to the floating-point baseline, decreases perplexity by 48\% compared to state-of-the-art gradient-free PTQ methods, and maintains GPU inference speed. Additionally, the extended version, SliM-LLM$^+$, which incorporates gradient-based quantization, further reduces perplexity by 35.1\%. Our code is available at https://github.com/Aaronhuang-778/SliM-LLM
title SliM-LLM: Salience-Driven Mixed-Precision Quantization for Large Language Models
topic Machine Learning
Computation and Language
url https://arxiv.org/abs/2405.14917