What do you want to do?
3 use cases
-
Run Gemma on your own machine from the terminal
Install the LiteRT LM CLI with uv and chat with a Gemma model without writing any code.
View prompt
Install google-ai-edge/LiteRT-LM with uv, run the gemma-3n-E2B-it-int4 model from the README with a test prompt, then try the Gemma 4 E4B example with the GPU backend. Report speed and whether each worked on my machine.
-
Add an offline language model to an Android app
Use the stable Kotlin API to run Gemma inside your Android app with no server.
View prompt
Help me add google-ai-edge/LiteRT-LM to my Android app <project> using the Kotlin API. Load <model>, add a summarize(text) function that runs on device, and show how to fall back to CPU when no GPU or NPU is available.
-
Serve local embeddings through an OpenAI-compatible endpoint
Run litert-lm serve with an embedding model to get a local /v1/embeddings endpoint for search and RAG.
View prompt
Set up google-ai-edge/LiteRT-LM to serve EmbeddingGemma 2 locally with litert-lm serve, then change my <search code> to call the local /v1/embeddings endpoint instead of the hosted API. Embed <sample docs> and show a test query.
Quick start with LiteRT LM
- Check you have what it needs: uv to install the CLI with uv tool install; Linux, macOS, Windows or Raspberry Pi for the CLI; Android, iOS or the web through the language APIs; A LiteRT-LM model, for example from the litert-community Hugging Face repos.
- Open google-ai-edge/LiteRT-LM on GitHub and read the README and license.
- Install the CLI with
uv tool install litert-lm - Run litert-lm run with --from-huggingface-repo pointing at a model repo such as google/gemma-3n-E2B-it-litert-lm, the model name and a --prompt
- Try a larger model like gemma-4-E4B-it with --backend=gpu and --speculative-decoding=on if your hardware supports it
- Use
litert-lm describeto inspect a model's metadata, capabilities and runtime requirements before loading it
These steps come from our top use case, Run Gemma on your own machine from the terminal, which also has a copy-paste agent prompt.
Use this in your AI agent
Ask your agent
Using the Deduped MCP, get the setup steps for google-ai-edge/LiteRT-LM
Add Deduped to Claude Code once
claude mcp add --transport http deduped https://dedupedai.com/mcp
Every Monday: the 5 hottest repos and exactly how to use them. Free, one email a week, unsubscribe anytime.
Get them freeAbout this repo
- Who it is forApp and edge developers who want a language model to run on the user's device instead of a cloud API.
- Why it is hot6.8k stars, talked about in 2 AI sources we track
- LanguageC++
- Sourcegithub.com/google-ai-edge/LiteRT-LM ยท Back to Hot repos
Requirements
- uv to install the CLI with uv tool install
- Linux, macOS, Windows or Raspberry Pi for the CLI; Android, iOS or the web through the language APIs
- A LiteRT-LM model, for example from the litert-community Hugging Face repos
Add this badge to your README
Maintain LiteRT LM? Show readers where to find these use cases.
Markdown
[](https://dedupedai.com/use-cases/google-ai-edge-litert-lm/?utm_source=github&utm_medium=badge&utm_campaign=google-ai-edge-LiteRT-LM)
HTML
<a href="https://dedupedai.com/use-cases/google-ai-edge-litert-lm/?utm_source=github&utm_medium=badge&utm_campaign=google-ai-edge-LiteRT-LM"><img src="https://dedupedai.com/badge/google-ai-edge/LiteRT-LM.svg" alt="Use cases on Deduped" height="20"></a>
A static image, no tracking script. About the badge
Questions about LiteRT LM
What is LiteRT LM?
LiteRT-LM is Google's production-ready orchestration layer for running LLMs with LiteRT on device. It runs on Android, iOS, web, desktop and IoT boards such as Raspberry Pi, uses GPU and NPU acceleration, supports vision and audio inputs and function calling, and handles Gemma, Llama, Phi-4, Qwen and more. It powers on-device AI in Chrome, Chromebook Plus and Pixel Watch, and ships a CLI plus Python, Kotlin, Swift, JavaScript and C++ APIs. It is an open-source project on GitHub: https://github.com/google-ai-edge/LiteRT-LM.
How do I use LiteRT LM?
Install the CLI with uv tool install litert-lm; then run litert-lm run with --from-huggingface-repo pointing at a model repo such as google/gemma-3n-E2B-it-litert-lm, the model name and a --prompt; try a larger model like gemma-4-E4B-it with --backend=gpu and --speculative-decoding=on if your hardware supports it. The use cases on this page give the full steps and a copy-paste agent prompt for each job.
Who is LiteRT LM for?
App and edge developers who want a language model to run on the user's device instead of a cloud API.
What can I do with LiteRT LM?
3 use cases so far, for example: Run Gemma on your own machine from the terminal; Add an offline language model to an Android app; Serve local embeddings through an OpenAI-compatible endpoint. Each has steps and a copy-paste agent prompt.
What do I need to run LiteRT LM?
uv to install the CLI with uv tool install; Linux, macOS, Windows or Raspberry Pi for the CLI; Android, iOS or the web through the language APIs; A LiteRT-LM model, for example from the litert-community Hugging Face repos.
What are alternatives to LiteRT LM?
Other hot AI repos in Software and DevOps: ECC, Thinkrail, Superpowers, Deep Infer, Instructor.
Is LiteRT LM safe to run?
Deduped does not own, audit or vouch for it. Read the README and license, run it on your own systems first and review every command before you run it.