Inference, Serving & Production·Question 34 of 76Intermediate

When does on-device or edge inference make sense, and what actually constrains it?

Type it the way you would explain it to an interviewer. A few sentences is enough; you can't break anything.

Model answer: the part to lead with

It makes sense when privacy or data residency, offline operation, per-request cost at very high volume, or near-zero network latency matters more than peak model quality. Typical real deployments: text prediction, on-device summarisation and transcription, classification or redaction before anything goes to the cloud, and local agents on laptops.

Full worked answer

It makes sense when privacy or data residency, offline operation, per-request cost at very high volume, or near-zero network latency matters more than peak model quality. Typical real deployments: text prediction, on-device summarisation and transcription, classification or redaction before anything goes to the cloud, and local agents on laptops.

The constraints, in the order they bite:

  • Memory. A phone realistically gives an app a couple of GB. That puts you around 1B to 4B params at 4-bit (roughly 0.5 to 2.5 GB), with ~8B at 4-bit (~4.5 GB) only on high-memory devices. KV cache competes for the same budget, so usable context is short. Laptops are far more generous, which is why the local-agent story is a laptop story first.
  • Bandwidth. You are at batch 1 forever, so decode is purely memory-bandwidth bound. Phone LPDDR5X sits in the tens of GB/s versus a datacentre GPU's TB/s, so expect an order of magnitude fewer tokens/s. The batching trick that saves you in the cloud does not exist here.
  • Thermals and battery. Sustained generation throttles. A benchmark's first 30 seconds is a lie; measure a long run and measure power.
  • Distribution. Multi-GB model downloads hurt install rates and updates. OS-provided on-device models sidestep this, at the price of less control.
  • Toolchain. llama.cpp/GGUF, MLX on Apple silicon, ONNX Runtime, Core ML and vendor NPUs. NPU support is uneven, and operator coverage plus supported quantization formats decide feasibility more often than raw TOPS.

The design that usually wins is hybrid: a small local model handles classification, routing, redaction and drafting, and hard queries escalate to the cloud; offline degrades to local-only. Evaluate the small model on your task, not on general leaderboards. The quality cliff from a frontier model to a 3B is task-dependent: often acceptable for extraction and classification, poor for open-ended reasoning.

What a good answer covers

  • It makes sense when privacy or data residency, offline operation, per-request cost at very high volume,…
  • Typical real deployments: text prediction, on-device summarisation and transcription, classification or…
  • Memory
  • Bandwidth
  • Thermals and battery

Key terms: Memory · Bandwidth · Thermals and battery · Distribution · Toolchain

Interviewer follow-ups to expect

  1. How do you decide where the local/cloud routing boundary sits?

  2. What breaks about your evaluation and observability story when inference runs on the user's device?

Worked answer from AI-Engineer-Interview-Questions by Om (MIT), reformatted for LLM Prep · answer text last updated 6 November 2026 · scoring and review schedule by LLM Prep