Abstract
Fine-tuning Large Language Models (LLMs) remains a computationally intensive task. While Parameter-Efficient Fine-Tuning (PEFT) methods like LoRA have mitigated these costs, the emergence of Mixture of LoRA Experts (MoLE) offers further potential for specialized adaptation. However, standard MoLE routing faces challenges in stability and expert utilization. We present DynMoLE, a novel framework that employs a hybrid routing mechanism governed by Tsallis entropy. By dynamically adjusting expert allocation based on token-level uncertainty, DynMoLE achieves a 9.6% performance improvement over standard LoRA and a 2.3% gain over current state-of-the-art MoLE methods, while ensuring more stable training dynamics.
Introduction
The rapid advancement of LLMs has necessitated efficient fine-tuning strategies. LoRA (Low-Rank Adaptation) has become a standard for PEFT, but its static nature limits its ability to handle diverse tasks within a single model. Mixture of LoRA Experts (MoLE) addresses this by combining multiple LoRA adapters, using a router to select the most relevant experts for each input token. Despite its promise, MoLE routing often suffers from inconsistent expert selection, rigid allocation strategies, and significant gradient fluctuations during training.
Challenges in MoLE Routing
Current MoLE implementations are hindered by three primary limitations:
- Inconsistent Expert Selection: When a router exhibits high uncertainty (a flat probability distribution), it may inconsistently assign similar inputs to different experts, leading to training instability.
- Rigid Expert Requirements: Most models employ a fixed "Top-k" routing strategy. However, empirical evidence suggests that different transformer layers have varying expert requirements; some layers benefit from more experts, while others require fewer.
- Gradient Fluctuations: Standard routing mechanisms, often based on Shannon entropy, can produce steep gradient magnitudes when probabilities approach zero, causing jumpy updates and slower convergence.
Methodology: Hybrid Routing via Tsallis Entropy
DynMoLE introduces a Hybrid Routing Mechanism that leverages Tsallis entropy to measure and manage router uncertainty. Unlike Shannon entropy, Tsallis entropy provides a smoother optimization landscape by avoiding the logarithmic singularities that cause gradient explosions.
The Hybrid Strategy
The routing behavior is dynamically adjusted based on the calculated entropy:
- High Uncertainty (Soft Routing): When the router is uncertain (high entropy), it employs soft routing, allowing a broader set of experts to contribute and facilitate exploration.
- Low Uncertainty (Top-p Routing): As the router becomes more confident (low entropy), it transitions to Top-p routing, focusing on a sparse, high-probability set of experts to refine specialization.
- Safety Constraints: To maintain diversity and prevent overfitting, the system ensures a minimum of $k$ experts are always active.
Entropic Auxiliary Loss
To guide the router toward a "peaked distribution"—where it is certain about its choices—DynMoLE incorporates an auxiliary loss function based on Tsallis entropy. This loss actively penalizes high-entropy states, encouraging the model to converge on the most effective experts for specific tasks.
Experimental Results
We evaluated DynMoLE using a Llama-2-7B base model across several commonsense reasoning and linguistic benchmarks, including ARC, OpenBookQA, and RTE.
- Performance Gains: DynMoLE achieved an average accuracy of 77.6%, outperforming standard LoRA by 9.6% and the previous state-of-the-art, MoLA, by 2.3%.
- Training Stability: The use of Tsallis entropy significantly reduced gradient fluctuations. On the RTE dataset, DynMoLE demonstrated faster and more stable convergence compared to baseline routing strategies.
- Layer-Wise Adaptability: Analysis confirmed that DynMoLE naturally adjusts expert activation across layers, effectively matching the varying complexity requirements of the transformer architecture.
Conclusion
DynMoLE represents a significant step forward in making Mixture of Experts more efficient and stable. By replacing rigid routing with a dynamic, entropy-aware hybrid mechanism, it achieves superior performance and training robustness. Future work will explore scaling this approach to larger model architectures and broader multi-task settings.
Summary updated