Engineering

Small Language Model vs Frontier Model: When Each Wins

Taran Srivastava

Senior Product Manager

September 25, 202625 min read

This blog gives you the boundary with numbers attached: where a small language model matches or beats a frontier model, the exact step where it stops, five teams that split their workloads and what each one measured, and a migration path that keeps quality flat while the bill drops.

What counts as a small language model and a frontier model in 2026?

A small language model (SLM) is a model small enough to serve on a single GPU, a workstation, or a phone. Most practitioners draw the line at roughly 1B to 14B parameters, and for mixture-of-experts (MoE) models they count active parameters per token, which is why Qwen3-30B-A3B, with 3B active, is usually filed as small. A frontier model is the current top tier from the large labs (the GPT-5.x, Claude Opus, and Gemini Pro families), served over an API and priced per token.

Two things make the boundary fuzzy, and both matter for your decision.

Small models now reach old frontier scores on targeted tasks

Microsoft's 14B Phi-4 scores 82.6 on HumanEval, ahead of the 70B Llama-3.3 on code, and Phi-4-reasoning-plus reaches 77.7% on AIME 2025, level with the 671B DeepSeek-R1 on that benchmark. The rough rule practitioners use: a 3B to 14B model today matches what a 70B model did 12 to 18 months ago on a narrow task. That gain comes from training on curated synthetic data and distilling from larger teacher models, which also explains why it shows up on targeted tasks first.

Open-weight models sit a few months behind the frontier

The mid-size open-weight tier (GLM, Kimi, Qwen, DeepSeek) now trails closed frontier models by months. Commentators quoted by The New Stack put the gap at about four months, at a fraction of the per-token price. For this guide, "small language model" means the 1B to 30B band you can fine-tune and self-host, and "frontier" means the top closed tier you rent by the token.

Why are AI engineers comparing small language models and frontier models right now?

You usually arrive at this comparison because the model bill started growing faster than usage, and the obvious fix (switch everything to a cheaper model) feels risky. Three pressures are behind it, and each one points to a different part of your stack.

Per-token prices fell, and bills rose anyway

Headline API prices dropped about 80% between early 2025 and early 2026, yet reasoning tokens are billed as output and often run 3 to 5 times the length of the visible answer. Agent conversations also grow with every turn: one documented Claude conversation went from $0.0018 at turn 1 to $2.41 by turn 260, a 1,339x increase from accumulated history alone. If you want the line-by-line breakdown of where that money goes, the LLM inference cost guide shows how cache reads came to dominate one agentic coding bill.

Reasoning tokens and accumulated history driving up agent bills while per-token prices fall

Reasoning tokens and accumulated history are why bills rise while per-token prices fall. Source: Towards Data Science.

Agents multiplied the number of calls per request

A single user action in an agent can trigger ten or twenty model calls: a lookup, a parse, a tool call, a check. On Anthropic traffic routed through OpenRouter, the share of requests that ended in a tool call rose from under 5% to well over 25% in about a year. Each of those short, structured calls is billed at the frontier rate when one model runs the whole pipeline.

NVIDIA estimate that about 60% of MetaGPT's model queries could run on specialized small models

NVIDIA estimates about 60% of MetaGPT's model queries could run on specialized small models. Source: arXiv 2506.02153.

Data rules and latency budgets narrowed the options

Regulated teams in health, legal, and finance increasingly want certain data to stay inside their own environment, and EU AI Act obligations for high-risk systems add documentation and control requirements on top. Latency adds a second constraint: a local small model returns its first token in about 50 to 200 ms, against 200 to 800 ms for a typical cloud call, which decides the question for autocomplete and voice before cost enters the picture.

So the comparison you are running is usually a per-step question inside a pipeline you already have: which of these calls is paying for capability it never uses?

How do small language models and frontier models compare side by side?

The table below compares the two on the dimensions that decide production choices. Every row is sourced in the sections that follow.

