Model merging usually forces a harsh choice: compress $N$ fine-tuned models into exactly one model (sacrificing accuracy) or keep all $N$ models (wasting storage). The "pre-train then fine-tune" paradigm has created an explosion of task-specific models. To avoid the massive storage and deployment costs of hosting dozens of individual models, researchers use model merging to combine them into a single multi-task model without needing the original training data.
However, forcing many tasks into a single model's parameter space causes "parameter interference," leading to a noticeable drop in accuracy compared to the individual fine-tuned models. Prior work has almost exclusively focused on the strict $1\times$ size limit, ignoring the vast spectrum between a single merged model and retaining all individual models. This paper introduces FlexMerge, a framework that allows merging models into any fractional size between 1 and $N$, fundamentally changing how we should evaluate merging algorithms.
The FlexMerge Framework
FlexMerge is a data-free framework that operates at the block level (e.g., individual attention or MLP layers) rather than the whole-model level. It acts as a routing and grouping framework, meaning it is algorithm-agnostic and can utilize any existing data-free parameter merging method (such as Task Arithmetic, TIES-Merging, Consensus, or EMR-Merging).
The merging process follows a bottom-up greedy approach:
- Initialization: Initially, every task retains its own distinct blocks.
- Similarity Matching: In each iteration, FlexMerge calculates the cosine similarity between all pairs of blocks across tasks. It finds the most similar pair and merges them.
- Flexible Sizing: This process repeats, gradually shrinking the total deployed model size, until a user-specified target size (which can be a fractional number, like $1.75\times$) is reached.
Key Insights: The Accuracy-Size Trade-Off
By exploring the space between $1\times$ and $N\times$ sizes, the authors uncover several critical insights that challenge the standard evaluation paradigm for model merging.
The "Elbow" in the Trade-off: You don't need to keep all models to get perfect accuracy. The accuracy-size curve shows steep initial gains. Giving a merged model just a little extra capacity naturally disentangles parameter interference, allowing it to reach near-perfect accuracy well before hitting the maximum $N\times$ size.
Algorithm Rankings are Size-Dependent: At the strict $1\times$ size limit, complex algorithms with explicit interference-reduction mechanisms (like TIES or Consensus) heavily outperform simple ones (like Task Arithmetic). But at slightly larger sizes (e.g., $2\times$ or $3\times$), simple algorithms catch up and sometimes even overtake the complex ones. The true utility of an algorithm depends on the available deployment budget.
Experimental Results
The paper evaluates FlexMerge across vision and NLP modalities, using both full fine-tuning (FFT) and parameter-efficient fine-tuning (PEFT), demonstrating significant gains:
- Vision: Using FlexMerge with Task Arithmetic (TA) on 8 vision tasks yielded a massive 13.5% average accuracy jump just by doubling the size from $1\times$ to $2\times$. Near fine-tuned accuracy was reached at $\approx6\times$ size, saving 25% storage compared to keeping all 8 models.
- NLP: For PEFT models (T0-3B), FlexMerge + TA gained 7.2% accuracy going from $1\times$ to $3\times$ size. For full fine-tuning (T5), doubling the size ($1\times$ to $2\times$) yielded a >9% accuracy boost.
- Speed and Efficiency: Generating the merge orders and executing the merges for 30 tasks takes only about 20 seconds. Thanks to a clever shared-tensor implementation, running inference on a $>1\times$ size FlexMerge model incurs negligible latency overhead compared to a standard $1\times$ merged model (e.g., 12.21 ms vs 12.30 ms for ViT-B/32).
Limitations and Future Work
Like most merging techniques, FlexMerge currently requires all input models to share the exact same base architecture; merging heterogeneous models remains an open challenge. Additionally, the theoretical understanding of why certain blocks merge better than others, and how to mathematically guarantee an optimal merged model for a specific size, is still lacking. Future directions include exploring specialized merging algorithms explicitly designed for block-level fusion, rather than just adapting whole-model algorithms to the block level.
Summary updated