Towards Modular LLMs by Building and Reusing a Library of LoRAs

Oleksiy Ostapenko, Zhan Su, Edoardo Maria Ponti, Laurent Charlin, Nicolas Le Roux +3 more
5/18/2024
cs.LGcs.CL

No confident code implementation found for this paper. 2 possible matches can be shown below.

Abstract

The growing number of parameter-efficient adaptations of a base large language model (LLM) calls for studying whether we can reuse such trained adapters to improve performance for new tasks. We study how to best build a library of adapters given multi-task data and devise techniques for both zero-shot and supervised task generalization through routing in such library.

Show full abstract

We benchmark existing approaches to build this library and introduce model-based clustering, MBC, a method that groups tasks based on the similarity of their adapter parameters, indirectly optimizing for transfer across the multi-task dataset. To re-use the library, we present a novel zero-shot routing mechanism, Arrow, which enables dynamic selection of the most relevant adapters for new inputs without the need for retraining. We experiment with several LLMs, such as Phi-2 and Mistral, on a wide array of held-out tasks, verifying that MBC-based adapters and Arrow routing lead to superior generalization to new tasks. We make steps towards creating modular, adaptable LLMs that can match or outperform traditional joint training.

View on arXivView PDF

Code Implementations

No confident code match yet

We couldn't find an author-owned or strongly-evidenced community implementation for this paper. 2 weaker matches are hidden by default — verify before relying on them.

No code implementations found yet.

Know of an implementation? Let us know in the comments below!

Similar Papers

Cite this paper

@article{ostapenko2024towards,
  title  = {Towards Modular LLMs by Building and Reusing a Library of LoRAs},
  author = {Oleksiy Ostapenko and Zhan Su and Edoardo Maria Ponti and Laurent Charlin and Nicolas Le Roux and Matheus Pereira and Lucas Caccia and Alessandro Sordoni},
  year   = {2024},
  eprint = {2405.11157},
  archivePrefix = {arXiv},
  url    = {http://arxiv.org/abs/2405.11157v1},
  journal = {ICML 2024 2024}
}

Add a badge to your README

Shows whether official code is linked for this paper.

Code of Paper badge
[![Code of Paper](https://codeofpaper.com/badge/2405.11157.svg)](https://codeofpaper.com/paper/2405.11157)

Discussion