Decision factorSmall language model (1B to 30B, often fine-tuned)Frontier model (top closed tier)
Narrow classification and extractionMatches or beats the frontier after fine-tuning. A 0.5B model hit 91.7% on a simple classification task where a 72B model scored 88.6%Strong zero-shot, paid at full rate on every call
Single tool calls and routingEquivalent: the best open-weight model scored 96% against GPT-5's 98% on single-tool tasksEquivalent
Branching and multi-source reasoningFalls off a cliff above two chained stepsAlso unreliable: 51% on branching, 42% on multi-source tasks
Long-horizon planning0% to 16% on 8 to 12 step constrained plansAhead, but only 10%
Large-codebase codingBest 30B coder models reach about 50% on SWE-bench VerifiedClaude Opus 4.6 reports 80.8%
Latency to first token50 to 200 ms locally200 to 800 ms over the network
Cost per passed task (agent tools)$0.00046 to $0.0022 self-hosted$0.0327 for GPT-5 at list price
Data residency and version pinningWeights, data, and inference stay in your environment; nobody swaps the model under youDepends on vendor retention terms and deprecation schedule
Setup effortEval set, training data, serving, drift monitoringAn API key
Volume where it pays offMore than 10 requests a second on one narrow taskUnder about 100 to 1,000 requests a day across varied tasks

Sources: Forbes on task-specific model benchmarks, AgentFloor, Towards Data Science.

The pattern in the table is the core of this guide. Small models win the rows where the task is narrow and the answer is checkable. On the rows where a step has to reason across several results, neither model type is reliable enough to ship on its own, which is where the harness around the model starts to matter more than model size.

Where does a small language model actually beat a frontier model?

A small language model beats a frontier model when the task is narrow, the output format is fixed, and you have examples of the right answer. Under those three conditions, fine-tuning concentrates the model's capacity on one job, and you stop paying for general knowledge on every call.

Classification, extraction, and summarization at volume

Fine-tuned small models consistently outperform larger zero-shot models on text classification. One study compared GPT-3.5, GPT-4, and Claude Opus against fine-tuned small models across sentiment, stance, and emotion tasks and found fine-tuning won in all cases. The cost gap at volume is large: in benchmarks reported by Forbes, a system producing 10,000 summaries a day cost about $7.20 with a task-specific model versus $58 with GPT-4.1 Mini, and human evaluators could not tell the outputs apart.

Single tool calls, parsing, and routing decisions

Inside an agent, most calls are "pick the tool and fill the arguments." On the AgentFloor benchmark, which ran 16 open-weight models from 0.27B to 32B against GPT-5 across 16,542 scored runs, a 3B model cleared an 80% reliability bar on single-tool calls, and the best open-weight model was formally equivalent to GPT-5 on that tier. That makes the routing layer itself a good small-model job: ML.ai's own tuned model tier, ML.ai Research, ships in 300M to 8B sizes for exactly this kind of intent, routing, PII, and extraction work.

Latency-bound and privacy-bound features

Autocomplete, voice turn-taking, and in-editor suggestions need first tokens in under 100 ms, which a cloud round trip rarely delivers. Regulated data (health, legal, finance) often cannot leave your environment at all. In both cases the small model wins by default, because the frontier option is ruled out before quality is compared.

Structured output that has to parse every time

A small model with constrained decoding (grammar-based tools such as Outlines or XGrammar) reaches 99%+ schema validity on structured output. For a downstream parser, a model that returns valid JSON every time is worth more than a smarter model that occasionally drifts.

Where does the frontier model still win?

The frontier model still wins when a step depends on reasoning across results it has not seen yet, when the context is very long, and when the work is too varied or too rare to justify training anything. It is also the right place to start any task whose definition of "good" is still unsettled.

Branching, multi-source synthesis, and long plans

The steps where an agent has to branch on an intermediate result, reconcile conflicting sources, or keep constraints intact across 8 to 12 tool calls are where small models drop off. They are also where frontier models score far lower than their marketing suggests, which the next section quantifies.

Frontier-grade coding across large codebases

As of mid-2026, Claude Opus 4.6 reports 80.8% on SWE-bench Verified, while the best 30B coder models top out around 50%. Cross-file refactors, unfamiliar repositories, and debugging that needs a hypothesis still belong on the top tier, or behind a verification loop that checks the work.

