Vibe Engines
YouTube

Vibe Engines is free, interactive AI engineering & system design — runs in your browser. Pick a learning path

Handbooks  /  LLM vs SLM
AI~8 min readComparison
Head to Head

LLM vs SLM: which one fits where it has to run?

LLMvsSLM

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."

01

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.

→ The rule

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.

02

Head to head

DimensionLLMSLM
ParametersTens to hundreds of billions+Typically under ~10B, often 1–3B
Where it runsDatacenter GPU / cloud APIOn-device — phone, laptop, edge
LatencyNetwork round-trip + larger computeNear-instant, local, no network hop
Cost per callAPI $ per tokenNear-zero marginal cost once deployed
Capability breadthBroad general reasoning, long-tail knowledgeNarrower, best when specialized for a task
PrivacyData leaves the device to a providerCan run fully on-device, nothing leaves
Offline capabilityNeeds networkWorks offline
Novel multi-step reasoningStrongerWeaker outside its training distribution
03

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
04

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.

→ The cheap default

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.

→ The number

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.)

05

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.

→ The trade you’re actually making

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.

06

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.

→ The pattern generalizes

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

The picture: one request through a cascade

request SLMon device confident?calibrated yes, share f answer no, share 1−f cloud LLMK× the cost cost/request = C + (1−f)·K·C; escalations wait for both models
The cascade from section 04, drawn as a request path. Every request pays for the SLM. Only the share it is not confident about pays for the LLM as well, and waits for both. The whole design rests on the middle box: if the confidence check passes wrong answers, they never reach the LLM.
By the numbers

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.

ModelPrecisionWeightsFits in 4 GB?Ceiling at 50 GB/s
70Bfp16 (16-bit)140 GBNo0.4 tok/s
70Bint435 GBNo1.4 tok/s
8Bfp1616 GBNo3.1 tok/s
8Bint44 GBNo room left for the KV cache or the app12.5 tok/s
3Bfp166 GBNo8.3 tok/s
3Bint41.5 GBYes, with 2.5 GB to spare33.3 tok/s
1Bfp162 GBYes25 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.

Trade-offs

Latency, cost and quality trade-offs

Here Time is the latency a user sees and Space is the cost and memory side.

CaseTimeSpaceWhy
Cloud LLM via APINetwork round trip, then queue and generationPer-token price on every call; nothing on the deviceHighest quality ceiling. Needs a network, and the data leaves the device.
On-device SLMNo network hop; bound by the device’s memory bandwidthNear-zero per call; costs memory, battery and a downloadWorks offline and keeps data local, within its narrower range.
Self-hosted SLM on a serverA round trip, but fast generationYou pay for the GPUs whether or not they are busyCheap per request only at high, steady volume.
Cascade, SLM then LLMEasy requests are fast; escalated ones wait for both modelsC + (1−f)·K·C per requestWins on cost when f > 1/K, provided the router escalates the right requests.
Quantised (int4) SLMFaster: a quarter of the bytes to read per tokenA quarter of fp16 memorySome quality loss, which varies by task. Measure it on yours.
Fine-tuned or distilled SLMSame as any SLMTraining cost up front, plus upkeepCan 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?”.

Watch for

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 f as 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.

In the wild

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/K is 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.

Your call

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.

A colleague says "we standardised on the frontier model — it is simpler to have one."

How should you read the claim that a small model "is nearly as good as" a frontier model?

Frequently asked

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.

LLM vs SLM · Vibe Engines · 2026
Finished this one? 0 / 209 Handbooks done
NextThe AI Cost Engineering Handbook Next on the “Serving models, and paying for them” ladder · rung 9 of 13

Explore the topic

See this alongside everything else on the same subject — handbooks, system designs, challenges and tools, in one place.

More Handbooks