Downloads · 30 days
0
outlast85/qwen2.5-0.5b-moe-domain-experts
qwen2.5-0.5b-moe-domain-experts is a machine learning model from outlast85. Use it for the machine learning task on the model card, and read the license before you ship it in a product. The card lists the license as apache-2.0.
A demonstration artifact, not a production model. It shows the moe-upcycle method: take dense Qwen2.5-0.5B, clone each FFN into 4 routed experts + 1 shared "generalist" expert + a router, then supervise the router by…
Downloads · 30 days
0
Access
Public
Updated Jun 18, 2026
Repo size
3.5 GB
Likes
0
Public
Click a slice to open those files.
.pt3.5 GB · 100%
From the Hugging Face model README
A demonstration artifact, not a production model. It shows the moe-upcycle method: take dense Qwen2.5-0.5B, clone each FFN into 4 routed experts + 1 shared "generalist" expert + a router, then supervise the router by domain so each routed expert becomes a real, named field specialist (Mode B).
llama.cpp -ncmoe).upcycle.py)This is a custom MoE saved as a state_dict, so loading needs the surgery code:
# pip install torch transformers ; git clone https://github.com/outlast85/moe-upcycle
import torch
from transformers import AutoModelForCausalLM, AutoTokenizer
from upcycle import upcycle_model # from the moe-upcycle repo
tok = AutoTokenizer.from_pretrained("Qwen/Qwen2.5-0.5B")
m = AutoModelForCausalLM.from_pretrained("Qwen/Qwen2.5-0.5B", dtype=torch.bfloat16)
upcycle_model(m, num_experts=4, top_k=1, drop_fraction=0.3, num_shared=1)
for l in m.model.layers: l.mlp.router.float()
m.load_state_dict(torch.load("mode_b_domain_experts.pt"))
m.eval()
# expert map: 0=code, 1=conversation, 2=explanation, 3=web
Distilled/trained on ~30k license-clean real examples (wikitext, codeparrot, OpenAssistant/oasst1, Dolly-15k), teacher Qwen2.5-3B, on an RTX 5090. Full method, code, and benchmarks: https://github.com/outlast85/moe-upcycle