Context beyond 128K tokens and broad world knowledge

Small models lose coherence past about 128K tokens and have thinner coverage of languages outside English and Chinese. Customer support across long-tail languages, or research over a large document set, stays on the frontier.

Low volume and moving requirements

Under roughly 1,000 requests a day across varied tasks, the API is cheaper once you count engineering time. AI engineer Sara Nóbrega puts the threshold plainly: "Don't fine-tune a small model to save $20 a month." A model tuned to last month's task is also brittle when the task changes, so anything still being redesigned should run on the frontier until it settles.

Where exactly is the boundary between a small language model and a frontier model?

The boundary sits between a two-step tool chain and the first step that has to branch on an intermediate result. We re-analyzed the per-tier results AgentFloor published for 16 open-weight models (0.27B to 32B) and GPT-5, counting how many models clear an 80% task-completion rate at each rung of the tool-use ladder.

Small models match GPT-5 through two-tool chains; above the cliff, neither side clears 80%

Small models match GPT-5 through two-tool chains. Above the cliff, neither side clears 80%.

Here is what that count shows:

TierWhat the step requiresOpen-weight models at 80% or higher (of 16)Best open-weight scoreGPT-5 score
A0Follow instructions, no tools7100%80%
AOne tool call896%98%
BTwo tools, output of one feeds the other384%82%
CBranch on an intermediate result059%51%
DCombine several sources, recover from conflicts036%42%
EPlan across 8 to 12 calls under persistent constraints016%10%

Method: counts derived from the per-model, per-tier task-completion table in the AgentFloor preprint (May 2026). Best open-weight score is the top of 16 models on that tier; the best model differs by tier.

Three conclusions follow, and the third is the one most comparisons miss.

First, the bottom three rungs are small-model territory. Instruction following, single tool calls, and short two-tool chains cover the bulk of calls in a typical agent, and at least three open-weight models clear 80% on each.

Second, there is a cliff between B and C. No open-weight model in the corpus clears even a 60% bar on branching, multi-source, or long-horizon tiers without a model-specific intervention.

Third, the frontier model does not clear the bar above the cliff either. GPT-5 scored 51%, 42%, and 10% on tiers C, D, and E. Routing the hard tail to a frontier model therefore leaves it unreliable.

What moves those tiers is the loop around the model: retries, verification against tests, and checks on the final action. In the AgentFloor ablations, adding one explicit instruction to submit the final decision moved one 8B model from 0 of 5 to 5 of 5 on a long-horizon task, while the same change did nothing for GPT-5.

Phil Whittaker, a staff engineer at Umbraco, made the same point to The New Stack: "Results also come from the quality of the harness that is driving the model." Model size decides the cost of the easy steps. The harness decides whether the hard steps succeed.

The AgentFloor preprint: 16 open-weight models against GPT-5 across 16,542 scored runs

The AgentFloor preprint: 16 open-weight models against GPT-5 across 16,542 scored runs. Source: arXiv 2605.00334.

How have real teams split work between small language models and frontier models?

Five teams below each moved part of a workload off a frontier model. Read them for the shape of the decision: which step moved, what they measured before cutting over, and what stayed on the big model.

Checkr, Intercom, NVIDIA and Palantir, Faros and NeoSapien, with the number each one measured

Checkr, Intercom, NVIDIA and Palantir, Faros and NeoSapien, with the number each one measured.

Checkr: a fine-tuned 8B model for the hardest 2% of background checks

Checkr's routine records were already handled by classic ML, but the messiest 2% of cases had to be sorted into 230 categories, and GPT-4 struggled with them. The team fine-tuned Llama models on thousands of past adjudications. A fine-tuned Llama-3-8B-instruct reached 90% accuracy on those hardest cases, beat GPT-4, returned answers in 0.15 seconds (30x faster than their GPT-4 tests), and cut inference cost 5x. An earlier Llama-2-7B run had already reached 97% on the easier data and 85% on the messy data.

What to copy: they picked a fixed label set, trained on their own historical decisions, and upgraded the base model when a better one shipped (the jump from 85% to 90% came from swapping Llama-2 for Llama-3, with the same data).

