Last updated: 03 December 2026
Google has released much of its on-device machine learning stack as open source. The code sits in the google-ai-edge organization on GitHub, and the developer documentation is under the Google AI Edge site. This article is a current guide to what is available, what each piece does, and which one to pick. The original announcement is old, so the guide describes the present state rather than repeating it.
The short answer: what Google has open-sourced for on-device ML
Google groups its edge tools under the name Google AI Edge. Based on the official pages, these are the main parts:
- LiteRT: a hardware-accelerated runtime for custom models. Its repository describes it as Google’s on-device framework for high-performance ML and GenAI deployment, and it continues the legacy of TensorFlow Lite.
- MediaPipe: ready-made task APIs (for example face landmarks, object detection and background blur) plus a lower-level framework for streaming media pipelines. Its repository is licensed under Apache-2.0.
- LiteRT-LM: SDKs for running large language models on devices, built on the LiteRT runtime.
- Model Explorer: a tool for visualizing and debugging model architectures.
- AI Edge Gallery: an app for trying generative AI use cases and on-device models. Google lists it on Google Play and the App Store.
Supported targets include Android, iOS, web and embedded devices. Models can run on CPU, GPU and NPU hardware, depending on the runtime and the device.
Why run machine learning on the device?
Running inference locally changes the trade-offs of an app:
- Latency: there is no network round trip, which matters for live camera or audio features.
- Privacy: raw images, audio or text can stay on the device.
- Offline use: features keep working without a connection.
- Cost: inference runs on the user’s hardware instead of your servers.
The costs are real too. Models must be small enough for phone memory, performance varies across devices, and you ship and update the model yourself.
How the pieces fit together
The layers build on one another. MediaPipe Tasks and LiteRT-LM give you high-level APIs. LiteRT is the runtime beneath them that executes the model on CPU, GPU or NPU. Your own model, converted from a training framework, goes straight to LiteRT.

MediaPipe in more detail
MediaPipe has several parts. MediaPipe Solutions covers audio, text, vision, retrieval and GenAI tasks. MediaPipe Tasks are cross-platform APIs and libraries with pre-trained models. MediaPipe Studio lets you try and benchmark solutions in a browser. MediaPipe Framework is the C++ toolkit for building custom pipelines out of packets, graphs and calculators. Setup guides exist for Android, iOS, Python and web.
LiteRT in more detail
LiteRT is for teams with their own model. Google’s overview says it converts and deploys models from PyTorch, JAX, TensorFlow and Keras. The documentation lists Android, iOS, web, Linux, Windows and IoT, with CPU acceleration through XNNPACK. The docs show the 2.x line, with 2.3.0 in the install examples at the time of writing. Check the release page before you pin a version.
LiteRT-LM in more detail
LiteRT-LM is a separate open-source project for LLMs on the device. Choose it when your feature is a chat, summarization or text-generation model. It is not meant for classic vision tasks.
Which one should you use?
| Need | Best starting point | Why |
|---|---|---|
| Face, hand, object or text task with minimal code | MediaPipe Tasks | Prebuilt APIs and pre-trained models |
| Custom pipeline for live video or audio | MediaPipe Framework | Graph and calculator model for streaming data |
| Your own trained model | LiteRT | Converts from several frameworks and accelerates on CPU, GPU or NPU |
| Local LLM features | LiteRT-LM | Built for language models on the device |
| Inspecting a model’s structure | Model Explorer | Visualization and debugging |
| Quickly seeing what is possible | AI Edge Gallery app | Try models without writing code |
Getting the source code
The commands below are illustrative and have not been tested here. Package names and versions change, so confirm them in the official documentation. The repositories live in the google-ai-edge GitHub organization and are named mediapipe, LiteRT and LiteRT-LM.
# Clone each repository from the google-ai-edge organization on GitHub
# (use a fresh directory for each one)
gh repo clone google-ai-edge/mediapipe
gh repo clone google-ai-edge/LiteRT
gh repo clone google-ai-edge/LiteRT-LM
# Typical Python install for MediaPipe Tasks (verify the package name in the docs)
pip install mediapipe
Treat downloaded code as untrusted until you have reviewed it. Build and run it in an isolated environment, not in your main workspace.
A short hands-on exercise
- Install the AI Edge Gallery app on a test phone and try a few models. Note the speed and quality.
- Pick one MediaPipe Task that matches a feature you want, such as object detection, and read its setup guide for your platform.
- Open MediaPipe Studio in a browser and test the same task on sample inputs.
- Measure latency and memory on your lowest-end target device, not only on a flagship phone.
- Decide whether the pre-trained model is good enough. If not, plan a custom model and a LiteRT conversion.
Best practices
- Start with the highest-level API that does the job, and drop down only when you need control.
- Test on real, varied hardware. Accelerator support differs between devices.
- Keep a CPU fallback so the feature works where GPU or NPU delegates are unavailable.
- Pin versions of runtimes and models, and read release notes before upgrading.
- Check licenses for both the code (MediaPipe is Apache-2.0) and each model you ship. Model licenses can differ from code licenses.
Common mistakes and troubleshooting
- Using old tutorials. Many older guides refer to TensorFlow Lite. The runtime now lives under the LiteRT name, so check the current docs for package names.
- Benchmarking only on a desktop. Results on a laptop say little about a mid-range phone.
- Oversized models. If the app crashes or stutters, try a smaller or quantized model before changing code.
- Assuming every task works everywhere. Platform support varies by task. Confirm your target platform in the task’s guide.
- Ignoring privacy duties. On-device processing helps, but you still need to disclose what the app collects.
FAQ
Is the code really open source?
The MediaPipe repository is under Apache-2.0, and LiteRT and LiteRT-LM are public repositories in the same organization. Read each repository’s license file yourself before reuse. I did not verify the license of every component.
Is LiteRT the same as TensorFlow Lite?
LiteRT is described as continuing the legacy of TensorFlow Lite. It is the current name and the one to look for in new projects.
Can I run an LLM on a phone with these tools?
Google offers LiteRT-LM for this, and MediaPipe lists GenAI tasks. Which models run well depends on the device’s memory and accelerators.
Do I need a Google account or cloud service?
The runtimes run locally. Some tools, such as the AI Edge Gallery app, are distributed through app stores. Check each tool’s documentation for its requirements.
Where is the primary documentation?
The Google AI Edge developer site is the main reference. The MediaPipe repository also points there for its docs.
Bottom line
If you want quick results, begin with MediaPipe Tasks. If you have your own model, use LiteRT. If you need a local language model, look at LiteRT-LM. Whichever you choose, test on the devices your users actually own.