Myth-4B / README.md
dracko14's picture
Upload README.md with huggingface_hub
46f76ff verified
|
Raw
History Blame Contribute Delete
4.57 kB
metadata
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 and 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)

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

# 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

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


Built with ❀️ using myth_fusion.py β€” a custom SLERP fusion engine