arXivDaily arXiv每日学术速递 周一至周五更新
arXiv 2401.06118cs.LGcs.CL
收藏

通过加性量化实现大语言模型的极致压缩

Extreme Compression of Large Language Models via Additive Quantization

HSE University(高等经济大学);Yandex Research(Yandex研究院);Skoltech(斯科尔科沃科学技术研究院);IST Austria(奥地利科学技术研究所);NeuralMagic(NeuralMagic公司)

Vage Egiazarian, Andrei Panferov, Denis Kuznedelev, Elias Frantar, Artem Babenko, Dan Alistarh

AI总结:

本研究针对大语言模型极致压缩需求,提出AQLM算法,通过输入自适应可学习加性量化与Transformer块码本联合优化,在2-3比特/参数的低比特压缩下实现准确率与尺寸的帕累托最优,且运行速度快、内存占用小。

摘要:

精准的开源大语言模型(LLMs)的涌现,引发了对高性能量化技术的竞速研发,这类技术可让大语言模型在终端用户设备上运行。本文从多码本量化(MCQ,Multi-Codebook Quantization)经典方法的视角,重新探讨大语言模型的“极致”压缩问题——该问题的定义是目标为极低比特数,例如每个参数2到3比特。我们提出的算法名为AQLM,它将用于信息检索的经典加性量化(AQ,Additive Quantization)方法进行泛化,通过两项创新推进大语言模型压缩的前沿水平:1)以输入自适应的方式对权重矩阵进行可学习加性量化;2)在每个Transformer块中联合优化码本参数。总体而言,AQLM是首个在压缩至每个参数不足3比特时,在准确率与模型尺寸的权衡上达到帕累托最优的方案,并且在极致压缩(2比特)场景下显著优于所有已知方案。此外,AQLM具备实用性:我们提供了用于token生成的AQLM快速GPU和CPU实现,使其运行速度能匹配甚至超越优化后的FP16实现,同时内存占用大幅降低。

英文摘要:

The emergence of accurate open large language models (LLMs) has led to a race towards performant quantization techniques which can enable their execution on end-user devices. In this paper, we revisit the problem of "extreme" LLM compression-defined as targeting extremely low bit counts, such as 2 to 3 bits per parameter-from the point of view of classic methods in Multi-Codebook Quantization (MCQ). Our algorithm, called AQLM, generalizes the classic Additive Quantization (AQ) approach for information retrieval to advance the state-of-the-art in LLM compression, via two innovations: 1) learned additive quantization of weight matrices in input-adaptive fashion, and 2) joint optimization of codebook parameters across each transformer blocks. Broadly, AQLM is the first scheme that is Pareto optimal in terms of accuracy-vs-model-size when compressing to less than 3 bits per parameter, and significantly improves upon all known schemes in the extreme compression (2bit) regime. In addition, AQLM is practical: we provide fast GPU and CPU implementations of AQLM for token generation, which enable us to match or outperform optimized FP16 implementations for speed, while executing in a much smaller memory footprint.

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

↑