Abstract
Low-Rank Adaptation (LoRA) is a popular technique for parameter-efficient fine-tuning, but its application in Mixture of Experts (MoE) settings lacks standardization. We introduce LoRALib, an open-source benchmark comprising 680 LoRA modules across 17 architectures and 40 tasks. Our evaluation reveals that the LoRAMoE framework currently outperforms other methods like Rocket and X-LoRA. Furthermore, we demonstrate that manual expert selection based on task relevance consistently surpasses automated selection mechanisms, highlighting a significant "expert selection gap" in current automated systems.
Introduction
While LoRA has revolutionized Parameter-Efficient Fine-Tuning (PEFT), it often suffers from a lack of generalization across diverse tasks. LoRA-MoE architectures attempt to solve this by routing inputs to specialized "experts." However, the field has become a "Wild West" where inconsistent models, datasets, and hyperparameters make objective comparison difficult. LoRALib addresses this by providing a unified, "apples-to-apples" benchmarking environment to identify which architectural and selection innovations truly drive performance.
Methods and Datasets
LoRALib consists of a standardized library of 680 LoRA modules trained on 40 downstream datasets. These modules span 17 model backbones (e.g., Llama 3.2, Qwen 2.5, Mistral) with sizes from 0.5B to 9B parameters. To ensure fairness, all modules use identical hyperparameters (rank=16, alpha=16).
The benchmarking pipeline evaluates three representative LoRA-MoE methods:
- LoRAMoE: Employs a router in the Feed-Forward Network (FFN) with balancing constraints to preserve "world knowledge."
- X-LoRA: A dynamic gating approach mixing adapters at token and layer levels.
- Rocket: Uses K-shot retrieval to select expert candidates before fine-tuning.
The benchmark covers 40 datasets across domains including Reasoning & Math (GSM8K, MATH), General Knowledge (MMLU, ARC), Language Understanding (GLUE), Medical (MedQA), and Ethics.
Key Insights: The Expert Selection Gap
A critical finding is that the method used to select experts from the library is as vital as the routing mechanism itself. We compared three selection mechanisms: Perplexity-based (PPL), Random, and Manual.
Manual selection—where experts are chosen based on human-perceived task relevance—consistently outperformed automated PPL selection. PPL often has a "blind spot," favoring general logic experts (like LogiQA) over domain-specific ones (like MATH) for mathematical tasks, leading to sub-optimal results.
Key Results: Method Performance
When evaluated on a level playing field, LoRAMoE emerged as the clear leader. It consistently achieved the highest average precision across all tested model backbones.
On the Llama-3.1-8B-Instruct backbone, LoRAMoE achieved an average score of 61.87, significantly higher than Rocket (56.96) and X-LoRA (51.37). The benefits of both superior routing (LoRAMoE) and proper expert selection were most pronounced in larger models and complex reasoning tasks.
Discussion and Future Work
While manual selection is currently superior, it is not scalable for libraries containing thousands of experts. Future research should focus on automated selection strategies that better mimic human intuition. Additionally, the performance of training-free methods like X-LoRA lags behind, suggesting a need for improved "plug-and-play" MoE architectures. LoRALib provides the necessary foundation for these future explorations.
The datasets and LoRA library are available on Hugging Face.
Summary updated