Upload README.md with huggingface_hub
Browse files
README.md
CHANGED
|
@@ -1,42 +1,73 @@
|
|
| 1 |
---
|
| 2 |
-
|
| 3 |
-
|
|
|
|
| 4 |
tags:
|
| 5 |
-
- mergekit
|
| 6 |
- merge
|
| 7 |
-
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 8 |
---
|
|
|
|
| 9 |
# Qwen2.5-1.5B-R1-SLERP
|
| 10 |
|
| 11 |
-
|
|
|
|
|
|
|
| 12 |
|
| 13 |
-
|
| 14 |
-
|
| 15 |
|
| 16 |
-
|
| 17 |
|
| 18 |
-
|
| 19 |
|
| 20 |
-
|
| 21 |
-
|
| 22 |
-
|
|
|
|
|
|
|
| 23 |
|
| 24 |
-
|
|
|
|
| 25 |
|
| 26 |
-
|
| 27 |
|
| 28 |
```yaml
|
| 29 |
-
|
| 30 |
merge_method: slerp
|
| 31 |
base_model:
|
| 32 |
-
model: /
|
| 33 |
slices:
|
| 34 |
- sources:
|
| 35 |
-
- model: /
|
| 36 |
layer_range: [0, 28]
|
| 37 |
-
- model:
|
| 38 |
layer_range: [0, 28]
|
| 39 |
parameters:
|
| 40 |
-
t: 0.
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 41 |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 42 |
```
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 1 |
---
|
| 2 |
+
language:
|
| 3 |
+
- en
|
| 4 |
+
license: apache-2.0
|
| 5 |
tags:
|
|
|
|
| 6 |
- merge
|
| 7 |
+
- mergekit
|
| 8 |
+
- slerp
|
| 9 |
+
- qwen2.5
|
| 10 |
+
- deepseek-r1
|
| 11 |
+
- reasoning
|
| 12 |
+
base_model:
|
| 13 |
+
- Qwen/Qwen2.5-1.5B-Instruct
|
| 14 |
+
- deepseek-ai/DeepSeek-R1-Distill-Qwen-1.5B
|
| 15 |
---
|
| 16 |
+
|
| 17 |
# Qwen2.5-1.5B-R1-SLERP
|
| 18 |
|
| 19 |
+
A SLERP merge (t=0.5) of:
|
| 20 |
+
- [`Qwen/Qwen2.5-1.5B-Instruct`](https://huggingface.co/Qwen/Qwen2.5-1.5B-Instruct) — strong general instruction following
|
| 21 |
+
- [`deepseek-ai/DeepSeek-R1-Distill-Qwen-1.5B`](https://huggingface.co/deepseek-ai/DeepSeek-R1-Distill-Qwen-1.5B) — RL-distilled chain-of-thought reasoning
|
| 22 |
|
| 23 |
+
Part of a systematic merge study on the Qwen2.5-1.5B family. See also:
|
| 24 |
+
- [`Mohaaxa/Qwen2.5-1.5B-R1-SLERP-AWQ`](https://huggingface.co/Mohaaxa/Qwen2.5-1.5B-R1-SLERP-AWQ) — AWQ 4-bit quantized version
|
| 25 |
|
| 26 |
+
## Benchmarks
|
| 27 |
|
| 28 |
+
Evaluated against both parent models on PPL (Wikitext-2) and GSM8K (100 samples):
|
| 29 |
|
| 30 |
+
| Model | PPL | GSM8K |
|
| 31 |
+
|-------|-----|-------|
|
| 32 |
+
| Qwen2.5-1.5B-Instruct (parent) | 16.141 | 38.0% |
|
| 33 |
+
| DeepSeek-R1-Distill-Qwen-1.5B (parent) | 107.467 | 3.0% |
|
| 34 |
+
| **Qwen2.5-1.5B-R1-SLERP (this model)** | 1205.427 | 2.0% |
|
| 35 |
|
| 36 |
+
PPL delta vs Instruct parent: +1189.286
|
| 37 |
+
GSM8K delta vs Instruct parent: -36.0%
|
| 38 |
|
| 39 |
+
## Merge Config
|
| 40 |
|
| 41 |
```yaml
|
|
|
|
| 42 |
merge_method: slerp
|
| 43 |
base_model:
|
| 44 |
+
model: Qwen/Qwen2.5-1.5B-Instruct
|
| 45 |
slices:
|
| 46 |
- sources:
|
| 47 |
+
- model: Qwen/Qwen2.5-1.5B-Instruct
|
| 48 |
layer_range: [0, 28]
|
| 49 |
+
- model: deepseek-ai/DeepSeek-R1-Distill-Qwen-1.5B
|
| 50 |
layer_range: [0, 28]
|
| 51 |
parameters:
|
| 52 |
+
t: 0.5
|
| 53 |
+
```
|
| 54 |
+
|
| 55 |
+
## Usage
|
| 56 |
+
|
| 57 |
+
```python
|
| 58 |
+
from transformers import AutoModelForCausalLM, AutoTokenizer
|
| 59 |
|
| 60 |
+
model = AutoModelForCausalLM.from_pretrained(
|
| 61 |
+
"Mohaaxa/Qwen2.5-1.5B-R1-SLERP",
|
| 62 |
+
torch_dtype="auto",
|
| 63 |
+
device_map="auto",
|
| 64 |
+
)
|
| 65 |
+
tokenizer = AutoTokenizer.from_pretrained("Mohaaxa/Qwen2.5-1.5B-R1-SLERP")
|
| 66 |
```
|
| 67 |
+
|
| 68 |
+
## Notes
|
| 69 |
+
|
| 70 |
+
- t=0.5 gives equal weight to both parents
|
| 71 |
+
- SLERP preserves weight magnitude better than linear interpolation
|
| 72 |
+
- Both parents share identical Qwen2.5 architecture (28 layers, hidden_dim=1536)
|
| 73 |
+
- For a quantized version with ~67% VRAM reduction, use the AWQ variant
|