Checkr's fine-tuned small model reached 97% on routine data and 85% on messy data

Checkr's fine-tuned small model reached 97% on routine data and 85% on messy data. Source: Computerworld.

Intercom: roughly $250K a month moved off a frontier model

Intercom moved a high-volume support workload from a frontier model onto a smaller open model and cut roughly $250K a month, as Fergal Reid described on the Chain of Thought podcast. The explainer drawn from that episode names the trigger: a single, well-scoped task dominating the bill, with a right answer stable enough to tune against. It also recommends a prototype-then-shrink order, where the frontier model defines what a good answer looks like before any small model is trained.

Worth copying: prototype on the frontier, write the eval from what "good" looks like there, and only then shrink. Committing to a small model before you know the target means optimizing for a bar nobody has set.

The prototype-then-shrink pattern and Intercom's roughly $250K monthly saving

The prototype-then-shrink pattern and Intercom's roughly $250K monthly saving. Source: Chain of Thought.

NVIDIA and Palantir: a 30B model beating a 550B model on one decision

NVIDIA and Palantir fine-tuned the 30B Nemotron 3.5 Lightning on decisions made by NVIDIA's supply-chain planners. On the supply-allocation task, it scored 86.7% accuracy against 55.5% for the 550B Nemotron 3 Ultra, a model roughly 18 times its size. NVIDIA's own solutions architects were careful about what that proves: "This doesn't mean the smaller model is more capable overall." Forecasting future production risk stayed hard even after fine-tuning.

The lesson: specialize on the decision you have labeled data for, and keep the adjacent prediction problems on a separate path until they have their own evidence.

A fine-tuned 30B model scored 86.7% against 55.5% for a 550B model on one supply-allocation task

A fine-tuned 30B model scored 86.7% against 55.5% for a 550B model on one supply-allocation task. Source: The New Stack, NVIDIA.

Faros: an open-model route matched frontier quality at about half the cost per task

Faros replayed 211 real engineering tasks from 12 of its repositories through seven model-and-harness routes. Claude Code with GLM-5.2 landed in the top quality band at $0.92 per task, against $1.76 for Claude Code with Opus 4.8 and $2.06 for Codex with GPT-5.5. Field CTO Ron Meldiner noted that "the best default changed while the experiment was still running", because a new open model shipped mid-test.

They still kept a pricier route (Claude Code with Kimi K2.6, at $1.78 per task) for ambiguous, high-complexity, and agent-tooling work. GLM-5.2 is a large open-weight model, so this case shows the same routing logic one tier up: the default moves to the cheaper model that clears the bar, and escalation handles the rest.

What to copy: test routes (model plus harness) on your own historical tasks, set escalation rules by work type, and rerun the evaluation when the market moves.

NeoSapien: 42% off a voice assistant's monthly bill with zero regressions

NeoSapien runs a voice-first consumer assistant with five moving parts, from understanding what the customer wants to summarizing the conversation afterward. ML.ai took over the routine parts of that pipeline and left the hardest parts on frontier models. The result was a 42% lower monthly AI bill, 28% faster responses, full rollout in 21 days, and zero quality regressions. "We stopped picking models one by one," said Aryan Yadav, Co-Founder and CTO.

The lesson: split the pipeline by step and move only the steps whose quality you can measure.

NeoSapien: 42% lower monthly AI bill with zero quality regressions

NeoSapien: 42% lower monthly AI bill with zero quality regressions.

How do you decide which model a step should use?

Decide per step, using four questions in order: how narrow the step is, how often it runs, how stable its definition is, and whether a constraint (latency, data residency, context length) rules one option out. The mind map below lays out the signals, and the checklist after it turns them into a call you can make in a design review.

Four questions to ask in order for each step of a pipeline

Ask the four questions in order for each step of your pipeline.

Question 1: Is the step narrow and checkable?

If the output is a label, a set of fields, a tool name with arguments, or a fixed template, and you can say whether it is right, the step is a small language model candidate. If it has to branch on what it just learned, reconcile sources, or plan several moves ahead, keep it on the frontier model and put a verifier behind it.

