arXivDaily arXiv每日学术速递 周一至周五更新
arXiv周末暂无论文更新,休息一下吧,周末愉快~~
arXiv 2310.08659cs.CLcs.AIcs.LG
收藏

LoftQ:面向大语言模型的LoRA微调感知量化

LoftQ: LoRA-Fine-Tuning-Aware Quantization for Large Language Models

Georgia Tech(佐治亚理工学院);Microsoft Azure(微软Azure)

Yixiao Li, Yifan Yu, Chen Liang, Pengcheng He, Nikos Karampatziakis, Weizhu Chen, Tuo Zhao

AI总结:

本文提出LoftQ框架,在量化LLM的同时为LoRA微调寻找合适的低秩初始化,以缩小量化模型与全精度模型的差距,在2位及2/4位混合精度下显著提升下游任务性能。

摘要:

量化是部署大语言模型(LLMs)不可或缺的技术,并且近年来已进入LoRA微调领域。本文聚焦于量化与LoRA微调同时应用于预训练模型的场景。在此类情况下,通常可以观察到全量微调与量化加LoRA微调方法在下游任务性能上存在一致的差距。为此,我们提出了LoftQ(LoRA微调感知量化),这是一种新颖的量化框架,它在对LLM进行量化的同时,为LoRA微调寻找合适的低秩初始化。这种初始化缩小了量化模型与全精度模型之间的差异,并显著提升了下游任务的泛化能力。我们在自然语言理解、问答、摘要和自然语言生成任务上评估了该方法。实验表明,我们的方法非常有效,并且优于现有的量化方法,尤其是在具有挑战性的2位和2/4位混合精度场景下。代码可在https://github.com/yxli2123/LoftQ获取。

英文摘要:

Quantization is an indispensable technique for serving Large Language Models (LLMs) and has recently found its way into LoRA fine-tuning. In this work we focus on the scenario where quantization and LoRA fine-tuning are applied together on a pre-trained model. In such cases it is common to observe a consistent gap in the performance on downstream tasks between full fine-tuning and quantization plus LoRA fine-tuning approach. In response, we propose LoftQ (LoRA-Fine-Tuning-aware Quantization), a novel quantization framework that simultaneously quantizes an LLM and finds a proper low-rank initialization for LoRA fine-tuning. Such an initialization alleviates the discrepancy between the quantized and full-precision model and significantly improves generalization in downstream tasks. We evaluate our method on natural language understanding, question answering, summarization, and natural language generation tasks. Experiments show that our method is highly effective and outperforms existing quantization methods, especially in the challenging 2-bit and 2/4-bit mixed precision regimes. The code is available on https://github.com/yxli2123/LoftQ.

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

↑