AI
New technique streamlines merging of specialized AI models while cutting memory overhead
Researchers introduce a selective merging approach that intelligently combines fine-tuned language models, reducing storage costs while maintaining performance gains.
Combining multiple specialized language models into a single unified system has been a longstanding challenge in AI development. A new research paper presents a method called Mediator that addresses key limitations in how these models are currently integrated.
The core challenge#
When researchers fine-tune different large language models (LLMs) for specific tasks, combining them through simple averaging tends to degrade performance. Existing solutions use model routing—selecting the best individual model for each input at inference time—but this approach demands substantial computational and storage resources while failing to capitalize on shared understanding across models.
How Mediator works#
The key insight behind Mediator is that different layers within language models experience varying degrees of parameter conflict. Rather than treating all layers uniformly, the method:
- Averages layers with minimal conflicts together directly
- Routes specific layers with significant conflicts through a novel expert selection mechanism that operates at the task level
- Decomposes fine-tuned models into a dense core expert paired with sparse specialized experts, drawing inspiration from task arithmetic sparsity techniques
- Adapts expert selection dynamically by evaluating input uncertainty, allowing the system to merge appropriate experts based on whether samples fall within or outside the model's training distribution
Testing and results#
The researchers tested Mediator on both LLaMA and Qwen model families across different scales and benchmarked performance on real-world reasoning tasks. Their experiments demonstrate that the approach achieves meaningful performance improvements while requiring considerably less memory and computational overhead than competing methods.
This balance between effectiveness and efficiency addresses a practical bottleneck in deploying merged models at scale.