Question 2: Does the volume justify the work?

NVIDIA's rule of thumb for fine-tuning is a stable schema plus more than 10,000 requests a day on the task. Below about 100 requests a day across varied tasks, call an API. In between, start with prompting plus retrieval, and move to fine-tuning only when your evaluation scores stop improving. One practitioner's open-source demo of a local-plus-frontier router put the monthly cost crossover at about 5,500 agent calls a day; treat that as a sanity check on your own numbers, since hardware and token prices move it.

Question 3: Will the definition of "right" stay put for a quarter?

Fine-tuned models encode the task as it was on the day you trained. If product requirements, label sets, or output schemas are still changing weekly, the retraining cost eats the savings.

Question 4: Does a hard constraint decide it?

Sub-100 ms latency, offline operation, or data that cannot leave your environment point to the small model. Context beyond 128K tokens or long-tail language coverage points to the frontier.

How much training data a small language model needs

GoalTypical examples needed
Style and format adaptation100 to 1,000 good pairs
Classification or extraction1,000 to 10,000
Adding domain knowledge10,000 to 100,000 (consider retrieval instead)
Distilling reasoning100,000 to 1,000,000 traces

Source: Towards Data Science. QLoRA (a 4-bit base model with low-rank adapters) is the common default, and a Llama 3.1 8B run fits on a single 16 GB GPU.

How do you move a step from a frontier model to a small language model without losing quality?

Move it in stages, with your own evaluation set as the acceptance test, and keep the frontier model serving every call until the small model has proven parity on real traffic. NVIDIA's paper outlines an LLM-to-SLM conversion algorithm built on usage logging, task clustering, and parameter-efficient fine-tuning; the version below adds the gates that teams in the previous section used.

Evaluation gates at every step of the migration, with rollback if quality dips

Your evals are the acceptance test at every gate, with rollback if quality dips.

Step 1: Log every call with its step label

Capture prompts, outputs, latency, and cost per call, tagged by which step of the pipeline made it. Without step labels you cannot tell which 40% of calls are cheap to move.

Step 2: Cluster the calls into recurring tasks

Group calls by intent and output shape. The clusters with fixed formats and high counts are your candidates; the long tail stays where it is.

Step 3: Build a 100 to 500 example eval set before training anything

Hand-grade examples for each candidate cluster and track schema validity, exact match, executable-call rate, p95 latency, and cost per successful task. Check any LLM-as-judge against human grades before you trust it. This is the step teams skip and regret, and it is the only thing that makes "same quality" a measured claim.

Step 4: Shadow the frontier model and use its answers as labels

Mirror production calls to the candidate model with no user impact. The frontier model's accepted outputs become training labels, which is how distillation turns your existing spend into a dataset.

Step 5: Fine-tune, then cut over in slices

Train the small model, then shift traffic in stages: shadow parity, then a partial live slice, then full cutover, with rollback wired in if quality dips below the baseline.

Step 6: Watch for drift and retune

Monitor input distribution, latency, and cost. When inputs drift, retune from fresh frontier labels rather than waiting for complaints.

This is the loop ML.ai Inference runs for you: it shadows your frontier calls with your SDK unchanged, clusters traffic into recurring tasks, fine-tunes a task model on your data with frontier answers as gold labels, shifts traffic only once your evals pass, and retunes when drift appears. Every promotion lands in an audit trail, and the pilot is one workload over 30 days with the targets agreed in writing up front. If you want to test it on your own traffic, start a 30-day pilot.

ML.ai Inference runs shadow, distill, serve and watch on your own traffic

ML.ai Inference runs shadow, distill, serve and watch on your own traffic.

What goes wrong when teams switch to a small language model?

Most failed migrations break in one of six predictable places. Each has a symptom you can watch for and a fix you can build in before cutover.

The validation set flatters the model

In one 2026 toxicity-classification study, larger 12B models scored 0.66 F1 on validation and only 0.52 on the test set, because they had learned to match the validation distribution. Fix: hold out a test set drawn from fresh production traffic, not a slice of the training data.

Parameter count predicts less than you expect

