iPhone and iPad
Gemma 4 on iPhone and iPad
Check iPhone and iPad hardware fit for Gemma 4: iOS Jetsam memory caps, Metal acceleration via PocketPal or llama.cpp Swift, and realistic E2B vs E4B limits.
Running Gemma 4 locally on iPhone and iPad relies on Apple Metal GPU shaders inside llama.cpp or MLX Swift wrappers, which deliver surprisingly brisk speeds on A17 Pro, A18 Pro, and M-series iPads.
Unlike macOS, however, iOS enforces a strict non-swapping per-process memory watchdog called Jetsam. Crossing an app’s allocated RAM limit triggers an immediate background kill without throwing an in-app error message.
iPhone and iPad Jetsam memory ceilings
Check your device’s physical RAM and Jetsam limit before importing multi-gigabyte GGUF models.
| Apple Mobile Device | Unified RAM | Est. Jetsam Ceiling | Best Gemma 4 Choice | Recommended Context |
|---|---|---|---|---|
| iPhone 14 / 15 (non-Pro) | 6 GB | ~3.0 GB | Qwen 3 0.6B / Gemma 3 1B | 1K–2K max (E2B risky) |
| iPhone 15 Pro / 16 / 16 Pro | 8 GB | ~4.8–5.0 GB | Gemma 4 E2B (Q4_K_M) | 2K–4K tokens |
| iPad Air / Pro M2 / M4 (8 GB) | 8 GB | ~5.5 GB | Gemma 4 E2B / tight E4B | 2K–4K tokens |
| iPad Pro M4 (16 GB model) | 16 GB | ~12.0 GB | Gemma 4 E4B / 12B Q4_K_M | 4K–8K tokens |
Best starting assumptions
- Start with Q4_K_M builds of Gemma 4 E2B (~3.1 GB memory with runtime buffers) on 8 GB iPhones.
- Keep context length between 2,048 and 4,096 tokens during initial tests so KV cache growth does not breach Jetsam mid-reply.
- Reserve Gemma 4 E4B (~4.6 GB) and 12B (~7.1 GB) for 16 GB M-series iPads or desktop Macs.
Recommended use cases
- Offline airplane Q&A and field notes
- Private document summarization and grammar checking
- On-device translation with zero network dependency
- Quick prompt validation before building Mac/desktop workflows
When to stop forcing mobile
Move the workflow to a Mac or Windows machine if the app keeps closing back to the Home Screen (Jetsam code 0x8badf00d), Metal shaders warm up slowly, or you need 16K–128K repository context windows.
Practical Metal shader caching & iOS battery guidance
On A17 Pro, A18 Pro, and M-series iPad chips, llama.cpp compiles Metal compute pipelines on the first prompt after an app update or cold device reboot. That initial 5-to-15 second delay is one-time shader compilation rather than model failure.
To avoid Jetsam pressure during multi-turn sessions on 8 GB iPhones, keep conversation threads concise, start fresh chats when switching topics, and avoid running heavy Safari tabs or video recording concurrently. Whenever you need 12B multimodal OCR or 26B-A4B MoE reasoning, switch from mobile to an Apple Silicon Mac or desktop workstation.
For developers evaluating Swift integrations, verify your target app requests the extended memory entitlement (`com.apple.developer.kernel.increased-memory-limit`) on supported iPadOS and iOS devices; without that entitlement, even 16 GB M4 iPads can be capped well below hardware capacity during model allocation, leading to unexpected early process terminations.
Run an LLM locally on iPhone with PocketPal
- Install PocketPal or another llama.cpp based iOS client.
- Download a small GGUF such as Qwen 3 0.6B or Gemma 4 E2B IT.
- Open Files and import the model into PocketPal.
- Select the model and keep context low for the first run.
- Send one short text prompt before trying longer chats.
- Drop to a smaller model if iOS unloads the session.
Run a local LLM on iPad without forcing desktop models
- Check the iPad model and available storage before downloading files.
- Install PocketPal or a compatible local inference app.
- Import the smallest model that matches your task.
- Run a short offline Q&A prompt.
- Increase context only after the model stays loaded.
- Use a Mac or Windows machine for 26B or 31B experiments.
Recommended models
Frequently asked questions
- Can I run an LLM locally on iPhone?
- Yes, you can run an LLM locally on iPhone with PocketPal or another Metal llama.cpp app. On 8 GB iPhones (15 Pro / 16 series), start with Gemma 4 E2B IT at Q4_K_M and cap context around 2K–4K tokens.
- How do I run an LLM locally on iPad?
- Install PocketPal or an MLX Swift iOS app, import a Q4_K_M GGUF file matching your iPad RAM tier (8 GB vs 16 GB), and run a short prompt before raising context.
- Can iPhone 15 Pro run local AI models?
- Yes. Its 8 GB unified memory and A17 Pro Metal GPU run Gemma 4 E2B Q4_K_M cleanly for short-to-medium offline conversations.
- Why does my iPhone crash back to the Home Screen mid-generation?
- That silent exit is the iOS Jetsam memory watchdog terminating the app when weights plus KV cache exceed ~4.8 GB on an 8 GB phone. Lower context length, close Safari/camera apps, or switch to a smaller quant.
- Which model should I use first on 6 GB iPhones?
- On 6 GB models like standard iPhone 14 or iPhone 15, start with Qwen 3 0.6B or Gemma 3 1B rather than E2B to maintain safe headroom below ~3 GB.