This repo holds the earlier MoSV files: v4 (one GGUF) and v3 (vectors and router). Newest: MoSV-Qwen3-4B and MoSV-Gemma-4-12B - seven experts each, trained supervised (no RL). Earlier: MoSV-Qwen3-4B-Coder - Qwen3-4B with debugging, performance and security experts. Also: MoSV-Qwen3-4B-v6.0.1 - Qwen3-4B with debugging and system-design experts, and MoSV-Gemma-4-12B v6.0.1 - Gemma 4 12B with debugging, teaching and story experts. On its locked test (43 prompts per trained topic) the Gemma model passes more behavior checks than plain Gemma on 41 of 43 teaching, 29 of 43 debugging and 17 of 43 story prompts, and fewer on 0, 2 and 7. Write-up: the v6.0.1 paper (archived), paper_v6_0_1.md.
GitHub: GitHub: code, training pipeline, tests and
the papers (current paper paper/mosv.md, older papers in paper/archive/). A snapshot of an older state of that
repo is in this Hugging Face repo's code/ folder.
Qwen3-4B-Instruct-2507 with task steering built in. Small steering vectors, trained by RL with Claude Haiku as the
judge, are stored inside the model as mixture-of-experts layers, and a gate picks one per token. One GGUF, no proxy
and no custom code: it loads in llama.cpp builds that include the hy_v3 architecture, and in LM Studio (what was
tested is under "Run it"). Research project.
These v3 and v4 files were trained by RL. The newer MoSV models use direct supervised training on finished answers (no RL).
llama-server -m MoSV-Qwen3-4B-F16.gguf -ngl 99 -fa on --jinja --temp 0.7 --top-k 20 --top-p 0.8 --min-p 0 --typical 1.0 --repeat-penalty 1.0 --presence-penalty 0 --frequency-penalty 0 --top-nsigma -1 --xtc-probability 0 --dry-multiplier 0
That is Qwen's recommended sampling (temperature 0.7, top_k 20, top_p 0.8) with every other sampler written out as
off, because llama-server turns some on by itself (min_p 0.05). The scores below were not measured with it: that test
was decoded greedily (--temp 0).
Or download the file and load it in LM Studio. You need a llama.cpp build that includes the hy_v3 architecture.
Tested: llama-server from one local Windows Vulkan build of a llama.cpp fork, and LM Studio's llama.cpp ROCm
runtime 2.80.1. Other LM Studio runtimes were not tested. It is 8.1 GB at F16 and fits one 16 GB GPU. Use a Q8_0 or Q4_0 KV cache; Q4_1 has
no Flash Attention kernel.
Built and tested on AMD only (RX 9070 XT, Vulkan and ROCm). NVIDIA is untested and the training code may need changes there; contributions are welcome on GitHub.
At layers 9, 18 and 27 the original Qwen MLP stays as an always-on shared expert. Next to it sit expert 0 (all zeros = "no steering") and 8 small SwiGLU topic experts: engineering, story, teaching, debugging, math solving, explanation, professional email, how-to guide. A linear gate picks one expert per token (sigmoid, top-1, weight 1). The rest of the model is unchanged Qwen. The experts and gates were distilled from v3, which adds one RL-trained vector per topic after the same layers, with a router picking the vector once per prompt.
86 held-out prompts, full-length answers, scored blind by Claude Haiku on a 5-criterion rubric per topic (1-5),
each pair judged twice with the order swapped. Decoding was greedy, not Qwen's recommended sampling: the normal and
v3 answers were written with vLLM (no length cap; 4 of 172 were stopped for looping), the v4 answers with
llama-server at temperature 0 (1 of 86 reached the 8,192-token cap).
| Topic | Normal Qwen | v3 | MoSV (v4) |
|---|---|---|---|
| Debugging | 1.70 | 4.12 | 4.09 |
| Professional email | 3.22 | 4.01 | 4.03 |
| Story | 2.55 | 3.82 | 3.66 |
| Teaching | 2.72 | 3.43 | 3.55 |
| Explanation | 2.90 | 3.45 | 3.49 |
| How-to guide | 3.00 | 2.86 | 3.21 |
| Engineering | 2.48 | 2.18 | 2.41 |
| Math solving | 4.53 | 4.47 | 4.43 |
| All 80 topic prompts | 2.89 | 3.54 | 3.61 |
Limits:
| File | What |
|---|---|
MoSV-Qwen3-4B-F16.gguf |
v4, the model (arch hy_v3). 8,104,645,440 bytes. sha256 35d00caba382fb0e1a593faeb07429289957fc628a47245c7b51e9847e139ba8 |
v3/vectors/steer-<topic>.gguf |
v3: the 8 vectors as llama.cpp control vectors (--control-vector, use with plain Qwen3-4B-Instruct-2507 F16) |
v3/router_qwen4b.pt |
v3: the router head (reads the hidden state after layer 9); used by v3/serve.py, which is no longer on main of the GitHub repo: it is at git tag pre-cleanup-2026-12-01 |
code/ |
Snapshot of an older state of the GitHub repo (v3 in code/v3/, v4 in code/moe/, papers in code/paper/). On GitHub, main no longer has v3/ or moe/: the current code is in mosv/, and the old code is at git tag pre-cleanup-2026-12-01 |
v5 (Bonsai-4B, one engineering expert) is not described on this card. Its write-up is docs/history/V5_BONSAI.md in the GitHub repo.
Inspired by Meral et al., "RL Post-Training in Diffusion Transformers Is Activation Steering" (arXiv:2611.26627), adapted from diffusion models to a text LLM with one vector per topic and a router.
Code, MoSV experts, routers and steering vectors: MIT (free to use, change and sell, keep the notice). The GGUF also contains the base model's weights, which stay under the base model's own license: Qwen/Qwen3-4B-Instruct-2507, Apache-2.0.