Downloads · 30 days
54
20% of all-time downloads
aipster/DevRouter-1.5B-GGUF
DevRouter-1.5B-GGUF is a text generation model from aipster. Use it when you need the model to write or continue text. The card lists the license as apache-2.0.
A tiny, fast router that turns a raw developer prompt into a single structured JSON decision.
Downloads · 30 days
54
20% of all-time downloads
All-time downloads
271
Public
Repo size
4.7 GB
Likes
1
Public
Click a slice to open those files.
.gguf4.7 GB · 100%
From the Hugging Face model README
A tiny, fast router that turns a raw developer prompt into a single structured JSON decision.
DevRouter-1.5B reads a raw coding prompt and returns one JSON object that (1) rewrites the prompt into a cleaner version, (2) classifies its intent, complexity, and a suggested route (which model tier to send it to), and (3) flags missing context the developer should have included. It is meant to sit in front of your expensive models and make a cheap, deterministic triage call in ~1–3 seconds on a single consumer GPU.
It is a fine-tune of Qwen2.5-Coder-1.5B-Instruct (Apache 2.0), distilled on a dataset of developer prompts labelled by a stronger teacher model.
Every response is a single JSON object with exactly these five fields:
| field | type | values |
|---|---|---|
rewrite | string | a clearer version of the prompt, preserving the original intent |
intent | enum | debug · refactor · feature · explain · documentation · boilerplate · architecture · review · optimize · other |
complexity | enum | low · medium · high |
route | enum | small_local · medium_api · large_api |
missing | array of strings | context the prompt should have included (empty if nothing) |
Input (user message):
My Flask app 500s on POST /upload with RequestEntityTooLarge, how do I fix it?
Output:
{
"rewrite": "I'm encountering a 500 Internal Server Error on my Flask app when handling POST /upload. The error is 'RequestEntityTooLarge'. How can I resolve this issue?",
"intent": "debug",
"complexity": "low",
"route": "small_local",
"missing": ["Flask version", "Python version"]
}
The router system prompt is baked into the model's chat template, so you do not need to supply a system prompt — just send the raw developer prompt as the user message.
# from the -GGUF repo (Modelfile + DevRouter-1.5B-Q8_0.gguf)
ollama create devrouter -f Modelfile
ollama run devrouter "refactor this giant function into smaller ones"
llama-server -m DevRouter-1.5B-Q8_0.gguf -c 8192 -ngl 99 --parallel 1
# then POST to /v1/chat/completions with just a user message, temperature 0
from transformers import AutoModelForCausalLM, AutoTokenizer
tok = AutoTokenizer.from_pretrained("aipster/DevRouter-1.5B")
model = AutoModelForCausalLM.from_pretrained("aipster/DevRouter-1.5B")
msgs = [{"role": "user", "content": "write a FastAPI POST /items endpoint with a Pydantic model"}]
inputs = tok.apply_chat_template(msgs, add_generation_prompt=True, return_tensors="pt")
out = model.generate(inputs, max_new_tokens=1408, do_sample=False)
print(tok.decode(out[0][inputs.shape[1]:], skip_special_tokens=True))
Use greedy decoding (temperature=0) for stable, parseable JSON.
Evaluated on a held-out, intent-stratified validation split (val, in-distribution) and an
out-of-distribution split (holdout, no GitHub-issue sources). Metrics: rate of valid JSON
(strict schema parse) and accuracy of intent / route / complexity against the teacher labels.
| metric | fp16 (val / holdout) | Q8_0 GGUF (val / holdout) |
|---|---|---|
| JSON validity | 0.973 / 0.955 | 0.965 / 0.946 |
| intent accuracy | 0.708 / 0.613 | 0.665 / 0.586 |
| route accuracy | 0.739 / 0.604 | 0.719 / 0.631 |
| complexity accuracy | 0.719 / 0.685 | 0.708 / 0.676 |
Per-intent accuracy (Q8_0, val):
| intent | acc | intent | acc |
|---|---|---|---|
| debug | 0.82 | architecture | 0.72 |
| refactor | 0.72 | documentation | 0.56 |
| explain | 0.73 | boilerplate | 0.64 |
| feature | 0.58 | review | 0.43 |
| optimize | 0.50 |
Single RTX 3090, Q8_0 GGUF via llama.cpp (single stream):
Throughput scales further with batching/concurrency.
review and documentation are under-represented and noisier in the
training data, and accuracy on them is lower.route/complexity as advisory.train_on_responses_onlyPre-routing / triage of developer prompts in an LLM application: rewriting, intent/complexity classification, and model-tier selection. Not intended for safety filtering, PII detection, or as a general assistant.
Apache 2.0, inherited from the base model. You are free to use, modify, and redistribute, including commercially.