Ask an engineering team what they run in production and you will rarely hear the name of the model that topped last month's leaderboard. You hear about a smaller model, pinned to a version, wrapped in caching, doing one narrow job well. The gap between what gets written about and what gets deployed has never been wider.
That gap exists because the two are judged on different scoreboards. Frontier models are judged on capability ceilings. Production models are judged on cost per resolved request, and those numbers pull in opposite directions once you serve anything at volume.
What is a small language model?
A small language model is a language model built to be cheap and fast enough to run on modest hardware: a single GPU, a laptop or even a phone. There is no official size cutoff. The open models below range from about 1 billion to 12 billion parameters, and in a hosted model family "small" usually just means the fastest, cheapest tier, such as Claude Haiku.
Fewer parameters mean less memory, lower latency and a lower price per token. An open model that fits on your own hardware also runs with no per-token API bill and without sending data to anyone else. The price is a lower ceiling on open-ended reasoning and broad knowledge, and most of this guide is about managing that trade.
Small language model examples
- Microsoft Phi-4-mini: a 3.8B-parameter text model with a 128K-token context window, released in February 2025 under the MIT license, according to its model card (opens in a new tab). The Phi-4 family also includes reasoning and multimodal variants.
- Google Gemma 4 E2B, E4B and 12B: the Gemma 4 model card (opens in a new tab) lists E2B (2.3B effective parameters, 5.1B with embeddings) and E4B (4.5B effective, 8B with embeddings) with a 128K context window, plus an 11.95B model with 256K. All three accept text, images and audio, under Apache 2.0.
- Meta Llama 3.2 1B and 3B: text-only models of 1.23B and 3.21B parameters with a 128K context window, released in September 2024. They use the Llama 3.2 Community License, a custom license under which companies whose products had more than 700 million monthly active users must request a license from Meta, per the model card (opens in a new tab).
- Qwen3-4B: a 4.0B-parameter model from the Qwen team with a native 32,768-token context window, extendable to 131,072 tokens, under Apache 2.0, per its model card (opens in a new tab).
Those details are as of November 2026 and come from each developer's model card. Check the license as carefully as the size: MIT and Apache 2.0 are permissive, while a custom license like Llama's adds conditions you should read before you ship. If you want to run one of these on your own machine, our guide to the best local LLM matches models to 8 GB through 80 GB setups and shows how to install them with Ollama.
Small language models vs LLMs: what actually differs
Whether the small model is an open one you host or the cheapest tier of an API, the trade against a large model looks the same.
| Small language model | Large (frontier) model | |
|---|---|---|
| Cost per token | Lowest tier, often 4x to 10x cheaper | Highest tier |
| Latency | Fast, good for real-time UX | Slower, especially with long reasoning |
| Strong at | Classification, extraction, formatting, short answers with context | Ambiguous requests, multi-step reasoning, novel problems |
| Weak at | Open-ended reasoning, thin or missing context | Nothing in particular, except cost at volume |
| Best use | The routine majority of requests | The hard or high-stakes minority |
What LLM inference actually costs
Price differences between tiers are large enough to change architecture decisions. Here are Anthropic's list API prices as a reference point; other providers show a similar spread between their small and large tiers.
| Model tier | Input per MTok | Output per MTok | Relative input cost |
|---|---|---|---|
| Claude Haiku 4.5 (small) | $1 | $5 | 1x |
| Claude Sonnet 5 (mid) | $2 | $10 | 2x |
| Claude Opus 5.5 (large) | $4 | $20 | 4x |
| Claude Fable 5.1 (frontier) | $10 | $50 | 10x |
Prices are from Anthropic's pricing page (opens in a new tab) and change often, so check before you budget. Batch processing halves both input and output prices for work that does not need an instant answer, and prompt caching makes repeated context, such as a long system prompt, far cheaper on every call after the first.
A worked monthly cost example
Take a support assistant handling 400,000 conversations a month. Each conversation averages six turns, each turn sends about 2,000 tokens of context and gets about 150 tokens back. That is 4.8 billion input tokens and 360 million output tokens a month, before any business logic.
| Setup | Input cost | Output cost | Monthly total |
|---|---|---|---|
| Everything on the large model (Opus 5.5) | $19,200 | $7,200 | $26,400 |
| Everything on the mid model (Sonnet 5) | $9,600 | $3,600 | $13,200 |
| Everything on the small model (Haiku 4.5) | $4,800 | $1,800 | $6,600 |
| Routed: 85% small, 15% large | $6,960 | $2,610 | $9,570 |
The routed setup costs about 64 percent less than sending everything to the large model, and it keeps the large model on the conversations most likely to need it. Running everything on the small model is cheaper still, but that is usually where quality drops and the savings get eaten by retries, escalations and refunds.
Real test results: when does a cheaper model stop saving money?
Routing tables like the one above assume the small model's answers are good. In practice some fail, and with a fallback you pay for both attempts. We wrote a short model of one conversation from the example above (12,000 input and 900 output tokens) and ran it to find the break-even point, then added the cost of a human handoff when a bad answer slips through. The $4 handoff cost is our assumption; use your own support cost.
# Cost per resolved conversation when the small model sometimes fails
# and the request is retried on the large model (fallback).
# Prices: USD per million tokens (input, output), from the table above.
SMALL = (1, 5) # Haiku 4.5
LARGE = (4, 20) # Opus 5.5
IN_TOK, OUT_TOK = 12_000, 900 # one conversation: 6 turns x 2,000 in, 150 out
def cost(price):
return (IN_TOK * price[0] + OUT_TOK * price[1]) / 1_000_000
small, large = cost(SMALL), cost(LARGE)
print(f"Large only: ${large:.4f} per conversation")
print(f"Small only: ${small:.4f} per conversation\n")
print("Small-model fail rate -> cost with fallback to large, saving vs large only")
for fail in (0.0, 0.05, 0.10, 0.20, 0.40, 0.60, 0.75, 0.80):
c = small + fail * large # every failure pays for both attempts
print(f" {fail:4.0%} ${c:.4f} {1 - c/large:6.1%}")
print(f"\nBreak-even fail rate: {1 - small/large:.0%}")
# Now add the cost of a human handoff when a bad answer slips through.
HANDOFF = 4.00 # USD per escalated conversation (assumed agent cost)
print("\nExtra escalations caused by the small model -> added cost per conversation")
for esc in (0.005, 0.01, 0.02):
print(f" {esc:.1%} more handoffs adds ${esc*HANDOFF:.4f}, vs ${large - small:.4f} saved on tokens")Large only: $0.0660 per conversation
Small only: $0.0165 per conversation
Small-model fail rate -> cost with fallback to large, saving vs large only
0% $0.0165 75.0%
5% $0.0198 70.0%
10% $0.0231 65.0%
20% $0.0297 55.0%
40% $0.0429 35.0%
60% $0.0561 15.0%
75% $0.0660 0.0%
80% $0.0693 -5.0%
Break-even fail rate: 75%
Extra escalations caused by the small model -> added cost per conversation
0.5% more handoffs adds $0.0200, vs $0.0495 saved on tokens
1.0% more handoffs adds $0.0400, vs $0.0495 saved on tokens
2.0% more handoffs adds $0.0800, vs $0.0495 saved on tokensTwo results are worth knowing before you pick a model. First, on token cost alone the small model keeps saving money until three in four of its answers fail, so retries are rarely what sinks a routing plan. Second, quality failures that reach people are far more expensive than tokens: in this example, just over 1.2 percent extra handoffs wipes out the entire token saving. That is why the next section is about measuring quality, not price.
How LLM routing works
Most request volume in a real product is routine: classification, extraction, reformatting, short answers with a retrieved document already in context. A small model handles those well. The interesting minority is where you spend: ambiguous intent, multi-step reasoning, anything where being wrong is expensive.
type Tier = "small" | "large";
type Task = {
hasRetrievedContext: boolean;
expectedTokens: number;
requiresMultiStepReasoning: boolean;
errorCostUsd: number;
};
function route(task: Task): Tier {
if (task.requiresMultiStepReasoning) return "large";
if (task.errorCostUsd > 50) return "large";
// Long answers with no supplied context lean on broad knowledge.
if (!task.hasRetrievedContext && task.expectedTokens > 800) return "large";
return "small";
}The router does not need to be clever. A handful of deterministic rules over metadata you already capture gets most of the benefit. Add a fallback so that when the small model's answer fails a validation check, or it signals low confidence, the request is retried on the large model. That single fallback protects quality while the rules do the saving.
Published research backs the approach. The RouteLLM (opens in a new tab) project from LMSYS reported cost reductions of over 85 percent on MT Bench, 45 percent on MMLU and 35 percent on GSM8K compared with sending everything to GPT-4, while still achieving 95 percent of its performance. Earlier, the FrugalGPT (opens in a new tab) paper from Stanford showed that cascading cheaper models before an expensive one could match the best single model with up to 98 percent lower cost on its test tasks.
How to prove a small model is good enough
The risk in moving traffic to a small model is not that it fails loudly. It is that it fails quietly, with answers that look fine and are slightly worse. The only protection is measuring quality on your own requests before and after the switch.
- Build a test set from real traffic. Pull 100 to 200 recent requests for one task type, including awkward ones, and keep the large model's answers as a baseline.
- Define pass and fail in writing. For extraction, that might be exact field matches. For support answers, it might be a short rubric: correct, complete, on policy, right tone.
- Run the small model on the same inputs. Score both sets the same way. A large model can do first-pass grading against your rubric, but have a person check a sample of its judgments.
- Look at the failures, not just the score. If the small model fails on one pattern, route that pattern to the large model instead of abandoning the switch.
- Ship behind a percentage. Move 10 percent of live traffic, compare resolution, retry and escalation rates for a week, then widen.
This is also where most of the savings come from in practice. Teams rarely move a whole product to a small model. They move the three or four task types that pass cleanly, and those are usually the highest-volume ones.
Real test results: four models on 50 maths problems
To show what step 3 looks like, we ran four open models, from a 4.6 GB download to an 8 GB one, on the same 50 randomly chosen grade-school maths problems from the public GSM8K test set, at temperature 0. We ran this test on 28 November 2026 in Google Colab on a free NVIDIA Tesla T4 GPU (16 GB of video memory), using Ollama 0.40.19 to serve the models. The screenshots are cropped from that notebook; the code is exactly what ran.

