Model merging is the technique of algorithmically combining the parameters of multiple pre-trained or fine-tuned models to create a unified model with blended capabilities. It operates under the linear mode connectivity hypothesis, which posits that fine-tuned models often reside in the same low-error basin in parameter space, allowing their weights to be safely interpolated. Common methods include simple linear interpolation (averaging) and more sophisticated task arithmetic, where task-specific parameter changes (deltas) are added to a base model. This process is distinct from training an ensemble, as it produces a single, deployable model.
Glossary
Model Merging

What is Model Merging?
Model merging is a post-training technique that combines multiple neural networks into a single, unified model without additional gradient-based training.
The primary goal is to efficiently consolidate specialized skills—such as coding and creative writing—from different source models into one generalist agent. Key techniques include MergeKit-style merging (slicing and merging layers) and the DARE method, which involves dropping and rescaling adapter weights. Merging is closely related to model soup creation and is a form of parameter-efficient adaptation, as it bypasses expensive retraining. However, it risks catastrophic interference if the source models are not sufficiently compatible, potentially degrading performance on original tasks.
Key Model Merging Techniques
Model merging combines multiple pre-trained models into a unified network, enabling multi-task capability and improved performance without additional training. These techniques operate directly on model parameters.
Task Arithmetic
Task arithmetic is a foundational merging method where the parameter differences (deltas) between a fine-tuned model and its base pre-trained model are computed. These task vectors are then combined via linear operations—such as addition, subtraction, and scalar multiplication—to create a model with blended capabilities.
- Key Operation: Merging is performed as:
θ_merged = θ_base + Σ(λ_i * (θ_finetuned_i - θ_base)), whereλ_iis a scaling coefficient. - Use Case: Enables 'forgetting' harmful behaviors by subtracting a safety vector or creating a multi-task model by adding multiple task vectors.
- Example: The
θ_coding + θ_math - θ_baseoperation can yield a model proficient in both coding and mathematical reasoning.
Linear Interpolation (SLERP & LERP)
Linear interpolation merges two models by taking a weighted average of their parameters. Spherical Linear Interpolation (SLERP) is preferred as it interpolates along the shortest great-circle path on a hypersphere, preserving the magnitude and dynamics of the weight space better than standard Linear Interpolation (LERP).
- SLERP Formula:
θ_merged = [sin((1-α)Ω)/sin(Ω)] * θ_A + [sin(αΩ)/sin(Ω)] * θ_B, whereΩis the angle between parameter vectors. - Advantage: Produces smoother, more stable merges, especially when models have diverged significantly.
- Typical Use: Blending two models fine-tuned on different but related domains (e.g., creative and technical writing) to achieve a balanced style.
TIES-Merging
TIES-Merging (Trim, Elect Sign & Merge) is a robust, three-step method designed to resolve conflicts when merging multiple models. It addresses two key issues: parameter redundancy and sign disagreement.
- Trim: Retains only the top-k% most significant parameters (largest magnitude deltas) for each task vector, discarding redundant or noisy updates.
- Elect Sign: For each parameter, resolves sign conflicts by electing the most common sign (positive/negative) across all trimmed task vectors.
- Merge: Averages the task vectors using the elected signs to produce the final merged model.
- Result: Significantly outperforms simple averaging, especially when merging many (>3) models with potentially conflicting objectives.
DARE & TIES
DARE (Drop And REscale) is a complementary technique often used with TIES. It is based on the observation that a large proportion of fine-tuning delta values can be randomly dropped (set to zero) without harming performance.
- Process: For each task vector, a high percentage (e.g., 90%) of its delta parameters are randomly dropped to zero. The remaining non-zero values are then rescaled (e.g., by 10x) to preserve the original vector's expected norm.
- Purpose: DARE sparsifies task vectors, dramatically reducing interference and conflict during the subsequent TIES merging step.
- Benefit: Enables the stable merging of a large number of models (10+), which would otherwise fail with naive averaging.
Model Soups
Model soups involve averaging the weights of multiple models fine-tuned from the same pre-trained checkpoint but with different hyperparameters (e.g., learning rates, data orders, or random seeds).
- Uniform Soup: Simple arithmetic mean of all model parameters.
- Greedy Soup: Models are sequentially added to the soup only if their addition improves validation performance.
- Insight: This technique exploits the finding that different fine-tuning runs converge to different basins in the loss landscape, and averaging can find a more generalizable point.
- Application: Primarily used to improve robustness and generalization by ensembling without the computational cost of running multiple models at inference.
MergeKit & Practical Tools
MergeKit is a popular, comprehensive open-source toolkit for implementing model merging techniques. It provides a unified interface for executing methods like SLERP, TIES, DARE, and task arithmetic.
- Supported Frameworks: Integrates with Hugging Face Transformers, supporting models in PyTorch, Safetensors, and GGUF formats.
- Key Features: Allows configuration via YAML files, supports merging across different architectures (with limitations), and includes utilities for model loading and saving.
- Ecosystem: The primary tool used by the community to create and share merged models on platforms like Hugging Face Hub (e.g., popular merges like
Marcoroni-7B-v3). - Link: https://github.com/arcee-ai/mergekit
How Model Merging Works
Model merging is a post-training technique for creating unified models with blended capabilities by algorithmically combining the parameters of multiple pre-trained or fine-tuned neural networks.
Model merging is the technique of algorithmically combining the learned parameters of multiple neural networks to create a single, unified model without additional gradient-based training. The core mechanism is task arithmetic, where the parameter differences (deltas) between a base model and its fine-tuned variants are linearly interpolated and added back to the base. This allows the merged model to inherit capabilities—such as coding proficiency and creative writing—from its source models, effectively performing multi-task inference from a single set of weights.
Common merging algorithms include linear interpolation (simple weighted averaging), SLERP (spherical linear interpolation for smoother blending), and more complex methods like DARE (Drop And REscale) or TIES-Merging (addressing sign conflicts). The process is distinct from ensemble methods, as it produces one deployable model. It is primarily used to efficiently create generalist models from specialist ones, consolidate multiple LoRA adapters, or blend safety-tuned models with capability-tuned ones, balancing performance across diverse objectives.
Common Use Cases for Model Merging
Model merging is a post-training technique used to combine the capabilities of multiple specialized models into a single, unified network without additional gradient-based training. These are its primary practical applications.
Multi-Task Generalization
Model merging creates a single model proficient across multiple distinct tasks by combining the parameter deltas of several fine-tuned models. This is achieved through techniques like task arithmetic or linear interpolation of model weights.
- Key Benefit: Eliminates the need to maintain and serve multiple separate models, reducing deployment complexity and inference cost.
- Example: Merging a model fine-tuned for code generation with another fine-tuned for creative writing to produce a unified assistant capable of both tasks.
- Mechanism: The merged model's parameters are calculated as
θ_merged = θ_base + Σ α_i * (θ_task_i - θ_base), whereα_iis a scaling coefficient for each task vector.
Mitigating Catastrophic Forgetting
When a model is sequentially fine-tuned on new tasks, it often suffers from catastrophic forgetting, losing proficiency on earlier tasks. Model merging offers a post-hoc solution.
- Process: Preserve the original base model and each task-specific fine-tuned version. The final multi-task model is created by merging these specialized checkpoints.
- Advantage: This bypasses the destructive sequential training process, allowing the retention of all original capabilities.
- Contrast with Continual Learning: Unlike online continual learning algorithms, merging is a one-time, offline combination of existing models, providing a stable snapshot of multi-task ability.
Model Specialization & Personalization
Merge specialized expert models to create a tailored model for a specific user, domain, or style without collecting new data or performing full fine-tuning.
- Domain Adaptation: Combine a general-purpose LLM with a model fine-tuned on highly technical legal or medical corpora to boost domain-specific accuracy.
- Style Blending: Merge models fine-tuned on different writing styles (e.g., formal, conversational, poetic) to achieve a desired tonal blend.
- Efficiency: This is far more compute-efficient than fine-tuning a new model from scratch for each unique combination of desired traits, enabling rapid experimentation and customization.
Improving Safety & Alignment
Merge a base model with a safety-tuned model to imbue it with robust refusal behaviors and harmlessness without degrading its core capabilities. This is a form of model steering.
- Methodology: Use a weighted merge between a capable but potentially unfiltered model and a heavily safety-aligned model. The safety model's parameters act as a corrective steering vector.
- Benefit: Can be more stable and predictable than applying Reinforcement Learning from Human Feedback (RLHF) post-hoc, offering fine-grained control over the trade-off between capability and safety.
- Example: The SLERP (Spherical Linear Interpolation) technique is often used for smooth interpolation between a base model and its safety-tuned variant.
Creating Foundational 'Soup' Models
Researchers merge dozens or hundreds of community fine-tunes of a base model (e.g., Llama 2) to create a robust, general-purpose 'model soup' that often outperforms any single constituent on aggregate benchmarks.
- Process: Collect many publicly available adapters or fine-tuned checkpoints. Their weights are averaged, often with uniform or task-performance-weighted scaling.
- Outcome: The resulting model exhibits improved overall robustness and generalization, as merging averages out noise and idiosyncrasies from individual fine-tuning runs.
- Real-World Instance: The MergeKit library and community frequently produce models like Marlin or Daredevil that are linear combinations of many open-source fine-tunes.
Efficient Architecture Search
Model merging serves as a proxy for rapid neural architecture exploration. By interpolating between models with different architectural properties (e.g., attention mechanisms, layer depths), researchers can efficiently search the continuum between them.
- Use Case: Merging a dense model with a sparse, MoE-like model to explore hybrid density-sparsity trade-offs.
- Advantage over Training: Evaluating a merged checkpoint is orders of magnitude faster than training a new model from scratch, allowing for rapid iteration in the hyperparameter and architectural space.
- Research Tool: This technique is used to empirically study the linear mode connectivity and loss basins of large neural networks, providing insights into their optimization landscapes.
Model Merging vs. Related Techniques
A technical comparison of model merging against other common methods for adapting or combining neural network capabilities.
| Feature / Metric | Model Merging | Full Fine-Tuning | Parameter-Efficient Fine-Tuning (PEFT) | Ensemble Methods |
|---|---|---|---|---|
Primary Objective | Combine capabilities from multiple models into a single unified model. | Specialize a base model for a single new task. | Efficiently adapt a base model to a new task with minimal parameters. | Combine predictions from multiple independent models to improve accuracy. |
Computational Cost (Training) | Low (No gradient steps, just arithmetic). | Very High (Updates all parameters). | Low to Moderate (Updates only small adapters). | High (Requires training multiple models). |
Inference Cost | Same as base model (single forward pass). | Same as base model (single forward pass). | Slight overhead from adapter modules. | Multiples of base model (N forward passes). |
Parameter Storage | One set of merged weights. | One new set of fine-tuned weights. | Base weights + small adapter weights. | N complete sets of model weights. |
Catastrophic Forgetting Risk | Low (Preserves base capabilities via interpolation). | Very High (Can overwrite original knowledge). | Low (Base weights are frozen). | None (Models are trained/used independently). |
Common Techniques | Task arithmetic, linear interpolation, SLERP. | Supervised fine-tuning (SFT) with cross-entropy loss. | LoRA, QLoRA, Adapter Layers. | Averaging predictions, weighted voting, stacking. |
Typical Use Case | Creating a multi-task model (e.g., coding + math) from specialists. | Creating a state-of-the-art model for a specific, well-defined task. | Quick, cost-effective adaptation for a new domain or style. | Maximizing performance in competitions or high-stakes predictions where accuracy is paramount. |
Ability to Blend Disparate Capabilities |
Frequently Asked Questions
Model merging is a post-training technique for combining multiple neural networks into a single, unified model. This section answers common technical questions about its mechanisms, applications, and trade-offs.
Model merging is the technique of algorithmically combining the parameters of multiple pre-trained or fine-tuned neural networks to create a single model with blended capabilities, typically without additional gradient-based training. It works by performing linear operations—most commonly averaging or adding—on the models' weight tensors. A foundational method is task arithmetic, where the difference (or "delta") between a model fine-tuned on a specific task and its base pre-trained model is calculated. These task vectors are then summed with the base model's weights, effectively "adding" multiple capabilities. Other approaches include slerp (spherical linear interpolation) for smoothly blending two models and ties-merging (Trim, Elect Sign & Merge) which resolves sign conflicts between parameters before merging to improve stability.
Enabling Efficiency, Speed & Accuracy
Intelligent Analysis, Decision & Execution
We build AI systems for teams that need search across company data, workflow automation across tools, or AI features inside products and internal software.
Talk to Us
Search across company data
Give teams answers from docs, tickets, runbooks, and product data with sources and permissions.
Useful when people spend too long searching or get different answers from different systems.

