ChatPaper.aiChatPaper

LoraHub:通過動態 LoRA 組合實現高效的跨任務泛化

LoraHub: Efficient Cross-Task Generalization via Dynamic LoRA Composition

July 25, 2023
作者: Chengsong Huang, Qian Liu, Bill Yuchen Lin, Tianyu Pang, Chao Du, Min Lin
cs.AI

摘要

低秩適應(LoRA)通常用於微調大型語言模型(LLMs)以應用於新任務。本文研究LoRA的可組合性,以實現跨任務泛化,並介紹LoraHub,一個策略框架,旨在有目的地組合在不同任務上訓練的LoRA模塊,以達到在未知任務上實現適應性性能的目的。僅需從新任務中獲取一些示例,LoraHub即可實現多個LoRA模塊的流暢組合,消除了對人類專業知識的需求。值得注意的是,此組合既不需要額外的模型參數,也不需要梯度。我們從Big-Bench Hard(BBH)基準測試中得出的實證結果表明,LoraHub能夠有效模擬在少樣本情況下的上下文學習表現,無需在每個推理輸入旁邊提供上下文示例。我們研究的一個重要貢獻是促進LoRA社區的發展,用戶可以分享他們訓練的LoRA模塊,從而促進這些模塊應用於新任務。我們預計這一資源將擴大對通用智能和生產中的LLMs的訪問範圍,並推動相應的進步。代碼將在https://github.com/sail-sg/lorahub 提供。
English
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 strategic 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 novel task, LoraHub enables the fluid combination of multiple LoRA modules, eradicating the need for human expertise. Notably, the composition requires neither additional model parameters nor gradients. Our empirical results, derived from the Big-Bench Hard (BBH) benchmark, suggest that LoraHub can effectively mimic the performance of in-context learning in few-shot scenarios, excluding the necessity of in-context examples alongside each inference input. A significant contribution of our research is the fostering of a community for LoRA, where users can share their trained LoRA modules, thereby facilitating their application to new tasks. We anticipate this resource will widen access to and spur advancements in general intelligence as well as LLMs in production. Code will be available at https://github.com/sail-sg/lorahub.
PDF322December 15, 2024