Google Gemma 4 Runs Natively on iPhone with Full Offline AI Inference
TL;DR Highlight
Google's open-source model Gemma 4 can now run on iPhone with full local inference without the cloud, demonstrating that on-device AI has moved beyond the experimental stage and entered a practical phase.
Who Should Read
iOS/Android developers looking to add AI features to mobile apps or considering edge AI solutions with privacy and offline requirements.
Core Mechanics
- Google's open-source model family, Gemma 4, can now run inference completely locally and offline on iPhone. There is no API call or cloud dependency.
- The flagship 31B variant in the model lineup showed similar performance to Qwen 3.5's 27B model in benchmarks. Gemma has approximately 4 billion more parameters.
- There are lightweight variants specifically designed for mobile deployment, E2B (2 billion parameters) and E4B (4 billion parameters), with Google even recommending E2B for its own apps. This is a choice considering memory and heat limitations.
- To get started, simply download the 'Google AI Edge Gallery' app from the App Store and select the desired model variant. Local inference is possible immediately without any separate settings or accounts.
- Google AI Edge Gallery is not just a simple text interface, but a platform that includes image recognition, voice interaction, and an extensible Skills framework. It is positioned as a foundation for developers to experiment with on-device AI.
- Inference is executed via the iPhone's GPU (Metal), and actual response latency is reported to be noticeably low. Actual benchmark figures measured Prefill speed of 231 t/s, Decode speed of 16 t/s, and time to first token of 1.16 seconds on an iPhone 16 Pro.
- The ability to operate offline is of practical value in enterprise use cases such as field work, medical environments, and where cloud processing is impossible due to data privacy regulations.
- The community has mentioned that it can also be run identically on Android via AI Core or llama.cpp.
Evidence
- There was criticism regarding the use of GPU (Metal). One comment stated, 'It seems they gave up on custom attention kernel compilation for Apple's dedicated NPU, ANE (Apple Neural Engine), and went around with Metal.' Metal is easy to port, but consumes much more battery than a dedicated NPU. It was evaluated as just a flashy tech demo until the ANE backend is rewritten.
- A developer created and released an offline code generation app called 'pucky' that runs on iPhone using Gemma 4 on GitHub (https://github.com/blixt/pucky). While the 4B model is technically executable, it automatically switches to 2B due to memory constraints, and it generates a single TypeScript file and compiles it with oxc. They stated that it is difficult to pass App Store review and must be built directly in Xcode.
- Experiences sharing being blocked by Apple's guideline 2.5.2 when attempting to deploy apps including local LLMs in the App Store have been shared. This points to Apple blocking LLM usage within the app store, and a practical concern that the distribution path for on-device AI apps may be limited.
- There was also criticism regarding the model structure characteristics of Gemma 4. 'Gemma 4 tends to activate almost all weights, resulting in high power consumption.' It was pointed out that it is less efficient than Qwen3-coder, which uses MoE (Mixture of Experts) to activate only about 3 billion parameters at a time. It was evaluated that there is still a lot of performance room left on the table.
- There were also warnings about the reliability of small models. An experience was shared where it confidently gave the wrong answer ('Yes, it is') when asked, 'Is it okay to give an avocado to a dog?' This case reminds us that it is dangerous to use small on-device models directly for medical or safety-related judgments.
How to Apply
- If you are developing enterprise field apps in areas such as medical, financial, and military where cloud AI APIs cannot be used due to data privacy regulations, adopting Google AI Edge Gallery and Gemma 4 E2B/E4B variants as an on-device inference base can satisfy both regulatory compliance and AI functionality.
- If you are trying to embed AI functionality in an iOS app, you may be blocked by Apple's guideline 2.5.2 when deploying to the App Store, so it is good to review TestFlight or enterprise deployment paths in advance. As in the case of community developers, Xcode direct build and sideloading methods can also be alternatives.
- When linking an LLM to a mobile app, model size selection is important. Considering memory and heat, E2B is more realistic than E4B. In fact, if you try 4B, it often automatically falls back to 2B due to memory constraints, so it is safer to design the UX based on E2B from the beginning.
- If you are concerned about battery consumption of on-device inference based on Gemma 4, you should add additional logic to limit usage frequency in battery-sensitive scenarios (e.g., minimize background processing, maintain short context) until support for ANE (Apple Neural Engine) is added instead of the current GPU (Metal) based backend.
Terminology
Related Papers
Claude Code sends 33k tokens before reading the prompt; OpenCode sends 7k
동일한 모델과 작업 환경에서 Claude Code와 OpenCode의 실제 토큰 사용량을 API 레벨에서 측정한 결과, Claude Code가 시스템 프롬프트 오버헤드만으로 OpenCode 대비 4.7배 더 많은 토큰을 소비한다는 것을 확인했다.
Mesh LLM: distributed AI computing on iroh
사무실, 집, 클라우드에 흩어진 GPU들을 하나의 OpenAI 호환 API로 묶어주는 분산 LLM 실행 시스템으로, 비싼 API 비용 없이 큰 모델을 직접 운영할 수 있다.
Show HN: Frugon – Find which LLM calls a cheaper model could handle (local, MIT)
내 LLM API 비용이 어디서 새는지 로컬에서 분석해주는 오픈소스 CLI 도구로, 비싼 모델 대신 저렴한 모델로 전환 가능한 호출을 골라낸다.
Jamesob's guide to running SOTA LLMs locally
2천 달러짜리 RTX 3090 한 장부터 4만 달러짜리 RTX PRO 6000 4장 셋업까지, 로컬에서 최신 LLM을 직접 돌리는 방법을 하드웨어 선택·구성·실행 설정까지 통째로 정리한 실전 가이드다.
Faster embeddings: how we rebuilt the ONNX path in Manticore
Manticore Search가 기존 SentenceTransformers/Candle 백엔드를 ONNX Runtime으로 교체해 텍스트 임베딩 생성 속도를 평균 14배 향상시켰다. 별도 모델 서비스 없이 DB 내부에서 직접 임베딩을 처리하는 구조에서 INSERT 속도가 곧 임베딩 속도이기 때문에 이 개선은 실질적인 ingest 처리량 향상으로 직결된다.
Asymmetric Quantization: Near-Lossless Retrieval with 97% Storage Reduction
멀티벡터 검색 모델의 문서 벡터를 1비트 이진값으로 압축하고 쿼리 벡터만 int8로 유지하는 비대칭 양자화 기법으로, 스토리지를 97% 줄이면서 검색 품질 손실을 0.61점(NDCG@10 기준)에 그치게 만든 실제 프로덕션 적용 사례다.