CLAug 6, 2024

Extend Model Merging from Fine-Tuned to Pre-Trained Large Language Models via Weight Disentanglement

arXiv:2408.03092v111 citationsh-index: 19
AI Analysis

This work addresses the challenge of merging LLMs with substantial parameter shifts, which is a problem for AI researchers and practitioners seeking to combine specialized models, though it appears incremental as it extends existing merging techniques to a broader scope.

The paper tackles the problem of merging Large Language Models (LLMs) with diverse parameter changes, such as fine-tuned and pre-trained models, by introducing a weight disentanglement method (WIDEN) that adaptively fuses magnitude and direction components, successfully injecting multilingual abilities into an instruction-following model and achieving balanced amalgamation of skills like instruction following, mathematical reasoning, and code generation.

Merging Large Language Models (LLMs) aims to amalgamate multiple homologous LLMs into one with all the capabilities. Ideally, any LLMs sharing the same backbone should be mergeable, irrespective of whether they are Fine-Tuned (FT) with minor parameter changes or Pre-Trained (PT) with substantial parameter shifts. However, existing methods often manually assign the model importance, rendering them feasible only for LLMs with similar parameter alterations, such as multiple FT LLMs. The diverse parameter changed ranges between FT and PT LLMs pose challenges for current solutions in empirically determining the optimal combination. In this paper, we make a pioneering effort to broaden the applicability of merging techniques from FT to PT LLMs. We initially examine the efficacy of current methods in merging FT and PT LLMs, discovering that they struggle to deal with PT LLMs. Subsequently, we introduce an approach based on WeIght DisENtanglement (WIDEN) to effectively extend the merging scope, which first disentangles model weights into magnitude and direction components, and then performs adaptive fusion by considering their respective contributions. In the experiments, we merge Qwen1.5-Chat (an FT LLM with instruction-following skills) with Sailor (a PT LLM with multilingual abilities) across 7B and 14B model scales. Results reveal that: (1) existing solutions usually fail when merging Sailor, either losing both abilities or only retaining instruction-following skills; (2) WIDEN successfully injects the multilingual abilities of Sailor into Qwen1.5-Chat and make it proficient in Southeast Asian languages, achieving enhancements in the fundamental capabilities. In light of previous research, we also merge multiple 13B FT LLMs and observe that WIDEN achieves a balanced amalgamation of instruction following, mathematical reasoning, and code generation skills.

Code Implementations1 repo
Foundations

The foundational work for this paper's niche, ranked by how specifically the neighbourhood builds on it — not by global fame.

Your Notes