AI-Models

On-Device AI 2026: These Models Run Offline on iPhone and Android

4 min read
A large smartphone displaying a brain made of circuit traces, next to a crossed-out cloud, surrounded by gears and computer chips Image generated with GPT Image 2
A large smartphone displaying a brain made of circuit traces, next to a crossed-out cloud, surrounded by gears and computer chips

TL;DR Too Long; Didn’t read

Several AI models now run completely offline on smartphones, without internet connection. Apple provides two of its own foundation models, AFM 3 Core and AFM 3 Core Advanced, directly on the iPhone, while Google brings Gemini Nano and the open Gemma 4 to Android. Gemma 4 and compressed models like Bonsai 27B also run on the iPhone via third-party apps.

Key takeaways

  • Apple's AFM 3 Core Advanced uses 20 billion parameters, but activates only one to four billion of them per request.
  • Google's open Gemma 4 offers a context window of 128,000 tokens as E2B and E4B and processes text, image, and audio.
  • Gemma 4 runs not only on Android but also on the iPhone thanks to frameworks like MLX and llama.cpp.
  • Apple's base model AFM 3 Core limits input and output together to 4,096 tokens.
  • PrismML's compressed Bonsai 27B brings 27 billion parameters and a context window of 262,000 tokens to the iPhone.
  • Google has not yet released official information on parameters or context windows for Gemini Nano.

AI models are increasingly running directly on smartphones, completely without an internet connection or cloud servers. Apple integrates two of its own foundation models, AFM 3 Core and AFM 3 Core Advanced, directly into iOS, while Google offers comparable components for Android with Gemini Nano and the open Gemma 4. The performance of these models varies significantly in terms of parameter count, context window, and supported input formats.

Apple delivers two foundation models directly on the iPhone

Apple’s base model AFM 3 Core operates with around three billion parameters and runs on all Apple Intelligence-capable devices. It processes text and images as input and outputs text. The context window is shared between input and output: According to Apple’s developer documentation, a total of 4,096 tokens are available, of which about 96 tokens remain for the response. At WWDC on June 8, 2026, Apple introduced a second, significantly larger model, AFM 3 Core Advanced. It utilizes a sparse architecture with 20 billion parameters but activates only one to four billion of them per request. The model is, according to Apple Machine Learning Research, natively multimodal and additionally processes audio. Unlike the base model, AFM 3 Core Advanced runs only on the iPhone 17 Pro and on iPad and Mac models with A19 Pro, M3, or M4 chips; devices with eight gigabytes of RAM are excluded. For tasks that exceed the device’s capabilities, Apple’s Private Cloud Compute steps in as needed with a significantly larger context window of 32,000 tokens – but then no longer purely locally.

Google brings Gemini Nano and the open Gemma 4 to Android

On the Android side, Gemini Nano runs via the system service AICore on compatible devices like Pixel smartphones. Google has not yet published official values for parameter count and context window. Since April 2, 2026, Google has also offered Gemma 4 in the AICore developer preview – an open model in two sizes. E2B has, according to Google’s model card, 2.3 billion effective parameters (5.1 billion including embeddings), while E4B has 4.5 billion effective parameters (8 billion including embeddings). Both variants offer a context window of 128,000 tokens, process text, images, and audio, and support more than 140 languages. E2B is optimized for speed and is about three times faster than E4B, which, in turn, provides more computing power for more complex tasks. The models run on AICore-capable devices with neural processing units from Google, MediaTek, or Qualcomm.

Open models like Gemma 4 now also run on the iPhone

Gemma 4 is not an Apple product, but it is openly available – and can therefore also be run on the iPhone, for example via Google’s own LiteRT-LM, Apple’s framework MLX, or the open-source llama.cpp. A benchmark published in May 2026 measured about 37.8 tokens per second for Gemma 4 E2B on an iPhone 17 using llama.cpp, while Google’s own LiteRT-LM achieved around 55.4 tokens per second. Another example of open models on the iPhone is Bonsai 27B from PrismML: The California startup compresses a 27-billion-parameter model through quantization to 3.9 to 5.9 gigabytes while reportedly maintaining a context window of 262,000 tokens. Through the Locally AI app, it runs on iPhones from model 15 with around eleven tokens per second – these values come from PrismML itself and are independently unverified. Microsoft also offers open models with Phi-4-mini (3.8 billion parameters, pure text model) and Phi-4-multimodal (5.6 billion parameters, additionally processes image and speech) with a context window of 128,000 tokens each, which can be used locally on iPhone and Android via apps based on MLX or ONNX Runtime.

ModelPlatformEffective ParametersContext WindowInputOutput
Apple AFM 3 CoreiPhone (Apple Intelligence)approx. 3 billion4,096 tokens (shared)Text, ImageText
Apple AFM 3 Core AdvancediPhone 17 Pro, iPad/Mac with M3/M420 billion (1–4 billion active)not specified by AppleText, Image, AudioText
Google Gemini NanoAndroid (AICore)not specified by Googlenot specified by GoogleTextText
Google Gemma 4 E2BAndroid (AICore), iPhone (third-party)2.3 billion (5.1 billion with embeddings)128,000 tokensText, Image, AudioText
Google Gemma 4 E4BAndroid (AICore), iPhone (third-party)4.5 billion (8 billion with embeddings)128,000 tokensText, Image, AudioText
Microsoft Phi-4-miniiPhone/Android (third-party apps)3.8 billion128,000 tokensTextText
Microsoft Phi-4-multimodaliPhone/Android (third-party apps)5.6 billion128,000 tokensText, Image, AudioText
PrismML Bonsai 27B (compressed)iPhone from model 1527 billion (compressed to 3.9–5.9 GB)262,000 tokens (according to PrismML)Text, ImageText

It will be crucial whether Apple opens AFM 3 Core Advanced beyond the currently exclusive iPhone 17 Pro and M3/M4 devices or whether open alternatives like Gemma 4 and Bonsai 27B continue to close the gap on older devices. For Google, it remains open when Gemini Nano will receive complete technical specifications or whether Gemma 4 will take on a leading role in AICore in the long term.

Frequently asked questions

Which iPhones support AFM 3 Core Advanced?

Only the iPhone 17 Pro and iPad and Mac models with A19 Pro, M3, or M4 chip. Devices with eight gigabytes of RAM are excluded.

Is Gemma 4 free to use?

Yes, Gemma 4 is openly available through Google AI and platforms like Hugging Face and Ollama, with no licensing fees.

Does on-device AI require an internet connection?

No, all mentioned models process requests completely locally on the device, without data transfer to a server.

How does on-device AI compare to cloud models?

On-device models are significantly smaller and faster but deliver weaker results on complex tasks compared to large cloud models like Gemini 3.5 Pro or Claude Opus.

Can I use Gemma 4 on an older iPhone?

Yes, via apps with llama.cpp or MLX support, but the speed noticeably decreases on older chips.

Changelog

  • – Initial publication of this guide.

← Back to the blog