arXivDaily arXiv每日学术速递 周一至周五更新
arXiv 2309.01885stat.MLcs.CLcs.LG
收藏

QuantEase:基于优化的语言模型量化方法

QuantEase: Optimization-based Quantization for Language Models

LinkedIn(领英);Massachusetts Institute of Technology(麻省理工学院)

Kayhan Behdin, Ayan Acharya, Aman Gupta, Qingquan Song, Siyu Zhu, Sathiya Keerthi, Rahul Mazumder

AI总结:

本文提出 QuantEase 逐层量化框架,将 LLM 训练后量化建模为非凸优化问题并用坐标下降求解,结合异常值感知变体,在困惑度和零样本准确率上超越 GPTQ、SpQR 等方法,并可在单块 A100 GPU 上高效量化 Falcon-180B。

摘要:

随着大语言模型(LLMs)日益普及,人们对其高效部署的压缩技术越来越感兴趣。本研究聚焦于大语言模型的训练后量化(PTQ)。借鉴近期进展,我们提出了 QuantEase,一种逐层量化框架,其中各层分别进行量化。该问题被建模为离散结构化的非凸优化问题,促使我们开发了基于坐标下降(CD)技术的算法。这些基于 CD 的方法为复杂的非凸逐层量化问题提供了高质量的解。值得注意的是,我们的基于 CD 的方法具有更新简单的特点,仅依赖矩阵和向量运算,避免了矩阵求逆或分解的需要。我们还探索了该方法的一种异常值感知变体,允许以完全精度保留重要权重(异常值)。在各种大语言模型和数据集上的经验评估中,我们的方法在困惑度和零样本准确率方面达到了最先进的性能,相较于 GPTQ 等方法相对提升最高达 15%。借助精心的线性代数优化,QuantEase 可在单块 NVIDIA A100 GPU 上约 3 小时内完成 Falcon-180B 等模型的量化。尤其值得关注的是,我们的异常值感知算法能够实现接近或低于 3 比特的大语言模型量化,且准确率下降在可接受范围内,从而无需非均匀量化或分组技术,在困惑度方面相较于 SpQR 等方法提升最高达两倍。

英文摘要:

With the rising popularity of Large Language Models (LLMs), there has been an increasing interest in compression techniques that enable their efficient deployment. This study focuses on the Post-Training Quantization (PTQ) of LLMs. Drawing from recent advances, our work introduces QuantEase, a layer-wise quantization framework where individual layers undergo separate quantization. The problem is framed as a discrete-structured non-convex optimization, prompting the development of algorithms rooted in Coordinate Descent (CD) techniques. These CD-based methods provide high-quality solutions to the complex non-convex layer-wise quantization problems. Notably, our CD-based approach features straightforward updates, relying solely on matrix and vector operations, circumventing the need for matrix inversion or decomposition. We also explore an outlier-aware variant of our approach, allowing for retaining significant weights (outliers) with complete precision. Our proposal attains state-of-the-art performance in terms of perplexity and zero-shot accuracy in empirical evaluations across various LLMs and datasets, with relative improvements up to 15% over methods such as GPTQ. Leveraging careful linear algebra optimizations, QuantEase can quantize models like Falcon-180B on a single NVIDIA A100 GPU in $\sim$3 hours. Particularly noteworthy is our outlier-aware algorithm's capability to achieve near or sub-3-bit quantization of LLMs with an acceptable drop in accuracy, obviating the need for non-uniform quantization or grouping techniques, improving upon methods such as SpQR by up to two times in terms of perplexity.

机构、总结、中文摘要均由AI分析而来,可能存在错误,请以论文正文为准。

↑