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

要約

量子化は大規模言語モデル (LLM) を提供するために不可欠な技術であり、最近では LoRA の微調整に取り入れられています。
この作業では、量子化と LoRA 微調整が事前トレーニングされたモデルに一緒に適用されるシナリオに焦点を当てます。
このような場合、完全な微調整アプローチと量子化と LoRA 微調整アプローチの間で、ダウンストリーム タスクのパフォーマンスに一貫したギャップが観察されるのが一般的です。
これに応えて、我々は、LLM を量子化し、同時に LoRA 微調整のための適切な低ランク初期化を見つける新しい量子化フレームワークである LoftQ (LoRA-Fine-Tuning-aware Quantization) を提案します。
このような初期化により、量子化モデルと完全精度モデル間の不一致が軽減され、下流タスクでの汎化が大幅に向上します。
自然言語理解、質問応答、要約、自然言語生成タスクに関する手法を評価します。
実験では、特に困難な 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.

arxiv情報

著者 Yixiao Li,Yifan Yu,Chen Liang,Pengcheng He,Nikos Karampatziakis,Weizhu Chen,Tuo Zhao
発行日 2023-11-28 16:06:59+00:00
arxivサイト arxiv_id(pdf)

提供元, 利用サービス

arxiv.jp, Google

カテゴリー: cs.AI, cs.CL, cs.LG パーマリンク