Skip to main content
QUICK REVIEW

[論文レビュー] LoraHub: Efficient Cross-Task Generalization via Dynamic LoRA Composition

Chengsong Huang, Qian Liu|arXiv (Cornell University)|Jul 25, 2023
Context-Aware Activity Recognition Systems被引用数 7
ひとこと要約

LoraHub は事前学習済み LoRA モジュールを自動的に組み合わせて未見タスクへ適応することで、追加パラメータなし・入力トークン数を抑えた近似イン-context 学習性能を達成します。

ABSTRACT

Low-rank adaptations (LoRA) are often employed to fine-tune large language models (LLMs) for new tasks. This paper investigates LoRA composability for cross-task generalization and introduces LoraHub, a simple framework devised for the purposive assembly of LoRA modules trained on diverse given tasks, with the objective of achieving adaptable performance on unseen tasks. With just a few examples from a new task, LoraHub can fluidly combine multiple LoRA modules, eliminating the need for human expertise and assumptions. Notably, the composition requires neither additional model parameters nor gradients. Empirical results on the Big-Bench Hard benchmark suggest that LoraHub, while not surpassing the performance of in-context learning, offers a notable performance-efficiency trade-off in few-shot scenarios by employing a significantly reduced number of tokens per example during inference. Notably, LoraHub establishes a better upper bound compared to in-context learning when paired with different demonstration examples, demonstrating its potential for future development. Our vision is to establish a platform for LoRA modules, empowering users to share their trained LoRA modules. This collaborative approach facilitates the seamless application of LoRA modules to novel tasks, contributing to an adaptive ecosystem. Our code is available at https://github.com/sail-sg/lorahub, and all the pre-trained LoRA modules are released at https://huggingface.co/lorahub.

研究の動機と目的

  • 多様なタスクで訓練されたモジュール LoRA を用いたクロスタスク一般化の調査。
  • 未知タスクのために LoRA モジュールを組み立て調整する二段階フレームワーク(Compose と Adapt)の開発。
  • 適応時の手動モジュール選択と追加モデルパラメータの排除。
  • BBH と FLAN-T5 を用いたゼロショットおよびインコンテキスト学習との効率性と性能トレードオフの評価。
  • 再利用可能なコンポーネントを促進する LoRA モジュールの共有を視野に入れたプラットフォーム中心のビジョンの提案。

提案手法

  • 異なる上流タスクで複数の LoRA モジュールを訓練し、多様なスキルを捉える。
  • 組み立て段階: LoRA モジュールをスカラー係数 w_i で線形結合して hat{m} を作成。
  • 適応段階: グラデーションを用いない最適化(例: CMA-ES)で hat{m} の w を few-shot の例に対して調整し、L + alpha * sum|w_i| を最小化。
  • 最終化: 最適化された hat{m} を基盤 LLM と統合して未知タスクを実行、追加パラメータの更新は行わない。
  • 推論効率の評価: 入力を抑え、推論時の例示デモを避ける。
Figure 1: The illustration of zero-shot learning, few-shot in-context learning and few-shot LoraHub learning (ours). Note that the Compose procedure is conducted per task rather than per example. Our method achieves similar inference throughput as zero-shot learning, yet approaches the performance o
Figure 1: The illustration of zero-shot learning, few-shot in-context learning and few-shot LoraHub learning (ours). Note that the Compose procedure is conducted per task rather than per example. Our method achieves similar inference throughput as zero-shot learning, yet approaches the performance o

実験結果

リサーチクエスチョン

  • RQ1 Diverse なタスクで訓練された LoRA モジュールのライブラリを効果的に組み合わせて未見タスクへ一般化できるか。
  • RQ2モジュール係数の勾配なし最適化は few-shot の例と組み合わせて競争力のある性能を得られるか。
  • RQ3 標準ベンチマークにおける LoraHub とインコンテキスト学習の効率性と性能のトレードオフはどうなるか。
  • RQ4 LoRA モジュールの数と階層(ランク)がクロスタスク一般化と安定性にどう影響するか。

主な発見

  • LoraHub は few-shot BBH 設定でインコンテキスト学習性能に近づく一方、各例あたりのトークン数を同程度またはそれ以下に抑える。
  • 異なるデモンストレーション例と組み合わせた場合、ICL に対して著しい上限の利得を達成できる可能性。
  • 勾配なし CMA-ES 最適化は適切な LoRA 重みを妥当な計算量で識別できる(例: 単一の A100 で1分未満)。
  • LoRA 処理を CPU だけで行える場合があり、LLM 推論が利用可能であれば民主化されたワークフローを実現。
  • 勾配ベースのファインチューニングと比較して、LoraHub は基礎モデルのパラメータを保持し、推論時の per-example プロンプトを回避する。
Figure 2: Our method encompasses two stages: the Compose stage and the Adapt stage. During the Compose stage, existing LoRA modules are integrated into one unified module, employing a set of coefficients, denoted as $w$ . In the Adapt stage, the combined LoRA module is evaluated on a few examples fr
Figure 2: Our method encompasses two stages: the Compose stage and the Adapt stage. During the Compose stage, existing LoRA modules are integrated into one unified module, employing a set of coefficients, denoted as $w$ . In the Adapt stage, the combined LoRA module is evaluated on a few examples fr

より良い研究を、今すぐ始めましょう

論文設計から論文執筆まで、研究時間を劇的に削減しましょう。

クレジットカード登録不要

このレビューはAIが作成し、人間の編集者が確認しました。