LIVE · Thursday 3 December

Which Small Model Can Pick the Next Tool On-Prem? 2026 Guide to Qwen3.5, Granite 4.2, xLAM-2, FunctionGemma

For a commercial agent, start with Apache 2.0 Qwen3.5 4B or 9B or Granite 4.2, keep a larger local model as the fallback, and test on your own traces. A first test costs about $41 in rented compute.

By Nick7 min read

For a commercial agent that must choose its next tool on-prem, start with Qwen3.5-4B or Qwen3.5-9B, or with IBM's Granite 4.2 3B or 8B. All four are small open models under Apache 2.0, and their makers report BFCL-V4 tool-calling scores between about 50 and 66. Salesforce's xLAM-2 has the best published multi-turn result at small sizes, but its licence limits it to research. Google's 270M FunctionGemma suits a small, fixed tool set once you fine-tune it. No public benchmark has measured any of these models on choosing the next tool inside a running agent loop, so a short test on your own logged decisions should make the final choice.

The right model depends on four facts about your agent

Four facts about your agent decide which model to start with:

  1. The licence that your product needs comes first. A commercial product needs Apache 2.0, MIT or terms that your lawyers accept, and that requirement removes xLAM-2.
  2. The number and stability of your tools decide whether fine-tuning a very small model is worth it. A fixed set of a dozen tools suits a fine-tuned small model, and a changing set suits a larger general one.
  3. The length and variety of your conversations decide how much general skill the model needs. Long multi-turn sessions are where small general models score worst on public tests.
  4. The memory on your local GPU limits the model size, and it must also hold a fallback model for doubtful turns.

Each candidate fits a different situation

Each candidate has a different kind of published evidence. Alibaba and IBM report their own BFCL-V4 scores on their model cards. The xLAM-2 figure comes from Berkeley's leaderboard, which was last updated on April 12, 2026. Scores from different runs should not be ranked against each other by a few points.

Situation Model and licence Published evidence 4-bit file, Q4_K_M
Long, varied conversations Qwen3.5-9B, Apache 2.0 BFCL-V4 66.1, from Alibaba 5.68 GB
Limited GPU memory Qwen3.5-4B, Apache 2.0 BFCL-V4 50.3, from Alibaba 2.74 GB
Preference for an enterprise vendor Granite 4.2 8B or 3B, Apache 2.0 BFCL-V4 52.39 and 52.41, from IBM 5.35 GB and 2.24 GB
Research or internal testing only xLAM-2-8b-fc-r, CC BY-NC 4.0 Multi-turn 70.00%, from Berkeley 4.92 GB
Small, fixed tool set FunctionGemma 270M, Gemma terms Mobile Actions 58% to 85% after fine-tuning, from Google 0.25 GB

Qwen3.5-9B is a sensible default for most teams, because it has the highest score that its maker publishes among the Apache 2.0 options. Alibaba also reports 79.1 for it on TAU2-Bench, an agent test with simulated users. Qwen3.5 models run in thinking mode by default, so you may want to turn that mode off for a fast routing step.

Qwen3.5-4B is the floor for a general model without fine-tuning. Below it, Alibaba's own scores fall to 43.6 for the 2B model and 25.3 for the 0.8B model. Alibaba also warns that the 2B model "is more prone to entering thinking loops."

Granite 4.2 suits teams that prefer IBM as the vendor. IBM released it on August 25, 2026. Its two small sizes score almost the same on BFCL-V4, so the 3B model gives most of the result at less than half the file size. IBM recommends the same qwen3_coder tool parser in vLLM that Alibaba recommends for Qwen3.5.

xLAM-2 is useful as a reference point in your test, even if you cannot ship it. Salesforce trained it on simulated multi-turn conversations, and its 8B model has the highest multi-turn score of any model of 9B parameters or fewer on Berkeley's board. Salesforce's model card describes the release as "for research purposes only."

FunctionGemma is the smallest option. Google's model card describes it as "intended to be fine-tuned for your specific function-calling task, including multi-turn use cases." Google's Mobile Actions dataset has about 9,650 examples, but Google does not say how many of them produced the 85% result.

