SliM-LLM:面向大语言模型的显著性驱动混合精度量化
SliM-LLM: Salience-Driven Mixed-Precision Quantization for Large Language Models
AI总结:
提出SliM-LLM,一种显著性驱动的混合精度量化框架,通过组级位分配和量化器校准,在低比特下提升LLM性能,显著降低内存和困惑度。
摘要:
训练后量化(PTQ)是压缩大型语言模型(LLM)的有效技术。然而,虽然统一精度量化计算效率高,但常常损害模型性能。为解决此问题,我们提出SliM-LLM,一个在组级别分配位宽的显著性驱动混合精度量化框架。我们的方法利用重要权重遵循结构化分布的观察,并引入两个关键组件:1)显著性决定位分配,根据组内显著性自适应地为每层内的组分配位宽;2)显著性加权量化器校准,通过结合元素级显著性来优化量化器参数。凭借其结构化分区,SliM-LLM提供了一种硬件友好的解决方案,在提高准确性的同时匹配统一量化方法的效率。实验表明,SliM-LLM在低比特宽下在各种LLM上实现了优越性能。例如,一个2比特量化的LLaMA-7B模型相比浮点基线减少了近6倍的内存使用,相比最先进的无梯度PTQ方法降低了48%的困惑度,并保持了GPU推理速度。此外,扩展版本SliM-LLM+,结合了基于梯度的量化,进一步降低了35.1%的困惑度。我们的代码可在https://github.com/Aaronhuang-778/SliM-LLM获取。
英文摘要:
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
机构、总结、中文摘要均由AI分析而来,可能存在错误,请以论文正文为准。