Resolving Interference When Merging Models
Paper • 2306.01708 • Published • 17
This is a merge of pre-trained language models created using mergekit.
This model was merged using the TIES merge method using prithivMLmods/Phi-4-QwQ as a base.
The following models were included in the merge:
IFEval is broken due to the Sky-T1 strict system prompt format, but other than that, seems to have recreated qwq at 14B.
ollama run hf.co/benhaotang/phi4-qwq-sky-t1-Q4_K_M-GGUF
I suggest adding SYSTEM "You are a helpful AI asistent. You always think step by step." to triger step by step reasoning.
import transformers
tokenizer = AutoTokenizer.from_pretrained("mircosoft/phi-4")
pipeline = transformers.pipeline(
"text-generation",
model="benhaotang/phi4-qwq-sky-t1",
tokenizer=tokenizer,
device_map="auto",
)
messages = [
{"role": "system", "content": "You are a helpful AI asistent. You always think step by step."},
{"role": "user", "content": "Give me a short intodcution to renormalization group(RG) flow in physcis?"},
]
outputs = pipeline(messages, max_new_tokens=128)
print(outputs[0]["generated_text"])
The following YAML configuration was used to produce this model:
models:
- model: prithivMLmods/Phi-4-QwQ
#no parameters necessary for base model
- model: benhaotang/Phi-4-llama-t1-full
parameters:
density: 0.5
weight: 0.5
- model: prithivMLmods/Phi-4-QwQ
parameters:
density: 0.5
weight: 0.5
merge_method: ties
base_model: prithivMLmods/Phi-4-QwQ
parameters:
normalize: false
int8_mask: true
dtype: float16
Detailed results can be found here! Summarized results can be found here!
| Metric | Value (%) |
|---|---|
| Average | 30.78 |
| IFEval (0-Shot) | 4.60 |
| BBH (3-Shot) | 52.61 |
| MATH Lvl 5 (4-Shot) | 39.58 |
| GPQA (0-shot) | 19.35 |
| MuSR (0-shot) | 21.38 |
| MMLU-PRO (5-shot) | 47.16 |