Abstract
Model merging offers a cost-effective alternative to maintaining multiple specialized Large Language Models (LLMs) by fusing their capabilities into a single backbone. However, simple merging techniques often suffer from inter-model interference, where conflicting parameter updates degrade performance. This paper introduces DELLA-Merging, a novel framework that utilizes magnitude-based sampling to prune "delta parameters" while preserving critical task-specific knowledge. By combining stochastic sampling with magnitude awareness and parameter rescaling, DELLA-Merging significantly reduces interference. Empirical evaluations on LLaMA-2-13B across mathematical, coding, and general instruction tasks demonstrate that DELLA-Merging outperforms existing state-of-the-art methods like DARE and TIES, achieving superior multi-task performance without additional training.
Introduction
In the rapidly evolving landscape of Large Language Models (LLMs), practitioners often face a trade-off between using a single generalist model or a suite of specialized experts. While experts excel at niche tasks like mathematics or Python coding, deploying separate high-parameter models (e.g., 13B or 70B) for every domain is computationally expensive and memory-intensive.
Model merging has emerged as a promising middle ground, allowing the fusion of multiple specialized models into a single entity without the overhead of retraining. However, the primary challenge in merging is interference—a phenomenon where the specialized knowledge of one model conflicts with another during the fusion process. Existing methods like Task Arithmetic (TA), TIES-Merging, and DARE attempt to mitigate this, but often fall short by being either too aggressive or ignoring the relative importance of specific parameters. This paper presents DELLA-Merging, a technique that leverages magnitude-based sampling to prune "noise" and preserve the essential expertise of each constituent model.
Methodology
DELLA-Merging introduces a three-step Drop-Elect-Merge pipeline designed to minimize conflict while maintaining the structural integrity of the model's internal representations.
- Drop (MAGPRUNE): The core innovation of DELLA is magnitude-based pruning. Unlike DARE, which drops weights randomly, MAGPRUNE ranks delta parameters (the difference between fine-tuned and base weights) by their magnitude. Parameters with smaller magnitudes are assigned a higher probability of being dropped. Crucially, surviving parameters are rescaled by $1/(1-p)$ to ensure the model's internal embeddings remain stable, preventing performance collapse at high pruning rates.
- Elect: To resolve sign conflicts—where different models suggest opposing updates to the same weight—DELLA identifies the dominant direction across all experts. It retains only those delta parameters that align with this majority direction.
- Fuse: The "elected" and pruned parameters are averaged and integrated back into the base model, governed by a global scaling coefficient ($\lambda$).
Experimental Setup
The researchers evaluated DELLA-Merging using LLaMA-2-13B as the backbone. They merged three distinct expert models:
- WizardLM: Specialized in instruction following, evaluated on AlpacaEval.
- WizardMath: Specialized in mathematics, evaluated on GSM8K.
- Llama-2-13b-code-alpaca: Specialized in Python coding, evaluated on MBPP.
The performance was compared against several baselines, including Task Arithmetic, TIES, and DARE, across various multi-task merging scenarios.
Results and Discussion
DELLA-Merging consistently outperformed state-of-the-art merging techniques across all benchmarks.
Key Insights
- Magnitude as a Proxy for Importance: The study confirms that the magnitude of a delta parameter is a strong indicator of its relevance to the expert task. Magnitude-aware pruning effectively separates signal from noise.
- The Criticality of Rescaling: Rescaling unpruned parameters is vital for stability. Without it, performance drops precipitously as the drop rate increases. With rescaling, models can lose up to 90% of their delta parameters while retaining most specialized abilities.
- Row-wise vs. Layer-wise Ranking: Ranking parameters within each row of a weight matrix (row-wise) proved more effective than layer-wide ranking, suggesting that preserving the relative importance of features within specific transformations is key to successful merging.
Performance Gains
DELLA showed an average improvement of 2.4 points over pruning baselines (DARE and TIES) and an 11.1 point lead over the standard Task Arithmetic baseline. In a Math+Code merge, DELLA improved performance by 7.6 points compared to versions without proper parameter scaling. Furthermore, it maintained generalist instruction-following performance (AlpacaEval) within 1 point of the original expert, whereas other methods saw drops of up to 3.3 points.
Conclusion
DELLA-Merging provides a robust framework for combining specialized LLMs while minimizing interference. By integrating magnitude-based sampling with parameter rescaling, it bridges the gap between purely stochastic and purely deterministic merging methods.
While effective, the method introduces additional hyperparameters, such as the drop rate $p$ and scaling factor $\lambda$, which require tuning. Future work may explore the application of these techniques to non-homologous models or different architectural scales. The source code for DELLA-Merging is available on GitHub.
Summary updated