What Is On-Device Inference?
Running a model on the user's own phone or laptop, why teams do it, and the memory and device limits, explained for your AI interview.
In short
On-device inference means the model runs on the user's own phone, laptop or browser, with no server round trip. The data stays local and each call adds no server bill, but the model has to be small enough for the device's memory, battery and speed.
10 min readIntermediateOccasional · estimateFacts checked 27 November 2026
Say it out loud
Read it once, then say it without looking. Start with the short one; use the long one when they ask you to go deeper.
On-device inference means the model runs on the user's own phone or laptop. The data stays on the device, and each call adds no server bill. The catch is size. A phone has less memory and battery than a data centre, so teams shrink the model with quantisation, which stores its numbers with fewer bits. They keep the device route for small, frequent jobs and send the hard ones to a server.
On-device inference means the model runs on the user's own hardware: a phone, a laptop or a web browser. The device does the work itself, with no server round trip. Google's ML Kit GenAI APIs, which run on Android devices through AICore, describe the same benefits: the input and output are processed locally, the feature keeps working without a reliable connection, and there is no extra server cost for each call.
The trade-off is size. A phone has less memory and battery than a data centre, so the model has to be small, and often shrunk. Quantisation stores each number with fewer bits, which cuts the memory needed. A three-billion-parameter model, as a round example, needs about six gigabytes at 16 bits, and about one and a half at 4 bits. In that made-up case, the 4-bit version fits a 2 GB app budget.
Devices also differ. Google's page says a model's availability and version may vary with the device's RAM, OS version and update status. Microsoft's guide says performance varies with the device hardware, so teams should test on the weakest device they promise to support.
In a real product, I would keep small, private and frequent jobs on the device, and send the heavy ones to a larger model in the cloud. That split is a sensible answer to give an interviewer.
What is on-device inference, in plain words?
Inference is the step where a trained model reads new input and produces an answer. On-device inference means that step happens on the user's own phone, laptop or browser. The model file sits on the device, and the device does the work, with no server round trip.
Think of a field engineer with a laminated manual in the van. The answer comes from the van, with no call to head office. But the van can carry only part of the library, and the manual must be replaced when a standard changes. A clinic's note app works the same way: a nurse dictates a note on a tablet, and a small model tidies it without needing a signal.
Key words
- Inference
- Running a trained model on new input to get an answer.
- Server round trip
- Sending a request to a remote computer and waiting for the reply.
- Quantisation
- Storing the model's numbers with fewer bits, so it takes less memory.
- Accelerator
- A chip built for the matrix maths of AI, such as a phone's neural engine or a graphics chip.
Why move a model onto the device?
Three reasons come up most. Each one is something a server cannot give as easily.
- Privacy
Data stays on the device
Google's on-device APIs say input, inference and output are processed locally. Nothing has to leave the device for the model to answer.
- Reliability
Works without a signal
The answer does not wait on a network round trip, so a clinic basement or a plane still works.
- Cost
No bill per call
A server bill grows with every call. An on-device call adds no server cost, though the team still pays to build and ship the app.
“Input, inference, and output data is processed locally”
Google, ML Kit GenAI APIs
“No additional server cost incurred for each API call”
Google, ML Kit GenAI APIs
The server still often gives the better answer, because it can usually hold a larger model. The device wins on privacy, offline use and cost per call, and it loses on raw capability.
What limits what can run on a device?
Three limits decide what fits: memory, battery and heat. The model has to load into memory before it answers, and each new word it writes needs the chip to move the model's numbers through memory. That uses battery and makes the device warm. Then there is the mix of hardware, because one phone can have a fast chip and another a slow one.
“devices with limited DRAM capacity”
Researchers, "LLM in a flash" (arXiv, 2023)
“Model availability and version may vary depending on the device's RAM configuration, OS version, and AICore update status”
Google, ML Kit GenAI APIs
Microsoft's guide to local AI on Windows says the same thing in plain terms: performance and compatibility vary with the device hardware. So a team should test on the weakest device it promises to support.
Can a model fit in a phone's memory?
Start with arithmetic. The numbers and the budget below are made up. The script is simplified: a real app also needs memory for its cache and runtime, so leave headroom.
# Does a made-up 3-billion-parameter model fit a made-up 2 GB app budget?
PARAMS = 3_000_000_000
BUDGET_GB = 2.0 # memory the app may use, after the OS and other apps
for bits in (16, 8, 4):
size_gb = PARAMS * bits / 8 / 1_000_000_000 # bits to bytes, then to GB
verdict = "fits" if size_gb <= BUDGET_GB else "too big"
print(f"{bits:>2}-bit: {size_gb:.2f} GB, {verdict}")Output
16-bit: 6.00 GB, too big 8-bit: 3.00 GB, too big 4-bit: 1.50 GB, fits
Fewer bits per number is the usual first cut, and that is quantisation. Hugging Face's guide for its browser library says that in resource-constrained environments such as browsers, a quantised version of the model is advisable, to lower bandwidth and optimise performance.
- 1
Pick the smallest model that does the job
Test it on your own examples. A small model is enough for many narrow tasks, and a bigger one only adds weight.
- 2
Quantise it
Store its numbers with fewer bits, then check the answers still pass your tests.
- 3
Convert it for the device
PyTorch's ExecuTorch and Google's LiteRT are runtimes built for deploying models on edge devices.
- 4
Test on the weakest device you support
Measure speed, memory and heat there, on the oldest phone or laptop the team supports.
- 5
Plan the fallback
If the device is too old or the task too hard, send that request to a cloud model.
Which work should stay on the device?
Keep work on the device when the data is sensitive, the network is weak, or the task is small and frequent. Send the rest to a bigger model on a server. A common design runs the small job locally and keeps a cloud model for the hard cases.
Where a clinic note gets its answer
Nurse's dictated note
starts on the ward tablet
Server route
Upload the note
waits on weak wifi
On-device route
Small model, local
runs on the tablet
Slow or dropped
the nurse waits or retypes
Note saved
ready at the bedside
- 1The note goes up to a server, the old way.
- 2The note stays on the tablet, and the small model works on it there.
- 3A weak signal drops the upload, and the nurse waits.
- 4The small model finishes without any network.
- Good fit
Short, private, frequent
Dictation clean-up, spelling fixes, a one-note summary, or labelling a photo on the phone.
- Poor fit
Long, heavy or newest
Research across 40,000 contract files, or work that needs the latest large model.
How would you ship a note app for a clinic with weak wifi?
A made-up clinic app turns a nurse's dictated note into a draft chart entry on a tablet. The wards have patchy wifi, and a note should not leave the tablet until the nurse saves it.
- 1
Run the clean-up on the tablet
A small quantised model tidies the dictation into a draft, with no signal needed.
- 2
Save every note locally first
The nurse never loses work, even if the app crashes or the wifi drops.
- 3
Sync when a connection returns
A queue sends saved notes to the server later, and the nurse sees a sent mark when it lands.
- 4
Send only the hard cases to the cloud
A long discharge summary goes to a larger model, only when a connection is up and the clinic has approved it.
What does the interviewer want to hear?
A strong answer covers
- A plain definition: the model runs on the user's device, with no server round trip.
- The three wins: data stays local, it works offline, and there is no server bill per call.
- The three limits: memory, battery and heat, plus the mix of hardware.
- Quantisation as the usual way to make a model fit.
- A hybrid plan: a small model on the device, and the cloud for the hard work.
- Testing on the weakest device you support.
Common traps
Trap"On-device means it is always faster."
BetterRemoving the network trip helps, but speed depends on the chip, so measure it on the target device.
Trap"It stays on the phone, so security is done."
BetterStored notes still need encryption, and a lost phone can expose whatever the app keeps.
Trap"A small model is just a worse one."
BetterFor a narrow task a small model can be good enough. Test it on your own examples before deciding.
Can you pick the right design?
Spot the wrong design
A clinic app must save a nurse's note in a basement with no signal. Which line breaks that rule?
Quick check
A made-up 3-billion-parameter model stores each number in 16 bits. About how much memory do its numbers take?
Can you answer these from memory?
Flash cards · tap a card to flip it
What will they ask next?
Learn it in depth
Last updated on 27 November 2026
Putting an AI model on phones, tablets or in a browser?
I design and build AI products and agents, including the split between what runs on the device and what runs in the cloud. Book a short call and tell me which devices and data you have.