On-Device LLMs
Why run a model on-device at all
The default architecture for most LLM-powered features sends a request to a remote server, runs the model on powerful data-center hardware, and streams a response back. This works well when connectivity is reliable and the content isn't sensitive, but it has three recurring costs: network round-trip latency on every request, a hard dependency on connectivity (no network, no feature), and the requirement to send the user's input — potentially sensitive personal or business content — off the device to a third party.
On-device LLMs move the model itself onto the user's phone, laptop, or embedded hardware, so inference happens locally without a network round trip. This isn't a strictly better architecture — it trades away the ability to run the largest, most capable models, which generally don't fit in the memory and compute budget of consumer hardware — but for the right use cases, the gains in latency, offline availability, and privacy are decisive enough to accept a smaller, less capable model.
The two enabling techniques: quantization and distillation
Quantization reduces the numerical precision used to store and compute a model's parameters — for example, converting weights stored as 16-bit or 32-bit floating-point numbers down to 8-bit or even 4-bit representations. This shrinks the model's memory footprint roughly in proportion to the precision reduction and speeds up computation, since lower-precision arithmetic is cheaper for hardware to execute, at the cost of some precision loss that, done carefully, often has only a small effect on output quality. Quantization is usually applied after a model is already trained (post-training quantization) or incorporated into training itself (quantization-aware training) for better quality at very low precision.
Distillation, covered in the SLM lesson as a way to produce smaller general models, plays an even more central role here: a large model's capability gets compressed into a dramatically smaller model specifically sized to fit comfortably within a phone's or laptop's memory and compute budget, trading breadth of capability for a footprint small enough to actually run locally. In practice, on-device deployment usually stacks both techniques — a distilled model that's then further quantized — to fit within the tight constraints of consumer hardware.
Quantization and distillation compared
| Technique | What it changes | Primary benefit | Primary cost |
|---|---|---|---|
| Quantization | Numerical precision of weights/activations | Smaller memory footprint, faster compute | Some precision/quality loss, more at very low bit-widths |
| Distillation | Model architecture/size itself | Dramatically fewer parameters to store and run | Narrower capability ceiling than the teacher model |
| Combined (typical on-device approach) | Both size and precision | Fits consumer-hardware memory and compute budgets | Compounded quality tradeoff versus a full-size, full-precision model |
Privacy and latency: the two real motivations
Privacy is often the decisive reason to choose on-device inference for a specific feature: if user input never leaves the device, there's no transmission to intercept, no third-party server processing sensitive content, and no data-retention policy at a remote provider to worry about — which matters a great deal for applications touching health information, private messages, financial details, or anything a user reasonably expects to stay local. This privacy benefit is structural, not just policy-based: it isn't contingent on trusting a vendor's stated data-handling practices, because the data simply never transmits in the first place.
Latency is the second major motivation: a local model responds in the time it takes the device's own hardware to compute a forward pass, with no network round trip at all, which matters for interactive, real-time use cases — live transcription, predictive text, on-the-fly translation during a conversation — where even a few hundred milliseconds of network latency would make the feature feel sluggish or unusable. Offline availability is a related practical benefit: an on-device model keeps working on a plane, in a basement with no signal, or in any environment with unreliable connectivity, where a cloud-dependent feature simply fails.
Note
Note
What's next
On-device deployment is the practical endpoint of the capability-cost tradeoff explored across this applied-AI arc — the same reasoning about matching model capability to actual task requirements, rather than defaulting to the largest available option, applies whether the constraint is a latency budget, a regulatory requirement, or a phone's memory limit.
I build these systems professionally.
Whether it's a RAG pipeline, analytics migration, or AI workflow — let's talk.