TLDR: LD-MoLE is a novel framework for fine-tuning large language models (LLMs) using a Mixture of LoRA Experts (MoLE). It introduces a learnable, dynamic routing mechanism that adaptively determines the optimal number of experts to activate for each token at different layers. By replacing rigid TopK routing with a differentiable Sparsegen-based function and a token-specific sparsity factor (λ) predicted by an MLP, LD-MoLE achieves superior performance and more efficient resource allocation across various instruction-tuning and sequence classification tasks, while guaranteeing at least one expert activation per token.
Large Language Models (LLMs) have become incredibly powerful, excelling at a wide array of natural language processing tasks. However, their immense size often means that fine-tuning them for specific tasks requires significant computational power and resources. To tackle this, researchers have developed techniques like Parameter-Efficient Fine-tuning (PEFT), with LoRA (Low-Rank Adaptation) being a prominent example. LoRA helps reduce the cost of training by only updating a small number of parameters.
Another powerful concept is the Mixture-of-Experts (MoE) design, which has been successfully integrated into LLMs during their pretraining. MoE allows models to scale up capacity while keeping computational costs in check. Combining LoRA with MoE has led to the Mixture of LoRA Experts (MoLE) framework, offering an efficient way to adapt LLMs without relying on a single LoRA configuration that might either overfit or underperform.
The Challenge with Existing Expert Routing
Despite these advancements, many current MoE systems, including some MoLE variants, face limitations due to rigid routing strategies. A common approach, known as TopK routing, forces every part of the input (or ‘token’) to consult a fixed number of experts. This means a manually tuned hyperparameter dictates resource allocation, preventing the model from adaptively deciding how many experts a token truly needs based on its complexity. Furthermore, the discrete nature of TopK routing makes it non-differentiable, hindering the end-to-end optimization process. Other dynamic routing methods, like ReLU-based routers, can suffer from instability, sometimes routing tokens to no experts at all, which degrades performance.
Introducing LD-MoLE: Learnable Dynamic Routing
A new research paper, titled “LD-MOLE: LEARNABLEDYNAMICROUTING FOR MIXTURE OFLORA EXPERTS” by Yuan Zhuang, Yi Shen, Yuexin Bian, Qing Su, Shihao Ji, Yuanyuan Shi, and Fei Miao, proposes an innovative solution called LD-MoLE. This framework introduces a Learnable Dynamic routing mechanism for Mixture of LoRA Experts that allows for adaptive, token-dependent, and layer-wise expert allocation. The core idea is to replace the rigid, non-differentiable TopK selection with a differentiable routing function that has a closed-form solution.
How LD-MoLE Works
LD-MoLE leverages a technique called Sparsegen, which projects values onto a probability simplex to generate sparse outputs in a fully differentiable way. A lightweight, shared Multi-Layer Perceptron (MLP) is used to predict a token-specific ‘sparsity factor’ (λ). This λ parameter dynamically controls the degree of sparsity in expert allocation. Essentially, it helps the model decide how many experts to activate for each token at different layers. This design ensures that tokens requiring more complex processing can access more experts, while simpler tokens use fewer, balancing efficiency and expressiveness.
Crucially, LD-MoLE’s routing mechanism guarantees that every token is assigned to at least one expert, preventing the ‘zero-activation’ problem seen in some other dynamic routing methods. The system is also fully differentiable, making it compatible with end-to-end training. Additionally, the researchers introduced an analytical sparsity control objective, derived from Sparsegen’s solution, to directly regulate the number of activated experts during training.
Impressive Performance Across Benchmarks
The effectiveness of LD-MoLE was rigorously tested on various instruction-tuning and sequence classification benchmarks, using Llama-3.2-3B and Qwen3-1.7B as base LLMs. The results were compelling: LD-MoLE consistently achieved the highest average scores compared to state-of-the-art baselines, including MoLA (which uses conventional TopK routing) and ReMoLE (which uses ReLU-based dynamic routing).
For instance, LD-MoLE showed significant gains on reasoning-heavy tasks, with average improvements of over +3.5% on benchmarks like ARC-Easy, SWAG, and HellaSWAG, and over +2.0% on CommonsenseQA. It also outperformed ReMoLE, demonstrating more stable effectiveness across diverse tasks. The research highlighted that LD-MoLE’s ability to adaptively determine the number of experts for each token and layer is a key factor in its superior performance.
Also Read:
- Unlocking Large AI Models for Edge Devices Through Collaborative Compression
- RADAR: Intelligent Routing for Reasoning LLMs Balances Performance and Cost
Adaptive Sparsity and Resource Allocation
The study also revealed that the predicted sparsity factor (λ) in LD-MoLE dynamically adjusts across different layers and tokens, outperforming fixed λ values. This adaptability is crucial because the optimal number of experts can vary significantly depending on the layer and the specific token being processed. Furthermore, the research confirmed that LD-MoLE intelligently allocates resources: frequently appearing tokens tend to activate fewer experts, while rarer or more complex tokens activate a larger and more diverse set, indicating that the model dedicates more capacity where it’s most needed.
In conclusion, LD-MoLE represents a significant step forward in fine-tuning large language models. By introducing a learnable and dynamic routing mechanism, it enables LLMs to adaptively allocate computational resources, leading to improved performance and efficiency across a wide range of tasks. This innovative approach opens up exciting avenues for future research, including its application in LLM pretraining and integration with other advanced PEFT methods. You can read the full research paper here.


