Inferensys

Glossary

Model Merging

Model merging is a technique that combines the weights of two or more fine-tuned foundation models into a single, unified model without requiring access to the original training data, enabling the composition of separate capabilities like visual inspection and instruction-following.
Data scientist building training data pipeline on laptop, data preprocessing visible, technical workspace.
WEIGHT INTERPOLATION

What is Model Merging?

Model merging is a technique that combines the weights of two or more separately fine-tuned foundation models into a single, unified model without requiring access to the original training data.

Model merging is a post-fine-tuning technique that arithmetically combines the internal weights of distinct neural networks into a single, cohesive model. By interpolating parameters from models fine-tuned on separate tasks—such as visual defect detection and natural language instruction-following—it creates a unified multimodal model capable of performing both functions simultaneously without multi-task retraining.

This approach relies on the linear mode connectivity observed in large transformer architectures, where independently optimized models often reside in the same low-loss basin. Methods like Spherical Linear Interpolation (SLERP) and Task Arithmetic bypass the need for original training data, enabling the composition of specialized industrial skills into a single deployable artifact for a manufacturing copilot.

COMPOSITIONAL AI

Key Model Merging Techniques

Model merging combines the weights of two or more fine-tuned foundation models into a single unified model without requiring access to the original training data. This enables the composition of separate specialized skills—such as visual inspection and instruction-following—into a cohesive manufacturing copilot.

01

Linear Interpolation (LERP)

The simplest merging technique that computes a weighted average of the parameters from two or more fine-tuned models. Each model's weights are multiplied by a scaling factor and summed together.

  • Formula: θ_merged = α · θ_modelA + (1 - α) · θ_modelB
  • Use case: Blending a general instruction-tuned model with a domain-specific manufacturing model
  • Key parameter: The interpolation weight α controls the balance between model behaviors
  • Limitation: Assumes linear compatibility between parameter spaces, which may not hold for models fine-tuned on vastly different tasks
02

Spherical Linear Interpolation (SLERP)

An advanced interpolation method that blends model weights along the geodesic path on a hypersphere rather than a straight line. This preserves the magnitude and directional properties of the weight vectors.

  • Advantage: Maintains the normalization characteristics of each model's weight space
  • Formula: Computes the shortest path between two points on a unit sphere
  • Best for: Merging models with similar architectures but divergent fine-tuning trajectories
  • Practical result: Often produces more coherent outputs than simple linear interpolation when combining models trained on related but distinct manufacturing tasks
03

Task Arithmetic

A method that treats fine-tuning as producing a task vector—the element-wise difference between the fine-tuned weights and the original pre-trained weights. These task vectors can be added, subtracted, or scaled independently.

  • Task vector: τ = θ_finetuned - θ_pretrained
  • Merging formula: θ_merged = θ_pretrained + λ_A · τ_A + λ_B · τ_B
  • Key capability: Enables task subtraction to selectively remove unwanted behaviors
  • Manufacturing example: Add a defect-detection task vector while subtracting a general conversational vector to create a focused quality inspection model
04

TIES-Merging

Trim, Elect Sign, and Merge—a technique that resolves interference between task vectors from different fine-tuned models before combining them. It addresses the problem where parameter updates from different tasks conflict.

  • Trim: Zeroes out small-magnitude changes that likely represent noise rather than signal
  • Elect Sign: Resolves sign conflicts by selecting the dominant direction of change across models
  • Merge: Averages only the agreed-upon parameter updates
  • Benefit: Significantly reduces performance degradation when merging multiple specialized manufacturing models simultaneously
05

DARE (Drop And REscale)

A pre-processing step applied to task vectors before merging that randomly drops a large percentage of delta parameters and rescales the remaining ones. This sparsification reduces redundancy and interference.

  • Drop rate: Typically 90-99% of delta parameters are randomly pruned
  • Rescaling: Remaining parameters are multiplied by 1/(1 - drop_rate) to preserve expected magnitude
  • Synergy: Often combined with TIES-Merging for superior results
  • Efficiency: Dramatically reduces the effective parameter count being merged, enabling the combination of multiple large industrial models without overwhelming interference
06

Model Soups

A simple yet effective technique that averages the weights of multiple models fine-tuned with different hyperparameters on the same task. Unlike other merging methods, model soups do not require separate specialized models.

  • Uniform soup: Simple equal-weight averaging of all fine-tuned checkpoints
  • Greedy soup: Sequentially adds models only if they improve validation performance
  • Key insight: Fine-tuned models with different random seeds or learning rates often lie in the same error basin
  • Manufacturing application: Average multiple checkpoints from a defect classifier training run to create a more robust model without additional training cost
MODEL MERGING

Frequently Asked Questions

Explore the mechanics, benefits, and risks of combining multiple fine-tuned foundation models into a single, multi-capable system without requiring access to the original training data.

Model merging is a technique that combines the weights of two or more separately fine-tuned foundation models into a single, unified model without requiring access to the original training data. The process operates directly on the model parameters, typically using mathematical interpolation. A common method is Spherical Linear Interpolation (SLERP) , which blends the weights of two models along a spherical path in the high-dimensional weight space, preserving the magnitude and structural integrity of the learned representations. More advanced approaches like TIES-Merging (Trim, Elect Sign, and Merge) resolve interference between models by trimming redundant parameters, resolving sign conflicts, and then merging only the aligned components. This allows a model fine-tuned for visual defect inspection to be combined with one fine-tuned for natural language instruction-following, creating a single manufacturing copilot that can both see and communicate.

Prasad Kumkar

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.