model-merging

Merge multiple fine-tuned language models using mergekit without retraining.

1|Updated Mar 5, 2026
One-click install
npx skills add https://github.com/Clay-HHK/claude-skills --skill model-merging-clay-hhk
Or copy as Structured Prompt for Agent▼
Please help me install this Agent Skill.
Skill: model-merging
Source: https://github.com/Clay-HHK/claude-skills/tree/main/model-merging
Command: npx skills add https://github.com/Clay-HHK/claude-skills --skill model-merging-clay-hhk

SYSTEM DOCUMENTATION & REQUIREMENTS

💡 This Skill requires mergekit, transformers, torch, and includes references (resource) components.

What problem does it solve? Combining capabilities from multiple fine-tuned models normally requires expensive retraining. This Skill lets you blend specialized models (math, coding, chat) into a single model using mergekit, running on CPU in minutes instead of days of GPU training. ## Core Features & Use Cases - Multiple Merge Methods: Supports SLERP, TIES-Merging, DARE, Task Arithmetic, linear merging, and MoE construction with ready-to-use YAML configurations. - Evaluation & Benchmarking: Includes guidance for Open LLM Leaderboard, MT-Bench, MMLU, HumanEval, and GSM8K testing with regression and sanity checks. - Production Deployment: Covers quantization (GGUF, GPTQ), HuggingFace Hub upload, and common pitfalls like incompatible architectures. - Use Case: Merge a math-specialized Mistral model with a chat model using SLERP to create a single model that handles both domains, then benchmark it against the parent models before deployment. ## Quick Start Merge the WizardMath and OpenHermes Mistral-7B models using SLERP with equal weights and evaluate the result on GSM8K.

Frequently Asked Questions about model-merging

High-intent search queries and answers about installing and using this skill.

FAQPage Schema
How do I merge two language models with mergekit?▼

Create a YAML config specifying merge_method (such as slerp or linear), the source models with weights, and dtype, then run mergekit-yaml config.yml ./output --cuda. SLERP works best for two models, while linear handles three or more.

What is the difference between SLERP, TIES, and DARE merging?▼

SLERP interpolates two models along a sphere in weight space for smooth blending. TIES-Merging trims small parameter changes and resolves sign conflicts, suiting many task-specific models. DARE randomly drops and rescales delta parameters to reduce redundancy.

Can I merge models with different architectures like Llama and Mistral?▼

No, merging requires models with the same architecture, such as two Mistral-7B variants. Merging Llama with Mistral fails because their parameter shapes and layer structures are incompatible.

Does model merging require a GPU?▼

No, merges can run on CPU since no training occurs, making them accessible without GPUs. The --cuda flag accelerates the process when a GPU is available, and low-memory options exist for constrained environments.

Why does my merged model perform worse than the parent models?▼

Common causes include over-weighting one model (keep weights in the 0.3-0.7 range), merging incompatible architectures, or excessive sparsity in TIES/DARE density settings. Always benchmark merged models on MMLU, GSM8K, and MT-Bench before deploying.