Views
No views yet
<tool_call> blocks for four
local search tools, intended for on-device inference (iOS / llama.cpp). Quantized to
Q5_K_M (~1.2 GB).<think> blocks| Tool | Purpose |
|---|---|
search_recipes(query, sort_by) | find recipes by dish / ingredient |
search_events(query, region, max_price) | find concerts, sports, shows |
search_food_categories(query, min_tier) | browse dish categories by popularity tier (1–5) |
search_regions(query) | look up which cities a region covers |
<tool_call>
{"name": "search_recipes", "arguments": {"query": "cubano"}}
</tool_call><|im_start|>system
{system prompt}<|im_end|>
<|im_start|>user
{user message}<|im_end|>
<|im_start|>assistantYou have access to these tools. To use one, reply ONLY with a tool_call block:
<tool_call>
{"name": "TOOL_NAME", "arguments": {"key": "value"}}
</tool_call>
Tools:
- search_recipes(query, sort_by): Find recipes by dish name or ingredient.
- search_events(query, region, max_price): Find concerts, sports, shows.
- search_food_categories(query, min_tier): Browse 100 dish categories by tier (1-5).
- search_regions(query): Look up which cities a region covers.
If the question does NOT need a tool, answer directly without a tool_call block.<tool_call>; your app runs the tool and feeds the result
back as a system message (Tool results:\n{...}\n\nNow answer the user's question using the results above.), then the model writes the final natural-language answer.| Metric | Base Qwen3-1.7B | This model (Q5_K_M) |
|---|---|---|
| Overall score | 0.767 | 0.850 |
| Pass rate (≥0.8) | 8/12 | 10/12 |
| Tool-call rate | 70% | 100% |
| Valid tool-call JSON | 70% | 100% |
| Correct tool name | 70% | 100% |
| Held-out tool-name acc (unseen) | 47% | 100% |
1hf download python3isfun/qwen3-1.7b-toolcall-gguf qwen3-1.7b-toolcall-Q5_K_M.gguf --local-dir .
2./llama-cli -m qwen3-1.7b-toolcall-Q5_K_M.gguf --temp 0 -p "<your ChatML prompt>"1from llama_cpp import Llama
2llm = Llama(model_path="qwen3-1.7b-toolcall-Q5_K_M.gguf", n_ctx=2048)
3prompt = ("<|im_start|>system\n" + SYSTEM_PROMPT + "<|im_end|>\n"
4 "<|im_start|>user\nFind me a recipe for tacos<|im_end|>\n"
5 "<|im_start|>assistant\n")
6print(llm(prompt, temperature=0.0, stop=["<|im_end|>"])["choices"][0]["text"])
7# -> <tool_call>\n{"name": "search_recipes", "arguments": {"query": "tacos"}}\n</tool_call>Q4_K_M variant (~1.06 GB) also exists; it matches Q5 under the trained prompt but is
slightly less robust under a longer few-shot prompt.