LoraHub: Generalizzazione Efficiente tra Task tramite Composizione Dinamica di LoRA
LoraHub: Efficient Cross-Task Generalization via Dynamic LoRA Composition
July 25, 2023
Autori: Chengsong Huang, Qian Liu, Bill Yuchen Lin, Tianyu Pang, Chao Du, Min Lin
cs.AI
Abstract
Gli adattamenti a basso rango (LoRA) sono spesso utilizzati per ottimizzare i grandi modelli linguistici (LLM) per nuovi compiti. Questo articolo esamina la componibilità di LoRA per la generalizzazione tra compiti e introduce LoraHub, un framework strategico progettato per l'assemblaggio mirato di moduli LoRA addestrati su vari compiti dati, con l'obiettivo di ottenere prestazioni adattabili su compiti non visti. Con pochi esempi di un nuovo compito, LoraHub consente la combinazione fluida di più moduli LoRA, eliminando la necessità di competenze umane. È importante notare che la composizione non richiede né parametri aggiuntivi del modello né gradienti. I nostri risultati empirici, derivati dal benchmark Big-Bench Hard (BBH), suggeriscono che LoraHub può efficacemente imitare le prestazioni dell'apprendimento in contesto in scenari few-shot, escludendo la necessità di esempi in contesto accanto a ogni input di inferenza. Un contributo significativo della nostra ricerca è la promozione di una comunità per LoRA, dove gli utenti possono condividere i propri moduli LoRA addestrati, facilitando così la loro applicazione a nuovi compiti. Prevediamo che questa risorsa amplierà l'accesso e stimolerà i progressi nell'intelligenza generale e negli LLM in produzione. Il codice sarà disponibile su 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.