← All courses

On-Device vs Cloud AI

🗓 May 31, 2026 ⏱ 2 min read

Why this choice matters most

Almost every Mobile AI feature starts with one question: should this run on the device or in the cloud? Get it right and your feature is fast, private and reliable. Get it wrong and it’s slow, expensive, drains the battery, or breaks offline. This lesson gives you a clear framework.

On-device AI

Strengths

  • Speed — no network round-trip; results in milliseconds.
  • Privacy — data never leaves the phone (great for photos, health, faces).
  • Offline — works with no internet.
  • No per-call cost — no server bill per inference.

Limits

  • Constrained by device memory, CPU/GPU/NPU and battery.
  • Models must be small — less capable than giant cloud models.
  • The model ships inside your app (bigger app size) and must be updated via app releases.

Cloud AI

Strengths

  • Power — run huge models (large language models, advanced vision) impossible on a phone.
  • Easy updates — improve the model server-side without an app release.
  • Consistent results across all devices.

Limits

  • Needs the internet; adds latency (the network round-trip).
  • Costs money per request — can get expensive at scale.
  • Sends user data to a server — privacy and compliance concerns.

A decision framework

Sensitive or offline? Yes -> On-device No -> consider cloud Needs a huge model? -> Cloud

Ask in order:

  1. Is the data sensitive, or must it work offline? → lean on-device.
  2. Is a small model good enough (e.g. detect a face, classify a photo)? → on-device.
  3. Does it need a large/generative model (chat, complex reasoning, image generation)? → cloud.
  4. Will it run constantly (battery) or rarely? → constant + heavy favours cloud or a tiny on-device model.

The hybrid pattern

Great apps blend both: a fast on-device model for the common case, falling back to the cloud for the hard case. Example: detect text on-device instantly, but send it to a cloud LLM only when the user asks to summarise it.

Common mistakes

  • Sending private data (photos, health) to the cloud when on-device would do.
  • Putting a model that’s too big on-device, hurting performance and app size.
  • Ignoring offline and error states for cloud features.
Summary: Choose on-device for speed, privacy and offline; choose cloud for power and easy updates. Decide per feature using data sensitivity, model size, frequency and connectivity — and use a hybrid where it helps.