Instructions to use mhndayesh/MoSV-Qwen3-4B-Coder with libraries, inference providers, notebooks, and local apps. Follow these links to get started.
- Notebooks
- Google Colab
- Kaggle
- Local Apps Settings
- llama.cpp
How to use mhndayesh/MoSV-Qwen3-4B-Coder with llama.cpp:
Install (macOS, Linux)
curl -LsSf https://llama.app/install.sh | sh # Start a local OpenAI-compatible server with a web UI: llama serve -hf mhndayesh/MoSV-Qwen3-4B-Coder:Q8_0 # Run inference directly in the terminal: llama cli -hf mhndayesh/MoSV-Qwen3-4B-Coder:Q8_0
Install from WinGet (Windows)
winget install llama.cpp # Start a local OpenAI-compatible server with a web UI: llama serve -hf mhndayesh/MoSV-Qwen3-4B-Coder:Q8_0 # Run inference directly in the terminal: llama cli -hf mhndayesh/MoSV-Qwen3-4B-Coder:Q8_0
Build from source code
git clone https://github.com/ggml-org/llama.cpp.git cd llama.cpp cmake -B build cmake --build build -j --target llama-app # Start a local OpenAI-compatible server with a web UI: ./build/bin/llama serve -hf mhndayesh/MoSV-Qwen3-4B-Coder:Q8_0 # Run inference directly in the terminal: ./build/bin/llama cli -hf mhndayesh/MoSV-Qwen3-4B-Coder:Q8_0
Use Docker
docker model run hf.co/mhndayesh/MoSV-Qwen3-4B-Coder:Q8_0
- Llama new
- LM Studio
- Jan
- vLLM
How to use mhndayesh/MoSV-Qwen3-4B-Coder with vLLM:
Install from pip and serve model
# Install vLLM from pip: pip install vllm # Start the vLLM server: vllm serve "mhndayesh/MoSV-Qwen3-4B-Coder" # Call the server using curl (OpenAI-compatible API): curl -X POST "http://localhost:8000/v1/chat/completions" \ -H "Content-Type: application/json" \ --data '{ "model": "mhndayesh/MoSV-Qwen3-4B-Coder", "messages": [ { "role": "user", "content": "What is the capital of France?" } ] }'Use Docker
docker model run hf.co/mhndayesh/MoSV-Qwen3-4B-Coder:Q8_0
- Ollama
How to use mhndayesh/MoSV-Qwen3-4B-Coder with Ollama:
ollama run hf.co/mhndayesh/MoSV-Qwen3-4B-Coder:Q8_0
- Unsloth Desktop
- Pi
How to use mhndayesh/MoSV-Qwen3-4B-Coder with Pi:
Start the llama.cpp server
# Install llama.cpp: brew install llama.cpp # Start a local OpenAI-compatible server: llama serve -hf mhndayesh/MoSV-Qwen3-4B-Coder:Q8_0
Configure the model in Pi
# Install Pi: npm install -g @earendil-works/pi-coding-agent # Add to ~/.pi/agent/models.json: { "providers": { "llama-cpp": { "baseUrl": "http://localhost:9931/v1", "api": "openai-completions", "apiKey": "none", "models": [ { "id": "mhndayesh/MoSV-Qwen3-4B-Coder:Q8_0" } ] } } }Run Pi
# Start Pi in your project directory: pi
- Docker Model Runner
How to use mhndayesh/MoSV-Qwen3-4B-Coder with Docker Model Runner:
docker model run hf.co/mhndayesh/MoSV-Qwen3-4B-Coder:Q8_0
- Lemonade
How to use mhndayesh/MoSV-Qwen3-4B-Coder with Lemonade:
Pull the model
# Download Lemonade from https://lemonade-server.ai/ lemonade pull mhndayesh/MoSV-Qwen3-4B-Coder:Q8_0
Run and chat with the model
lemonade run user.MoSV-Qwen3-4B-Coder-Q8_0
List all available models
lemonade list
- Hermes Agent
How to use mhndayesh/MoSV-Qwen3-4B-Coder with Hermes Agent:
Start the llama.cpp server
# Install llama.cpp: brew install llama.cpp # Start a local OpenAI-compatible server: llama serve -hf mhndayesh/MoSV-Qwen3-4B-Coder:Q8_0
Configure Hermes
# Install Hermes: curl -fsSL https://hermes-agent.nousresearch.com/install.sh | bash hermes setup # Point Hermes at the local server: hermes config set model.provider custom hermes config set model.base_url http://127.0.0.1:9931/v1 hermes config set model.default mhndayesh/MoSV-Qwen3-4B-Coder:Q8_0
Run Hermes
hermes
- Atomic Chat
- OpenClaw
How to use mhndayesh/MoSV-Qwen3-4B-Coder with OpenClaw:
Start the llama.cpp server
# Install llama.cpp: brew install llama.cpp # Start a local OpenAI-compatible server: llama serve -hf mhndayesh/MoSV-Qwen3-4B-Coder:Q8_0
Configure OpenClaw
# Install OpenClaw: npm install -g openclaw@latest # Register the local server and set it as the default model: openclaw onboard --non-interactive --mode local \ --auth-choice custom-api-key \ --custom-base-url http://127.0.0.1:9931/v1 \ --custom-model-id "mhndayesh/MoSV-Qwen3-4B-Coder:Q8_0" \ --custom-provider-id llama-cpp \ --custom-compatibility openai \ --custom-text-input \ --accept-risk \ --skip-health
Run OpenClaw
openclaw agent --local --agent main --message "Hello from Hugging Face"
MoSV-Qwen3-4B-Coder
Qwen3-4B-Instruct-2507 with three small steering experts for engineering questions: debugging, performance and security. One GGUF that stock llama.cpp and LM Studio run. Research release.
Part of MoSV (Mixture of Steering Vectors): the base model stays frozen; small experts at three layers (9, 18, 27) are picked per token by a router, or "none", in which case the model answers as plain Qwen. Code and full pipeline: GitHub Β· other models: MoSV collection.
It teaches how to answer, not new facts. It is not trained to write code better.
What the experts do
| Expert | Questions it takes | Habits taught |
|---|---|---|
| debugging | bug reports, without the code | start from what the report shows, tie each cause to a clue, say how to confirm it, keep the fix conditional |
| performance | speed, scaling, caching, data models and queries, services and APIs, events, consistency | say what limits the system first, name the concrete parts, say what must stay correct, what to measure and what it costs |
| security | access, encryption, privacy, attacks, deployment, hosting, monitoring, backups | say who could misuse it and what they reach, what enforces each check, least access, rollback, what stays exposed |
Results
120 prompts no expert or router trained on (40 per topic), plain prompts (no instructions), answered by this GGUF and by plain Qwen3-4B Q8_0 in llama.cpp with Qwen's recommended sampling, each answer judged alone by Claude Haiku with four yes/no behavior checks and one soundness check.
| Topic | Behavior, base β MoSV | MoSV better / worse / same | Soundness, base β MoSV | Answer tokens | Cut off at 2,048 tokens |
|---|---|---|---|---|---|
| Debugging | 0.09 β 0.59 | 39 / 0 / 1 | 0.97 β 1.00 | 1,533 β 912 | 0 β 0 |
| Performance | 0.21 β 0.47 | 26 / 2 / 12 | 0.50 β 0.62 | 1,544 β 1,488 | 10 β 1 |
| Security | 0.34 β 0.78 | 29 / 2 / 9 | 0.70 β 0.75 | 1,538 β 1,431 | 9 β 1 |
Router, tokens of unseen text sent to the right expert (range over the three layers; 4,137 texts):
| none | debugging | performance | security | |
|---|---|---|---|---|
| Prompts | 99-100% | 97-98% | 83-87% | 87-89% |
| Answers | 99-100% | 99-100% | 94-96% | 62-67% (8 answers only) |
Held-out loss: plain Qwen 1.205, this model 0.519, plain Qwen told the rules 0.433.
Use
llama-server -m MoSV-Qwen3-4B-Coder-Q8_0.gguf -ngl 99 -fa on --jinja
Sampling: temperature 0.7, top_k 20, top_p 0.8, min_p 0 (Qwen's own). In LM Studio, load it as any GGUF. The file
uses llama.cpp's hy_v3 architecture (a dense model with MoE layers), which recent llama.cpp builds and LM Studio
support.
How it was made
- Router first: 36,458 texts in four classes. Design questions were sorted into performance or security by Claude Haiku (24,152 labels); bug reports and everyday prompts needed no sorting. 19 minutes.
- Answers: Qwen3-4B wrote them itself, told the topic's rules: 81 performance, 95 security (kept if they finished), and the 174 checked debugging answers of MoSV-Qwen3-4B v6.0.1.
- Experts: supervised training on those 350 answers with the plain prompt; base frozen, all three experts in one run, best at step 50 of 60, 11 minutes on one RX 9070 XT, 10.2 GB.
Data: questions from Software Engineering, DBA, Information Security, Stack Overflow, Server Fault and DevOps Stack Exchange (CC BY-SA), architecture decision records, and public bug reports. Pipeline: docs/ROUTER_PIPELINE.md.
Limits
- The checks test habits, not facts. One judge (Claude Haiku), one round, 40 prompts per topic. The locked test of the earlier models was not run, and untrained topics were not compared with plain Qwen.
- Performance is the weakest: "what limits it first" 0.00 β 0.15 and "what must stay correct" 0.03 β 0.23. Some of its questions do not fit those habits.
- Debugging still states invented class or file names as fact in most answers (check passed: 0.00 β 0.05).
- The performance and security training answers were not quality-checked before training.
- English only. Not for production use; do not rely on it for security decisions.
License
Base weights: Qwen3-4B-Instruct-2507, Apache-2.0. MoSV experts and router: MIT.
- Downloads last month
- 403
8-bit
Model tree for mhndayesh/MoSV-Qwen3-4B-Coder
Base model
Qwen/Qwen3-4B-Instruct-2507