Task Arithmetictask_arithmeticcodingmathqwenphispecialist

Qwen-Phi Coder — Task Arithmetic Specialist

Task arithmetic recipe subtracting a general-purpose vector from Qwen2.5-Coder and adding a math fine-tune task vector, surgically steering the model toward combined code + math excellence. Demonstrates the vector arithmetic approach to model editing.

Author

mergekit-community

Published

February 28, 2026

Last updated

February 28, 2026

Versions

1

Best Score

82.1

Stars

203

Qwen2.5-7B · 7BQwen2.5-Coder-7B-Instruct · 7BPhi-3.5-mini-instruct · 3.8B

Merge Lineage

Merge Lineage

3 source models

Output

qwen-phi-coder-math

7B

Task Arithmetic

Click any model node to open its Hugging Face page

Config YAML

qwen-phi-task-arithmetic-code-v1.0.yaml
merge_method: task_arithmetic
base_model: Qwen/Qwen2.5-7B
models: - model: Qwen/Qwen2.5-Coder-7B-Instruct
    parameters: weight: 1.0
  - model: microsoft/Phi-3.5-mini-instruct
    parameters: weight: 0.6
dtype: bfloat16

Benchmark Scores

BenchmarkMergedQwen2.5-CoderPhi-3.5-miniΔ Best
HumanEvaltop
82.179.872.3+2.3
MMLU
74.273.670.4+0.6
MT-Bench
8.48.38.0+0.1

Model Weights & Density — Task Arithmetic

Qwen2.5-Coder-7B-Instruct7B
weight
1.00
Phi-3.5-mini-instruct3.8B
weight
0.60

Embed Badge

Add this to your Hugging Face model card to link back to this recipe.

MergeKitRecipe
markdown
[![MergeKit Recipe](https://img.shields.io/badge/MergeKit-Recipe-10b981?style=flat-square)](https://www.mergekit.com/recipes/qwen-phi-task-arithmetic-code)

Use this Model

Run, deploy, or interact with Qwen-Phi Coder — Task Arithmetic Specialist directly.

MergeKit Cloud

Run this model on serverless GPU infrastructure — zero setup, pay-per-second.

RunPod Serverless

Select GPU

A10G · 24 GB~45s cold
A100 · 80 GB~30s cold
H100 · 80 GB~20s cold
Est. ~$0.001 / inference · billed per second
Coming Soon

Serverless GPU · Powered by RunPod

Reproduce Locally

Run this exact merge on your own machine in three steps:

bash
pip install mergekit
yaml
merge_method: task_arithmetic
base_model: Qwen/Qwen2.5-7B
models:
  - model: Qwen/Qwen2.5-Coder-7B-Instruct
    parameters:
      weight: 1.0
  - model: microsoft/Phi-3.5-mini-instruct
    parameters:
      weight: 0.6
dtype: bfloat16
bash
mergekit-yaml qwen-phi-task-arithmetic-code.yaml ./output

Want to build your own merge?

Use the MergeKit config generator to build a YAML recipe visually — no code required.