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
Merge Lineage
Merge Lineage
3 source modelsSource Models
Output
qwen-phi-coder-math
7B
Task ArithmeticClick any model node to open its Hugging Face page
Config 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: bfloat16Benchmark Scores
| Benchmark | Merged | Qwen2.5-Coder | Phi-3.5-mini | Δ Best |
|---|---|---|---|---|
HumanEvaltop | 82.1 | 79.8 | 72.3 | +2.3 |
MMLU | 74.2 | 73.6 | 70.4 | +0.6 |
MT-Bench | 8.4 | 8.3 | 8.0 | +0.1 |
Model Weights & Density — Task Arithmetic
How I Built This
Embed Badge
Add this to your Hugging Face model card to link back to this recipe.
[](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.
Select GPU
Serverless GPU · Powered by RunPod
Reproduce Locally
Run this exact merge on your own machine in three steps:
pip install mergekitmerge_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: bfloat16mergekit-yaml qwen-phi-task-arithmetic-code.yaml ./outputWant to build your own merge?
Use the MergeKit config generator to build a YAML recipe visually — no code required.