Skip to main content
QUICK REVIEW

[논문 리뷰] LoraHub: Efficient Cross-Task Generalization via Dynamic LoRA Composition

Chengsong Huang, Qian Liu|arXiv (Cornell University)|2023. 07. 25.
Context-Aware Activity Recognition Systems인용 수 7
한 줄 요약

LoraHub는 사전 학습된 LoRA 모듈을 자동으로 구성하여 미지의 작업에 대해 LLM을 적은 샷 예제로 적응시키고, 입력 토큰 수를 줄이고 추가 매개변수 없이 인-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 모듈을 학습시켜 다양한 기술을 포착한다.
  • Compose 단계: 스칼라 계수 w_i를 사용하여 LoRA 모듈을 선형적으로 더해 단일 hat{m}으로 만든다.
  • Adapt 단계: 적은 샷 예제로 w를 조정하기 위해 그래디언트-프리 최적화(CMA-ES 등)를 적용하고 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다양한 작업에서 학습된 LoRA 모듈의 라이브러리를 효과적으로 구성하여 미지의 작업으로 일반화할 수 있는가?
  • RQ2모듈 계수의 그래디언트-프리 최적화가 소수 샷 예제와 함께 경쟁력 있는 성능을 달성하는가?
  • RQ3표준 벤치마크에서 LoraHub와 인-context 학습 간의 효율성 및 성능 트레이드오프는 무엇인가?
  • RQ4LoRA 모듈의 수와 랭크가 크로스-태스크 일반화와 안정성에 어떤 영향을 미치는가?

주요 결과

  • LoraHub은 BBH의 소수 샷 환경에서 동일하거나 더 적은 토큰으로 인-context 학습 성능에 근접한 성능을 보여준다.
  • 다양한 시연 예제와 함께 사용할 때 방법이 ICL에 비해 상한 이점을 달성할 수 있다.
  • 그래디언트-프리 CMA-ES 최적화는 비교적 적은 컴퓨팅 자원(예: 단일 A100에서 1분 미만)으로 적합한 LoRA 가중치를 효과적으로 식별한다.
  • LoraHub은 LoRA 처리에 대해 CPU-만으로도 작동할 수 있어, LLM 추론이 가능하다고 가정하면 민주화된 워크플로를 가능하게 한다.
  • 그래디언트 기반 미세 조정과 비교하여 LoraHub은 기본 모델 매개변수를 보존하고 추론 시 예시 프롬프트를 피한다.
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가 만들고, 인간 에디터가 검토했습니다.