Fine-Tuning a Small Model vs GPT-4o for Function Calling: Small Wins Single Calls, Loses Multi-Step Work
Benchmarks show fine-tuned 1B to 8B models matching GPT-4-class models on single tool calls over a fixed tool set. They fall behind on multi-step and open-ended tasks, and GPT-4o itself retires on January 14, 2027.
A fine-tuned small model can match GPT-4o at function calling when the job is one call, picked from a fixed set of tools, in a format the model was trained on. In the published benchmarks, 1B to 8B models trained for tool use score level with GPT-4-class models on single calls, then fall well behind once tasks need several dependent calls, missing tools or long sessions. The comparison is also on a clock: OpenAI retires GPT-4o and its fine-tunes on January 14, 2027, and its recommended replacement, gpt-6-luna, costs less than GPT-4o mini, which weakens the cost case for fine-tuning a small model unless your volume is very high.
Why single calls are the easy part
Function calling is really two skills. The first is formatting: reading a schema and emitting a valid call with the right argument names and types. The second is judgement: deciding which tool fits a vague request, whether any tool fits, and what to call next after a result comes back. Fine-tuning a small model is very good at teaching the first skill and much weaker at teaching the second.
The clearest evidence is the Berkeley Function Calling Leaderboard (BFCL), which scores single-call and multi-turn tasks separately. On its V4 leaderboard, last updated April 12, 2026, Qwen3-8B scores 87.58% on the non-live AST tests, which check calls made in a single turn, and Qwen3-4B-Instruct-2507 scores 87.88%. In the same native function-calling mode, GPT-4.1 scores 82.79% on those tests, GPT-5.2 81.85% and Claude Opus 4.5, the top model overall, 88.58%. On single-turn calls, model size barely matters.
The multi-turn columns tell a different story, and they are where tool-tuned small models split from untuned ones. Salesforce's xLAM-2-8b-fc-r, an 8B model trained specifically for tool use, scores 70.00% on BFCL's multi-turn tests, ahead of Claude Opus 4.5 at 68.38% and far ahead of GPT-5.2 at 28.12%. The general-purpose Qwen3-8B manages 41.75%, Qwen3-1.7B 11.00% and Qwen3-0.6B 3.62%. Then the same xLAM model scores 6.50% on BFCL's agentic web-search tasks and 13.98% on memory tasks, against 84.50% and 73.76% for Claude Opus 4.5. The pattern is what fine-tuning predicts: the model is strong on the kind of task it was trained for and weak on the kinds it was not.
What the older head-to-heads with GPT-4o showed
GPT-4o itself is not on the V4 leaderboard, so the direct comparisons come from 2024 papers on older BFCL versions.
The GLM-4 paper, revised July 30, 2024, lists GPT-4o (2024-05-13) at 82.94% overall, GLM-4-9B-Chat at 81.00% and an untuned Llama-3-8B-Instruct at 58.88%. The Hammer paper, using the leaderboard as of September 20, 2024 (BFCL v2), reports its function-calling-tuned Hammer-7B at 83.92%, against 83.35% for GPT-4o mini and 83.13% for GPT-4o (2024-05-13) in prompt mode. Those snapshots predate BFCL's multi-turn and agentic categories, which is why small models looked level with GPT-4o: the benchmark was then mostly testing single calls.
TinyAgent is the strongest narrow-task result. It fine-tuned models for a desktop assistant with 16 functions covering email, contacts, calendar, notes and similar tools. A 1.1B model went from 12.71% to 78.89% success, and a 7B model from 41.25% to 83.09%, against 79.08% for GPT-4-Turbo. Its metric is strict: a plan counts only if it calls the right set of functions with the right dependency graph. But the comparison is with GPT-4-Turbo, not GPT-4o, and the 16 tools never change.
Where small models break as the tool set grows
The papers converge on two pressure points: more tools to choose from, and more steps per task.
OpenAI's own fine-tuning cookbook warns that as the number of functions and the task complexity grow, "function calling becomes less accurate," with more hallucinated and incorrect calls. CallNavi, revised April 24, 2025, tests exactly that, with 729 questions over 579 APIs and up to 115 candidate APIs per question. On single-call questions, GPT-4o picked the right API 97.8% of the time and Llama 3.1 8B 91.6%. On hard questions with dependent calls of up to five steps, GPT-4o fell to 61.1% and Llama 3.2 3B to 40.0%. The fine-tuned Gorilla v2 7B scored 61.6% on single calls and 0.5% on multi-API questions. The authors conclude that models under 10B parameters "exhibit instability, often producing inconsistent or incomplete outputs."
The exact tool count at which GPT-4o pulls ahead of a fine-tuned small model has not been measured on a single harness. TinyAgent's workaround suggests the answer is to avoid the question: its retrieval step showed the model about four relevant tools per query instead of all 16, cut the prompt from 2,762 to 1,397 tokens, kept recall at 0.998 and slightly raised success.
How fine-tunes fail, and the fixes that worked
Fine-tuning can break tool calling as easily as fix it. In September 2024 a developer on OpenAI's forum reported that a fine-tuned gpt-4o-mini stopped calling their functions under tool_choice='auto', while the base model called them correctly; forcing calls sometimes returned "The model has produced invalid content." The thread never confirmed a fix.
The Small Models, Big Tasks study, published April 27, 2025, shows how uneven results are. Trained on 55,000 examples from Salesforce's xLAM dataset, Phi-3-mini went from 0% parsable JSON to 99.62%, with 87.27% task accuracy. Three other 3B-class models, Phi-2, Starcoder2-3B and Stable-code-3B, still produced no parsable output after fine-tuning. The authors name format adherence as the main barrier. The practical lesson is to start from a model already trained for tool calls and to test JSON validity before anything else.
Two training fixes have published evidence behind them. Hammer added 7,500 "irrelevance" examples, in which the correct tool is removed and the right answer is no call at all, and found about 10% of such data worked best; that teaches a model not to call tools it should not. Hammer also replaced function and parameter names with random strings during training, so the model learns from descriptions rather than names. In its tests, xLAM-1B-fc dropped significantly when tool names were obfuscated, and Hammer much less, though the paper gives no exact figures. That is the closest any study comes to measuring what happens after a schema change; accuracy after a real schema change without retraining has not been measured.
How much data parity takes
The published recipes use far more examples than most teams have logged. TinyAgent trained on 80,000 synthetic examples generated by GPT-4-Turbo for about $500. Hammer started from Salesforce's 60,000-example xLAM dataset. OpenAI's cookbook generated its training data with GPT-4o and fine-tuned gpt-3.5-turbo, which went from correctly declining 6 of 10 challenging requests to all 10. How many logged production examples a team needs to reach parity with GPT-4o on its own tools has not been measured.
Parsec, a small language model lab, sells this loop as a managed service: its inference page describes tracing production requests, building datasets and evaluations the customer approves, training with SFT or LoRA, and serving, with low-confidence requests sent to a closed frontier model. It says the weights are the customer's to download and that a first post-trained model takes "about 4 weeks," a figure given without a baseline. It publishes no price for the service and no function-calling benchmark.
The cost case after GPT-4o
OpenAI's deprecations page sets January 14, 2027 as the shutdown date for GPT-4o, GPT-4o mini and their fine-tunes, and job creation for fine-tuning ends for remaining customers on January 6, 2027. Its pricing page says fine-tuning is "closed to new users." The recommended replacement, gpt-6-luna, supports function calling but not fine-tuning.
Take one million calls a month, each with 1,500 input tokens of schemas and request and 100 output tokens, at list prices with no caching. GPT-4o costs $4,750 a month ($2.50 input, $10.00 output per million tokens), or $4.75 per 1,000 calls. GPT-4o mini costs $285. gpt-6-luna costs $200 at $0.10 and $0.50, assuming reasoning is off, which OpenAI's model page says Chat Completions requires for function calling. A fine-tuned 8B model on one Together H100 dedicated endpoint at $5.49 an hour costs $3,952.80 for a 720-hour month whatever the traffic. Training is minor: 20,000 examples of 1,600 tokens over three epochs is 96 million tokens, or $32.64 at the $0.34 per million Together's pricing page lists for Llama 3.1 8B supervised fine-tuning, assuming each epoch is billed. The page also lists a $0.38 rate for the same models without saying which applies to LoRA, which would make it $36.48.
Against GPT-4o, the dedicated GPU breaks even at about 832,000 calls a month. Against gpt-6-luna, it takes about 19.8 million. Whether one H100 handles that load, and its p50 and p95 latency under it, has not been measured. If GPT-4o's behaviour is the bar a replacement must match, record its answers on your logged requests now, while it can still be measured. For reference, BFCL records mean and p95 latency of 1.32 and 2.40 seconds for GPT-4.1 mini and 2.23 and 5.26 seconds for GPT-5.2.
Bottom line
If your product calls a small, stable set of tools once per request at high volume, or must run on-device or inside your own network, fine-tune a model already trained for tool use (Qwen3 or xLAM-2 class; BFCL lists xLAM-2 and Hammer 2.1 7B under a CC BY-NC 4.0 licence, while Qwen3 is Apache 2.0), add irrelevance examples, and switch only when it matches the API model on your own logged test set. If requests are open-ended, chain several calls or use tools that change often, stay on an API model. If you are on GPT-4o today, plan the move before January 14, 2027, and price gpt-6-luna before you price a GPU.
Sources
- OpenAI, Deprecations: https://developers.openai.com/api/docs/deprecations
- OpenAI, API pricing: https://developers.openai.com/api/docs/pricing
- OpenAI, GPT-6 Luna model page: https://developers.openai.com/api/docs/models/gpt-6-luna
- OpenAI Cookbook, Fine tuning with function-calling: https://developers.openai.com/cookbook/examples/fine_tuning_for_function_calling
- OpenAI Developer Community, Fine-Tuning & Function Calling: https://community.openai.com/t/fine-tuning-function-calling/934980
- Berkeley Function Calling Leaderboard: https://gorilla.cs.berkeley.edu/leaderboard.html
- BFCL leaderboard data (overall): https://gorilla.cs.berkeley.edu/data_overall.csv
- BFCL code and data (GitHub): https://github.com/ShishirPatil/gorilla/tree/main/berkeley-function-call-leaderboard
- TinyAgent: Function Calling at the Edge (arXiv 2409.00608): https://arxiv.org/html/2409.00608v3
- Hammer: Robust Function-Calling for On-Device Language Models via Function Masking (arXiv 2410.04587): https://arxiv.org/html/2410.04587v2
- ChatGLM: A Family of Large Language Models from GLM-130B to GLM-4 All Tools (arXiv 2406.12793): https://arxiv.org/html/2406.12793
- Small Models, Big Tasks (arXiv 2504.19277): https://arxiv.org/html/2504.19277v1
- CallNavi (arXiv 2501.05255): https://arxiv.org/html/2501.05255v2
- Together AI, Pricing: https://www.together.ai/pricing
- Parsec, Inference: https://parseclab.ai/inference/
- Parsec vs routers: https://parseclab.ai/compare/routers/