Can small models match large models on function calling?
Explores whether small language models fine-tuned with the right training method can achieve comparable performance to large models on structured reasoning tasks requiring precise function calls, and what training approach makes this possible.
The insight in this paper is methodological: function-calling for reasoning tasks is a domain where DPO outperforms SFT for small models, because the failure modes are more about preferring the right format and call sequence than about generating any plausible text. The proposed framework uses an agent that, given a problem and a callable function set, queries a large LLM by injecting function descriptions and examples and managing calls in a step-by-step reasoning chain. The byproduct is a dataset of correct AND incorrect chat completions — preference pairs ready for DPO.
Why DPO rather than SFT or PPO. SFT teaches the model to imitate good examples but provides no signal about what to avoid — and rigid output formats (precise variable names, JSON, argument values) punish near-misses harshly, so explicit negative examples matter. PPO would work but requires extensive human feedback to train a reward model, making it resource-intensive. DPO removes the reward-model step by incorporating preferences directly into the training objective, with demonstrated stability advantages over PPO.
The structural move is that a large LLM does double duty: it generates the candidate reasoning chains AND its successes/failures provide the preference labels for the small model's training. This is a teacher-distillation pattern but with both polarities — the small model learns what the large model gets right and what it gets wrong, not just to imitate the large model's right answers. The pattern fits the broader case for Can small language models handle most agent tasks?: function-calling is exactly the kind of repetitive, scoped, format-rigid work where a fine-tuned small model can replace a large general-purpose one.
The practical implication: when output format is rigid and small-model deployment is the goal, the question is not "can SFT close the gap" but "what's the cheapest source of preference signal." Self-generated preference pairs from a strong teacher are essentially free relative to human feedback.
Inquiring lines that read this note 113
This note is a source for these research framings, grouped by the broader line of inquiry each explores. Scan the bold lines of inquiry; follow any specific question forward.
How can AI alignment serve diverse human preferences at scale?- Can communication problems and optimization problems be addressed with the same alignment approaches?
- Can preference trees structure alignment data for domains beyond math and code?
- Why does DPO outperform SFT specifically for function calling tasks?
- How does preference-based training compare to supervised fine-tuning for function calling?
- Can smaller judge models better capture human preferences than larger prompted models?
- Can granular sub-task training for function calling improve both open and proprietary models?
- How much of the combinatorial task space must training data cover?
- Do different function-calling subtasks have different entropy profiles during training?
- Does training on granular tasks beat training on the full function calling problem?
- When does the right constraint beat additional model capacity?
- How do larger models maintain more parallel tasks than smaller models?
- Does the optimal model size depend on what capabilities you actually need?
- Why do production systems optimize for three model classes instead of foundation models?
- Do small models show different parameter efficiency patterns than large models?
- How should tiny language models be architected differently than large ones?
- What makes a small surgical wide component sufficient with a capable deep model?
- Why does the right structural prior matter more than raw model capacity?
- Can input augmentation and rephrasing compensate for smaller model limitations?
- Can prompt optimization inject new knowledge into language models?
- Does joint optimization of prompts and parameters outperform separate tuning?
- Why do method-level improvements avoid the generation-verification gap that parameter-level improvements face?
- Why does AI code generation lag behind pattern-matching benchmarks?
- Can language models learn to form ad-hoc conventions through training?
- How much alignment data does a language model actually need to specialize well?
- What architectural changes would let language models develop genuine functional competence?
- Why do smaller models favor code formats while larger models prefer natural language?
- How does the generation-verification gap prevent language models from improving themselves?
- How does tool integration leverage comprehension without demanding perfect generation?
- Does scaling model size solve compositional generalization problems?
- Can granular function calling tasks learn composition from graph-sampled data?
- Can recursion alone drive generalization better than model scale?
- How does inference compute substitution affect the training parameter scaling trade-off?
- Can test-time scaling prioritize genuine reasoning over pattern matching?
- Does more inference compute help reasoning models match specialized domain performance?
- Can test-time compute on smaller models replace larger model inference?
- What architectural variables most improve inference efficiency today?
- Why does architecture matter more than training compute for inference efficiency?
- Do tool-enabled reasoning models close the gap on constraint satisfaction?
- How does tool-based reasoning expand what language models can do?
- Does selecting examples from multiple complexity levels outperform selecting only high-quality examples?
- Can smaller models actually perform well on specific downstream tasks?
- Why do models fail on logically equivalent tasks with different data distributions?
- Can instance seeds work for tasks beyond language understanding benchmarks?
- Can smaller specialist models outperform large generalist models on domain tasks?
- How can language models extract more value from fewer demonstrations?
- How do task frequency and complexity interact with model capacity during training?
- How does business logic specification replace annotated training datasets?
- Why do open-source models trained on proprietary outputs still fail at reasoning?
- Why does NLI fine-tuning amplify frequency bias instead of teaching inference?
- Why does distillation transfer reasoning patterns with few examples?
- What makes reasoning-specific post-training different from standard parameter scaling?
- How much does training composition affect syntactic versus reasoning performance?
- Can models maintain reasoning-output coupling while improving domain accuracy?
- Does task diversity in pretraining data transfer reasoning better than larger models?
- Can fine-tuning ever teach semantic inference instead of amplifying training shortcuts?
- Does supervised fine-tuning improve reasoning or just response formatting?
- Does fine-tuning improve domain accuracy at the cost of reasoning quality?
- Does fine-tuning models for specific tasks destroy their ability to reason?
- Why does instruction-following capability decrease as models scale stronger?
- How can smaller models help select useful data for larger models?
- What output distribution properties make smaller models better for wide sampling?
- Which RAG sub-decisions are actually pattern matching versus reasoning intensive?
- What are the computational trade-offs between training-time vs inference-time consistency correction?
- What training cost tradeoffs exist between fine-tuning and other knowledge injection methods?
- How do retrieval and fine-tuning trade off flexibility against training cost?
- Can small models solve complex tasks using externalized reasoning graphs?
- Why do language models struggle with formal logical reasoning and joins?
- Can reasoning in free text then formatting separately recover performance?
- Why do smaller LLMs fail at zero-shot argument scheme classification?
- Can cognitive scaffolding replace tool-based reasoning augmentation in language models?
- Why do smaller models lose reasoning faithfulness more than larger models?
- Can a tiny recursive network beat billion-parameter models on hard problems?
- Do instruction-tuned models learn tasks or just output format distributions?
- Why do structure-targeted training negatives fail to fix the underlying problem?
- Why do smaller and larger models converge on different output formats?
- Can finetuning sparse subnetworks alone match full parameter finetuning results?
- Does fine-tuning a small model match fine-tuning a large one?
- Can specialized components replace single fully-trained models in deployment?
- Why does parameter-efficient tuning scaling fail to improve finetuning performance?
- Does pretraining data size matter less than base model scale for finetuning?
- How does model scale affect anticipatory behavior in structured training?
- How do routers decide when to escalate from small to large models?
- Can multiple small models outperform a single large model with good routing?
- Why might diverse smaller models with routing beat one giant model?
- What makes routing a better investment than training larger models?
- How do pre-training and distillation enable minimal routing signals to work?
- Does small heterogeneous model architecture outperform large homogeneous pools economically?
Related concepts in this collection 5
This note in its neighbourhood — explore the map, then jump to a related concept in the list below.
Click a node to walk · click center to open · click Open in graph to see this note in the full knowledge graph
-
Can small language models handle most agent tasks?
Explores whether smaller, cheaper models are actually sufficient for the repetitive, scoped work that dominates deployed agent systems, rather than relying on large models by default.
exemplifies: function-calling is the canonical repetitive-scoped-format-rigid task where SLM-first architectures pay off; DPO-from-teacher is one viable training recipe.
-
Can breaking function calling into subtasks improve model generalization?
Does training on seven granular function-calling subtasks instead of one umbrella objective close the gap between open-source and proprietary models? This explores whether decomposition surfaces hidden failure modes that unified training misses.
complements: Granite argues granular sub-task training closes the open-vs-proprietary gap on the *what to train on* axis; this note argues DPO-from-teacher closes the gap on the *how to train* axis. Both target the same problem (open-source function-calling lags proprietary).
-
Where do traditional function calling systems actually break down?
Function calling seems simple but fails in ways that aren't obvious. This explores three independent failure points—retrieval, context bloat, and output rigidity—that together explain why even the best models struggle.
extends: Floworks names rigid output format as one of three failure points; this note shows DPO-with-negative-examples is a targeted intervention against the format failure mode specifically.
-
Does teacher-refined data always improve student model performance?
Explores whether higher-quality training data from teacher models uniformly benefits student models, or if compatibility with the student's current learning state matters for effective instruction.
complicates: teacher-distillation effectiveness depends on student-teacher compatibility; preference-pair distillation may inherit this dependency.
-
Why do alignment methods work if they model human irrationality?
DPO and PPO-Clip succeed partly by implicitly encoding human cognitive biases like loss aversion. Does modeling irrationality explain their effectiveness better than traditional preference learning theory?
extends: explains *why* DPO's negative-example signal works — it implicitly models loss aversion, which is exactly the asymmetry rigid output formats impose.
Related papers in this collection 8
Papers most semantically related to this note, ranked by cosine similarity in the embedding space.
- Improving Small-Scale Large Language Models Function Calling for Reasoning Tasks
- VibeThinker-3B: Exploring the Frontier of Verifiable Reasoning in Small Language Models
- Echo Chamber: RL Post-training Amplifies Behaviors Learned in Pretraining
- Learning to Reason for Factuality
- OCC-RAG: Optimal Cognitive Core for Faithful Question Answering
- A Survey on Post-training of Large Language Models
- Beyond Accuracy: Evaluating the Reasoning Behavior of Large Language Models -- A Survey
- A Survey on Test-Time Scaling in Large Language Models: What, How, Where, and How Well?
Original note title
DPO-trained small models can match large models on function-calling reasoning chains — preference data from a teacher beats SFT for the rigid output format