LoraRetriever: Input-Aware LoRA Retrieval and Composition for Mixed Tasks in the Wild
Preprint
Abstract
Low-Rank Adaptation (LoRA) provides an effective yet efficient solution for fine-tuning large language models (LLM). The modular and plug-and-play nature of LoRA enables the integration of diverse domain-specific LoRAs to enhance the capabilities of LLMs. Previous research on exploiting multiple LoRAs either focuses on specific isolated downstream tasks or fixes the selection of LoRAs during training. However, in real-world scenarios, LLMs receive diverse prompts covering different tasks, and the pool of candidate LoRAs is often dynamically updated. To bridge this gap, we propose LoraRetriever, a retrieve-then-compose framework that adaptively retrieves and composes multiple LoRAs according to the input prompts. LoraRetriever contains three main components: firstly, identifying and retrieving LoRAs relevant to the given input; secondly, formulating strategies for effectively integrating the retrieved LoRAs; and thirdly, developing efficient batch inference to accommodate heterogeneous requests. Experimental results indicate that LoraRetriever consistently outperforms the baselines, highlighting its practical effectiveness and versatility.Keywords
All Related Versions
This publication has 11 references indexed in Scilit:
- A survey on large language model based autonomous agentsFrontiers of Computer Science, 2024
- LLM-Adapters: An Adapter Family for Parameter-Efficient Fine-Tuning of Large Language Models2023
- AdapterSoup: Weight Averaging to Improve Generalization of Pretrained Language Models2023
- Task-aware Retrieval with Instructions2023
- One Embedder, Any Task: Instruction-Finetuned Text Embeddings2023
- Efficiently Tuned Parameters Are Task Embeddings2022
- AdaMix: Mixture-of-Adaptations for Parameter-efficient Model Tuning2022
- Sentence-T5: Scalable Sentence Encoders from Pre-trained Text-to-Text Models2022
- Dense Passage Retrieval for Open-Domain Question Answering2020
- Adaptive Mixtures of Local ExpertsNeural Computation, 1991