Instructions to use okolxc/openmythos-2b-edge with libraries, inference providers, notebooks, and local apps. Follow these links to get started.
- Libraries
- Transformers
How to use okolxc/openmythos-2b-edge with Transformers:
# Use a pipeline as a high-level helper from transformers import pipeline pipe = pipeline("text-generation", model="okolxc/openmythos-2b-edge")# pip install -U transformers accelerate # Load model directly from transformers import AutoModel model = AutoModel.from_pretrained("okolxc/openmythos-2b-edge", device_map="auto") - Notebooks
- Google Colab
- Kaggle
- Local Apps Settings
- vLLM
How to use okolxc/openmythos-2b-edge with vLLM:
Install from pip and serve model
# Install vLLM from pip: pip install vllm # Start the vLLM server: vllm serve "okolxc/openmythos-2b-edge" # Call the server using curl (OpenAI-compatible API): curl -X POST "http://localhost:8000/v1/completions" \ -H "Content-Type: application/json" \ --data '{ "model": "okolxc/openmythos-2b-edge", "prompt": "Once upon a time,", "max_tokens": 512, "temperature": 0.5 }'Use Docker
docker model run hf.co/okolxc/openmythos-2b-edge
- SGLang
How to use okolxc/openmythos-2b-edge 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 "okolxc/openmythos-2b-edge" \ --host 0.0.0.0 \ --port 30000 # Call the server using curl (OpenAI-compatible API): curl -X POST "http://localhost:30000/v1/completions" \ -H "Content-Type: application/json" \ --data '{ "model": "okolxc/openmythos-2b-edge", "prompt": "Once upon a time,", "max_tokens": 512, "temperature": 0.5 }'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 "okolxc/openmythos-2b-edge" \ --host 0.0.0.0 \ --port 30000 # Call the server using curl (OpenAI-compatible API): curl -X POST "http://localhost:30000/v1/completions" \ -H "Content-Type: application/json" \ --data '{ "model": "okolxc/openmythos-2b-edge", "prompt": "Once upon a time,", "max_tokens": 512, "temperature": 0.5 }' - Docker Model Runner
How to use okolxc/openmythos-2b-edge with Docker Model Runner:
docker model run hf.co/okolxc/openmythos-2b-edge
OpenMythos-2B β Edge (SFT)
Qwen3.5-2B weights running inside the OpenMythos architecture (hybrid linear attention + GQA + MoE-ready blocks), converted 1:1 and then instruction-tuned on UltraChat-200k for 500 steps on a single Tesla T4.
The SFT pass closed and reversed the conversion gap: the fine-tuned Mythos model is now less perplex than the original Qwen on the same held-out data.
| Base model | Qwen/Qwen3.5-2B |
| Params | 2.393 B (bf16) |
| Layers | 24 (18 linear-attention + 6 full-attention), 11 + 1 recurrent + 12 |
| Attention | hybrid: Gated DeltaNet (linear) + GQA full-attention |
| Context | 248 320 vocab, RoPE ΞΈ=1e7, 256k native positions |
| Weights | 5.80 GB, 4 safetensors shards |
| Training | 500 steps, UltraChat-200k, lr 1e-5 cosine, seq 192, Adafactor |
π Verified results (Tesla T4, bf16)
Identical held-out set: 69 UltraChat-200k test samples + 5 general-text samples = 12 313 tokens, scored with the same tokenizer and the same code path for every model.
Qwen3.5-2B (original) held-out ppl = 7.9467 (1.00x)
OpenMythos-2B (converted) held-out ppl = 11.8564 (1.49x) <- before SFT
OpenMythos-2B (SFT, this repo) held-out ppl = 6.2327 (0.78x) <- after SFT
The conversion alone cost 1.49x perplexity; 500 steps of SFT on UltraChat recovered it and overshot, leaving the Mythos model 22% better than the Qwen it was derived from on this data.
π¦ Files
| file | what |
|---|---|
model-00001..00004-of-00004.safetensors |
the model (5.80 GB, bf16, 335 tensors) |
model.safetensors.index.json |
shard index |
config.json |
architecture metadata + SFT hyperparameters |
sft_gqa_ultrachat_step500.safetensors |
the same weights as a single file |
scratch_2b/ |
earlier from-scratch checkpoints (different, smaller architecture) β see its README |
Load with the OpenMythos architecture (see config.json for the layer map);
the weights are a 1:1 copy of the converted Qwen3.5-2B tensors.
ποΈ Architecture
Embed β [11 Γ TransformerBlock] β [RecurrentBlock] β [12 Γ TransformerBlock] β RMSNorm β tied Head
β β
β ββ ACT / LoRA recurrent reasoning block
ββ hybrid attention: Gated DeltaNet + GQA full-attention
Each TransformerBlock = pre-norm attention + SwiGLU feed-forward, with optional Mixture-of-Experts, Mixture-of-Depths routing, Multi-Token-Prediction head, sparse-attention (DSA) and long-term KV memory available as fine-tuning targets.
β Conversion fidelity
| Component | Transfer |
|---|---|
| Gated DeltaNet attention (18 layers) | direct copy β module parity 0.43 % |
| GQA full attention (6 layers) | direct copy β layer parity cos 0.996 |
| SwiGLU feed-forward (6144) | direct copy |
| Norms (zero-centred RMSNorm) | direct copy |
| Embedding / output head | direct copy (tied) |
load_state_dict on the promoted checkpoint reports
0 missing / 0 unexpected tensors.
Post-hoc compression of K and V into a shared MLA latent was measured too (SVD energy retention 86β98 %) and found lossy, so the converted checkpoint keeps per-head K/V; the compressed-latent attention path is kept in the project for training from scratch.
π Attribution
Weights are derived from Qwen3.5-2B (Apache-2.0). Please respect the upstream license and keep the attribution when redistributing.
- Downloads last month
- 1,038