File size: 4,568 Bytes
46f76ff
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
---
license: mit
library_name: transformers
tags:
- merge
- slerp
- qwen3.5
- myth
- reasoning
- coding
- math
base_model:
- Qwen/Qwen3.5-4B
- Jackrong/Qwen3.5-4B-Neo
pipeline_tag: text-generation
language:
- en
- multilingual
extra_gated_prompt: "This model is open for all. No special permission needed."
---

# 🧬 Myth 4B

**Myth 4B** is a fusion of [Qwen 3.5 4B](https://huggingface.co/Qwen/Qwen3.5-4B) and [Qwen3.5-4B-Neo](https://huggingface.co/Jackrong/Qwen3.5-4B-Neo) via SLERP (Spherical Linear Interpolation), built with a custom fusion engine that operates directly on safetensors β€” no mergekit required.

> "Three forces, one entity β€” Myth"

## Model Details

### Architecture

| Attribute | Value |
|---|---|
| **Base Model** | Qwen 3.5 4B |
| **Parameters** | 4B |
| **Context Length** | 32K |
| **Architecture** | `qwen3_5` |
| **Format** | FP16 (sharded, 8 files) + GGUF Q4_K_M |
| **Fusion Method** | SLERP (50% Qwen 3.5 + 50% Neo) |

### Lineage

```
Qwen 3.5 4B (multimodal base)
        |
        β”œβ”€β”€ SLERP ──→ 🧬 Myth 4B
        |
Qwen3.5-4B-Neo (reasoning expert)
```

Myth inherits:
- **Deep reasoning** from Neo's reasoning-focused fine-tuning
- **Multimodal capabilities** from Qwen 3.5's native architecture
- **Coding & math** from Qwen 3.5's strong foundation
- **1M-token capable** via Qwen 3.5's extended context architecture

## Fusion Engine

Unlike most merges that use mergekit, Myth 4B was merged using a **custom-built fusion engine**:

```
myth_fusion.py β€” Custom SLERP Engine
  β€’ Reads safetensors directly (no transformers dependency)
  β€’ Processes one tensor at a time (low memory footprint)
  β€’ Saves in shards (8 shards Γ— ~100 tensors each)
  β€’ Supports any model architecture
  β€’ No GPU required
```

738 tensors were merged in 2 stages, with shard-based saving to prevent OOM on 8GB RAM hardware.

## Files

| File | Size | Description |
|---|---|---|
| `model-*.safetensors` (Γ—8) | 8.8 GB total | FP16 model weights (sharded) |
| `Myth-4B-Q4_K_M.gguf` | 2.78 GB | Quantized GGUF (Q4_K_M) |
| `myth_system_prompt.md` | 5 KB | Custom system prompt (Claude Fable 5-inspired) |

## Usage

### Transformers (Python)

```python
from transformers import AutoModelForCausalLM, AutoTokenizer

model = AutoModelForCausalLM.from_pretrained(
    "dracko14/Myth-4B",
    torch_dtype="auto",
    device_map="auto",
    trust_remote_code=True
)
tokenizer = AutoTokenizer.from_pretrained(
    "dracko14/Myth-4B",
    trust_remote_code=True
)

messages = [
    {"role": "system", "content": "You are Myth, a helpful AI assistant."},
    {"role": "user", "content": "Write a Python function for binary search."},
]
prompt = tokenizer.apply_chat_template(messages, tokenize=False)
inputs = tokenizer(prompt, return_tensors="pt").to(model.device)
outputs = model.generate(**inputs, max_new_tokens=200)
print(tokenizer.decode(outputs[0], skip_special_tokens=True))
```

### llama.cpp / Ollama

```bash
# Download GGUF
wget https://huggingface.co/dracko14/Myth-4B/resolve/main/Myth-4B-Q4_K_M.gguf

# Run with llama.cpp
./llama-cli -m Myth-4B-Q4_K_M.gguf -p "Hello" -n 256

# Or with Ollama (create Modelfile first)
echo "FROM ./Myth-4B-Q4_K_M.gguf" > Modelfile
ollama create myth -f Modelfile
ollama run myth
```

### System Prompt

Myth includes a custom system prompt inspired by Claude Fable 5:
[πŸ“„ myth_system_prompt.md](https://huggingface.co/dracko14/Myth-4B/blob/main/myth_system_prompt.md)

## Benchmarks

*Benchmarks coming soon. Myth 4B inherits Qwen 3.5 4B's strong baseline with enhanced reasoning from Neo.*

## Training & Merge Details

| Detail | Value |
|---|---|
| **Compute** | 8GB RAM VPS (CPU only) |
| **Merge Time** | ~15 minutes (738 tensors) |
| **Quantization** | llama.cpp (162 seconds) |
| **Upload** | ~10 minutes |
| **Total Cost** | $0 (free VPS + free HuggingFace) |

## Limitations

- Base model knowledge cutoff applies
- Performance on CPU may be slow (4B params)
- Not fine-tuned for specific downstream tasks
- May exhibit base model biases

## License

MIT β€” open for all use cases.

## Links

- πŸ“„ [System Prompt](https://huggingface.co/dracko14/Myth-4B/blob/main/myth_system_prompt.md)
- 🌐 [Space Documentation](https://huggingface.co/spaces/dracko14/myth)
- βš™οΈ [Fusion Engine](https://github.com/yourusername/myth-fusion) (coming soon)
- 🧬 [Qwythos-9B-v2](https://huggingface.co/empero-ai/Qwythos-9B-v2) (Mythos-class 9B model)

---

*Built with ❀️ using [myth_fusion.py](https://huggingface.co/spaces/dracko14/myth) β€” a custom SLERP fusion engine*