ToolChooser-0.8B
A LoRA adapter on Qwen3.5-0.8B that chooses which tool answers a chat message when an embedding router is unsure. The router scores the message against every capability (tool) the chat offers; when two or more are still close, ToolChooser chooses one of them, or none, in which case the person is asked to choose.
It chooses only among the capabilities the router itself offered, and the host application decides what runs: a model's output alone never authorizes an operation.
It is a distillation: it learned the choices of a teacher 34 times its size, Qwen3.8-27B. On capability choices it never saw it makes the teacher's choice more often than a 35-billion-parameter model asked the same thing, and a wrong choice less than a tenth as often:
| 201 capability choices: the teacher's choice / the person asked / wrong | 106 capability choices | |
|---|---|---|
| ToolChooser-0.8B | 180 / 19 / 2 | 90 / 14 / 2 |
| Qwen3.6-35B-A3B, thinking off (MoE, 3B active) | 171 / 4 / 26 | 84 / 4 / 18 |
| DeepSeek-V4-Flash, thinking off | 152 / 24 / 24, 1 unreadable | 71 / 20 / 15 |
| LFM2.5-24B-A2B, thinking on (it cannot be turned off) | 145 / 1 / 41, 14 unreadable | 74 / 0 / 26, 6 unreadable |
| Qwen3.5-4B, thinking off | 134 / 12 / 55 | 69 / 6 / 31 |
A wrong choice is a capability where the teacher chose none or another one; the person being asked is not a wrong choice, since nothing runs that was not asked for. The general models write their answer with the sampling their own cards give, and it is read with the host application's own parser; unreadable means the parser found no answer in it. ToolChooser's answer is read as a decision (below), in a few short requests: the template, the tokenizer and the next-token probabilities along the options; a general model writes its answer in one.
Its sibling adapters load on the same base, each in a repository of its own: SemanticRepair-0.8B, which rewrites a message the router did not place, and QueryTranslator-0.8B, which writes a search request again in another language.
What is in this repository
| file | what it is |
|---|---|
qwen3.5-0.8b-base-2fc06364-q8_0.gguf | the base: Qwen3.5-0.8B at revision 2fc06364, Q8_0, 833,592,320 bytes, sha256 6a94a8273ab1fc5735743967b621eb5a3baba8e36a202f61c20dc47fbb80eb51 |
tool-chooser-0.8b-20261126-lora-f16.gguf | the adapter, F16 LoRA, 21,671,008 bytes, sha256 0641d5694676b2db13a1ef1c5c58f329b42bb880f518c667ed8dc12fad37f323 |
LICENSE | the base model's Apache-2.0 licence |
Pin the sha256 of both files: a routing decision has to be reproducible.
Where it runs
With llama-server:
llama-server -m qwen3.5-0.8b-base-2fc06364-q8_0.gguf \
--lora tool-chooser-0.8b-20261126-lora-f16.gguf \
--jinja --host 127.0.0.1 --port 9250 -ngl 99 -c 32768 --no-context-shift --cache-ram 0
When the base also carries its sibling adapters, each request names this one at full scale and the others at none.
When it is asked, and how it is read
It reads the base model's chat template (llama-server --jinja, thinking
off): a system message with the rules, and a user message listing the offered
capabilities, each with its title, its description and what it gives
(prose, tables, a chart, a page…), the documents the person selected, and the
message. The rules: choose by what the message asks for, not by the words it
shares with a title; when the person selected documents and the message asks
about what they hold, choose the capability that reads the selected
documents; otherwise choose one only when the message plainly asks for what
it gives and for nothing another one gives as well, and answer none when two
would answer it equally. Its trained answer is one Markdown item:
- capability: <one id from the list, or none>
Nothing is generated. For each offered capability and for none, the
host reads the probability of that whole answer, its end token included,
from llama-server's next-token log-probabilities (/completion with
n_probs), and normalizes them over the options. The likeliest capability is
taken only when its probability is at least 0.85; below that the person is
asked to choose. At 0.8 it takes four more of the teacher's choices on the 201
capability choices with no more wrong ones, but in the chat's routing chain as many
more wrong choices as right ones: 0.85 leaves those to the person.
| threshold | 201: the teacher's choice / the person asked / wrong | 106 |
|---|---|---|
| 0.75 | 184 / 15 / 2 | 92 / 12 / 2 |
| 0.8 | 184 / 15 / 2 | 92 / 12 / 2 |
| 0.85 | 180 / 19 / 2 | 90 / 14 / 2 |
| 0.9 | 177 / 22 / 2 | 90 / 14 / 2 |
What it is measured to do
201 capability choices, 146 Italian and 55 English, from conversation groups that share nothing with the training rows, each answered by the teacher, Qwen3.8-27B, with the rules above; in 116 of them the person had selected documents.
106 capability choices, 53 Italian and 53 English, answered by the teacher with the same rules but the one on selected documents.
In the chat's routing chain, behind SemanticRepair-0.8B, at the threshold above, each message asked in a chat with no earlier turn: on 100 test messages, 50 Italian and 50 English, right 73, wrong 14, the person asked 13; on 480 real Italian questions, right 183, wrong 18, the person asked 279 (most of them refer to a conversation or to documents the chat does not hold).
What it does not fix
It chooses only among what the router offered. A capability the router did not put in the contest cannot be chosen, however right it would be.
The descriptions alone often do not settle it. Without selected documents it leaves more choices to the person than with them: a description says what a capability gives, not every question it answers.
Measured in Italian and English.
The data it was trained on
108,313 training rows, 87,476 answered with a capability and 20,837 with none, all answered by the teacher with the rules above: capability choices recorded in conversations played through the application, those with selected documents answered again with the rule on selected documents, and the capability choices of 16,575 requests written for what the chat's capabilities give, routed by the application's own routing. 36,449 capability choices the teacher answered while documents were selected without the rule on selected documents are left out; so is an answer the host's own parser could not read, a request already kept, and every question a benchmark measures. The 201 capability choices of the table were taken out by conversation group before training, and the 106 stay out too. 1,060 rows of held-out people validate it.
Training
| base | Qwen/Qwen3.5-0.8B at 2fc06364, its language model only |
| method | LoRA with Unsloth, bf16, rank 16, alpha 16, dropout 0, on every linear layer of the language model (186 modules) |
| schedule | one pass: 6,770 updates of 16 examples (2 × 8 accumulated), learning rate 2×10⁻⁴, linear, 10% warm-up, weight decay 0.01, 8-bit AdamW |
| tokens | 108.3M in the examples, 759K of them in the answers |
| loss | on the answer only |
| hardware | one NVIDIA A100 64 GB of the Leonardo supercomputer in Bologna, thanks to CINECA |
| release | F16 LoRA GGUF |
It starts from the original base; it does not continue an earlier round.
Licence
Apache-2.0, as its base model Qwen3.5-0.8B. What it chooses is yours to check, and so is the responsibility for what you let it decide.