HydraOpt: Navigating the Efficiency-Performance Trade-off of Adapter Merging

Taha Ceritli, Ondrej Bohdal, Mete Ozay, Jijoong Moon, Kyenghun Lee, Hyeonmok Ko, Umberto Michieli

TL;DR

Large language models (LLMs) are powerful but memory-hungry. Adapters help fine-tune them for specific tasks, but storing many adapters is impractical for resource-constrained devices. This paper introduces HydraOpt, a novel model merging technique that intelligently combines adapters, significantly reducing storage while maintaining competitive performance, offering a flexible trade-off between efficiency and accuracy.

What Problem Does This Paper Address?

Modern large language models (LLMs) achieve impressive results across a wide range of natural language processing tasks. To further enhance their performance on specific tasks, they are often fine-tuned using parameter-efficient fine-tuning (PEFT) methods, such as low-rank adapters (e.g., LoRA). These adapters allow for task-specific customization without retraining the entire LLM, making them ideal for deployment on devices with limited computational resources. However, the need to store a separate adapter for each task leads to substantial memory overhead. While model merging techniques exist to combine multiple adapters into a single one, they typically result in significant performance degradation, making them impractical for real-world applications. This paper addresses the critical challenge of reducing adapter storage requirements without sacrificing performance, aiming to enable efficient LLM deployment on resource-constrained devices.

Methods

The core innovation of HydraOpt lies in its approach to merging low-rank adapters. The authors observe that within LoRA adapters, the 'A' matrices tend to capture more general, cross-task information, while the 'B' matrices are more task-specific. HydraOpt leverages this observation by learning a single, shared 'A'' parameter and a set of task-specific 'B'' parameters. This allows for a flexible trade-off: by adjusting the number of shared 'B'' parameters (denoted by M), HydraOpt can navigate the spectrum between maximum storage efficiency (few shared 'B'' parameters) and higher performance (more distinct 'B'' parameters). The merging process is guided by a data-free loss function that minimizes the difference between the original adapter updates and the updates generated by the merged adapters. This approach allows for controllable efficiency-performance trade-offs, unlike existing methods that offer a fixed outcome.

Datasets

The authors conducted experiments using a comprehensive evaluation framework comprising 40 downstream tasks across 5 applications: Grammar Correction (GC), Smart Reply (SR), Text Summarization (TS), Tone Adjustment (TA), and Question Answering (QA). These tasks were evaluated in 8 different languages: English (EN), German (DE), Spanish (ES), French (FR), Italian (IT), Japanese (JA), Korean (KO), and Chinese (ZH). For datasets, they utilized:

  • Cambridge English Write & Improve (W&I) for GC.
  • Persona-Chat Synthetic for SR.
  • SAMSum for TS.
  • Sound Natural (rephrased) for TA.
  • SQuAD for QA.

Machine translation was used to adapt English datasets for other languages, with specific datasets like EC-Spell (Chinese), Merlin (Italian), and GitHub Typo Corpus used for grammar correction in their respective languages.

Key Insights and Ideas

  • Asymmetric Nature of LoRA Parameters: The observation that 'A' parameters are more similar across tasks than 'B' parameters is crucial. This insight underpins HydraOpt's strategy of sharing 'A' and learning task-specific 'B's, leading to more efficient merging.
  • Controllable Trade-off: Unlike previous methods that offer a single, fixed performance-efficiency point, HydraOpt provides a knob (the number of shared 'B'' parameters, M) to explicitly control this trade-off, allowing users to choose the optimal balance for their specific needs.
  • Data-Free Merging: The method operates without requiring task-specific data during the merging process, making it applicable even when such data is scarce or unavailable. This is a significant advantage for practical deployment.
  • Generalization Across LLMs and Adapters: The authors demonstrate that HydraOpt is effective not only with LoRA but also with other low-rank adapters like VeRA, and it generalizes well across different LLM sizes and architectures (Llama, Gemma, Phi-3).

Key Results

HydraOpt demonstrates significant improvements in storage efficiency while maintaining competitive performance:

  • Storage Reduction: HydraOpt achieved up to a 48% reduction in storage size compared to storing all individual adapters.
  • Performance: The method achieved competitive performance, with an average drop of only 0.2-1.8% compared to storing all adapters.
  • Outperforming Baselines: HydraOpt consistently outperformed existing model merging techniques in terms of performance, especially when a slight increase in storage was permitted. For instance, when compared to TA (a strong baseline), HydraOpt achieved a 1.4% performance gain by utilizing only 8% more storage.
  • Efficiency vs. Performance: Even at the most constrained storage efficiency (2.5% of original size), HydraOpt narrowed the performance gap with individual LoRA adapters to as little as 7.2%.

Limitations and Future Work

The authors acknowledge several limitations and suggest future research directions:

  • Data-Driven Merging: The current work focuses on data-free merging. Exploring data-driven scenarios could potentially yield further gains in efficiency and performance.
  • Broader Adapter Types: While HydraOpt was tested with LoRA and VeRA, its application to other types of adapters could be a valuable area for future work.
  • Cross-Modal and Multi-Modal Tasks: The authors believe their method could be extended to more general cross-modal and multi-modal tasks, which are gaining increasing attention.
  • Environmental Impact and Fairness: The paper notes that while storage is reduced, inference complexity is not directly addressed, and the impact on the environment and fairness across different population subgroups needs further investigation.

Summary updated

BibTeX
@inproceedings{ceritli2025hydraopt,
  author = {Taha Ceritli and Ondrej Bohdal and Mete Ozay and Jijoong Moon and Kyenghun Lee and Hyeonmok Ko and Umberto Michieli},
  title = {{HydraOpt: Navigating the Efficiency-Performance Trade-off of Adapter Merging}},
  booktitle = {Conference on Empirical Methods in Natural Language Processing},
  year = {2025},
}
Figure