The smallest model, Gemma 4 E2B, solved 46 of 50, only two fewer than Gemma 4 12B, and answered in about a third of the time (3.1 seconds per question against 8.7). For a routine, well-defined task, that is exactly the trade this article describes: a small accuracy gap for a large speed and cost saving. Two cautions apply. GSM8K is public and widely used, so models may have seen similar problems in training, which flatters everyone; your own requests are the only test that counts. And a 4-point gap still means two extra wrong answers per 50, so check what those failures would cost you before you switch.
# small vs larger models on 50 grade-school maths problems (GSM8K)
import re, time, random, requests, pandas as pd, subprocess
from datasets import load_dataset
API = "http://localhost:11434/api"
MODELS = ["gemma4:e2b", "phi4-mini", "gemma4:e4b", "gemma4:12b"]
qs = load_dataset("openai/gsm8k", "main", split="test")
random.seed(42)
sample = [qs[i] for i in random.sample(range(len(qs)), 50)]
def gold(a): return float(a.split("####")[-1].strip().replace(",", ""))
def last_number(t):
nums = re.findall(r"-?\d[\d,]*\.?\d*", t.replace("$", ""))
return float(nums[-1].replace(",", "").rstrip(".")) if nums else None
rows, examples = [], {}
for m in MODELS:
subprocess.run(["ollama", "pull", m], capture_output=True)
correct, secs, toks = 0, 0.0, 0
for q in sample:
t0 = time.time()
r = requests.post(f"{API}/chat", json={
"model": m, "stream": False, "think": False, "keep_alive": "10m",
"options": {"temperature": 0, "num_predict": 600},
"messages": [{"role": "user", "content":
q["question"] + "\nSolve step by step. End with: Answer: <number>"}]}).json()
secs += time.time() - t0
text = r["message"]["content"]; toks += r.get("eval_count", 0)
ok = last_number(text) == gold(q["answer"])
correct += ok
examples.setdefault(m, []).append((q["question"][:80], gold(q["answer"]), last_number(text), ok))
rows.append({"model": m, "correct_of_50": correct, "accuracy": f"{correct/50:.0%}",
"avg_seconds_per_question": round(secs / 50, 1),
"avg_output_tokens": round(toks / 50)})
print(rows[-1])
requests.post(f"{API}/generate", json={"model": m, "keep_alive": 0})
acc = pd.DataFrame(rows); acc.to_csv("/content/accuracy.csv", index=False)
print(acc.to_string(index=False))Caching and batching: the two cheaper levers
Routing is not the only way to cut inference cost, and it combines well with two others that need no change in model at all.
- [Prompt caching](https://platform.claude.com/docs/en/build-with-claude/prompt-caching): if every request repeats the same long system prompt, instructions or reference document, caching that prefix means later calls read it at a fraction of the normal input price. On Anthropic's current price list, cache reads on Haiku 4.5 and Sonnet 5 are billed at one tenth of the base input rate. For context-heavy workloads like the support example above, that can matter as much as routing.
- [Batch processing](https://platform.claude.com/docs/en/build-with-claude/batch-processing): work that does not need an answer in seconds, such as nightly classification, content tagging or evaluation runs, can go through a batch API at half price on both input and output.
- Shorter context: sending only the retrieved passages a request needs, instead of whole documents, lowers cost on every tier and often improves accuracy too.
Why small models got good enough
- Distillation: smaller models trained on the outputs of larger ones, a technique formalized in Hinton, Vinyals and Dean's 2015 paper (opens in a new tab), now come close to their teachers on narrow tasks.
- Quantization: running weights at 4-bit or 8-bit precision cuts memory enough to change which hardware you need. The QLoRA (opens in a new tab) paper showed 4-bit fine-tuning can preserve full 16-bit task performance.
- Better retrieval: a small model given the right document often beats a large model answering from memory.
- Better prompts and skills: precise instructions close much of the gap. A clear prompt, like the ones in our Claude prompt engineering guide, does more for a small model than for a large one.
When not to use a small model
- The request is ambiguous and the model has to work out what the user means.
- The answer needs several dependent reasoning steps, such as planning or debugging.
- A wrong answer is costly: legal, financial or medical content, or anything that triggers a refund.
- There is no retrieved context and the task depends on broad knowledge.
- You have not measured quality yet. Start on the large model, collect examples, then move traffic down once you can prove parity.
How to start cutting LLM costs this month
- Log every request with its task type, input length and outcome, so you know your real traffic mix.
- Pick the one or two highest-volume, lowest-risk task types and test them on a small model against a sample of 100 real requests.
- Add a rules-based router and a fallback to the large model, then track cost per resolved request next to latency and error rate.
- Turn on prompt caching for shared context and batch processing for anything that can wait.
- Package repeatable instructions as reusable Claude Skills so every tier gets the same precise procedure.
The likely end state is not that small models win. It is that the question stops being interesting, the way nobody asks which database you use before asking what you store. Model choice becomes a per-endpoint decision, tracked on a dashboard next to latency and error rate. Teams that build the routing layer early do that calmly; teams that build it late do it under budget pressure. For more on the models and tools behind this, see our AI guides.



