anaksor-ocr
Sokheng · Kit
Reads Khmer and English text from documents, receipts and photos of signs, using a detector for text lines and a recogniser for each line. Suits developers who…
Small decider that returns a calibrated probability for what an agent should do next and which tool it should call. For developers building agents and support bots.
Qwen3.5-4B-Router-1M is a kit in the Developer category, listed by Mindket. It is free. This is version 1, last updated on . Download it on this page, a zip of its files. Nothing in it runs by itself.
pip install -U huggingface_hub hf download MaziyarPanahi/Qwen3.5-4B-Router-1M
This 4B model decides what an AI agent should do next and which tool it should call. It does not write free text. For every option it gives a calibrated probability. Its base is Qwen3.5-4B with an Unsloth decision head, and it learned from 17,600 labelled rows.
It suits developers building agents or support bots who want a small local model to pick the next step or the right tool.
| Industry | Who uses it | How they use it | Example |
|---|---|---|---|
| Software | Agent builders | Pick the next action in an agent loop | Choosing between answering and calling a tool |
| Customer support | Support platform teams | Route a customer to the right tool or a human | Transferring a request to a human agent |
| E-commerce | Service desk developers | Choose a lookup tool for a customer question | Calling an order status tool |
You can skip it if you need a judge of whole agent traces, free-text replies, or clinical agents.
It runs as Python code on your own machine through Unsloth, with a LoRA adapter on Qwen3.5-4B.
| Use case | Who | What they get back |
|---|---|---|
| Next action choice | Agent developers | A probability for each possible next step |
| Tool choice | Support bot builders | A probability for each available tool |
| Human handoff | Service teams | A signal to transfer a request to a person |
You need Python, the Hugging Face tool and the Unsloth library. The sample code loads the model by its repository name.
pip install -U huggingface_hub hf download MaziyarPanahi/Qwen3.5-4B-Router-1M
Write a question that lists each tool as an option, add the available tools and the conversation to the state, and call predict. You get a probability per option, so you can set your own confidence cut.
from unsloth import FastDecisionModel
model, tokenizer = FastDecisionModel.from_pretrained("MaziyarPanahi/Qwen3.5-4B-Router-1M", max_seq_length=4096, load_in_4bit=False)
FastDecisionModel.for_inference(model)
question = {"decision": {"type": "choice",
"instructions": "Which available tool should be called next?",
"criteria": {"get_order_status": "Call `get_order_status`.",
"transfer_to_human_agent": "Call `transfer_to_human_agent`."}}}
state = '{"available_tools": [{"name": "get_order_status"}, {"name": "transfer_to_human_agent"}], '\
'"conversation": [{"role": "user", "content": "I would like to speak to a person please."}]}'
print(FastDecisionModel.predict(model, tokenizer, state, question))| Tool | What it does |
|---|---|
| FastDecisionModel.from_pretrained | Loads the model and tokenizer |
| FastDecisionModel.for_inference | Prepares the model for predictions |
| FastDecisionModel.predict | Returns a probability for each option |
A customer writes that they would like to speak to a person. With two tools on offer, an order status lookup and a human transfer, the model returns a probability for each, and the transfer option should come out ahead.
If you are new, think of it as a signpost for an agent that points to the next move. Run the sample and see how it scores two tools against one message.
If you know the field, it is a LoRA of rank 16 trained on four public decision datasets using only their source labels, not the earlier Jev answers. On 480 held-out rows it beat Jev 1.13 by 5.8 points overall. The labels record what the source trace did next, so read the scores as agreement with the source.
The test covered four task families of 120 rows each. Training stopped early on a time budget.
Small decider that returns a calibrated probability for what an agent should do next and which tool it should call. For developers building agents and support bots.
Made by MaziyarPanahi on Hugging Face. These notes are Mindket's, written from its model page and model card; the model's own files and license are on Hugging Face.
What it is: This 4B model decides what an AI agent should do next and which tool it should call. It does not write free text. For every option it gives a calibrated probability. Its base is Qwen3.5-4B with an Unsloth decision head, and it learned from 17,600 labelled rows.
Who it suits: It suits developers building agents or support bots who want a small local model to pick the next step or the right tool.
Industry | Who uses it | How they use it | Example
Software | Agent builders | Pick the next action in an agent loop | Choosing between answering and calling a tool
Customer support | Support platform teams | Route a customer to the right tool or a human | Transferring a request to a human agent
E-commerce | Service desk developers | Choose a lookup tool for a customer question | Calling an order status tool
You can skip it if you need a judge of whole agent traces, free-text replies, or clinical agents.
Where to use it: It runs as Python code on your own machine through Unsloth, with a LoRA adapter on Qwen3.5-4B.
Use case | Who | What they get back
Next action choice | Agent developers | A probability for each possible next step
Tool choice | Support bot builders | A probability for each available tool
Human handoff | Service teams | A signal to transfer a request to a person
How to set it up: You need Python, the Hugging Face tool and the Unsloth library. The sample code loads the model by its repository name.
pip install -U huggingface_hub
hf download MaziyarPanahi/Qwen3.5-4B-Router-1M
How to use it: Write a question that lists each tool as an option, add the available tools and the conversation to the state, and call predict. You get a probability per option, so you can set your own confidence cut.
from unsloth import FastDecisionModel
model, tokenizer = FastDecisionModel.from_pretrained("MaziyarPanahi/Qwen3.5-4B-Router-1M", max_seq_length=4096, load_in_4bit=False)
FastDecisionModel.for_inference(model)
question = {"decision": {"type": "choice",
"instructions": "Which available tool should be called next?",
"criteria": {"get_order_status": "Call `get_order_status`.",
"transfer_to_human_agent": "Call `transfer_to_human_agent`."}}}
state = '{"available_tools": [{"name": "get_order_status"}, {"name": "transfer_to_human_agent"}], '\
'"conversation": [{"role": "user", "content": "I would like to speak to a person please."}]}'
print(FastDecisionModel.predict(model, tokenizer, state, question))
Tool | What it does
FastDecisionModel.from_pretrained | Loads the model and tokenizer
FastDecisionModel.for_inference | Prepares the model for predictions
FastDecisionModel.predict | Returns a probability for each option
Example: A customer writes that they would like to speak to a person. With two tools on offer, an order status lookup and a human transfer, the model returns a probability for each, and the transfer option should come out ahead.
For newcomers and experts: If you are new, think of it as a signpost for an agent that points to the next move. Run the sample and see how it scores two tools against one message.
If you know the field, it is a LoRA of rank 16 trained on four public decision datasets using only their source labels, not the earlier Jev answers. On 480 held-out rows it beat Jev 1.13 by 5.8 points overall. The labels record what the source trace did next, so read the scores as agreement with the source.
Conversation and tool list
Decision head reads the state
Probability for each tool or action
You pick the highest or set a cut
Good to know: The test covered four task families of 120 rows each. Training stopped early on a time budget.
Title: Overall accuracy on 480 test rows
This model: 86.5%
Jev 1.13: 80.6%
Download its files with Hugging Face's command line:
pip install -U huggingface_hub
hf download MaziyarPanahi/Qwen3.5-4B-Router-1M
Then follow the usage in its model card. Nothing in this kit runs by itself.
README.md 5 KB
Listed Hugging Face models in the same category that share the most tags with this one.
| Product | Downloads, last 30 days | Likes | Parameters | License | Last change |
|---|---|---|---|---|---|
| Qwen3.5-4B-Router-1M This page | 47 | 3 | — | apache-2.0 | |
| Qwen3.5-4B-Judge-1MShares peft · decision-model · unsloth | 29 | 3 | — | apache-2.0 | |
| OpenJevShares agents · decision-model · safetensors | 9,293 | 199 | 27.4B | cc-by-nc-4.0 | |
| Mica-v0.5-4BShares agents · decision-model · safetensors | 6,375 | 47 | 4.7B | apache-2.0 | |
| mini-JevShares agents · decision-model · safetensors | 291 | 25 | 263K | apache-2.0 | |
| ARC 1.0Shares agents · decision-model · safetensors | 37 | 23 | 615M | apache-2.0 |
Sokheng · Kit
Reads Khmer and English text from documents, receipts and photos of signs, using a detector for text lines and a recogniser for each line. Suits developers who…
Qwen · Kit
Qwen2.5-7B-Instruct as GGUF files in eight quantization sizes, to chat with locally through llama.cpp. For people who want a capable 7.6B model on their own co…
ACE-Step · Kit
Generates music from text with a 4B diffusion decoder, 50 steps and guidance control, aiming for higher audio quality than the base. For creators with a GPU of…
alirezarezvani · Skill
Adds 411 ready-made skills for Claude Code and other coding agents, grouped by role from engineering and product to marketing, finance and compliance. Installs…
block · Kit
Self-hostable workspace where people and AI agents share the same rooms, built on a Nostr relay that logs every action as a signed event. For teams that want t…
backnotprop · Kit
Opens your AI coding agent's plans, specs and code changes in a browser so you can annotate or comment on them and send the feedback straight back to the agent.