In AgentFloor, Ministral-3 14B scored worse than its 8B sibling on every tier from A0 to B (24% against 84% on single-tool calls), and a 4B model posted the best multi-source score in the corpus. Fix: benchmark two or three sizes per family on your own task before picking one.

A "planning" prompt makes small models stop acting

A plan-then-execute-then-submit prompt structure reduced task completion for every model tested in AgentFloor, by 33 points for Ministral-3 8B, which wrote careful plans and never called a tool. Fix: test prompt structure per model, and add an explicit instruction for the final action.

Reasoning mode costs more than it returns

With reasoning enabled, Qwen3 32B took about 90 seconds per passed task, roughly 2.2 times longer than GPT-5, at lower accuracy. Fix: treat reasoning as a per-step setting and measure it, rather than turning it on everywhere.

Local does not mean safe

A single scanning pass in 2025 flagged 352,000 unsafe or suspicious issues across 51,700 models on Hugging Face, and prompt injection works the same against a local model. Fix: pull weights from verified publishers, scan them, and keep the same input and output guardrails you would put on an API.

The savings are smaller than the per-token math suggests

Tokenizers differ between model families, so the same text can cost more tokens on the new model. Umbraco's Phil Whittaker cautioned that, once tokenizer differences are counted, a switch advertised as 10x cheaper can land closer to a 50% reduction. Fix: compare cost per successful task on your own traffic before you believe any per-token price comparison.

What does per-step routing look like inside an AI coding agent?

In a coding agent, per-step routing means each turn of a task (classify the intent, extract the fields, draft the change, verify it) gets the cheapest model that clears the quality bar for that turn, instead of every turn defaulting to the frontier model. ML.ai Code publishes its own breakdown of one completed task, and it shows both the savings and their limit.

Light steps get cut hardest, so the step mix sets the savings ceiling

Light steps get cut hardest, so your step mix sets the savings ceiling.

StepFrontier on every stepML.ai Code, routed
Classify intent$0.09$0.03 (ML.ai Standard)
Extract fields$0.14$0.06 (ML.ai Standard)
Draft the change$0.28$0.20 (ML.ai High)
Verify against evals$0.19$0.14 (ML.ai High)
Total per completed task$0.70$0.43

Our read of those numbers: the two light steps are only about a third of the frontier bill ($0.23 of $0.70), yet routing cuts them by 61%. The two heavy steps are two thirds of the bill and drop by only 28%. So the share of light steps in your workload sets your savings ceiling. A pipeline that is mostly drafting and verifying will not save 60% by routing alone, and anyone promising that without looking at your step mix is guessing.

ML.ai Code's published per-step cost for one completed task: $0.70 frontier-only against $0.43 routed

ML.ai Code's published per-step cost for one completed task: $0.70 frontier-only against $0.43 routed.

The same data also shows where the quality comes from. On a 50-instance slice of SWE-bench Verified, ML.ai Code solved 86% of issues against 58% for a leading frontier model in a single shot, using retries, test-driven verification, and multi-sample selection. That is the harness point from the ladder analysis, applied to coding: cheaper models on the light turns, and a verification loop on the heavy ones.

86% on a 50-instance SWE-bench Verified slice, against 58% for a leading frontier model in a single shot

86% on a 50-instance SWE-bench Verified slice, against 58% for a leading frontier model in a single shot.

ML.ai Code runs this inside VS Code and Cursor. It reads your repository, hands each step to one of four focused agents (Explore and Architect read and plan, Plan writes a reviewable plan file, and only General can change code), shows a native diff before any edit, and changes nothing on disk until you choose Allow. Its command safety classifier parses every shell command before it runs, so sudo, xargs, and redirections cannot hide a destructive action.

You can install ML.ai Code for VS Code and start with a request that changes nothing, such as asking it to explain how authentication is wired in your repository. For the routing math behind it, the model routing guide covers why a cheaper model can sometimes cost more.

What are engineers arguing about in the small language model debate?

Practitioner discussion in developer media and on the major forums keeps returning to four disagreements. None of them is settled, and each one changes how you should hedge.

