VelociTrinium/intent-router-qwen2.5-0.5b-instruct-gguf (v3)
LoRA fine-tuned Qwen/Qwen2.5-0.5B-Instruct (r=24, alpha=48, NEFTune 5.0, 4-class calibrated loss, merged FP32 -> F16 GGUF) for low-latency, single-token 4-class CRM intent routing (single-turn and multi-turn chat_history) via Ollama.
Included Files
intent-router-qwen2.5-0.5b-instruct-v3-f16.gguf(948.1 MB,F16)Modelfile(baked-inSYSTEMprompt, ChatML template,temperature 0,top_k 10,num_predict 1,num_ctx 768,num_thread 6)training_metadata.json&evaluation_report.json
Quickstart with Ollama
huggingface-cli download VelociTrinium/intent-router-qwen2.5-0.5b-instruct-gguf \
intent-router-qwen2.5-0.5b-instruct-v3-f16.gguf Modelfile --local-dir .
ollama create intent-router-qwen2.5-0.5b-instruct:v3.0.0 -f Modelfile
(With huggingface_hub >= 1.0, use hf download instead of huggingface-cli download.)
Inference (/api/chat with logprobs)
Send only user/assistant messages (do not inject another system message — Modelfile already includes it):
curl http://127.0.0.1:11434/api/chat -d '{
"model": "intent-router-qwen2.5-0.5b-instruct:v3.0.0",
"messages": [{"role": "user", "content": "Update Kevin phone number"}],
"stream": false,
"keep_alive": "10m",
"logprobs": true,
"top_logprobs": 20,
"options": {"temperature": 0, "num_predict": 1}
}'
Intent Classes & Guardrails
The model emits 1 token. Normalize linear probabilities (exp(logprob)) across {CHAT, READ, WRITE, ASK} from logprobs[0].top_logprobs:
| Route | Token (ID) | Scope |
|---|---|---|
GENERAL_CHAT | CHAT (60717) | Greetings, CRM/CRE/SQL conceptual help, sample queries, live-data meta, notices, drafting without DB actions |
DB_READ | READ (9560) | Clear fetch, search, filter, count, aggregate, audit queries, or negative-write guards |
DB_WRITE | WRITE (32781) | Clear, non-destructive mutations with targets/values, complete READ+WRITE, or full inbound inquiries |
CLARIFICATION_REQUIRED | ASK (7384) | Missing target/value, unresolved pronouns, read-vs-write ambiguity, or destructive/bulk ops |
Recommended guardrail precedence:
P(ASK) >= 0.40andP(ASK) >= P(WRITE)->CLARIFICATION_REQUIRED- Else
P(WRITE) >= 0.40->DB_WRITE - Else
max(P) < 0.60->CLARIFICATION_REQUIRED - Else
argmax(P) - Post-model safety guard: if
DB_WRITEis selected on an unguarded bulk/destructive pattern (e.g.override every,drop table,truncate,mass update), intercept toCLARIFICATION_REQUIRED.
Benchmarks (v3, Held-Out Test Set: 300 Samples / 48 Multi-Turn)
| Class | Precision | Recall | F1 | Support |
|---|---|---|---|---|
GENERAL_CHAT | 1.0000 | 1.0000 | 1.0000 | 80 |
DB_READ | 1.0000 | 1.0000 | 1.0000 | 76 |
DB_WRITE | 1.0000 | 0.9865 | 0.9932 | 74 |
CLARIFICATION_REQUIRED | 0.9859 | 1.0000 | 0.9929 | 70 |
- Guarded Accuracy / Macro F1:
99.67%/0.9965(Raw: 99.33%/0.9932) - Multi-Turn Accuracy (
48samples):100.0% - Calibration:
NLL = 0.0363|Brier = 0.0108 - CPU Latency:
163.40 msmean |127.23 msP50 |347.51 msP95