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 145
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.
Should AI alignment prioritize individual preferences, collective norms, or roles?- 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?
- 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?
- Does selecting examples from multiple complexity levels outperform selecting only high-quality examples?
- Why do models fail on logically equivalent tasks with different data distributions?
- Do different function-calling subtasks have different entropy profiles during training?
- Can smaller specialist models outperform large generalist models on domain tasks?
- Can granular function calling tasks learn composition from graph-sampled data?
- Does training on granular tasks beat training on the full function calling problem?
- How do task frequency and complexity interact with model capacity during training?
- How does per-step credit assignment improve small model performance on sequential tasks?
- When does the right constraint beat additional model capacity?
- 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?
- Can weaker models match stronger ones with sufficient search and reasoning budget?
- What architectural variables most improve inference efficiency today?
- Why does architecture matter more than training compute for inference efficiency?
- How does distributed inference enable models to run on weak hardware?
- How do larger models maintain more parallel tasks than smaller models?
- Does scaling model size solve compositional generalization problems?
- Does the optimal model size depend on what capabilities you actually need?
- Can smaller models actually perform well on specific downstream tasks?
- How can smaller models help select useful data for larger models?
- Why do smaller and larger models converge on different output formats?
- Why do production systems optimize for three model classes instead of foundation models?
- Why do smaller models favor code formats while larger models prefer natural language?
- Do small models show different parameter efficiency patterns than large models?
- How should tiny language models be architected differently than large ones?
- What filtering criteria best identify student-compatible refinements from teacher models?
- What makes a small surgical wide component sufficient with a capable deep model?
- Do different model sizes show different rates of optional field overfilling behavior?
- Does fine-tuning a small model match fine-tuning a large one?
- What output distribution properties make smaller models better for wide sampling?
- Why does the right structural prior matter more than raw model capacity?
- Does pretraining data size matter less than base model scale for finetuning?
- Can smaller models produce skill updates as useful as frontier model updates?
- Does small heterogeneous model architecture outperform large homogeneous pools economically?
- Can model compression size predict generalization better than parameter count?
- Can dense models match specialized architectures by mixing data better?
- Are architectural differences between models more detectable than size differences?
- Can task type alone predict which model size is sufficient?
- Do smaller models match Chinchilla-optimal performance when trained much longer?
- Can smaller language models match large model accuracy at lower total cost?
- Why do small language models show faster on-premise payback than large ones?
- When does task structure matter more than model size in low-resource settings?
- Do non-fine-tuned base models outperform these specialized models on finance tasks?
- Do tool-enabled reasoning models close the gap on constraint satisfaction?
- Why do open-source models trained on proprietary outputs still fail at reasoning?
- Does architectural design matter more than model scale for reasoning tasks?
- 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?
- Can cognitive scaffolding replace tool-based reasoning augmentation in language models?
- Why do smaller models lose reasoning faithfulness more than larger models?
- How does tool-based reasoning expand what language models can do?
- How does business logic specification replace annotated training datasets?
- Can specialized components replace single fully-trained models in deployment?
- How does model scale affect anticipatory behavior in structured training?
- Does curriculum-based training keep small models perpetually at their learning edge?
- Can signal quality regulations help smaller teachers outperform larger ones?
- How much alignment data does a language model actually need to specialize well?
- Does token-level loss aggregation help aligned models differently?
- Can weak models supervise the alignment of stronger models effectively?
- How do different training objectives compare in scaling favorably for alignment?
- Can fine-tuning ever teach semantic inference instead of amplifying training shortcuts?
- Why does NLI fine-tuning amplify frequency bias instead of teaching inference?
- Does fine-tuning models for specific tasks destroy their ability to reason?
- 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?
- Does fine-tuning improve domain accuracy at the cost of reasoning quality?
- Can prompt optimization inject new knowledge into language models?
- Does joint optimization of prompts and parameters outperform separate tuning?
- What architectural changes would let language models develop genuine functional competence?
- What substrate do supervised models lack that makes them weaker on low-resource languages?
- How can language models extract more value from fewer demonstrations?
- How does tool integration leverage comprehension without demanding perfect generation?
- Why do single function-calling benchmarks mask model weakness in specific areas?
- How do structured benchmarks differ from real-world software task performance?
- Can instance seeds work for tasks beyond language understanding benchmarks?
- How do general language model benchmarks predict specialized domain performance?
- How does evaluation setting affect measured reasoning capabilities in language models?
- Do smaller models optimized for benchmarks perform worse than their scores suggest in real tasks?
- Does knowledge structure matter more than knowledge volume for model training?
- What are the computational trade-offs between training-time vs inference-time consistency correction?
- How much does training data composition shape security model performance?
- Do instruction-tuned models learn tasks or just output format distributions?
- Why does instruction-following capability decrease as models scale stronger?
- Why do large models match small instruction-tuned models on few-shot tasks?
- Could better instruction-tuning overcome the 49% ceiling without changing parser architecture?
- Why do large language models outperform fine-tuned models once repeated items are removed?
- Can finetuning sparse subnetworks alone match full parameter finetuning results?
- 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?
- Why does parameter-efficient tuning scaling fail to improve finetuning performance?
- 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?
- Can routing enable smaller language models to replace larger ones across tasks?
- Can smaller LLMs perform tool use tasks through modular decomposition?
- Can code generation substitute for dynamic function calling in production workflows?
- Why do structure-targeted training negatives fail to fix the underlying problem?
- Why do different language models succeed on different queries?
- Can recursion alone drive generalization better than model scale?
- Can a tiny recursive network beat billion-parameter models on hard problems?
- Can externalized memory and skills replace model scaling?
- Does memory granularity need to match the task domain or the model size?
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
- Scalpel vs. Hammer: GRPO Amplifies Existing Capabilities, SFT Replaces Them
- VibeThinker-3B: Exploring the Frontier of Verifiable Reasoning in Small Language Models
- AI4AI at Test-Time: Strong-to-Weak Capability Transfer via Harnesses
- Echo Chamber: RL Post-training Amplifies Behaviors Learned in Pretraining
- LIMO: Less is More for Reasoning
- Rethinking "RL Generalizes, SFT Memorizes": The Role of SFT Data
- Learning to Reason for Factuality
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