agent-management
Create, manage, and orchestrate AI agents using the AI Maestro CLI. Use when the user asks to "create agent", "list agents",…
Merge multiple fine-tuned models using mergekit to combine capabilities without retraining. Use when creating specialized models by blending domain-specific expertise (math + coding + chat), improving performance beyond single models, or experimenting rapidly with model
Claude Code
$ npx -y skills add davila7/claude-code-templates --skill emerging-techniques-model-merging --agent claude-code
Codex
$ npx skills add davila7/claude-code-templates --skill emerging-techniques-model-merging -a codex -y
Cursor
$ npx skills add davila7/claude-code-templates --skill emerging-techniques-model-merging -a cursor -y
Gemini CLI
$ npx skills add davila7/claude-code-templates --skill emerging-techniques-model-merging -a gemini-cli -y
GitHub Copilot
$ npx skills add davila7/claude-code-templates --skill emerging-techniques-model-merging -a github-copilot -y
OpenCode
$ npx skills add davila7/claude-code-templates --skill emerging-techniques-model-merging -a opencode -y
Windsurf
$ npx skills add davila7/claude-code-templates --skill emerging-techniques-model-merging -a windsurf -y
name: emerging-techniques-model-merging description: Merge multiple fine-tuned models using mergekit to combine capabilities without retraining. Use when creating specialized models by blending domain-specific expertise (math + coding + chat), improving performance beyond single models, or experimenting rapidly with model variants. Covers SLERP, TIES-Merging, DARE, Task Arithmetic, linear merging, and production deployment strategies. license: MIT metadata: version: 1.0.0 author: Orchestra Research tags: [Emerging Techniques, Model Merging, Mergekit, SLERP, TIES, DARE, Task Arithmetic, Model Fusion, No Retraining, Multi-Capability, Arcee AI] dependencies: [mergekit, transformers, torch]
Use Model Merging when you need to:
**Success Stories**: Marcoro14-7B-slerp (best on Open LLM Leaderboard 02/2024), many top HuggingFace models use merging
**Tools**: mergekit (Arcee AI), LazyMergekit, Model Soup
# Install mergekit git clone https://github.com/arcee-ai/mergekit.git cd mergekit pip install -e . # Or via pip pip install mergekit # Optional: Transformer library pip install transformers torch
# config.yml - Merge two models with equal weights
merge_method: linear
models:
- model: mistralai/Mistral-7B-v0.1
parameters:
weight: 0.5
- model: teknium/OpenHermes-2.5-Mistral-7B
parameters:
weight: 0.5
dtype: bfloat16# Run merge mergekit-yaml config.yml ./merged-model --cuda # Use merged model python -m transformers.models.auto --model_name_or_path ./merged-model
# config.yml - Spherical interpolation
merge_method: slerp
slices:
- sources:
- model: mistralai/Mistral-7B-v0.1
layer_range: [0, 32]
- model: teknium/OpenHermes-2.5-Mistral-7B
layer_range: [0, 32]
parameters:
t: 0.5 # Interpolation factor (0=model1, 1=model2)
dtype: bfloat16**Linear (Model Soup)**
merged_weights = w1 * model1_weights + w2 * model2_weights + w3 * model3_weights # where w1 + w2 + w3 = 1
**SLERP (Spherical Linear Interpolation)**
# SLERP formula merged = (sin((1-t)*θ) / sin(θ)) * model1 + (sin(t*θ) / sin(θ)) * model2 # where θ = arccos(dot(model1, model2)) # t ∈ [0, 1]
**Task Arithmetic**
# Task vector task_vector = finetuned_model - base_model # Merge multiple task vectors merged = base_model + α₁*task_vector₁ + α₂*task_vector₂
**TIES-Merging**
**DARE (Drop And REscale)**
# Basic structure
merge_method: <method> # linear, slerp, ties, dare_ties, task_arithmetic
base_model: <path> # Optional: base model for task arithmetic
models:
- model: <path/to/model1>
parameters:
weight: <float> # Merge weight
density: <float> # For TIES/DARE
- model: <path/to/model2>
parameters:
weight: <float>
parameters:
# Method-specific parameters
dtype: <dtype> # bfloat16, float16, float32
# Optional
slices: # Layer-wise merging
tokenizer: # Tokenizer configuration**Best for**: Simple model combinations, equal weighting
merge_method: linear
models:
- model: WizardLM/WizardMath-7B-V1.1
parameters:
weight: 0.4
- model: teknium/OpenHermes-2.5-Mistral-7B
parameters:
weight: 0.3
- model: NousResearch/Nous-Hermes-2-Mistral-7B-DPO
parameters:
weight: 0.3
dtype: bfloat16**Best for**: Two models, smooth interpolation
merge_method: slerp
slices:
- sources:
- model: mistralai/Mistral-7B-v0.1
layer_range: [0, 32]
- model: teknium/OpenHermes-2.5-Mistral-7B
layer_range: [0, 32]
parameters:
t: 0.5 # 0.0 = first model, 1.0 = second model
dtype: bfloat16**Layer-specific SLERP:**
merge_method: slerp
slices:
- sources:
- model: model_a
layer_range: [0, 32]
- model: model_b
layer_range: [0, 32]
parameters:
t:
- filter: self_attn # Attention layers
value: 0.3
- filter: mlp # MLP layers
value: 0.7
- value: 0.5 # Default for other layers
dtype: bfloat16**Best for**: Combining specialized skills
merge_method: task_arithmetic
base_model: mistralai/Mistral-7B-v0.1
models:
- model: WizardLM/WizardMath-7B-V1.1 # Math
parameters:
weight: 0.5
- model: teknium/OpenHermes-2.5-Mistral-7B # Chat
parameters:
weight: 0.3
- model: ajibawa-2023/Code-Mistral-7B # Code
parameters:
weight: 0.2
dtype: bfloat16**Best for**: Many models, resolving conflicts
merge_method: ties base_model: mistralai/Mistral-7B-v0.1 models: - model: W
Open-source registry and CLI for Claude Code components: agents, commands, skills, hooks, MCPs, settings and mods
Create, manage, and orchestrate AI agents using the AI Maestro CLI. Use when the user asks to "create agent", "list agents",…
Send and receive cryptographically signed messages between AI agents using the Agent Messaging Protocol (AMP). Use when the user…
Search auto-generated codebase documentation for function signatures, API docs, class definitions, and code comments. Use when…
Query the code graph database to understand component relationships, dependencies, and change impact. Use when the user asks to…
Search conversation history and semantic memory to recall previous discussions, decisions, and context. Use when the user asks to…
You MUST use this before any creative work - creating features, building components, adding functionality, modifying behavior, or…
Ask which skill or flow fits your situation. A router over the skills in this repo.