Twin-Merging: Dynamic Integration of Modular Expertise in Model Merging

Zhenyi Lu, Chenghao Fan, Wei Wei, Xiaoye Qu, Dangyang Chen +1 more
2/3/2026

No official code found. Best implementation: LZY-the-boys/Twin-Merging (144 stars, MIT, last commit 2025-03-17).

Abstract

In the era of large language models, model merging is a promising way to combine multiple task-specific models into a single multitask model without extra training. However, two challenges remain: (a) interference between different models and (b) heterogeneous data during testing. Traditional model merging methods often show significant performance gaps compared to fine-tuned models due to these issues. Additionally, a one-size-fits-all model lacks flexibility for diverse test data, leading to performance degradation. We show that both shared and exclusive task-specific knowledge are crucial for merging performance, but directly merging exclusive knowledge hinders overall performance. In view of this, we propose Twin-Merging, a method that encompasses two principal stages: (1) modularizing knowledge into shared and exclusive components, with compression to reduce redundancy and enhance efficiency; (2) dynamically merging shared and task-specific knowledge based on the input. This approach narrows the performance gap between merged and fine-tuned models and improves adaptability to heterogeneous data. Extensive experiments on $20$ datasets for both language and vision tasks demonstrate the effectiveness of our method, showing an average improvement of $28.34\%$ in absolute normalized score for discriminative tasks and even surpassing the fine-tuned upper bound on the generative tasks. Our implementation is available in \url{https://github.com/LZY-the-boys/Twin-Merging}

View on arXivView PDF

Code Implementations(1)

MIT

[NeurIPS2024] Twin-Merging: Dynamic Integration of Modular Expertise in Model Merging

14415Shell, PythonJun 3, 20241 years agoMIT

Similar Papers

Cite this paper

@article{lu2026twinmerging,
  title  = {Twin-Merging: Dynamic Integration of Modular Expertise in Model Merging},
  author = {Zhenyi Lu and Chenghao Fan and Wei Wei and Xiaoye Qu and Dangyang Chen and Yu Cheng},
  year   = {2026},
  eprint = {2406.15479},
  archivePrefix = {arXiv},
  doi    = {10.48550/arXiv.2406.15479},
  url    = {https://arxiv.org/abs/2406.15479},
  journal = {NEURIPS 2024 2024}
}

Add a badge to your README

Shows whether official code is linked for this paper.

Code of Paper badge
[![Code of Paper](https://codeofpaper.com/badge/2406.15479.svg)](https://codeofpaper.com/paper/2406.15479)

Discussion