Vibe Engines is free, interactive AI engineering & system design — runs in your browser. Pick a learning path →
LLM vs SLM: which one fits where it has to run?
The instinct is to always reach for the biggest model. But the question that actually decides this isn't "which is smarter" — it's "where does this have to run, and how fast does the answer need to come back."
The one distinction that decides everything
An LLM is a frontier-scale model — tens to hundreds of billions of parameters or more — typically served from a datacenter over an API, with broad general reasoning and deep long-tail knowledge. An SLM (small language model, roughly under ~10B parameters, often 1–3B) is compact enough to run on-device — a phone, a laptop, an edge box — with no network round-trip.
Does the task need broad, novel reasoning and quality matters more than latency or cost? LLM. Does the task need to run offline, privately, or near-instantly at massive volume? SLM.
Head to head
| Dimension | LLM | SLM |
|---|---|---|
| Parameters | Tens to hundreds of billions+ | Typically under ~10B, often 1–3B |
| Where it runs | Datacenter GPU / cloud API | On-device — phone, laptop, edge |
| Latency | Network round-trip + larger compute | Near-instant, local, no network hop |
| Cost per call | API $ per token | Near-zero marginal cost once deployed |
| Capability breadth | Broad general reasoning, long-tail knowledge | Narrower, best when specialized for a task |
| Privacy | Data leaves the device to a provider | Can run fully on-device, nothing leaves |
| Offline capability | Needs network | Works offline |
| Novel multi-step reasoning | Stronger | Weaker outside its training distribution |
When to use each
Reach for an LLM
- Complex or novel reasoning
- Broad general knowledge needed
- The task is too varied to specialize a small model for
- Quality ceiling matters more than cost or latency
Reach for an SLM
- On-device or offline requirement
- Privacy-sensitive — data can’t leave the device
- Narrow, well-defined task (classification, autocomplete, extraction)
- Cost or latency at massive request volume matters more than peak capability
The production pattern: route, don’t always escalate
Model routing (cascade) is the pattern that gets used at scale: send requests to a cheap SLM first, and escalate only the ambiguous or hard ones to a bigger LLM. Because most real traffic is easy, this cuts cost and latency dramatically without giving up quality on the requests that actually need it. An on-device SLM can also do a first pass and call out to a cloud LLM only when its own confidence is low.
Don't default every request to the biggest model. Measure how much of your real traffic an SLM handles correctly, and reserve the LLM for the tail that genuinely needs it.
The flip point: when the cascade pays off
Here is the number, worked out. Run the SLM on every request and escalate only the fraction it cannot handle to the LLM. If the SLM correctly handles a fraction f of traffic and the LLM costs K× the SLM per request, then per-request cost is C_s + (1−f)·K·C_s for the cascade versus K·C_s for always-LLM. The cascade wins whenever C_s + (1−f)·K·C_s < K·C_s, which simplifies to f > 1/K.
With a typical ~20× price gap between a small and a large model, the break-even is f > 1/20 = 5%: the cascade is cheaper the moment the SLM correctly answers just 1 in 20 requests. Real SLMs handle far more than 5% of everyday traffic, so at scale routing almost always wins on cost. (Assumes the SLM runs on every request and the LLM only on the escalated share; the small routing and double-latency overhead on escalated requests is ignored, and the SLM’s answers must actually clear your quality bar — cost only matters when quality holds.)
Why the capability gap is shrinking faster than people assume
The "small = weak" assumption is increasingly outdated for a specific reason: the recent gains in small models came primarily from better DATA CURATION and training recipes, not just from adding parameters — the "textbooks are all you need" line of research showed that a smaller model trained on carefully curated, high-quality data can outperform a much larger model trained on noisier, less curated web data. Modern ~3B-class SLMs now often beat 2023-era 70B-class models on many benchmarks, which means "small" increasingly describes efficient-for-its-capability, not simply weak.
This reframes the whole comparison: the LLM-vs-SLM line is less and less about a fixed capability gap that's permanently true, and more about DEPLOYMENT constraints — where does this need to run, what's the latency budget, does privacy require the data to never leave the device. Those constraints don't change as models get better; they're determined by the product, not the model generation.
An LLM's advantage isn't "smarter, full stop" anymore — it's "can afford to be less efficient because it doesn't have to fit on a phone." That's a deployment trade, not a permanent intelligence gap.
A worked scenario: a keyboard app’s two AI features
A mobile keyboard app's autocomplete and autocorrect need sub-50ms suggestions with zero network dependency — sending every keystroke to a cloud API would be both too slow and a real privacy and cost problem at that volume. An SLM (or smaller) running on-device is the only fit: the constraint isn't "what's the best possible suggestion," it's "what can respond fast enough, offline, without leaking every keystroke."
The same app's "help me rewrite this paragraph" feature is invoked rarely, by explicit user action, and tolerates a second or two of latency — a much better fit for calling out to a cloud LLM, where the higher-quality rewrite is worth the round-trip because the constraint here (occasional use, quality matters, latency is forgivable) is the opposite of autocomplete's. Same app, same company, two different deployment constraints, two different right answers.
Ask per-feature, not per-app: does THIS specific interaction need to be instant, offline, and private, or can it afford a round-trip for better quality? The answer rarely applies uniformly across a whole product.
The picture: one request through a cascade
Worked example: will the model fit on the device?
Before “is it good enough?” comes “does it fit?”. A model’s weights take parameters × bits per weight ÷ 8 bytes. Say an app may use 4 GB of a phone’s memory, and the phone reads memory at 50 GB/s (both figures are illustrative). Generating one token at batch size 1 reads every weight once, so bandwidth ÷ weight size is a ceiling on tokens per second.
| Model | Precision | Weights | Fits in 4 GB? | Ceiling at 50 GB/s |
|---|---|---|---|---|
| 70B | fp16 (16-bit) | 140 GB | No | 0.4 tok/s |
| 70B | int4 | 35 GB | No | 1.4 tok/s |
| 8B | fp16 | 16 GB | No | 3.1 tok/s |
| 8B | int4 | 4 GB | No room left for the KV cache or the app | 12.5 tok/s |
| 3B | fp16 | 6 GB | No | 8.3 tok/s |
| 3B | int4 | 1.5 GB | Yes, with 2.5 GB to spare | 33.3 tok/s |
| 1B | fp16 | 2 GB | Yes | 25 tok/s |
Three things fall out of the table. First, size decides more than capability does: no amount of quality makes a 35 GB file fit in 4 GB, which is why the page puts the line at deployment constraints. Second, quantisation is what makes on-device practical. 4-bit weights are a quarter of fp16, so a 3B model drops from 6 GB to 1.5 GB and its speed ceiling rises fourfold with it. In practice it takes a little more than the table shows, for quantisation scales and any layers kept at higher precision. Third, the weights are not the whole bill. The KV cache grows with every token of context, so a model that just fits with a short prompt can run out of memory on a long document. The 1.5 GB is also a download, and a user pays it before the feature does anything.
Latency, cost and quality trade-offs
Here Time is the latency a user sees and Space is the cost and memory side.
| Case | Time | Space | Why |
|---|---|---|---|
| Cloud LLM via API | Network round trip, then queue and generation | Per-token price on every call; nothing on the device | Highest quality ceiling. Needs a network, and the data leaves the device. |
| On-device SLM | No network hop; bound by the device’s memory bandwidth | Near-zero per call; costs memory, battery and a download | Works offline and keeps data local, within its narrower range. |
| Self-hosted SLM on a server | A round trip, but fast generation | You pay for the GPUs whether or not they are busy | Cheap per request only at high, steady volume. |
| Cascade, SLM then LLM | Easy requests are fast; escalated ones wait for both models | C + (1−f)·K·C per request | Wins on cost when f > 1/K, provided the router escalates the right requests. |
| Quantised (int4) SLM | Faster: a quarter of the bytes to read per token | A quarter of fp16 memory | Some quality loss, which varies by task. Measure it on yours. |
| Fine-tuned or distilled SLM | Same as any SLM | Training cost up front, plus upkeep | Can match a large model on one narrow task. It does not generalise beyond it. |
Notice that latency and cost pull in the same direction here, and quality pulls against both. That is why the useful question is never “which model is best?” but “what is the smallest model that clears the quality bar for this feature?”.
Common mistakes when choosing between LLM and SLM
- Choosing by parameter count or leaderboard
A public benchmark measures someone else’s task. Build a set of a few hundred real examples from your own feature, with the answers you expect, and score both models on it. That set also tells you
f, the only number the cascade’s cost depends on. - Trusting an uncalibrated confidence score
A cascade only works if the SLM’s confidence means something. A model that is confidently wrong never escalates, so its mistakes go straight to users. Pick the escalation threshold on labelled data, and count
fas the share it gets right, not the share it answers. - Forgetting the escalation latency
The flip-point formula ignores latency. An escalated request waits for the SLM, the check and then the LLM, so it is slower than calling the LLM directly. If hard requests are also the important ones, look at p95 latency on the escalated share before you celebrate the cost.
- Budgeting memory for weights only
The KV cache grows with context length, and the app, the OS and other apps share the same memory. Test on the lowest-end device you support, with the longest input you allow. A model that only fits on a flagship phone is a model for a minority of your users.
- Treating the on-device model as free to change
A cloud model can be swapped in an afternoon. An on-device model ships inside the app or as a separate download, so every update is a release and a multi-gigabyte transfer, and old versions stay in the field for months. Version the model, and keep the prompt format compatible across versions.
Where this shows up in production and interviews
- Phone operating systems
Platform vendors now ship a small model with the operating system so apps can share it instead of each bundling their own. Apple has described its on-device foundation model as roughly 3 billion parameters, with larger requests going to its servers. That is the cascade from this page, built into the platform.
- Model gateways and routers
In the cloud, the same idea becomes a router in front of several model tiers. It sends classification, extraction and short answers to a small model and the rest to a frontier one. The flip point
f > 1/Kis the router’s whole business case. - Regulated and air-gapped settings
Healthcare, legal and defence workloads often cannot send data to a third-party API at all. A small model on the organisation’s own hardware is then not a cost choice but the only option, which is the page’s point that deployment constraints decide.
- Interviews
“How much memory does a 7B model need?” is a standard warm-up: 7B × 2 bytes = 14 GB in fp16, 3.5 GB in 4-bit, plus the KV cache. The follow-ups are about the cascade: how you set the threshold, what happens to latency on escalation, and how you would know if the small model got worse.
Which would you pick?
Three situations. Pick the side you'd actually build — the explanation follows.
An on-device feature must work with no network, keep the text on the phone, and respond as the user types.
Offline, private and instant are the three properties the page assigns to small models, and each one alone rules out a round trip. An offline error state means the feature does not work when the requirement said it must, and caching cannot answer text the user is typing for the first time.
A colleague says "we standardised on the frontier model — it is simpler to have one."
The page is explicit that the answer rarely applies uniformly across an app: some interactions need broad novel reasoning, most do not. Defaulting everything to the largest model pays frontier latency and cost on the traffic an SLM would have handled correctly — the measurement the page asks for is what share of real traffic that actually is.
How should you read the claim that a small model "is nearly as good as" a frontier model?
The page's position is that a frontier model's advantage is being able to afford inefficiency because it does not have to fit on a phone. That makes the comparison task-dependent rather than absolute: strong on the narrow tasks it was shaped for, still behind on broad novel reasoning. Both "just marketing" and "size no longer matters" replace that with a slogan.
Quick answers
LLM or SLM — which should I use?
Decide by deployment constraint, not just capability. If the task needs to run offline, privately, or near-instantly at high volume, use an SLM. If it needs broad or novel reasoning and can tolerate cloud latency and cost, use an LLM.
Are small models still much weaker than large ones?
Less than commonly assumed. Recent gains from better data curation mean modern ~3B-class SLMs often beat older 70B-class models on many tasks. The gap that remains is more about deployment fit than a fixed intelligence ceiling.
What is model routing / cascading?
A production pattern where requests are sent to a cheap, fast SLM first, and only escalated to a bigger LLM when the SLM’s confidence is low or the task is genuinely hard — cutting cost and latency since most real traffic is easy.
Can an SLM and LLM work together in one product?
Yes, commonly. An on-device SLM handles fast, private, high-volume interactions, while a cloud LLM is reserved for rarer, harder requests that tolerate latency and benefit from broader reasoning — often within the same app.
Explore the topic
See this alongside everything else on the same subject — handbooks, system designs, challenges and tools, in one place.
More Handbooks
- The Prompting HandbookA friendly, hands-on field guide for everyday humans — learn the CRISP framework, spot bad prompts, practice with real recipes, play a drag-and-drop game, and test yourself with a quiz. No code required.Read →
- The Senior AI Engineer Interview Handbook60 questions across architecture, production incidents, agentic systems, RAG, evals, cost, safety, and leadership — what staff-level AI interviewers actually probe for.Read →
- The LLM Serving HandbookHow to serve large language models fast and cheap — prefill vs decode, the KV cache, continuous batching and PagedAttention (vLLM), quantization, speculative decoding, and the latency-vs-throughput tradeoffs that decide your inference bill.Read →
- The Transformers HandbookThe architecture behind every LLM, built up from scratch — tokens and embeddings, positional encoding, self-attention (query/key/value), multi-head attention, the transformer block (FFN, residuals, layer norm), and how a decoder-only model generates text autoregressively.Read →
- The Fine-Tuning HandbookWhen to fine-tune vs RAG vs prompting, full fine-tuning vs parameter-efficient methods, how LoRA and QLoRA make it cheap enough for a single GPU, why the data matters more than the method, catastrophic forgetting, and how to evaluate and decide.Read →
- The On-Device AI HandbookSmall models, everywhere: why 1–14B models got frontier-adjacent (distillation + textbook data), the napkin law of local inference (tokens/sec ≈ bandwidth ÷ bytes), quantization and the llama.cpp / GGUF / Ollama / MLX stack, the honest local-vs-cloud decision table, four hybrid patterns that ship, and the evals craft of choosing a small model that actually fits the device.Read →