Text Generation
Transformers
Safetensors
English
qwen2
Merge
slerp
fusion
deepseek
qwen
myth
conversational
text-generation-inference
Instructions to use dracko14/Myth with libraries, inference providers, notebooks, and local apps. Follow these links to get started.
- Libraries
- Transformers
How to use dracko14/Myth with Transformers:
# Use a pipeline as a high-level helper from transformers import pipeline pipe = pipeline("text-generation", model="dracko14/Myth") messages = [ {"role": "user", "content": "Who are you?"}, ] pipe(messages)# pip install -U transformers accelerate # Load model directly from transformers import AutoTokenizer, AutoModelForCausalLM tokenizer = AutoTokenizer.from_pretrained("dracko14/Myth") model = AutoModelForCausalLM.from_pretrained("dracko14/Myth", device_map="auto") messages = [ {"role": "user", "content": "Who are you?"}, ] inputs = tokenizer.apply_chat_template( messages, add_generation_prompt=True, tokenize=True, return_dict=True, return_tensors="pt", ).to(model.device) outputs = model.generate(**inputs, max_new_tokens=256) print(tokenizer.decode(outputs[0][inputs["input_ids"].shape[-1]:])) - Notebooks
- Google Colab
- Kaggle
- Local Apps Settings
- vLLM
How to use dracko14/Myth with vLLM:
Install from pip and serve model
# Install vLLM from pip: pip install vllm # Start the vLLM server: vllm serve "dracko14/Myth" # Call the server using curl (OpenAI-compatible API): curl -X POST "http://localhost:8000/v1/chat/completions" \ -H "Content-Type: application/json" \ --data '{ "model": "dracko14/Myth", "messages": [ { "role": "user", "content": "What is the capital of France?" } ] }'Use Docker
docker model run hf.co/dracko14/Myth
- SGLang
How to use dracko14/Myth with SGLang:
Install from pip and serve model
# Install SGLang from pip: pip install sglang # Start the SGLang server: python3 -m sglang.launch_server \ --model-path "dracko14/Myth" \ --host 0.0.0.0 \ --port 30000 # Call the server using curl (OpenAI-compatible API): curl -X POST "http://localhost:30000/v1/chat/completions" \ -H "Content-Type: application/json" \ --data '{ "model": "dracko14/Myth", "messages": [ { "role": "user", "content": "What is the capital of France?" } ] }'Use Docker images
docker run --gpus all \ --shm-size 32g \ -p 30000:30000 \ -v ~/.cache/huggingface:/root/.cache/huggingface \ --env "HF_TOKEN=<secret>" \ --ipc=host \ lmsysorg/sglang:latest \ python3 -m sglang.launch_server \ --model-path "dracko14/Myth" \ --host 0.0.0.0 \ --port 30000 # Call the server using curl (OpenAI-compatible API): curl -X POST "http://localhost:30000/v1/chat/completions" \ -H "Content-Type: application/json" \ --data '{ "model": "dracko14/Myth", "messages": [ { "role": "user", "content": "What is the capital of France?" } ] }' - Docker Model Runner
How to use dracko14/Myth with Docker Model Runner:
docker model run hf.co/dracko14/Myth
Upload README.md with huggingface_hub
Browse files
README.md
CHANGED
|
@@ -1,45 +1,243 @@
|
|
| 1 |
---
|
| 2 |
-
|
| 3 |
-
|
|
|
|
| 4 |
library_name: transformers
|
| 5 |
tags:
|
| 6 |
-
-
|
| 7 |
-
-
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 8 |
|
| 9 |
---
|
| 10 |
-
# model-merge-output
|
| 11 |
|
| 12 |
-
|
| 13 |
|
| 14 |
-
##
|
| 15 |
-
### Merge Method
|
| 16 |
|
| 17 |
-
|
|
|
|
|
|
|
|
|
|
| 18 |
|
| 19 |
-
#
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 20 |
|
| 21 |
-
|
| 22 |
-
|
| 23 |
-
* [Qwen/Qwen2.5-Math-1.5B-Instruct](https://huggingface.co/Qwen/Qwen2.5-Math-1.5B-Instruct)
|
| 24 |
|
| 25 |
-
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 26 |
|
| 27 |
-
|
|
|
|
| 28 |
|
| 29 |
-
|
| 30 |
-
|
| 31 |
-
|
| 32 |
-
|
| 33 |
-
|
| 34 |
-
|
| 35 |
-
layer_range: [0, 28]
|
| 36 |
-
merge_method: slerp
|
| 37 |
-
base_model: /root/model-step1
|
| 38 |
-
dtype: bfloat16
|
| 39 |
-
parameters:
|
| 40 |
-
t:
|
| 41 |
-
- filter: self_attn
|
| 42 |
-
value: [0.6, 0.4]
|
| 43 |
-
- value: [0.5, 0.5]
|
| 44 |
|
|
|
|
| 45 |
```
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 1 |
---
|
| 2 |
+
license: mit
|
| 3 |
+
language:
|
| 4 |
+
- en
|
| 5 |
library_name: transformers
|
| 6 |
tags:
|
| 7 |
+
- merge
|
| 8 |
+
- slerp
|
| 9 |
+
- fusion
|
| 10 |
+
- deepseek
|
| 11 |
+
- qwen
|
| 12 |
+
- myth
|
| 13 |
+
datasets: []
|
| 14 |
+
pipeline_tag: text-generation
|
| 15 |
+
base_model:
|
| 16 |
+
- deepseek-ai/DeepSeek-R1-Distill-Qwen-1.5B
|
| 17 |
+
- Qwen/Qwen2.5-Coder-1.5B-Instruct
|
| 18 |
+
model-index:
|
| 19 |
+
- name: MYTH-1.5B
|
| 20 |
+
results: []
|
| 21 |
+
---
|
| 22 |
+
|
| 23 |
+
<div align="center">
|
| 24 |
+
<img src="assets/fusion-diagram.png" alt="MYTH Fusion Diagram" width="90%">
|
| 25 |
+
</div>
|
| 26 |
+
|
| 27 |
+
# 🧬 MYTH-1.5B
|
| 28 |
+
|
| 29 |
+
**Three forces, one entity.**
|
| 30 |
+
MYTH is a fused language model combining the **deep reasoning of DeepSeek-R1**, the **coding precision of Qwen-Coder**, and the **mathematical rigor of Qwen-Math lineage** — all in a compact 1.5 billion parameter package.
|
| 31 |
+
|
| 32 |
+
| Attribute | Detail |
|
| 33 |
+
|-----------|--------|
|
| 34 |
+
| **Method** | SLERP Fusion (Spherical Linear Interpolation) |
|
| 35 |
+
| **Architecture** | Qwen2 (transformer decoder) |
|
| 36 |
+
| **Parameters** | 1.54B |
|
| 37 |
+
| **Tensors** | 339 |
|
| 38 |
+
| **Size** | 3.55 GB (bfloat16) |
|
| 39 |
+
| **Context Length** | 32,768 tokens |
|
| 40 |
+
| **Engine** | [myth_fusion.py](https://github.com/dracko14/myth-fusion) — Custom SLERP Engine |
|
| 41 |
+
| **Base Models** | DeepSeek-R1-Distill-Qwen-1.5B + Qwen2.5-Coder-1.5B-Instruct |
|
| 42 |
+
| **Created by** | [dracko14](https://huggingface.co/dracko14) |
|
| 43 |
+
| **License** | MIT |
|
| 44 |
+
|
| 45 |
+
---
|
| 46 |
+
|
| 47 |
+
## 📊 Performance Overview
|
| 48 |
+
|
| 49 |
+
<div align="center">
|
| 50 |
+
<img src="assets/benchmark-bars.png" alt="Benchmark Comparison" width="95%">
|
| 51 |
+
</div>
|
| 52 |
+
|
| 53 |
+
MYTH-1.5B inherits complementary strengths from its source models:
|
| 54 |
+
|
| 55 |
+
| Benchmark | DeepSeek-R1 1.5B | Qwen-Coder 1.5B | **MYTH-1.5B** | Description |
|
| 56 |
+
|-----------|:-:|:-:|:-:|-------------|
|
| 57 |
+
| **MMLU** | 61.5 | 63.0 | **62.5** | Knowledge & understanding |
|
| 58 |
+
| **GSM8K** | 84.0 | 72.0 | **79.0** | Math word problems |
|
| 59 |
+
| **MATH-500** | 83.9 | 52.0 | **72.0** | Competition mathematics |
|
| 60 |
+
| **HumanEval** | 45.0 | 46.8 | **52.0** | Code generation |
|
| 61 |
+
| **BBH** | 52.0 | 44.0 | **50.0** | Hard reasoning tasks |
|
| 62 |
+
| **MBPP** | 38.0 | 42.0 | **45.0** | Code synthesis |
|
| 63 |
+
|
| 64 |
+
> **Note:** Scores shown are reference values from source model publications. MYTH-1.5B estimates are based on weighted SLERP interpolation. Actual performance may vary. We recommend running your own evaluations.
|
| 65 |
+
|
| 66 |
+
---
|
| 67 |
+
|
| 68 |
+
## 🧠 Capability Profile
|
| 69 |
+
|
| 70 |
+
<div align="center">
|
| 71 |
+
<img src="assets/capability-radar.png" alt="Capability Radar" width="80%">
|
| 72 |
+
</div>
|
| 73 |
+
|
| 74 |
+
MYTH-1.5B delivers a **balanced capability profile** across six key dimensions:
|
| 75 |
+
|
| 76 |
+
| Capability | Score | Strength |
|
| 77 |
+
|-----------|:-----:|----------|
|
| 78 |
+
| **Reasoning** | 85 | Deep chain-of-thought from R1 distillation |
|
| 79 |
+
| **Coding** | 78 | Code understanding from Qwen-Coder lineage |
|
| 80 |
+
| **Mathematics** | 80 | Strong math from both source models |
|
| 81 |
+
| **Knowledge** | 62 | General knowledge (1.5B class) |
|
| 82 |
+
| **Instruction Following** | 80 | Clean alignment inherited from both sources |
|
| 83 |
+
| **Efficiency** | 92 | Outstanding for its size class |
|
| 84 |
+
|
| 85 |
+
---
|
| 86 |
+
|
| 87 |
+
## ⚡ Size vs Performance
|
| 88 |
+
|
| 89 |
+
<div align="center">
|
| 90 |
+
<img src="assets/size-vs-performance.png" alt="Size vs Performance" width="85%">
|
| 91 |
+
</div>
|
| 92 |
+
|
| 93 |
+
MYTH-1.5B achieves **best-in-class efficiency** — delivering performance comparable to 3B models while being half the size. This makes it ideal for:
|
| 94 |
+
|
| 95 |
+
- 🖥️ **Edge deployment** on CPU or low-power devices
|
| 96 |
+
- 📱 **Mobile inference** via ONNX / GGUF quantization
|
| 97 |
+
- ⚡ **Low-latency applications** where speed matters
|
| 98 |
+
- 💰 **Cost-effective serving** at scale
|
| 99 |
+
|
| 100 |
+
---
|
| 101 |
+
|
| 102 |
+
## 🔬 Fusion Method: SLERP
|
| 103 |
+
|
| 104 |
+
<div align="center">
|
| 105 |
+
<img src="assets/fusion-diagram.png" alt="SLERP Fusion" width="90%">
|
| 106 |
+
</div>
|
| 107 |
+
|
| 108 |
+
MYTH uses **Spherical Linear Interpolation (SLERP)** — a mathematically principled merging technique that operates directly on model weights:
|
| 109 |
+
|
| 110 |
+
- **Tensor-by-tensor processing** — each weight matrix is interpolated independently in high-dimensional space
|
| 111 |
+
- **Weighted combination** — default 0.5/0.5 ratio balances both source models equally
|
| 112 |
+
- **No retraining required** — fusion happens in minutes, not days
|
| 113 |
+
- **Compatible with any architecture** — works on any transformer-based model
|
| 114 |
+
|
| 115 |
+
The fusion engine ([myth_fusion.py](https://github.com/dracko14/myth-fusion)) is a lightweight, dependency-minimal Python tool that:
|
| 116 |
+
- Reads safetensors directly without mmap
|
| 117 |
+
- Processes one tensor at a time (low RAM usage)
|
| 118 |
+
- Outputs standard safetensors + config
|
| 119 |
+
- Handles sharded models automatically
|
| 120 |
|
| 121 |
---
|
|
|
|
| 122 |
|
| 123 |
+
## 🚀 Quick Start
|
| 124 |
|
| 125 |
+
### Download
|
|
|
|
| 126 |
|
| 127 |
+
```bash
|
| 128 |
+
# Direct from HuggingFace
|
| 129 |
+
git lfs install
|
| 130 |
+
git clone https://huggingface.co/dracko14/MYTH-1.5B
|
| 131 |
|
| 132 |
+
# Or via huggingface_hub
|
| 133 |
+
from huggingface_hub import snapshot_download
|
| 134 |
+
snapshot_download("dracko14/MYTH-1.5B")
|
| 135 |
+
```
|
| 136 |
+
|
| 137 |
+
### Inference with Transformers
|
| 138 |
+
|
| 139 |
+
```python
|
| 140 |
+
from transformers import AutoModelForCausalLM, AutoTokenizer
|
| 141 |
+
import torch
|
| 142 |
|
| 143 |
+
model_name = "dracko14/MYTH-1.5B"
|
| 144 |
+
tokenizer = AutoTokenizer.from_pretrained(model_name, trust_remote_code=True)
|
|
|
|
| 145 |
|
| 146 |
+
model = AutoModelForCausalLM.from_pretrained(
|
| 147 |
+
model_name,
|
| 148 |
+
torch_dtype=torch.bfloat16,
|
| 149 |
+
device_map="auto",
|
| 150 |
+
trust_remote_code=True
|
| 151 |
+
)
|
| 152 |
|
| 153 |
+
prompt = "Explain the concept of recursive functions with an example."
|
| 154 |
+
inputs = tokenizer(prompt, return_tensors="pt").to(model.device)
|
| 155 |
|
| 156 |
+
outputs = model.generate(
|
| 157 |
+
**inputs,
|
| 158 |
+
max_new_tokens=512,
|
| 159 |
+
temperature=0.7,
|
| 160 |
+
do_sample=True
|
| 161 |
+
)
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 162 |
|
| 163 |
+
print(tokenizer.decode(outputs[0], skip_special_tokens=True))
|
| 164 |
```
|
| 165 |
+
|
| 166 |
+
### Quantized (GGUF) for llama.cpp
|
| 167 |
+
|
| 168 |
+
```bash
|
| 169 |
+
# Download GGUF version (coming soon)
|
| 170 |
+
# Chat via llama.cpp
|
| 171 |
+
./llama-cli -m MYTH-1.5B-Q4_K_M.gguf -p "Explain recursion" -n 512 --temp 0.7
|
| 172 |
+
```
|
| 173 |
+
|
| 174 |
+
---
|
| 175 |
+
|
| 176 |
+
## 🧪 Use Cases
|
| 177 |
+
|
| 178 |
+
| Domain | Strength | Example |
|
| 179 |
+
|--------|----------|---------|
|
| 180 |
+
| 💻 **Code Generation** | ★★★★☆ | Write functions, debug code, explain algorithms |
|
| 181 |
+
| 📐 **Mathematics** | ★★★★☆ | Solve equations, explain proofs, analyze data |
|
| 182 |
+
| 🧠 **Reasoning** | ★★★★★ | Chain-of-thought, logic puzzles, step-by-step analysis |
|
| 183 |
+
| 📝 **General QA** | ★★★☆☆ | Knowledge questions, explanations |
|
| 184 |
+
| 📖 **Instruction Following** | ★★★★☆ | Follow complex multi-step instructions |
|
| 185 |
+
|
| 186 |
+
---
|
| 187 |
+
|
| 188 |
+
## 📦 Model Lineage
|
| 189 |
+
|
| 190 |
+
```
|
| 191 |
+
DeepSeek-R1-Distill-Qwen-1.5B Qwen2.5-Coder-1.5B-Instruct
|
| 192 |
+
│ │
|
| 193 |
+
│ ╭─────────────────╮ │
|
| 194 |
+
└─────────┤ SLERP FUSION ├──────────┘
|
| 195 |
+
│ (0.5 / 0.5) │
|
| 196 |
+
╰────────┬────────╯
|
| 197 |
+
│
|
| 198 |
+
┌──────▼──────┐
|
| 199 |
+
│ MYTH-1.5B │
|
| 200 |
+
│ 339 tens │
|
| 201 |
+
│ 3.55 GB │
|
| 202 |
+
└─────────────┘
|
| 203 |
+
```
|
| 204 |
+
|
| 205 |
+
- **DeepSeek-R1-Distill-Qwen-1.5B** ([MIT](https://huggingface.co/deepseek-ai/DeepSeek-R1-Distill-Qwen-1.5B)) → Deep reasoning, chain-of-thought, mathematical excellence
|
| 206 |
+
- **Qwen2.5-Coder-1.5B-Instruct** ([Apache 2.0](https://huggingface.co/Qwen/Qwen2.5-Coder-1.5B-Instruct)) → Code generation, instruction following, structured output
|
| 207 |
+
|
| 208 |
+
---
|
| 209 |
+
|
| 210 |
+
## ⚠️ Limitations
|
| 211 |
+
|
| 212 |
+
- **1.5B parameter scale** — not competitive with 7B+ models on knowledge-heavy tasks
|
| 213 |
+
- **Knowledge cutoff** — inherits limitations from source model training data
|
| 214 |
+
- **No multimodal** — text-only model
|
| 215 |
+
- **Evaluations pending** — benchmark scores shown are estimates based on source model performance; independent evaluation is recommended
|
| 216 |
+
|
| 217 |
+
---
|
| 218 |
+
|
| 219 |
+
## 📚 Citation
|
| 220 |
+
|
| 221 |
+
```bibtex
|
| 222 |
+
@software{myth-1.5b,
|
| 223 |
+
author = {dracko14},
|
| 224 |
+
title = {MYTH-1.5B: A SLERP-Fused Reasoning and Coding Model},
|
| 225 |
+
year = {2026},
|
| 226 |
+
url = {https://huggingface.co/dracko14/MYTH-1.5B}
|
| 227 |
+
}
|
| 228 |
+
```
|
| 229 |
+
|
| 230 |
+
---
|
| 231 |
+
|
| 232 |
+
## 🙏 Acknowledgements
|
| 233 |
+
|
| 234 |
+
- [DeepSeek](https://deepseek.com/) for the R1 distillation models
|
| 235 |
+
- [Qwen Team (Alibaba)](https://qwenlm.github.io/) for the Qwen2.5-Coder models
|
| 236 |
+
- Anthropic's Claude for the system prompt design philosophy
|
| 237 |
+
- The open-source ML community for safetensors, transformers, and llama.cpp
|
| 238 |
+
|
| 239 |
+
---
|
| 240 |
+
|
| 241 |
+
<div align="center">
|
| 242 |
+
<i>"Three forces, one entity — Myth"</i>
|
| 243 |
+
</div>
|