Is paying frontier prices a capability decision or lock-in?

Open-model advocates argue that most frontier spend buys enterprise features around the model (identity integration, connectors, observability) rather than intelligence. CNCF executive director Jonathan Bryce told The New Stack that paying ten times more for a four-month capability lead amounts to an expensive form of lock-in. His advice is to build on infrastructure that lets you change models and hardware without rebuilding the application each time the leaderboard moves.

Do open models hold up on real developer work?

Reports are mixed. One Screen Studio engineer found GLM 5.2 matched or beat Claude Opus 4.8 on tech research and produced a working, typed React form, but the same model failed to render a single-file 3D scene and hit usage-limit warnings by late afternoon. The consistent thread is that clear, scoped prompts close the gap and open-ended generation widens it.

Is the routing layer worth its own engineering cost?

Skeptics point out that moving from one API endpoint to several specialized models with routing logic takes real engineering, and that the economics only work at scale. Supporters answer that the specialists are cheap enough to retrain often. Both sides agree the savings depend on volume, which is why Question 2 above comes before any architecture work.

Will the frontier just get cheap enough to end the debate?

The large labs ship distilled, cheaper variants of their best models, and mixture-of-experts designs activate a small fraction of their parameters per token. That narrows the price gap per call. It does not remove the per-step question, because a cheaper frontier call on a step that a 3B model handles at 96% is still overpaying, and a cheaper frontier call on a branching step is still unreliable without verification.

Put each step on the model that earns it

You can now look at any agent or pipeline and sort its steps: narrow, frequent, checkable steps go to a small language model; branching, multi-source, and long-horizon steps stay on a frontier model with verification behind them; anything low-volume or still changing stays on the API. The first step is small: log one week of calls with step labels and count how many are classification, extraction, or single tool calls. That count is your savings ceiling.

If you would rather not build the shadow, distill, and cutover loop yourself, ML.ai Inference runs it on one of your workloads for 30 days against targets you set, and you owe nothing if it misses them. Book a 30-minute call to pick the workload, or install ML.ai Code to see per-step routing in your own editor today.

Frequently Asked Questions

What is a small language model?

A small language model is a language model of roughly 1B to 14B parameters (or a mixture-of-experts model with a similar number of active parameters) that can run on a single GPU, workstation, or phone. Teams usually fine-tune one for a narrow job such as classification, extraction, or tool selection, where it can match or beat much larger models at a fraction of the cost.

Is a small language model the same as an open-source model?

No. Size and licensing are separate. Many small language models are open-weight (Llama, Qwen, Gemma, Phi), but frontier labs also sell small distilled models through their APIs, and some large models are open-weight. What makes a model "small" is the parameter count you serve; the license is a separate question.

Can a small language model run an AI agent on its own?

It can run the routine layers of an agent: instruction following, single tool calls, and short two-tool chains, where the best open-weight models match GPT-5. For steps that branch on intermediate results or plan across many tool calls, pair it with a frontier model or a verification loop, because no model in current benchmarks is reliable there on its own.

How much cheaper is a small language model than a frontier model?

For narrow agent tasks, cost per passed task ran about 15x lower self-hosted and 3x lower on cloud GPUs in the AgentFloor benchmark, at matched accuracy. Whole-pipeline savings are smaller because heavy steps still need capable models; ML.ai's published per-task breakdown shows about 39% saved per completed coding task.

Should I fine-tune a small language model or use retrieval?

Fine-tune when the task and output format are stable and you need consistent behavior; use retrieval when the knowledge changes often. Injecting domain facts through fine-tuning takes 10,000 to 100,000 examples and goes stale, so the common setup pairs a fine-tuned small model for format and behavior with retrieval for facts.

Do small language models hallucinate more than frontier models?

On open-ended questions, yes, because they store less world knowledge. On narrow tasks with fixed outputs, fine-tuning and constrained decoding make them more consistent than a general model, reaching 99%+ schema validity on structured output.

Share

Written by

Taran Srivastava

Senior Product Manager

Try ML.ai Code today, or talk to us about what is next.

Install the editor agent on your own machine, or book a call to talk through your team's workloads.