Background: Model Merging Is Not Simple Weight Averaging
When the same base model is fine-tuned on code, math, customer service, or domain-specific corpora, it produces multiple checkpoints with different capability focuses. Deploying them as separate services means additional GPU memory, routing, and operational costs. Merging them into one model can potentially achieve broader capability coverage without increasing per-inference cost.
The risk is that parameter changes from fine-tuning are not unconditionally additive “feature plugins.” Different models may produce opposing updates at the same parameter position or express noise through many small-magnitude changes. Direct averaging sometimes works, but when source models are far apart, task objectives conflict, or vocabularies and templates are inconsistent, the merged model may lose the advantages of multiple source models simultaneously.
Therefore, production model merging should be treated as a complete model building and release process, not something that can be executed offline and then deployed.
Core Principles: Understanding Parameter Interference Through Task Vectors
Let the base model parameters be θ₀, and the i-th fine-tuned model be θᵢ. Its task vector relative to the base model is:
τᵢ = θᵢ - θ₀
θ_merge = θ₀ + Σ wᵢ · τᵢ'
Here, wᵢ is the source model weight, and τᵢ' is the task vector after trimming, sparsification, or conflict resolution. The truly difficult part is not the summation, but deciding which updates are worth keeping, which side to trust in conflicts, and how to verify the combined behavior.
TIES: Trim First, Then Determine Sign Consensus
TIES-Merging categorizes interference into two types: a large number of redundant small-magnitude parameter changes, and sign disagreements between different task vectors at the same position. Its process can be summarized as:
- Trim: Remove updates with small magnitudes to reduce redundancy;
- Elect Sign: Determine the overall sign direction for each parameter position;
- Merge: Only merge updates consistent with the final sign.
This makes TIES more suitable than unconditional averaging for multiple homologous fine-tuned models, but it still requires choices of density, weights, and source model combinations. Sign consensus only reduces one type of interference; it does not prove that business capabilities will necessarily add up.
DARE: Randomly Drop Task Deltas and Rescale
DARE randomly drops a portion of parameter deltas in the task vector and rescales the remaining ones by 1 / (1 - p). Paper experiments show that task deltas from some homologous fine-tuned models have high redundancy, and a high drop ratio may still preserve capabilities.
In production, do not treat the high sparsity ratios from the paper as default parameters. Different models, training methods, and task conflict levels vary greatly. The correct approach is to include drop rate, source model weights, and random seed in a reproducible candidate matrix and filter using independent evaluations.
Calibration Set: Moving from “Experience-Based Weighting” to Behavior Constraints
The 2026 Output-Space Projection research frames merge weight selection as an optimization problem based on calibration inputs and source model outputs, providing diagnostic metrics for predicting merge quality. It is currently more suitable as a research direction than a direct replacement for mature merge tools, but the lesson for engineering teams is clear:
Merge coefficients should not rely solely on intuition or leaderboard searches. A set of calibration samples representing real business distributions should constrain output behavior.
The calibration set is used for parameter selection; the release evaluation set is used to decide whether to go live. The two must be separated to avoid tuning the gate data to “known answers.”
Engineering Implementation: Making the Merge Process a Replayable Pipeline
Step 1: Establish Source Model Access Gates
Before executing a merge, at least verify:
- Whether the source models come from the exact same base checkpoint, not just a similar name;
- Whether architecture, number of layers, hidden dimensions, attention heads, and parameter shapes are compatible;
- Whether tokenizer, special tokens, embedding matrix, and chat template are consistent;
- Whether each source model has an independent capability baseline and known regressions;
- Whether the model license permits merging, redistribution, and commercial use;
- Whether weight files have been hash-verified and security-scanned.
MergeKit supports building an output tokenizer from the base vocabulary, vocabulary union, or a specified model, and allows configuring the embedding source for special tokens. This capability solves “how to build,” not “automatically correct.” The source of special tokens, chat template, and stop tokens still need separate replay.
Step 2: Generate Immutable Fingerprints for Each Merge Artifact
Beyond the model file, a merge manifest should also be saved. Here is an example of governance fields:
{
"base_model_sha256": "...",
"source_models": [
{"name": "code-sft", "sha256": "...", "weight": 0.55},
{"name": "math-sft", "sha256": "...", "weight": 0.45}
],
"merge_method": "ties",
"method_parameters": {"density": "candidate-grid"},
"tokenizer_source": "base",
"chat_template_sha256": "...",
"dtype": "bfloat16",
"tool_version": "pinned-version",
"random_seed": 20260713,
"calibration_set": "merge-calibration-v3",
"evaluation_suite": "merge-release-gate-v5"
}
Any change in source model, weight, density, random seed, tokenizer, or tool version should generate a new artifact version, not overwrite the old model.
Step 3: Establish a Simple Baseline First, Then Increase Algorithm Complexity
It is recommended to build at least three types of candidates:
| Candidate Type | Purpose |
|---|---|
| Linear / Model Soup Baseline | Determine if source models are already in a similar region |
| TIES Candidate | Observe if sign conflict handling improves capability retention |
| DARE-TIES Candidate | Verify if task vector sparsification further reduces interference |
Do not start with complex layer-level weighting or large-scale automatic search. If simple averaging is already stable, complex methods only expand the parameter space and regression cost. If simple methods fail, first analyze source model distance, conflict layers, and tokenizer differences, rather than blindly expanding the search.
Step 4: Design a Balanced Calibration Set and Capability Retention Set
A usable merge evaluation should include at least four parts:
- Source Capability Retention Set: Cover the most important tasks of each source model individually;
- Conflict Sample Set: Samples where source models tend to give different styles, formats, or conclusions for the same input;
- Base Capability Set: Verify that common sense, language, instruction following, and other basic capabilities have not significantly degraded;
- Platform Gate Set: Structured output, safety policies, multilingual, long/short inputs, and boundary tokens.
The calibration set can be used to select weights and densities; the final gate set must remain independent. Also retain per-sample outputs from source models to support differential replay against the merged model, rather than just looking at an aggregate score.
Step 5: Use Multi-Dimensional Release Gates
Production gates should not only compare average accuracy. At least check:
- The retention degree of each source capability, avoiding a total score increase that masks a single capability collapse;
- Whether base model capabilities and safety boundaries have regressed;
- Whether refusal rate, format adherence, output length, and language distribution have changed abruptly;
- Whether tokenizer, chat template, stop tokens, and tool call format are compatible;
- Whether the inference backend can load correctly, and whether GPU memory, throughput, and latency meet budget;
- Whether the same manifest and random seed can reproduce the same artifact.
Specific thresholds must be determined by business risk and historical volatility, not copied from papers or public leaderboard numbers.
Step 6: Perform Canary and Rollback Like a Regular Model Version
The merged model needs an independent model ID and should not be disguised as a new version of any source model. The recommended release path is:
offline evaluation → replay / shadow traffic → small canary → staged rollout → full release
The rollback target should be the previous stable merged version or a clear single source model. The model card should record the complete merge tree, source model versions, method parameters, evaluation results, and known limitations, so that future teams can explain the source of model capabilities.
Applicable Scenarios and Boundaries
Model Merging Is Suitable When:
- Multiple models come from the same base checkpoint and have undergone well-defined fine-tuning;
- You want to reduce the GPU memory and routing complexity of multiple resident models;
- You can build a regression set covering each source capability;
- You accept that the merge result requires multiple rounds of candidate filtering, not a single generation for deployment.
Be Cautious or Avoid Direct Weight Merging When:
- Source models differ significantly in architecture, base model, or tokenizer;
- A source model has unresolved safety or format regressions;
- Business requirements demand strictly monotonic improvement in all capabilities;
- You have no independent evaluation data and can only rely on public leaderboards;
- The team cannot save and reproduce the complete merge configuration and source artifacts.
Common Misconceptions
Misconception 1: Models from the Same Family Can Be Merged Directly
Similar model names do not mean identical base weights. Different revisions, vocabulary expansions, RoPE configurations, or layer structures change the meaning of a merge. Rely on hashes, configurations, and parameter shapes.
Misconception 2: TIES or DARE Automatically Eliminate Capability Conflicts
They reduce specific types of parameter interference. When task objectives themselves are contradictory, templates are incompatible, or source model quality is unstable, algorithms cannot replace product decisions and evaluations.
Misconception 3: A Higher Leaderboard Score Means Ready for Deployment
The total score may mask a decline in code, math, safety, or specific language capabilities. Production gates must retain bucketed results by capability, language, input length, and business scenario.
Misconception 4: Model Merging Requires No Data
Weight computation can be data-free, but parameter selection and risk assessment are not. Without a calibration set and regression set, you cannot know if the merged artifact retains the capabilities you truly need.
Misconception 5: Only the Merged Weights Need to Be Saved
Without source model hashes, method parameters, random seeds, tokenizer, template, and tool version, the artifact is unreproducible and the source of capability changes cannot be audited.
Pre-Deployment Checklist
- Base checkpoint and weight hashes of all source models confirmed
- Architecture, parameter shapes, tokenizer, and chat template verified
- Comparable baselines exist for Linear, TIES, and DARE-type candidates
- Calibration set and final release evaluation set are independent
- Key capabilities of each source model have individual regression results
- Safety, format, multilingual, and special tokens replayed
- Inference backend loading, GPU memory, throughput, and latency verified
- Merge manifest, tool version, and random seed solidified
- Canary, alerting, and rollback targets configured
- Model card records merge tree, known limitations, and applicable boundaries
FAQ
Q: Can capabilities from different base models be merged together?
Traditional task vector methods typically rely on homologous or highly compatible parameter spaces. When architectures, vocabularies, or parameter shapes are inconsistent, more complex layer-level splicing, tokenizer transplantation, or model surgery is needed, significantly increasing risk and evaluation cost. This should not be conflated with ordinary model merging.
Q: The merged model performs poorly. Should I adjust weights or change the method first?
First, locate the problem. If a capability changes monotonically with source model weight, try adjusting weights first. If there is widespread parameter sign conflict, test TIES. If task deltas are highly redundant, test DARE. If the tokenizer, template, or base checkpoint is inconsistent, fix compatibility first, rather than continuing to search for merge parameters.
References
- TIES-Merging: Resolving Interference When Merging Models — https://arxiv.org/abs/2306.01708
- Language Models are Super Mario: Absorbing Abilities from Homologous Models as a Free Lunch — https://arxiv.org/abs/2311.03099
- MergeKit GitHub Repository — https://github.com/arcee-ai/mergekit
- Arcee’s MergeKit: A Toolkit for Merging Large Language Models — https://arxiv.org/abs/2403.13257
- Model Merging by Output-Space Projection — https://arxiv.org/abs/2605.29101
- Model Soups: Averaging Weights of Multiple Fine-Tuned Models Improves Accuracy without Increasing Inference Time — https://arxiv.org/abs/2203.05482