NeurIPS 2026Coming to NeurIPS?Explore papers, orals & directions

Dynamic Model Merging Made Slim

Guodong Du, Wanyu Lin

TL;DR

DiDi-Merging introduces a slim dynamic model merging framework that uses differentiable rank allocation to optimally balance shared and task-specific expert parameters. By avoiding the storage-heavy extremes of prior methods, it retains over 98% of fine-tuned model accuracy at just 1.24× the parameter cost of a single model, outperforming baselines that require more than double the storage.

What Problem Does This Paper Address?

Deploying multiple task-specific models fine-tuned from a single large backbone (like Llama or CLIP) is incredibly expensive at scale. While static model merging fuses these models into a single monolithic checkpoint to save space, it suffers from "task interference," where performance degrades across the board.

Dynamic model merging solves this by using a router to dynamically activate task-relevant parameters at inference time. However, existing dynamic methods hit a massive storage bottleneck due to how they split parameters between the shared backbone and task-specific "experts." They typically fall into two failure modes:

  1. Heavy Shared: Keeping a full-sized shared model alongside tiny per-task experts (e.g., TALL-Mask, FREE-Merging).
  2. Heavy Expert: Dropping the shared component entirely and pushing all knowledge into per-task expert vectors (e.g., TSV-C, SMILE), causing storage to scale linearly with the number of tasks.

The authors introduce DiDi-Merging (Dynamic Merging with Differentiable Rank) to find the golden mean: a balanced, slim shared-expert architecture.

Figure 2: Parameter allocation in dynamic model merging. The balance beam denotes the router, and baskets hold shared (multi-colour circles) and expert (single-colour circles) knowledge; legend at right. (a) Heavy shared: full-size shared model, tiny per-task experts. (b) Heavy expert: no shared component; per-task expert storage grows with task count. (c) Balanced shared–expert: slim shared module + small per-task experts, the regime DiDi-Merging targets via differentiable rank optimisation, with capacity adapting to task similarity.

Methods

DiDi-Merging operates in three main stages, completely free of the original training data:

  1. Low-Rank Decomposition: Task vectors (the difference between fine-tuned and pre-trained weights) are statically averaged into a shared knowledge vector. The remaining unique features for each task are treated as expert residuals. Both components are then decomposed using Singular Value Decomposition (SVD).
  2. Differentiable Rank Optimization: Instead of manually tuning the rank (capacity) of the shared and expert modules, the authors formulate parameter budgeting as an end-to-end differentiable optimization problem. They introduce a smooth, continuous truncation function controlled by a learnable rank parameter $r$. Ranks are jointly optimized across all layers and tasks against a joint objective that minimizes task-vector reconstruction error while penalizing total parameter size.
  3. Data-Free LoRA Refinement: Truncating ranks naturally causes minor accuracy drops. To recover this, the framework instantiates low-rank LoRA-style modules and refines them in a data-free pass, using the original uncompressed task vectors as the reconstruction targets.

Datasets

The authors evaluated DiDi-Merging across three distinct modalities:

  • Vision: 8 standard classification benchmarks (including SUN397, Stanford Cars, RESISC45, EuroSAT, SVHN, GTSRB, MNIST, and DTD) using CLIP-ViT-B/32 and ViT-L/14, scaled up to 14 and 20 tasks.
  • Large Language Models (LLMs): Four fine-tuned models based on Llama-3.1-8B-Instruct and Qwen-2.5-7B-Instruct evaluated across 10 benchmarks spanning general knowledge (MMLU-Pro), math (GSM8K, MATH), coding (HumanEval, MBPP), and instruction-following (AlpacaEval-2, MT-Bench).
  • Multimodal LLMs (MLLMs): Four specialized MLLMs (Vision, Audio, Video, Point Cloud) fine-tuned from Vicuna-7B-v1.5, evaluated on 14 dual-modal QA and captioning tasks (e.g., VQAv2, TextVQA, Clotho, MSVD, ModelNet40).

Key Insights and Ideas

  • Task Similarity Dictates Rank Allocation: The optimization automatically discovers task relationships without human intervention. For instance, highly similar tasks (like the digit datasets MNIST and SVHN) naturally receive a much higher shared-rank ratio, whereas distinct tasks reserve more capacity for their specific expert modules.
  • Architectural Awareness: The differentiable rank allocation naturally aligns with the underlying transformer architecture. The optimization automatically assigns the lowest ranks to attention-output projections and the highest ranks to MLP modules, matching the relative information density of each layer type.
  • Cross-Modal Synergy: In MLLM merging, the dynamically merged model actually exceeded the performance of individual fine-tuned models on certain audio and point-cloud tasks. The shared knowledge base allows instruction-following capabilities to transfer beneficially across modalities.

Key Results

  • Vision Merging: At a slim 1.24× parameter budget, DiDi-Merging matches the strongest dynamic baseline (TSV-C) while using less than 60% of its storage overhead. At a 1.4× budget, it achieves the highest overall accuracy (89.8% on ViT-B/32).
  • LLM Merging: On the challenging Llama-3.1-8B suite, DiDi-Merging-L (2× budget) outperforms prior dynamic methods by an average of +5.4%, showing massive improvements on instruction-following benchmarks like AlpacaEval-2.
  • Compute Efficiency: The framework achieves these results with a very modest compute footprint, requiring only 1.1 GB of GPU memory and roughly 14 minutes of total optimization time on the 8-task vision benchmark.

Limitations and Future Work

The authors note three primary limitations:

  1. Ideal Router Assumption: The framework currently relies on an MoE-style "ideal router" that knows the task identity at inference time. Developing a router that can infer task identity directly from raw inputs remains future work.
  2. Storage During Merging: While the final deployed model is slim, the optimization process itself requires access to the full, uncompressed fine-tuned checkpoints to act as targets.
  3. Sequential Bottleneck: The rank optimization stage currently runs sequentially per task, making it the primary wall-clock bottleneck of the pipeline, though the authors note this could be mitigated via parallelization.

Summary updated

BibTeX
@inproceedings{du2026dynamic,
  author = {Guodong Du and Wanyu Lin},
  title = {{Dynamic Model Merging Made Slim}},
  booktitle = {Advances in Neural Information Processing Systems},
  year = {2026},
  url = {https://openreview.net/forum?id=rTNJl9wcz6},
}
Figure