Blog/LLMOps & evals
Small language models: when a 4B model is enough
When a small model beats a frontier API: cost per resolved case, latency, privacy, distillation, quantization, routing and an eval plan that fits your traffic.
Balázs Csorba··11 min read
- Small language models
- Distillation
- Quantization
- Model routing
- LLMOps

Key takeaways
- Small is a deployment property: the model fits the hardware you can afford, with room for the KV cache and the context you actually send.
- Bounded extraction, routing, on-device work and high-volume batch jobs are the sweet spot; open-ended synthesis and rare knowledge are not.
- Compare cost per resolved case, not per token. The escalation rate caps your savings, and router false negatives become quality incidents.
- Distil first, quantize second, evaluate the exact artifact third, in every language you ship.
- Route small by default and escalate on validation failure; a good validator is worth more than a clever router.
The most expensive habit in LLM engineering is reaching for the frontier model by default. In 2026 a 4B model can classify a support ticket, pull line items out of an invoice, or decide which tool an agent should call next, at a fraction of the cost and latency of the model you would have used two years ago. That does not make small models a universal answer. It makes them the right default for a large, boring share of production traffic.
This post is a decision procedure, not a leaderboard. It covers what small means now, the four jobs where small models win, the cost math per resolved case, latency as a distribution, privacy as an architecture, and the three levers that make a small model better than its parameter count suggests: distillation, quantization and routing. It ends with the evaluation plan I would run before moving traffic, and a one-page checklist.
What small means in 2026
Small is a deployment property before it is a parameter count. NVIDIA’s position paper defines an SLM as a model that fits on a common consumer device and answers fast enough to serve one user’s agent requests, and notes that in 2025 most models below 10B fit that description. A survey of the field draws the line lower, at 100M–5B, because that is where on-device research lives. Both definitions are useful: the number that matters is not the badge on the model card, but whether the artifact fits the hardware you can afford, with room for the KV cache and the context you actually send.
The 2026 catalogue is wider than the old 7B-or-nothing choice. Gemma 4 ships as E2B, E4B, 12B, 26B A4B and 31B under Apache 2.0, with 128K context on the small models and 256K on the medium ones. Qwen3 covers 0.6B to 32B dense, and Qwen’s launch post claims the 4B model rivals Qwen2.5-72B-Instruct. Phi-4 is a 14B MIT-licensed model trained on roughly 10 trillion tokens. Apple ships a roughly 3B on-device model with 2-bit quantization-aware training and LoRA adapters. None of these is a frontier replacement. All of them are credible for bounded work.
Parameter count also hides compute. Gemma 4 26B A4B has 25.2B total parameters but activates 3.8B per token, so it runs closer to a 4B dense model than its total suggests. When you compare serving costs, compare active parameters, memory bandwidth and context length, not the number in the name.
| Family | Sizes | What it is |
|---|---|---|
| Gemma 4 | E2B, E4B, 12B, 26B A4B, 31B | Apache 2.0; 128K or 256K context |
| Qwen3 | 0.6B to 32B dense | Apache 2.0; 4B rivals older 72B |
| Phi-4 | 14B | MIT; about 10T training tokens |
| Apple AFM | about 3B on-device | 2-bit QAT; Private Cloud Compute server |
Four jobs where a small model wins
Four kinds of work keep paying for small models.
- Bounded extraction and classification. If the output is a JSON object with a fixed schema, or one of twenty labels, the task is a contract, not a conversation. A small model that holds the contract is enough.
- Routing and triage. Deciding which queue, tool, template or model should handle a request is classification with a recoverable failure mode: a wrong route costs a retry, not a lawsuit.
- On-device and private inference. Apple’s 3B model handles summarization, entity extraction and tool calling on the phone. When the data cannot leave the device or the building, a smaller model is not a compromise; it is the only architecture that ships.
- High-volume batch work. NVIDIA puts a 7B model at 10–30× cheaper than a 70–175B model in latency, energy and FLOPs. At millions of calls, that gap is the project.
The inverse list is just as important. Open-ended synthesis, multi-document reasoning, rare or fast-changing knowledge, and single-shot decisions with expensive errors are frontier work. A small model will produce fluent, confident text in all four cases, which is exactly the risk. My rule: if you cannot write the output contract or the label set on one line, a small model is the wrong first experiment.
The cost math: per resolved case, not per token
Token prices are an input, not the decision. The unit that survives a budget conversation is cost per resolved case: model calls including retries, the share of cases a human reviews, the infrastructure you pay for while idle, and the cost of the failures that reach a customer.
The relative gap is large. NVIDIA’s 10–30× figure is about serving a 7B model versus a 70–175B one, before you add the operational overhead of running your own GPU. Self-hosting is not automatically cheaper: an idle GPU is a fixed cost, and a small team’s time is not free. The honest comparison includes utilization. A single GPU serving an internal tool at 5% utilization is a hobby; the same GPU at 60% is infrastructure.
Routing changes the arithmetic in a useful way. RouteLLM, the LMSYS router trained on preference data, reports cost reductions of over 85% on MT Bench, 45% on MMLU and 35% on GSM8K compared with GPT-4 alone, while reaching 95% of GPT-4’s performance. The variation across benchmarks is the point: savings depend on how often the cheap model is good enough, which is a property of your traffic, not of the router.
// share of the all-frontier bill you still pay
const small = 1; // relative cost of a small call
const frontier = 20; // relative cost of a frontier call
for (const escalation of [0.05, 0.2, 0.5]) {
const blended = (1 - escalation) * small + escalation * frontier;
console.log(escalation, (blended / frontier).toFixed(2));
}
// 0.05 -> 0.10 0.2 -> 0.24 0.5 -> 0.53The formula is simple enough to keep in a spreadsheet. If a frontier call costs 20× a small call and you escalate 20% of requests, you still pay 24% of the all-frontier bill. At 50% escalation you pay 53%. The escalation rate is the ceiling on your savings, and the router’s false negatives — hard cases sent to the small model — are the part that shows up as quality incidents. Track both, and put the same numbers in the dashboard as prompt caching and routing.
Latency is a distribution, not a number
Latency is not one number. Time to first token decides whether an interface feels alive; inter-token latency decides whether reading is pleasant; p95 under concurrency decides whether the feature survives a Monday morning. A model that is fast alone can be slow behind a queue.
Local inference removes the network hop and gives you a predictable machine, but not automatically a faster answer. A 3B model on a laptop competes with a frontier model on a datacenter GPU; the laptop wins on privacy and cost, not always on tokens per second. Apple’s on-device model is built for summarization and extraction, not for general chat. Gemma 3 270M, Google’s 270M-parameter model, used 0.75% of a Pixel 9 Pro battery for 25 conversations in Google’s internal test, which is the kind of number that matters when the feature runs on a phone all day.
Serving choices move latency more than the model family. Quantization cuts memory traffic, which is often the bottleneck on a single GPU. Gemma 4 12B ships with multi-token prediction drafters to reduce latency, and Google positions it for laptops with 16GB of VRAM or unified memory. Batching raises throughput and usually worsens p95. If your SLO is interactive, optimize the tail; if it is a nightly batch, optimize tokens per euro and ignore the tail.
Privacy is an architecture decision
Privacy is an architecture decision, not a model size. A local model keeps the prompt inside your boundary for that step, which removes a third-party processor and a cross-border transfer from the data flow. It does not remove the GDPR, the legal basis, retention rules, access control, logging, or a DPIA for risky processing. The AI Act is a different regime, not a replacement: general-purpose AI obligations applied in August 2025, transparency rules in August 2026, and the high-risk rules for Annex III uses now apply from 2 December 2027 after the AI Omnibus.
What small models change is the cost of the private option. Gemma 3 4B at int4 needs about 2.6GB for the weights, and Gemma 3 1B needs about 0.5GB; a 270M model runs in a browser or on a phone. That makes “keep it local” a realistic default for extraction and classification, not just a compliance exception. The trade-off moves to operations: you own updates, model provenance, telemetry, and the question of what the device logs.
Distillation: buying capability without the size
Distillation is how a small model inherits behaviour it did not learn on its own. A teacher — usually a frontier model, sometimes a larger open model — generates traces for your task, and the student is trained on them. Black-box distillation uses only the teacher’s text; white-box distillation also uses logits or hidden states. For most product teams the black-box version is enough, because the output contract is what you care about.
The evidence is encouraging but not magical. DeepSeek distilled R1’s reasoning traces into 1.5B–8B models, and NVIDIA’s review notes that the 7B distill outperformed GPT-4o and Claude 3.5 Sonnet on some reasoning benchmarks. Qwen3 uses a strong-to-weak distillation stage for its 0.6B–14B models. A 2025 study of distillation across Qwen students found the gains are largest for the smallest students, around 1.3% for a 7B student, and that the choice of distillation method matters less than the teacher’s fit to the domain: a teacher that was not fine-tuned on the target domain could cut student performance by up to 40%.
That last number is the practical warning. Distilling from a generalist teacher into a narrow task works when the teacher is good at that task and the traces are clean. It fails when you distil fluent guesses. NVIDIA’s conversion recipe suggests 10k–100k examples per task as a working range. The output is not a model that knows more; it is a model that behaves more consistently on your distribution. I treat a distilled model as a compiled prompt: faster and cheaper at runtime, but it must be recompiled when the task changes. The trade-offs against RAG and prompting are the same ones in the fine-tuning decision guide.
Quantization: the cheapest 4×
Quantization is the cheapest 4× in the stack, and the easiest to do badly. Post-training quantization takes a trained model and stores weights at lower precision; quantization-aware training simulates the low-precision arithmetic during training, so the model learns to tolerate it. Google’s Gemma 3 QAT release is the clearest public example: int4 cuts the 27B model from 54GB to 14.1GB, the 12B from 24GB to 6.6GB, the 4B from 8GB to 2.6GB and the 1B from 2GB to 0.5GB, and Google reports a 54% reduction in the perplexity drop at Q4_0 compared with naive quantization.
| Model | BF16 VRAM | int4 VRAM | Reduction |
|---|---|---|---|
| Gemma 3 27B | 54 GB | 14.1 GB | 3.8× |
| Gemma 3 12B | 24 GB | 6.6 GB | 3.6× |
| Gemma 3 4B | 8 GB | 2.6 GB | 3.1× |
| Gemma 3 1B | 2 GB | 0.5 GB | 4× |
Apple goes further on device: its roughly 3B model uses 2-bit quantization-aware training, plus KV-cache sharing, to fit the phone. At the other end, llama.cpp’s Q4_K_M takes an 8B model from 32.1GB to 4.9GB, and its docs recommend an importance matrix built from representative text. The lesson is not “always 4-bit”; it is that the quality cost depends on the method, the calibration data and the task. Structured output, arithmetic and rare languages degrade before casual chat does.
# build an importance matrix from your own text, then quantize
llama-imatrix -m gemma-4-E4B-it-bf16.gguf -f domain.txt --chunk 512 -o e4b-imatrix.dat
llama-quantize --imatrix e4b-imatrix.dat gemma-4-E4B-it-bf16.gguf \
gemma-4-E4B-it-Q4_K_M.gguf Q4_K_MOrder matters: fine-tune or distil first, quantize second, evaluate the exact file third. A benchmark run on the BF16 checkpoint tells you nothing about the Q4_K_M artifact you will deploy. Keep the KV cache in the memory budget; Google’s VRAM numbers are weights only. And use the same runtime you will ship, because llama.cpp, vLLM and MLX do not quantize or schedule identically.
Routing: small by default, frontier by exception
Routing turns the cost curve into an architecture. The default path goes to the small model; the exception goes to the frontier model. The router can be a set of rules (task type, input length, customer tier), a classifier, or a learned preference model. RouteLLM’s result shows what a good router buys; its transfer test, where routers trained on one model pair worked on another without retraining, shows why the idea generalises.
The part most teams underinvest in is the validator. A small model that returns invalid JSON has not saved you money; it has moved the failure downstream. Validate the schema, check required fields, and escalate on failure. Do not ask the model for a confidence score and trust it; use signals you can calibrate — schema validity, retrieval score, agreement between two samples, or a rule on input length.
async function answer(req: Request) {
const draft = await callModel(SMALL_MODEL, req.messages, { schema: req.schema });
if (validate(draft, req.schema).ok) return draft;
// one cheap retry, then escalate
const retry = await callModel(SMALL_MODEL, req.messages, { schema: req.schema, temperature: 0 });
if (validate(retry, req.schema).ok) return retry;
return callModel(FRONTIER_MODEL, req.messages, { schema: req.schema });
}Start with rules. A learned router is a second model with its own eval set, drift and failure modes; it earns its place only after the rule-based version has a measured escalation rate. And keep the frontier path warm: an escalation that times out is worse than a slower first answer. I would rather have a dumb router with a good validator than a clever router with none.
Evaluation: your benchmark or none
Public benchmarks are a filter, not a decision. Phi-4 is the cleanest example I know: on Microsoft’s published simple-evals numbers it scores 56.1 on GPQA against 50.6 for GPT-4o, and 3.0 on SimpleQA against 39.4. Same model, opposite conclusions, because the benchmarks measure different things. A small model can be excellent at graduate-level science and hopeless at recalling a fact about a niche product.
The only benchmark that decides is a labelled sample of your traffic. I would start with 200–500 cases, stratified by language (German and Hungarian, if you ship them), input length, class balance and the edge cases that already cause support tickets. Label them by hand or with a strong model plus spot checks, and keep a held-out slice that nobody tunes against.
Measure six things per candidate: task accuracy, schema validity, abstention rate, p95 latency under realistic concurrency, cost per resolved case, and escalation rate. Run the exact artifact — quantized file, runtime, prompt, context length — against the same set. Then gate the rollout on the lower bound of the confidence interval, not the mean, and on the cost of the failures that remain.
Two slices are easy to forget. Long inputs shift the bottleneck to prefill and can change the ranking. Languages other than English expose tokenizer and training-data gaps that a global average hides. If your shop serves Austrian German and Hungarian, evaluate both before you move a single request. The mechanics of a small eval set that actually gates a release are in LLM evals for product features.
A one-page decision checklist
The checklist I use before moving traffic:
- Can I write the output contract — schema or label set — in one line?
- What happens when the model is wrong: retry, review, refund, or nothing?
- What is the monthly volume and the peak concurrency?
- Can the data leave the boundary, and what would it take to keep it inside?
- Do I have at least 200 labelled cases from real traffic?
- Which quantized artifact fits the hardware with headroom for the KV cache?
- Who owns the escalation path, and how is it monitored?
If questions 1, 2 and 5 pass and volume is high, pilot a small model in shadow mode for two weeks. Compare it with the frontier baseline on the same traffic, including the cases it fails. If the failure cost is acceptable and the p95 holds, route the easy share and keep the frontier path for the rest. If not, you have learned that for the price of an eval set, which is cheaper than learning it in production.
Sources
- Belcak et al.: Small Language Models are the Future of Agentic AI (arXiv 2506.02153)
- Google: Gemma 4 model card
- Google: Gemma 3 QAT models, state-of-the-art AI on consumer GPUs
- Google: Introducing Gemma 3 270M
- Microsoft Research: Phi-4 Technical Report (arXiv 2412.08905)
- Qwen: Qwen3 Technical Report (arXiv 2505.09388)
- Apple: Apple Intelligence Foundation Language Models, Tech Report 2025 (arXiv 2507.13575)
- Ong et al.: RouteLLM, Learning to Route LLMs with Preference Data (arXiv 2406.18665)
- LMSYS: RouteLLM, an open-source framework for cost-effective LLM routing
- Gomes et al.: On the Generalization vs Fidelity Paradox in Knowledge Distillation (arXiv 2505.15442)
- llama.cpp: quantize tool documentation
- European Commission: AI Act
Frequently asked questions
Is a 4B model good enough to replace a frontier model?
For a bounded task with a clear output contract and a labelled eval set, often yes. For open-ended reasoning, long-context synthesis or rare factual knowledge, no. The only way to know is to measure on your own traffic.
How much memory does a 4B model need?
Gemma 3 4B at int4 needs about 2.6GB for the weights, and Gemma 3 1B about 0.5GB. Add the KV cache, which grows with context and concurrency, plus runtime overhead. A 16GB laptop or GPU has comfortable headroom for Gemma 4 12B at int4, which is how Google positions it.
Does quantization hurt quality?
It can. QAT and a good 4-bit format keep the loss small; aggressive 2-bit or 3-bit quantization hurts structured output, arithmetic and rare languages first. Evaluate the exact quantized file, not the model family.
Can I fine-tune a small model on one GPU?
LoRA and QLoRA make it practical for models in the single-digit billions, and NVIDIA describes fine-tuning a small model as a few GPU-hours. Full fine-tuning is a different budget. Distillation needs a teacher and a clean dataset, not a cluster.
When should I still use a frontier model?
Open-ended writing and synthesis, multi-step reasoning across documents, long-context work, rare or fast-changing knowledge, and any single-shot decision where a wrong answer is expensive.
Is on-device inference automatically GDPR-compliant?
No. Keeping data on the device changes the data flow and can remove a processor, but you still need a legal basis, retention rules, access control and a DPIA where the risk requires it. Local is an architecture, not a compliance certificate.