arXivDaily arXiv每日学术速递 周一至周五更新
arXiv 2306.08162cs.CLcs.AIcs.LG
收藏

INT2.1:面向通过低秩适配实现误差校正的可微调量化大语言模型

INT2.1: Towards Fine-Tunable Quantized Large Language Models with Error Correction through Low-Rank Adaptation

Harvard University(哈佛大学);University of Amsterdam(阿姆斯特丹大学);Stochastic Inc.(Stochastic公司)

Yuji Chai, John Gkountouras, Glenn G. Ko, David Brooks, Gu-Yeon Wei

AI总结:

本研究提出基于LoRA的极致内存高效微调方法与低秩误差校正方法,在仅增加5%模型尺寸的前提下,实现了可在消费级笔记本微调的高性能INT2量化大语言模型,且方法可推广至多种量化标准。

摘要:

我们提出了一种可大幅降低微调显存需求并校正量化大语言模型中量化误差的方法。首先,我们利用低秩适配(Low-Rank Adaptation,LoRA)为量化模型开发了一种极致内存高效微调(extremely memory-efficient fine-tuning,EMEF)方法,并以此为基础构建了一种误差校正算法,旨在最小化量化过程带来的误差。我们的方法将内存需求降低了多达5.6倍,使得在消费级笔记本电脑上微调70亿参数的大语言模型(Large Language Model,LLM)成为可能。\n同时,我们提出了低秩误差校正(Low-Rank Error Correction,LREC)方法,该方法利用新增的LoRA层来缩小量化模型与其浮点版本之间的性能差距。我们的误差校正框架打造出了功能完整的INT2量化LLM,该模型具备生成连贯英文文本的能力。据我们所知,这是首个能够达到如此性能的INT2大语言模型。我们的方法仅带来1.05倍的模型尺寸开销,对应有效精度为INT2.1。\n此外,我们的方法可轻松推广至其他量化标准,如INT3、INT4和INT8,恢复其损失的性能,这标志着模型量化领域的一个重要里程碑。本文阐述的策略对量化模型的未来开发与优化具有广阔的应用前景,标志着低资源机器学习计算格局的关键转变。

英文摘要:

We introduce a method that dramatically reduces fine-tuning VRAM requirements and rectifies quantization errors in quantized Large Language Models. First, we develop an extremely memory-efficient fine-tuning (EMEF) method for quantized models using Low-Rank Adaptation (LoRA), and drawing upon it, we construct an error-correcting algorithm designed to minimize errors induced by the quantization process. Our method reduces the memory requirements by up to 5.6 times, which enables fine-tuning a 7 billion parameter Large Language Model (LLM) on consumer laptops. At the same time, we propose a Low-Rank Error Correction (LREC) method that exploits the added LoRA layers to ameliorate the gap between the quantized model and its float point counterpart. Our error correction framework leads to a fully functional INT2 quantized LLM with the capacity to generate coherent English text. To the best of our knowledge, this is the first INT2 Large Language Model that has been able to reach such a performance. The overhead of our method is merely a 1.05 times increase in model size, which translates to an effective precision of INT2.1. Also, our method readily generalizes to other quantization standards, such as INT3, INT4, and INT8, restoring their lost performance, which marks a significant milestone in the field of model quantization. The strategies delineated in this paper hold promising implications for the future development and optimization of quantized models, marking a pivotal shift in the landscape of low-resource machine learning computations.

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

↑