model-merging

Merge fine-tuned language models with mergekit using SLERP, TIES, DARE, and task arithmetic.

5|2|Updated Aug 10, 2026
One-click install
npx skills add https://github.com/MedTiLab/Auto-meta-analysis --skill model-merging-medtilab
Or copy as Structured Prompt for Agent▼
Please help me install this Agent Skill.
Skill: model-merging
Source: https://github.com/MedTiLab/Auto-meta-analysis/tree/main/skills/emerging-techniques/model-merging
Command: npx skills add https://github.com/MedTiLab/Auto-meta-analysis --skill model-merging-medtilab

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, and naive weight averaging causes interference and capability loss. This Skill provides mergekit configurations and algorithms to blend models on CPU without retraining. ## Core Features & Use Cases - Multiple Merge Methods: Configure linear, SLERP, task arithmetic, TIES-Merging, and DARE merges with YAML configs covering weight selection, density tuning, and layer-wise slicing. - Evaluation & Benchmarking: Run Open LLM Leaderboard, MT-Bench, MMLU, HumanEval, and GSM8K evaluations with regression testing and sanity checks before deployment. - Production Patterns: Apply real-world merge recipes (Marcoro14-7B-slerp, MoE creation, gradual merging, quantization) for deployment to HuggingFace Hub. - Use Case: Merge a math-specialized Mistral model with a chat model using SLERP at t=0.5, benchmark the result against both parents, and push the merged model to HuggingFace. ## Quick Start Merge the math model WizardMath-7B and the chat model OpenHermes-2.5-Mistral-7B into one model using SLERP and evaluate it 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 without retraining?▼

Use mergekit with a YAML config specifying a merge method like SLERP or linear, the source model paths, and weights. Run mergekit-yaml config.yml ./merged-model to produce the merged checkpoint on CPU or GPU.

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 across many task-specific models. DARE randomly drops delta parameters and rescales the rest to reduce redundancy.

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

No, merging only works between models sharing the same architecture, such as two Mistral-7B fine-tunes. Merging Llama with Mistral fails because their parameter shapes and layer structures are incompatible.

How do I evaluate a merged model before deploying it?▼

Benchmark the merged model on Open LLM Leaderboard tasks, MT-Bench, MMLU, HumanEval, and GSM8K, then compare scores against both parent models. Run regression tests and sanity checks to confirm no capability dropped below the weaker parent.

What density value should I use for TIES or DARE merging?▼

Start conservatively with density 0.8, keeping 80% of parameters, then increase sparsity toward 0.5 if performance holds. If quality degrades, raise density back toward 0.9 to retain more fine-tuned parameters.