[論文レビュー] LoRA Learns Less and Forgets Less
LoRA はコードと数学タスクで完全微調整に劣るが、より強い正則化を提供し、忘却を減らし、生成の多様性を維持する。
Low-Rank Adaptation (LoRA) is a widely-used parameter-efficient finetuning method for large language models. LoRA saves memory by training only low rank perturbations to selected weight matrices. In this work, we compare the performance of LoRA and full finetuning on two target domains, programming and mathematics. We consider both the instruction finetuning (approximately 100K prompt-response pairs) and continued pretraining (20B unstructured tokens) data regimes. Our results show that, in the standard low-rank settings, LoRA substantially underperforms full finetuning. Nevertheless, LoRA better maintains the base model's performance on tasks outside the target domain. We show that LoRA mitigates forgetting more than common regularization techniques such as weight decay and dropout; it also helps maintain more diverse generations. Finally, we show that full finetuning learns perturbations with a rank that is 10-100X greater than typical LoRA configurations, possibly explaining some of the reported gaps. We conclude by proposing best practices for finetuning with LoRA.
研究の動機と目的
- LoRA が難解なコードおよび数学ドメインで完全微調整と同等の性能を達成できるか評価する。
- LoRA を2つの訓練 regime のもとで評価する。instruction finetuning (IFT) および continued pretraining (CPT)。
- ターゲットドメインでファインチューニングを実施した場合のソースドメイン能力の忘却を分析する。
- フルファインチューニングと比較した LoRA 揺らぎの階数(ランク)とモジュール感度を特徴づける。
- 実践的な LoRA 設定のベストプラクティスを提案する。
提案手法
- コードと数学ドメインで、Llama-2 7B(場所により13Bも)に対して LoRA と完全微調整を比較する。
- 2つのデータ regimes を使用: instruction finetuning(約100K のプロンプト-レスポンス対)および continued pretraining(約10B トークン)。
- ターゲットドメインの性能を HumanEval(コード)および GSM8K(数学)で評価する。
- ソースドメインの忘却を HellaSwag、ARC-Challenge、Winograd 問題で評価する。
- ファインチューニングの摂動ランクを分析するために特異値分解を実施する。
- 学習率、ターゲットモジュール、および LoRA ランクのハイパーパラメータスイープを実施する。
実験結果
リサーチクエスチョン
- RQ1どの条件下で LoRA はコードと数学タスクで完全微調整の精度に近づくか?
- RQ2LoRA は完全微調整と比較してソースドメインの忘却を緩和するか?
- RQ3LoRA の摺動ランクとターゲットモジュールは性能と正則化にどう影響するか?
- RQ4LoRA の性能と安定性に最も強く影響を与えるハイパーパラメータは何か?
- RQ5instruction finetuning および continued pretraining の効果を最大化する実践的ガイドラインは何か?
主な発見
- LoRA は CPT および IFT を通じてコードと数学タスクで完全微調整に及ばず、コードのギャップが数学より大きい。
- LoRA はソースドメインの忘却が完全微調整より小さく、正則化効果を示している。
- LoRA はウェイト減衰やアテンションのドロップアウトより強い正則化を提供し、より多様な出力生成を維持する。
- 完全微調整は高ランクの摂動を生み出す傾向があり、摂動ランクは典型的なLoRA設定の10〜100倍に及ぶ。
- LoRA は学習率とターゲットモジュールの選択に高度に敏感で、モジュールの選択がランクより影響が大きい。
- ベストプラクティスの指針は、LoRA を instruction finetuning に用い、全モジュールを対象に控えめなランクで、数エポックの訓練を行うことを推奨する。
より良い研究を、今すぐ始めましょう
論文設計から論文執筆まで、研究時間を劇的に削減しましょう。
クレジットカード登録不要
このレビューはAIが作成し、人間の編集者が確認しました。