Instructions to use Robokid1134/TinyToolRouter-0.6B with libraries, inference providers, notebooks, and local apps. Follow these links to get started.
- Libraries
- Transformers
How to use Robokid1134/TinyToolRouter-0.6B with Transformers:
# Use a pipeline as a high-level helper from transformers import pipeline pipe = pipeline("text-generation", model="Robokid1134/TinyToolRouter-0.6B") messages = [ {"role": "user", "content": "Who are you?"}, ] pipe(messages)# pip install -U transformers accelerate # Load model directly from transformers import AutoTokenizer, AutoModelForCausalLM tokenizer = AutoTokenizer.from_pretrained("Robokid1134/TinyToolRouter-0.6B") model = AutoModelForCausalLM.from_pretrained("Robokid1134/TinyToolRouter-0.6B", device_map="auto") messages = [ {"role": "user", "content": "Who are you?"}, ] inputs = tokenizer.apply_chat_template( messages, add_generation_prompt=True, tokenize=True, return_dict=True, return_tensors="pt", ).to(model.device) outputs = model.generate(**inputs, max_new_tokens=256) print(tokenizer.decode(outputs[0][inputs["input_ids"].shape[-1]:])) - Notebooks
- Google Colab
- Kaggle
- Local Apps Settings
- llama.cpp
How to use Robokid1134/TinyToolRouter-0.6B 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 Robokid1134/TinyToolRouter-0.6B:Q4_K_M # Run inference directly in the terminal: llama cli -hf Robokid1134/TinyToolRouter-0.6B:Q4_K_M
Install from WinGet (Windows)
winget install llama.cpp # Start a local OpenAI-compatible server with a web UI: llama serve -hf Robokid1134/TinyToolRouter-0.6B:Q4_K_M # Run inference directly in the terminal: llama cli -hf Robokid1134/TinyToolRouter-0.6B:Q4_K_M
Use pre-built binary
# Download pre-built binary from: # https://github.com/ggerganov/llama.cpp/releases # Start a local OpenAI-compatible server with a web UI: ./llama-server -hf Robokid1134/TinyToolRouter-0.6B:Q4_K_M # Run inference directly in the terminal: ./llama-cli -hf Robokid1134/TinyToolRouter-0.6B:Q4_K_M
Build from source code
git clone https://github.com/ggerganov/llama.cpp.git cd llama.cpp cmake -B build cmake --build build -j --target llama-server llama-cli # Start a local OpenAI-compatible server with a web UI: ./build/bin/llama-server -hf Robokid1134/TinyToolRouter-0.6B:Q4_K_M # Run inference directly in the terminal: ./build/bin/llama-cli -hf Robokid1134/TinyToolRouter-0.6B:Q4_K_M
Use Docker
docker model run hf.co/Robokid1134/TinyToolRouter-0.6B:Q4_K_M
- Llama new
- LM Studio
- Jan
- vLLM
How to use Robokid1134/TinyToolRouter-0.6B with vLLM:
Install from pip and serve model
# Install vLLM from pip: pip install vllm # Start the vLLM server: vllm serve "Robokid1134/TinyToolRouter-0.6B" # Call the server using curl (OpenAI-compatible API): curl -X POST "http://localhost:8000/v1/chat/completions" \ -H "Content-Type: application/json" \ --data '{ "model": "Robokid1134/TinyToolRouter-0.6B", "messages": [ { "role": "user", "content": "What is the capital of France?" } ] }'Use Docker
docker model run hf.co/Robokid1134/TinyToolRouter-0.6B:Q4_K_M
- SGLang
How to use Robokid1134/TinyToolRouter-0.6B with SGLang:
Install from pip and serve model
# Install SGLang from pip: pip install sglang # Start the SGLang server: python3 -m sglang.launch_server \ --model-path "Robokid1134/TinyToolRouter-0.6B" \ --host 0.0.0.0 \ --port 30000 # Call the server using curl (OpenAI-compatible API): curl -X POST "http://localhost:30000/v1/chat/completions" \ -H "Content-Type: application/json" \ --data '{ "model": "Robokid1134/TinyToolRouter-0.6B", "messages": [ { "role": "user", "content": "What is the capital of France?" } ] }'Use Docker images
docker run --gpus all \ --shm-size 32g \ -p 30000:30000 \ -v ~/.cache/huggingface:/root/.cache/huggingface \ --env "HF_TOKEN=<secret>" \ --ipc=host \ lmsysorg/sglang:latest \ python3 -m sglang.launch_server \ --model-path "Robokid1134/TinyToolRouter-0.6B" \ --host 0.0.0.0 \ --port 30000 # Call the server using curl (OpenAI-compatible API): curl -X POST "http://localhost:30000/v1/chat/completions" \ -H "Content-Type: application/json" \ --data '{ "model": "Robokid1134/TinyToolRouter-0.6B", "messages": [ { "role": "user", "content": "What is the capital of France?" } ] }' - Ollama
How to use Robokid1134/TinyToolRouter-0.6B with Ollama:
ollama run hf.co/Robokid1134/TinyToolRouter-0.6B:Q4_K_M
- Unsloth Desktop
- Pi
How to use Robokid1134/TinyToolRouter-0.6B with Pi:
Start the llama.cpp server
# Install llama.cpp: brew install llama.cpp # Start a local OpenAI-compatible server: llama serve -hf Robokid1134/TinyToolRouter-0.6B: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:8080/v1", "api": "openai-completions", "apiKey": "none", "models": [ { "id": "Robokid1134/TinyToolRouter-0.6B:Q4_K_M" } ] } } }Run Pi
# Start Pi in your project directory: pi
- Docker Model Runner
How to use Robokid1134/TinyToolRouter-0.6B with Docker Model Runner:
docker model run hf.co/Robokid1134/TinyToolRouter-0.6B:Q4_K_M
- Lemonade
How to use Robokid1134/TinyToolRouter-0.6B with Lemonade:
Pull the model
# Download Lemonade from https://lemonade-server.ai/ lemonade pull Robokid1134/TinyToolRouter-0.6B:Q4_K_M
Run and chat with the model
lemonade run user.TinyToolRouter-0.6B-Q4_K_M
List all available models
lemonade list
- Hermes Agent
How to use Robokid1134/TinyToolRouter-0.6B with Hermes Agent:
Start the llama.cpp server
# Install llama.cpp: brew install llama.cpp # Start a local OpenAI-compatible server: llama serve -hf Robokid1134/TinyToolRouter-0.6B: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:8080/v1 hermes config set model.default Robokid1134/TinyToolRouter-0.6B:Q4_K_M
Run Hermes
hermes
- Atomic Chat
- OpenClaw
How to use Robokid1134/TinyToolRouter-0.6B with OpenClaw:
Start the llama.cpp server
# Install llama.cpp: brew install llama.cpp # Start a local OpenAI-compatible server: llama serve -hf Robokid1134/TinyToolRouter-0.6B: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:8080/v1 \ --custom-model-id "Robokid1134/TinyToolRouter-0.6B: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"
TinyToolRouter-0.6B
A lightweight, CPU-first tool router fine-tuned from Qwen3-0.6B.
GitHub: @roboroyce
TinyToolRouter-0.6B is a 0.6-billion-parameter language model designed to select tools from a supplied list of tool schemas. Given a natural-language request and the available tools, it produces exactly one structured JSON tool call or explicitly abstains when no tool applies.
Example
Input request: What's the weather in Oslo?
Output:
{
"name": "get_weather",
"arguments": {
"city": "Oslo"
}
}
When no listed tool applies, the model abstains:
{
"name": "no_tool",
"arguments": {}
}
Key features
- Small footprint: 0.6B parameters, suitable for CPU-first inference.
- Schema-aware routing: Selects from tool definitions supplied at inference time.
- Structured output: Produces a single JSON object representing a proposed tool call.
- Explicit abstention: Supports a dedicated
no_toolresponse. - Paraphrase robustness: Evaluated on requests phrased differently from the training examples.
- Unseen-schema evaluation: Tested on tools absent from the training set.
- Multiple formats: Safetensors and GGUF builds are available in this repository.
Model details
| Property | Value |
|---|---|
| Model | TinyToolRouter-0.6B |
| Base model | Qwen/Qwen3-0.6B |
| Parameters | 0.6B |
| Fine-tuning | Supervised fine-tuning with LoRA (PEFT) |
| Deployment | Merged fine-tuned weights |
| Primary language | English |
| License | Apache-2.0 |
| Intended hardware | CPU-only and low-VRAM systems |
| Safetensors size | Approximately 1.2 GB |
| GGUF Q4_K_M size | Approximately 397 MB |
| GGUF Q8_0 size | Approximately 639 MB |
| GGUF F16 size | Approximately 1.2 GB |
File sizes are approximate and may vary slightly by build.
Benchmark results
TinyToolRouter was evaluated on a held-out set of 231 cases covering three distinct evaluation families.
Overall performance
| Metric | Qwen3-0.6B (base) | TinyToolRouter-0.6B |
|---|---|---|
| Exact match | 51.95% | 92.21% |
| Valid structured output | 99.13% | 99.13% |
| Tool selection | 93.51% | 98.70% |
| Argument accuracy | 51.95% | 92.21% |
no_tool precision |
76.47% | 97.56% |
no_tool recall |
97.50% | 100.00% |
no_tool F1 |
85.71% | 98.77% |
Exact match improved by 40.26 percentage points over the base model.
Performance by evaluation family
| Evaluation family | Cases | Base model | Fine-tuned |
|---|---|---|---|
seen_paraphrase |
131 | 22.90% | 92.37% |
unseen_schema |
60 | 85.00% | 86.67% |
no_tool |
40 | 97.50% | 100.00% |
What these results mean
- Paraphrase robustness: Exact match increased from 22.90% to 92.37% on requests that use unseen phrasing for tools encountered during training.
- Unseen tool schemas: Exact match increased from 85.00% to 86.67% on tools absent from the training set. This is a modest improvement, not evidence of fully general tool-schema understanding.
- Abstention: The fine-tuned model correctly abstained on all 40 held-out
no_toolcases, with 97.56% measured precision.
Evaluation methodology
Both models were evaluated using identical prompts and generation settings:
do_sample=Falsemax_new_tokens=128- Held-out evaluation set: 231 cases
- Evaluation metric: exact match of the expected structured output
The benchmark separates familiar tool schemas with paraphrased requests, genuinely unseen tool schemas, and requests that should not trigger a tool call.
The reported metrics are from the safetensors model. The GGUF conversions have not been independently benchmarked, so equivalent performance across formats should not be assumed.
Quickstart
Install dependencies
pip install torch transformers
Run with Transformers
import json
import torch
from transformers import AutoModelForCausalLM, AutoTokenizer
model_id = "Robokid1134/TinyToolRouter-0.6B"
tokenizer = AutoTokenizer.from_pretrained(model_id)
model = AutoModelForCausalLM.from_pretrained(model_id)
model.eval()
tools = [
{
"name": "get_weather",
"description": "Get the current weather for a city.",
"parameters": {
"type": "object",
"properties": {
"city": {"type": "string"}
},
"required": ["city"],
},
}
]
system_prompt = (
"You are a tool router. You are given a list of available tools "
"and a user request. Reply with exactly one JSON object of the form "
'{"name": "<tool_name>", "arguments": {"<argument>": "<value>"}}. '
"Use only the listed tools and their declared arguments. "
'If no listed tool applies, reply {"name": "no_tool", "arguments": {}}. '
"Output JSON only, with no additional prose."
)
messages = [
{"role": "system", "content": system_prompt},
{
"role": "user",
"content": json.dumps({
"tools": tools,
"request": "What's the weather in Oslo?"
}),
},
]
prompt = tokenizer.apply_chat_template(
messages,
tokenize=False,
add_generation_prompt=True,
enable_thinking=False,
)
inputs = tokenizer(prompt, return_tensors="pt")
with torch.inference_mode():
output = model.generate(
**inputs,
max_new_tokens=128,
do_sample=False,
)
new_tokens = output[0][inputs["input_ids"].shape[1]:]
response = tokenizer.decode(
new_tokens,
skip_special_tokens=True,
)
print(response)
Expected output:
{"name": "get_weather", "arguments": {"city": "Oslo"}}
Note: enable_thinking=False is recommended for direct routing output. The example uses the Qwen3 chat template and assumes a Transformers version that supports this argument.
GGUF: CPU inference
GGUF builds are available in the repository's gguf/ directory.
| File | Approximate size | Intended use |
|---|---|---|
gguf/model-Q4_K_M.gguf |
397 MB | Compact CPU inference |
gguf/model-Q8_0.gguf |
639 MB | Higher quantization fidelity |
gguf/model-f16.gguf |
1.2 GB | Full-precision weight storage |
Run a GGUF model using llama.cpp:
llama-cli \
-m gguf/model-Q4_K_M.gguf \
-p "<your prompt>"
The prompt should follow the model's expected chat template and include the available tool schemas and user request.
For repeated use, a dedicated prompt template or a compatible Ollama model configuration can simplify integration.
Benchmark caveat: The GGUF files were converted from the merged fine-tuned model but have not been independently re-evaluated. The benchmark figures above apply to the safetensors model.
Tool schema format
The model expects a JSON object containing a list of available tools and a natural-language request.
{
"tools": [
{
"name": "get_weather",
"description": "Get the current weather for a city.",
"parameters": {
"type": "object",
"properties": {
"city": {
"type": "string"
}
},
"required": ["city"]
}
}
],
"request": "What's the weather in Oslo?"
}
The schema format is JSON-Schema-style, with a name, description, and parameters object for each tool.
Training covered the following argument types:
stringintegernumberbooleanarrayof stringsarrayof numbers
Examples included required and optional arguments, along with distractor tools that should not be selected.
The model returns a proposed tool name and its arguments. It does not execute the tool or verify that the underlying action succeeds.
Training
| Setting | Value |
|---|---|
| Base checkpoint | Qwen/Qwen3-0.6B |
| Base revision | c1899de289a04d12100db370d81485cdf75e47ca |
| Fine-tuning method | LoRA using PEFT |
| Adapter rank | 16 |
| LoRA alpha | 32 |
| LoRA dropout | 0.05 |
| Target modules | Attention and MLP projections |
| Epochs | 3 |
| Training steps | 57 |
| Learning rate | 1e-4 |
| Scheduler | Cosine |
| Warmup ratio | 3% |
| Batch size | 8 |
| Gradient accumulation | 4 |
| Maximum sequence length | 512 tokens |
| Training precision | BF16 |
| Random seed | 7 |
| Training examples | 599 |
| Held-out examples | 231 |
| Hardware | NVIDIA A10G, 24 GB VRAM |
| Approximate training time | 150 seconds |
| PyTorch | 2.5.1 |
| Transformers | 4.57.6 |
| PEFT | 0.17.1 |
| Python | 3.9 |
The LoRA adapter was merged into the base model for deployment.
Training loss was computed on the assistant's JSON output, with prompt tokens masked from the loss.
Dataset
The dataset consists of original synthetic examples authored for this project and released under Apache-2.0.
No scraped text, chat logs, or personal data were used. Slot values are synthetic, including example email addresses, dates, and city names.
Tool coverage
Tools represented in training (9):
get_weathersend_emailcreate_calendar_eventsearch_webconvert_currencyset_timertranslate_textfilter_itemstag_note
Unseen tools reserved for evaluation (5):
play_musicget_stock_pricebook_restaurantdraw_chartcreate_reminder
Data separation
The training and held-out sets use disjoint templates, value pools, and example IDs.
The unseen_schema evaluation family contains tools absent from training entirely. The training set also includes abstention examples, while the held-out no_tool requests are disjoint from those training examples.
These design choices help test whether the model learned useful routing patterns rather than simply memorizing identical examples. They do not eliminate every possible source of dataset bias or leakage.
Limitations
- English only: The model was trained and evaluated on English-language examples.
- Limited tool coverage: Training covers nine tool schemas, with five additional schemas used for evaluation.
- Synthetic data: Performance on real-world agent requests may differ from the reported benchmark.
- Modest unseen-schema gains: The improvement on unseen schemas is only 1.67 percentage points.
- Limited argument extraction: Arguments often appear explicitly in the request. The evaluation primarily tests tool selection, argument correctness, and structured output rather than unrestricted information extraction.
- Small evaluation set: Results are based on 231 held-out examples. Small differences may reflect only a few cases.
- Single random seed: Multi-seed variance has not been measured.
- Quantized models not re-benchmarked: The reported metrics do not establish equivalent performance for the GGUF builds.
- Context length: Training used a maximum sequence length of 512 tokens. Long tool lists may exceed the model's familiar input distribution or be truncated by an inference pipeline.
Intended use
TinyToolRouter-0.6B is intended for:
- Local AI agents running on CPU-only or low-VRAM machines.
- Lightweight tool-selection front ends for larger language models.
- Routing between a predefined set of application tools.
- Explicitly declining requests that do not match any available tool.
- Research into compact language models, tool calling, and structured generation.
- Reproducible experiments comparing a small base model against a narrowly fine-tuned router.
Out of scope
This model is not a general-purpose assistant. It is not intended to independently answer general questions, execute tools, or make safety-critical decisions.
Do not rely on its output alone to authorize sensitive actions or execute shell commands. The calling application should validate the selected tool, enforce an allowlist, validate arguments against the actual schema, and require appropriate authorization before executing an action.
Citation
If you use this model in research or another project, you can cite it as follows:
@misc{tinytoolrouter06b,
title = {TinyToolRouter-0.6B: A CPU-First, Schema-Strict Tool Router},
author = {Robokid1134},
year = {2026},
note = {LoRA fine-tune of Qwen/Qwen3-0.6B},
url = {https://huggingface.co/Robokid1134/TinyToolRouter-0.6B}
}
Attribution and license
TinyToolRouter-0.6B is fine-tuned from Qwen/Qwen3-0.6B, which is released under the Apache-2.0 license.
This derivative model is distributed under Apache-2.0, with the applicable upstream license and copyright notices preserved. The project's original code and generated dataset are also released under Apache-2.0.
- Downloads last month
- 479