Automate internal workflows
Use AI to route work, draft outputs, trigger actions, and keep approvals and logs in place.
Useful when repetitive work moves across multiple tools and teams.

Add AI to products and internal tools
Build assistants, guided actions, or decision support into the software your team or customers already use.
Useful when AI needs to be part of the product, not a separate tool.
Related Terms
Model merging intersects with several core techniques for adapting and aligning language models. These related concepts form the toolkit for creating specialized, multi-capability AI systems.
Task Arithmetic
A foundational model merging technique where the parameter deltas (changes from a base model) of multiple fine-tuned models are combined using linear operations (e.g., addition, scaling). This allows for the creation of a unified model that blends capabilities without additional gradient-based training.
- Core Operation: Merging is performed as:
Merged Weights = Base Weights + Σ(α_i * Task Delta_i). - Example: Adding the delta from a model fine-tuned for translation to the delta from a model fine-tuned for summarization can yield a model proficient at both tasks.
- Key Insight: Treats fine-tuning adjustments as vectors in weight space that can be composed.
Parameter-Efficient Fine-Tuning (PEFT)
A family of techniques that adapt a pre-trained model by updating only a small subset of its parameters. PEFT methods like LoRA and Adapters are often the source models for merging, as their compact, task-specific updates are ideal for surgical combination.
- Why it's related: Merging multiple LoRA adapters is a highly efficient way to combine capabilities.
- Key Methods: LoRA (Low-Rank Adaptation), Adapter Layers, Prompt Tuning.
- Benefit for Merging: Produces small, modular weight updates that are computationally cheap to store, combine, and evaluate.
Catastrophic Forgetting
The phenomenon where a neural network loses previously learned information when trained on a new task. Model merging is often pursued as a solution to this problem, as it aims to combine specialized capabilities without the sequential fine-tuning that typically causes forgetting.
- The Problem: Full fine-tuning on task B often degrades performance on previously learned task A.
- Merging as a Mitigation: By arithmetically combining models fine-tuned independently on tasks A and B, merging seeks to preserve both skill sets.
- Contrast with Sequential Tuning: Merging is a post-hoc, non-gradient-based alternative to multi-task training.
Model Soup
A simple yet effective merging strategy that involves averaging the weights of multiple models fine-tuned from the same pre-trained checkpoint (often with different hyperparameters or data orders). This can improve robustness and generalization.
- Process:
Soup Weights = (Weight_1 + Weight_2 + ... + Weight_n) / n. - Empirical Finding: Often outperforms any of the individual constituent models.
- Relation to Merging: Represents a specific, uniform averaging instantiation of the broader model merging paradigm.
Mixture of Experts (MoE)
A neural network architecture design where different sub-networks ("experts") are activated conditionally based on the input. While also a multi-capability approach, it differs fundamentally from weight merging.
- Key Difference: MoE uses conditional computation (routing), while merging creates a static blend of weights.
- Architecture vs. Post-Hoc: MoE is designed into the model; merging is applied after independent models are trained.
- Inference Cost: A merged model has fixed FLOPs per token; a sparse MoE model can have lower active FLOPs.
Gradient-Based Merging
An advanced merging approach that uses lightweight gradient descent to find an optimal linear combination of model weights, rather than using simple arithmetic averages. This can yield better performance than task arithmetic.
- Process: Uses a small validation dataset to tune the merging coefficients (α_i) via a few steps of gradient descent.
- Frameworks: Implemented in tools like MergeKit (using the
tiesordare_tiesmethods). - Advantage: Data-driven optimization can resolve conflicts between constituent models more intelligently than preset formulas.

About the author
Prasad Kumkar
CEO & MD, Inference Systems
Prasad Kumkar is the CEO & MD of Inference Systems and writes about AI systems architecture, LLM infrastructure, model serving, evaluation, and production deployment. Over 5+ years, he has worked across computer vision models, L5 autonomous vehicle systems, and LLM research, with a focus on taking complex AI ideas into real-world engineering systems.
His work and writing cover AI systems, large language models, AI agents, multimodal systems, autonomous systems, inference optimization, RAG, evaluation, and production AI engineering.
Partnered with leading AI, data, and software stack.
How We Work
Custom AI workflows for your Business
One-fit-all AI don't work for modern businesses. At Inferensys, we aim to understand your business & custom requirements; which we use to define most efficient agentic workflows, the data, and the tools for your business.
01
Review the use case
We understand the task, the users, and where AI can actually help.
Read more02
Pick the right approach
We define what needs search, automation, or product integration.
Read more03
Build the first useful version
We implement the part that proves the value first.
Read more04
Improve from there
We add the checks and visibility needed to keep it useful.
Read moreThe first call is a practical review of your use case and the right next step.
Talk to Us