The question says it all.
How do I run a small AI model on the phone or in the browser for free?
1 answer
On Android, try Gemma 4 through the AICore developer preview and the ML Kit Prompt API. In Chrome on a desktop, use the built-in Prompt API with Gemini Nano. Both run on the user's own device: no API bill, it works offline, and the text never leaves the phone. Just keep a fallback, because only some devices support them so far.
We build offline apps with no servers, so a model that lives on the device fits how we work.
On Android
- Google released Gemma 4 in the AICore developer preview on 2 April 2026, in two sizes: E2B, which is fast, and E4B, which is stronger. It understands text, images and audio in more than 140 languages.
- Google says Gemma 4 is the base of Gemini Nano 4, and code you write for the preview should carry over to Nano 4 devices.
- You call it with the ML Kit Prompt API from Android Studio.
- Preview models run fast on AICore devices. On other phones they fall back to the CPU, which is slow.
- You can try the models with no code in Google's AI Edge Gallery app.
- In October 2026 an ML Kit Agentic API for Nano 4 arrived in alpha: it runs functions for you, keeps the chat history and has guardrails. Alpha means it can still change.
In the browser
Chrome has a Prompt API that talks to Gemini Nano on the user's machine. Chrome's docs list it for Chrome 148 on the web and Chrome 138 for extensions. Before you build on it, know the limits:
- Windows 10 or 11, macOS 13 or newer, Linux, or a Chromebook Plus. Not Chrome on Android or iOS yet.
- At least 22 GB of free disk space.
- A GPU with more than 4 GB of video memory, or 16 GB of RAM with 4 CPU cores.
- It does not work inside Web Workers, and a cross-origin iframe needs
allow="language-model".
What I would build first
Pick one small feature where a mistake is harmless: summarising a note, suggesting tags, cleaning up text from a photo. Check if the model is available, use it if it is, and fall back to a simple rule or just hide the button if not. Your app stays fast and private for everyone, and gets smarter on the phones that can do more.
Sources:
Your answer
Know the answer? Sign in and share it. Useful answers earn points.
Sign in to answer