LQ-LoRA: Low-rank Plus Quantized Matrix Decomposition for Efficient Language Model Finetuning

要約

我々は、事前トレーニングされた言語モデルをメモリ効率よく適応させるための簡単なアプローチを提案します。
私たちのアプローチでは、反復アルゴリズムを使用して、事前トレーニングされた各行列を高精度の低ランク コンポーネントとメモリ効率の高い量子化コンポーネントに分解します。
微調整中、量子化されたコンポーネントは固定されたままで、低ランクのコンポーネントのみが更新されます。
我々は、全体のターゲットメモリ予算を考慮して各行列の量子化パラメータ(ビット幅、ブロックサイズなど)を動的に設定できる量子化コンポーネントの整数線形計画法を提案します。
さらに、行列分解中に再構成目標に重み付けをするためにフィッシャー情報行列の近似を使用するアルゴリズムのデータ認識バージョンを検討します。
RoBERTa および LLaMA-2 (7B および 70B) を適応させる実験では、低ランク + 量子化行列分解アプローチ (LQ-LoRA) が強力な QLoRA および GPTQ-LoRA ベースラインを上回り、さらにより積極的な量子化を可能にすることが実証されています。
たとえば、OpenAssistant ベンチマークでは、LQ-LoRA は、4 ビット QLoRA で微調整されたモデルと競合する 2.5 ビット LLaMA-2 モデルを学習できます。
言語モデリング キャリブレーション データセットで微調整すると、LQ-LoRA をモデル圧縮にも使用できます。
この設定では、2.75 ビット LLaMA-2-70B モデル (低ランク コンポーネントを含めると平均 2.85 ビットで、27 GB の GPU メモリが必要) は、完全な精度で元のモデルと競合します。

要約(オリジナル)

We propose a simple approach for memory-efficient adaptation of pretrained language models. Our approach uses an iterative algorithm to decompose each pretrained matrix into a high-precision low-rank component and a memory-efficient quantized component. During finetuning, the quantized component remains fixed and only the low-rank component is updated. We present an integer linear programming formulation of the quantization component which enables dynamic configuration of quantization parameters (e.g., bit-width, block size) for each matrix given an overall target memory budget. We further explore a data-aware version of the algorithm which uses an approximation of the Fisher information matrix to weight the reconstruction objective during matrix decomposition. Experiments on adapting RoBERTa and LLaMA-2 (7B and 70B) demonstrate that our low-rank plus quantized matrix decomposition approach (LQ-LoRA) outperforms strong QLoRA and GPTQ-LoRA baselines and moreover enables more aggressive quantization. For example, on the OpenAssistant benchmark LQ-LoRA is able to learn a 2.5-bit LLaMA-2 model that is competitive with a model finetuned with 4-bit QLoRA. When finetuned on a language modeling calibration dataset, LQ-LoRA can also be used for model compression; in this setting our 2.75-bit LLaMA-2-70B model (which has 2.85 bits on average when including the low-rank components and requires 27GB of GPU memory) is competitive with the original model in full precision.

arxiv情報

著者 Han Guo,Philip Greengard,Eric P. Xing,Yoon Kim
発行日 2023-11-20 18:57:41+00:00
arxivサイト arxiv_id(pdf)

提供元, 利用サービス

arxiv.jp, Google

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