Google AI Edge Gallery On-Device LLM Guide
While everyone is talking about the cloud arms race of hundred-billion-parameter models, another, quieter revolution is happening in our pockets. If you turn off the phone’s Wi-Fi and mobile data and switch on airplane mode, can it still understand the photos in the album, pin down a moment in a video, and even control system settings in natural language?
Google’s official open-source Google AI Edge Gallery gives a hard yes.
It is Google’s official reference app for the LiteRT on-device generative AI ecosystem—and using a Google Pixel 10 (128GB / Tensor G5) as a concrete hardware baseline shows how much genuinely offline capability fits within 6–7 GB of storage.
Taking Apart Google AI Edge Gallery: Not Just Another Wrapped Chat Box
There are already plenty of open-source tools that run GGUF models on a phone, such as PocketPal and MLC Chat. Google AI Edge Gallery is aimed somewhere else. It is the official flagship reference app for Google’s LiteRT ecosystem, formerly TensorFlow Lite.
Core Architecture: LiteRT, Pressed Down to the Hardware Operators
Local inference on phones has usually leaned on a general-purpose CPU, or on OpenCL that was never fully tuned. That runs hot and drains the battery. AI Edge Gallery is built directly on the LiteRT and litert-lm runtimes. It can compile the model’s compute graph and offload it to the phone chip’s dedicated NPU/TPU or GPU:
-
SoC-specific builds: Open the project’s GitHub Releases page and you will find that, besides a generic arm64-v8a package, Google has unusually shipped separate builds for particular flagship chips. One is ai_edge_gallery_app_tensor_g5.apk for the Pixel 10 series. Others are the sm8750 / sm8850 packages for Qualcomm Snapdragon flagships. That chip-level fit is there so the TPU/NPU operators can run at full strength.
-
Native multimodal support: Unlike a text-only inference framework, it natively runs text, image input through a vision encoder, realtime audio (ASR/TTS), and high-dimensional embeddings together.
From Toy Conversation to an On-Device Agent
A lot of people still think of a small on-device model, 2B to 4B parameters, as something that writes worse poems than the cloud and rambles when it reasons. AI Edge Gallery is explicit about the design: the point of a small on-device model is not reciting an encyclopedia. It is private handling of the data on your person, very low-latency intent routing, and system tool calls.
The project builds in three killer directions:
-
Function calling: With a very small model tuned for the job, such as FunctionGemma 270M, it turns natural language into system API calls.
-
Agent Skills and local MCP: It experimentally brings in the Model Context Protocol (MCP) and modular skill loading. You can attach Wikipedia lookup, an interactive map card, or even a custom URL skill, so the on-device model can close the loop: think, call a tool, ask for approval, then answer.
-
On-device multimodal RAG: With EmbeddingGemma 2, it builds a high-dimensional semantic index locally over private photos and videos.
Engineering Details for People Who Like to Tinker
-
Hugging Face, direct, plus local import: The built-in model manager pulls official quantized .task or .litertlm models in one step. People who want to go further can convert a PyTorch model with the Google AI Edge Torch toolchain and import it onto the phone for testing.
-
A hard-nosed live benchmark board: Every run can open detailed numbers: TTFT (time to first token), prefill speed, decode speed in tokens per second, and a live RAM curve. One tap switches the comparison among CPU, GPU, and TPU backends.
The Hardware Test: Can a Google Pixel 10 (128GB) Run an On-Device Large Model?
Anyone holding the base Pixel 10, the 128GB one, has a reasonable worry. Large models are several gigabytes each. With 128GB of storage and base hardware, can this project actually be used?
We start by doing the arithmetic with the hardware numbers:
Compute and Memory (RAM): A Comfortable Sweet Spot
-
TSMC 3nm Tensor G5: The Pixel 10 moves to a Tensor G5 built on TSMC’s N3E process. Efficiency, and heat control under a sustained load, take a qualitative leap over the previous generation. With the official tensor_g5 accelerated package, prefill on the TPU is very fast. Pictures and long stretches of text barely hitch.
-
12GB of LPDDR5X: What decides whether a phone can run a large model has never been flash storage. It is RAM. The Pixel 10 comes with 12GB. After Android, background services, and the memory reserved for the built-in AICore (Gemini Nano), a foreground app can still count on a steady 5GB to 6.5GB of contiguous memory. That means:
-
2B to 4B models (INT4/INT8): This is the sweet spot. They sit in memory without strain, and generation can hold a steady 30 to 60+ tokens/s, well past reading speed.
-
7B to 9B models (INT4): At the limit they can be loaded and run, but they can trip Android’s LMK, the low-memory killer, and force background apps to reload. They fit short, one-shot tests in Prompt Lab.
Storage and Flash Speed (128GB UFS 3.1): The Only Soft Spot, and a Way Around It
The 128GB Pixel 10 uses UFS 3.1 flash. The 256GB and larger versions use UFS 4.0. That shows up in on-device AI in two concrete ways:
-
A cold start takes a little longer. The first time you tap a 3GB model, the weights have to be read from UFS 3.1 and mapped into LPDDR5X. Compared with UFS 4.0, each cold start costs about 1.5 to 2.5 extra seconds. Once the model is in memory, later turns depend only on RAM bandwidth and TPU compute, not on flash speed.
-
You cannot be a model hoarder. After system firmware (about 18GB), everyday social and video apps (about 40GB), and the photos and videos you actually shoot, a 128GB phone usually has something like 30GB to 50GB left to play with. Download a dozen open models of different sizes the way you would on a PC, and the storage warning shows up quickly.
So the way to use AI Edge Gallery on a Pixel 10 (128GB) is: pick models carefully, split them by job, and replace one huge model with a combination of small multimodal ones.
In Practice: 5 Phenomenal Things to Do with AI Edge Gallery on a Pixel 10
After you sideload ai_edge_gallery_app_tensor_g5.apk, a Pixel 10 unlocks five practical scenarios that are fully offline, with zero cloud interaction:
Scenario 1: Photo Search With No Privacy Anxiety, and Finding the Highlight Frame in a Video
Cloud photo search is useful, but many people do not want ID cards, private family gatherings, or handwritten contracts uploaded.
In AI Edge Gallery, EmbeddingGemma 2 builds a multimodal vector index of the library on the device:
-
Instant Media Search: You can type a casual or abstract description, such as “a selfie drinking coffee in the snow last winter” or “a receipt with a red stamp”, or upload a similarly composed picture and search by image. The match finishes in milliseconds and does not use 1KB of data.
-
Video Moment Finder: You shot a 5-minute pet or sports clip and want the best two seconds for a post. Type “the moment the cat jumps onto the shelf and knocks the cup over”. The model scans the frame features, highlights the matching time range on the timeline, and can crop and export it in one step.
Scenario 2: Mobile Actions — Offline System Control That Actually Understands What You Say
Why does a voice assistant sometimes fail “set an alarm and dim the screen”? Rule engines are rigid, and waking a cloud model is slow.
The Mobile Actions module in AI Edge Gallery shows what FunctionGemma 270M can do. The model has 270 million parameters, only a little over 200MB in size, and is tuned hard for function calling:
-
In a basement garage, on a plane, or anywhere else with no network, you only have to say: “I’m going to take a nap. Set an alarm for 45 minutes from now, turn on Do Not Disturb, and turn off Bluetooth.”
-
The tiny 270M model splits that sentence into structured JSON system instructions in a very short time and calls the Android interfaces to do it in one pass. You can also try the built-in Tiny Garden farm game and watch natural language turn, live, into multi-step control APIs inside the game.
Scenario 3: Mount Agent Skills and Carry an Offline Knowledge Base and Tool Flow
In the AI Chat module, once Agent Skills is on, the on-device model no longer answers only from what was memorized in its weights:
-
Dynamic tool calls: You can enable the built-in Wikipedia Skill or Interactive Map Card Skill. Ask about a historical event or a place, and the on-device model decides on its own to retrieve, pulls structured data, then summarizes and renders it.
-
Custom skills and local MCP: As a developer, you can connect a lightweight script you wrote, an internal API, or a local service that speaks MCP. Before a sensitive action, the model shows a clear Tool Approval card, so you can see which parameters it is about to send and which interface it is about to call. The sense of safety is as high as it gets.
Scenario 4: A Live XR Language Tutor and Offline Visual Reasoning (Ask Image)
Traveling, and the Japanese menu or the museum label makes no sense? Or helping someone study a language at home?
-
Ask Image: Photograph a dense flowchart on a blackboard, a handwritten draft, or an error on a screen. A local multimodal Gemma 4 model pulls out the table, turns it into Markdown, or explains the physics in the picture.
-
XR Language Teacher: Point the camera at the objects on a desk. The AI recognizes what is in the frame, a coffee cup, a mechanical keyboard, a plant, and explains it aloud in the language you are learning, such as Spanish, Japanese, or French. Even better, it files the words for those real objects into a local vocabulary and builds its own mini-games, Vocab Popper (a word match-3 game) and Buddy Runner (a vocabulary parkour runner), so memorizing words becomes something you do with the scene in front of you.
Scenario 5: Audio Scribe Live Transcription and the Prompt Lab Mobile Workbench
-
Audio Scribe: With the Pixel 10’s microphone array and an on-device ASR model, a closed-door meeting or interview that has to stay confidential can be transcribed live and interpreted across languages, offline. The recording and the transcript never leave the device.
-
Prompt Lab: If you use AI agents at work, or you build LLM apps, and a system-prompt improvement occurs to you while walking or commuting, open Prompt Lab, set temperature, top-k, and top-p, and use the built-in code highlighting, summary, and tone-rewrite templates to check a prompt prototype wherever you are.
A Golden Storage Setup for the Pixel 10 (128GB): The Whole Set in 6GB
To try every core feature above in 128GB without crowding out photos and apps, skip downloading everything. Use this on-device golden quartet, kept to about 6GB to 7GB in total:
| Role | Recommended model | Estimated size | Features it drives | Why this one |
|---|---|---|---|---|
| All-purpose multimodal workhorse | Gemma 4 (2B or 4B INT4) | ~2.2 GB–3.2 GB | AI Chat, Ask Image, XR language tutor, Prompt Lab | 4-bit quantization keeps image-and-text ability while fitting 12GB of RAM, and it takes Tensor G5 acceleration best. |
| Multimodal vector engine | EmbeddingGemma 2 | ~400 MB | Instant Media Search, Video Moment Finder | The piece that makes photo search and video moment-finding work. Small, and it builds an index quickly. |
| Fast system router | FunctionGemma 270M | ~250 MB | Mobile Actions, Tiny Garden | Built for on-device function calling. It barely registers in memory, and it responds like native code. |
| On-device speech set | Built-in Whisper / LiteRT ASR & TTS | ~600 MB | Audio Scribe, two-way spoken conversation | Gives the text model ears and a mouth, and closes the loop on fully offline speech. |
A note on space: When you want to try a newly released 7B model, such as a Qwen or Llama derivative, download it from the app’s Model Management page, run the benchmark, then delete the weights in one step. Keep the models that stay installed inside 7GB.
Hands On: A Full Deployment on the Pixel 10 in 3 Steps
-
Download the accelerated package made for this phone. Go to the repository’s Releases page and open the Assets list for the latest version. Do not blindly take the first generic package. Find and install ai_edge_gallery_app_tensor_g5.apk, the one marked Tensor G5.
-
Set a Hugging Face access token (optional, but worth it). Some of the newest Gemma models on Hugging Face are gated: you have to accept the license. The first time you tap download in the app, sign in to your Hugging Face account and accept the terms, or paste a read-only access token, and the direct download can run at full speed.
-
Turn on TPU/GPU acceleration and check it. After the model downloads, open any chat or the benchmark screen, tap the engine settings icon at the top right, and confirm the backend is GPU or TPU / NPU. Type a long passage and watch the speed at the bottom. When tens of tokens a second pour out like a waterfall, and the phone is in airplane mode, you have a pocket AI lab that is actually yours.
Closing: The Future of On-Device AI Is Already Here
A close look at google-ai-edge/gallery makes the relationship clear. On-device AI and cloud models are not a choice of one instead of the other. They complement each other. Cloud models take the hard, long chains of reasoning and search across the web. An on-device setup like Pixel 10 + Tensor G5 + AI Edge Gallery, with zero latency, zero data cost, and 100% physical privacy isolation, takes over the album, the microphone, the camera, and system control, the things closest to us.
Even with a base 128GB Pixel 10, a tight 2B to 4B multimodal model plus specialized fine-tunes of a few hundred megabytes is enough for this small device to burst with astonishing local intelligence. Download that dedicated APK, turn on airplane mode, and feel what it is like to put a frontier model in your pocket.