Instructions to use ninosh/em-router 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 ninosh/em-router 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 ninosh/em-router:Q4_K_M # Run inference directly in the terminal: llama cli -hf ninosh/em-router:Q4_K_M
Install from WinGet (Windows)
winget install llama.cpp # Start a local OpenAI-compatible server with a web UI: llama serve -hf ninosh/em-router:Q4_K_M # Run inference directly in the terminal: llama cli -hf ninosh/em-router:Q4_K_M
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 ninosh/em-router:Q4_K_M # Run inference directly in the terminal: ./build/bin/llama cli -hf ninosh/em-router:Q4_K_M
Use Docker
docker model run hf.co/ninosh/em-router:Q4_K_M
- Llama new
- LM Studio
- Jan
- vLLM
How to use ninosh/em-router with vLLM:
Install from pip and serve model
# Install vLLM from pip: pip install vllm # Start the vLLM server: vllm serve "ninosh/em-router" # Call the server using curl (OpenAI-compatible API): curl -X POST "http://localhost:8000/v1/chat/completions" \ -H "Content-Type: application/json" \ --data '{ "model": "ninosh/em-router", "messages": [ { "role": "user", "content": "What is the capital of France?" } ] }'Use Docker
docker model run hf.co/ninosh/em-router:Q4_K_M
- Ollama
How to use ninosh/em-router with Ollama:
ollama run hf.co/ninosh/em-router:Q4_K_M
- Unsloth Desktop
- Pi
How to use ninosh/em-router with Pi:
Start the llama.cpp server
# Install llama.cpp: brew install llama.cpp # Start a local OpenAI-compatible server: llama serve -hf ninosh/em-router:Q4_K_M
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": "ninosh/em-router:Q4_K_M" } ] } } }Run Pi
# Start Pi in your project directory: pi
- Docker Model Runner
How to use ninosh/em-router with Docker Model Runner:
docker model run hf.co/ninosh/em-router:Q4_K_M
- Lemonade
How to use ninosh/em-router with Lemonade:
Pull the model
# Download Lemonade from https://lemonade-server.ai/ lemonade pull ninosh/em-router:Q4_K_M
Run and chat with the model
lemonade run user.em-router-Q4_K_M
List all available models
lemonade list
- Hermes Agent
How to use ninosh/em-router with Hermes Agent:
Start the llama.cpp server
# Install llama.cpp: brew install llama.cpp # Start a local OpenAI-compatible server: llama serve -hf ninosh/em-router:Q4_K_M
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 ninosh/em-router:Q4_K_M
Run Hermes
hermes
- Atomic Chat
- OpenClaw
How to use ninosh/em-router with OpenClaw:
Start the llama.cpp server
# Install llama.cpp: brew install llama.cpp # Start a local OpenAI-compatible server: llama serve -hf ninosh/em-router:Q4_K_M
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 "ninosh/em-router:Q4_K_M" \ --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"
|
Download README.md from ninosh/em-router: direct link, hf CLI and curl.
- Browser
- Download file 2.9 kB
-
https://huggingface.co/ninosh/em-router/resolve/main/README.md
- Command line
-
hf download hf://ninosh/em-router/README.md
-
curl -L -o README.md https://huggingface.co/ninosh/em-router/resolve/main/README.md
2.9 kB
| language: | |
| - en | |
| license: apache-2.0 | |
| tags: | |
| - em | |
| - skill-router | |
| - commit-msg | |
| - gguf | |
| - qwen2.5 | |
| - lora | |
| base_model: Qwen/Qwen2.5-1.5B-Instruct | |
| pipeline_tag: text-generation | |
| # em-router | |
| Skill-routing and commit-message model fine-tuned for the **em** developer CLI tool. | |
| Given a free-text developer request → outputs the single best skill slug (`sdd-feature`, `ws-commit`, `gitnexus-exploring`, …). | |
| Given a unified git diff → outputs a one-line [Conventional Commit](https://www.conventionalcommits.org/) message. | |
| ## Model Details | |
| | Field | Value | | |
| |---|---| | |
| | **Developed by** | Travis Dinh ([ninosh](https://huggingface.co/ninosh)) | | |
| | **Base model** | [Qwen/Qwen2.5-1.5B-Instruct](https://huggingface.co/Qwen/Qwen2.5-1.5B-Instruct) | | |
| | **Model type** | LoRA fine-tune → GGUF Q4\_K\_M | | |
| | **Language** | English | | |
| | **License** | Apache-2.0 | | |
| | **Tasks** | Skill routing (classification), commit message generation | | |
| ## Training | |
| | Hyperparameter | Value | | |
| |---|---| | |
| | Framework | Unsloth + TRL SFTTrainer | | |
| | Hardware | Kaggle T4 (fp16) | | |
| | LoRA rank / alpha | 16 / 32 | | |
| | Epochs | 3 | | |
| | Effective batch size | 16 | | |
| | Learning rate | 2e-4 | | |
| | Final eval loss | 1.369 | | |
| ### Training Data | |
| | Dataset | Rows | Task | | |
| |---|---|---| | |
| | [ninosh/em-commit-msg-train](https://huggingface.co/datasets/ninosh/em-commit-msg-train) | 150 | Conventional commit from diff | | |
| | [ninosh/em-intent-train](https://huggingface.co/datasets/ninosh/em-intent-train) | 240 | Skill slug from developer request | | |
| Both use OpenAI chat format (`system` / `user` / `assistant`), combined and split 90/10 train/val. | |
| ## Files | |
| | File | Size | Description | | |
| |---|---|---| | |
| | `em-router-Q4_K_M.gguf` | ~986 MB | 4-bit quantized — use with llama.cpp or Ollama | | |
| | `adapter_model.safetensors` | ~71 MB | Raw LoRA adapter — use with PEFT/Unsloth for further fine-tuning | | |
| | `tokenizer.json` | 11 MB | Qwen2.5 tokenizer | | |
| ## Usage | |
| ### With em CLI (recommended) | |
| ```bash | |
| # Download once (~986 MB) | |
| em model pull | |
| # Generate a commit message from staged diff | |
| git diff HEAD | em model run --task commit-msg | |
| # Route a request to the best skill | |
| em model run --task intent --prompt "I need to review my recent changes" | |
| ``` | |
| ### With llama.cpp | |
| ```bash | |
| huggingface-cli download ninosh/em-router em-router-Q4_K_M.gguf | |
| llama-cli -m em-router-Q4_K_M.gguf --chat-template chatml \ | |
| -p "You are a skill router. Output only one skill slug. No explanation.\nUser: review my changes" | |
| ``` | |
| ### With Ollama | |
| ```bash | |
| ollama run hf.co/ninosh/em-router | |
| ``` | |
| ## Skill Set Version | |
| Trained against skill set hash `86f22cbf`. Run `em model status` to check whether a newer version is available. | |
| ## Limitations | |
| - Covers the `em` skill library (~80 skills). Out-of-scope requests return the closest match. | |
| - Commit messages are single-line only; no body/footer generation. | |
| - Context window 2048 tokens; very large diffs are truncated. | |