Microsoft's Phi-4-mini is a possible fifth option, with 3.8B parameters, an MIT licence and built-in tool tokens. Microsoft publishes no Berkeley score for it, and Berkeley's board has no row for it, so its tool-choice accuracy has not been published.

Decision models suit teams that need a probability for every option

A decision model scores each allowed option and returns a probability, instead of writing a tool call as text. That output fits a confidence threshold directly. Cloudflare's Clef-flash, released on October 1, 2026, is built on Qwen3.5-9B and has Apache 2.0 weights that can run locally. Cloudflare publishes no calibration score and no result for choosing tools in an agent loop.

Parsec's TOD works the same way. It ranks the next action from a list of allowed actions and passes a turn to the main model when its confidence is low. According to Parsec's TOD page, its median model pass takes 69 ms on one H100 GPU. The published weights are LoRA adapters on Google's Gemma 4 12B, which needs the Gemma 4 licence and more memory than the other options here. The TOD page does not describe on-prem deployment, so a local setup means running the published adapters yourself.

Every setup needs constrained decoding and a local fallback

Constrained decoding forces each output to match the JSON schema of your tools. The vLLM server applies it when you name a function or set tool_choice="required". The vLLM developers describe the result as "a validly-parsable function call - not a high-quality one." A single-author study posted to arXiv on September 20, 2026 found that the XGrammar library removed every schema failure on 14 tasks for five small models. It added 4 to 8 milliseconds of compile time per schema.

Teams that serve through llama.cpp need the --jinja flag on llama-server for tool calls. The llama.cpp developers warn that extreme cache quantization such as -ctk q4_0 "can substantially degrade the model's tool calling performance."

A fallback for low-confidence turns must stay on your premises. If those turns go to an external API, the hardest cases carry customer data out. The accuracy of each model at high confidence has not been measured publicly, and neither has the share of turns that each could take at 95% precision. Your own test has to set the threshold.

The router is also only one of several places where customer data travels. Each of the following paths must stay local for the privacy goal to hold:

  • The tool arguments that the router writes go to whichever service the tool calls.
  • The tool results come back into the context and travel with it to any later model call.
  • The reply and summary steps see the whole context, so they must also run on a local model.
  • The traces that you label for training contain customer data, so off-site fine-tuning needs scrubbed data.

A test of three candidates costs little compared with one month of an always-on GPU

A first test can be costed in five steps. The estimate uses list prices from Together's pricing page as a stand-in for your own hardware, which you would use for any unscrubbed data. The assumptions are stated in each step.

  1. Assume that you label 3,000 logged decisions at one minute each. That is 50 hours of a reviewer's time.
  2. Assume that serving and scoring Qwen3.5-9B, Qwen3.5-4B and Granite 4.2 8B takes one working day of GPU time, or 8 hours. On Together's on-demand H100 cluster at $3.99 an hour, that is $31.92. The speed of each model has not been measured, so the 8 hours is an assumption.
  3. Assume that each labelled decision has 3,000 tokens of context, and that you fine-tune Qwen3.5-4B for three passes over the data. That is 27 million tokens. At Together's listed $0.34 per million tokens, the job costs $9.18, or $10.26 at the $0.38 rate in its second table.
  4. For production, a 4B router with a 9B fallback needs 2.74 GB plus 5.68 GB, or 8.42 GB, for the 4-bit weights. The cache for long conversations adds memory that has not been measured.
  5. For comparison, one dedicated H100 kept running all month costs 720 hours at $5.49, or $3,952.80, on Together's list.

On these assumptions, the compute for the test costs about $41. The reviewer's 50 hours are the largest cost. That balance means that the labelled set is the main investment, and it stays useful for every later model that you test.

Berkeley's BFCL code runs locally served models through vLLM or SGLang, and it accepts a new model handler. Teams can use it as the harness for this test and replace the public cases with their own labelled traces.

Sources

More in Models

All Models →