- C++ 71.3%
- Python 7.3%
- TypeScript 7.1%
- Starlark 3.7%
- CMake 2.8%
- Other 7.6%
| Filename | Latest commit message | Latest commit date |
|---|---|---|
|
|
||
| .github | ||
| agents/skills | ||
| build_config | ||
| c | ||
| cmake | ||
| colabs | ||
| cxxbridge_cmd | ||
| docs | ||
| js | ||
| kotlin | ||
| models | ||
| omni | ||
| prebuilt | ||
| python | ||
| runtime | ||
| rust | ||
| samples/ios_and_mac | ||
| schema | ||
| src | ||
| support | ||
| swift | ||
| sync | ||
| third_party | ||
| tools/pytest | ||
| .bazeliskrc | ||
| .bazelrc | ||
| .bazelversion | ||
| .gitattributes | ||
| .gitignore | ||
| .lfsconfig | ||
| __init__.py | ||
| android_ndk_env.bzl | ||
| BUILD | ||
| BUILD.llguidance | ||
| cargo-bazel-lock.json | ||
| Cargo.lock | ||
| Cargo.toml | ||
| CMakeLists.txt | ||
| CMakePresets.json | ||
| CODE_OF_CONDUCT.md | ||
| CONTRIBUTING.md | ||
| GOVERNANCE.md | ||
| LICENSE | ||
| Package.swift | ||
| PATCH.llguidance_grammar | ||
| PATCH.llguidance_numeric | ||
| PATCH.llguidance_perf | ||
| PATCH.llguidance_regexvec | ||
| PATCH.toktrie | ||
| README.md | ||
| requirements.txt | ||
| rust_cxx_bridge.bzl | ||
| version.bzl | ||
| WORKSPACE | ||
LiteRT-LM
LiteRT-LM is Google's production-ready orchestration layer to run LLMs with LiteRT, engineered for high-performance, cross-platform execution.
🔗 Product Website | 💬✨ Chat Demo | 🔎✨ Embedding Demo
🔥 What's New: v0.20.0
-
- NPU Executor Metadata & Default Behavior Change:
- Added
LlmNpuExecutorMetadatatoExecutorMetadataproto and updated the runtime to resolve unset NPU execution flags (enable_neon_for_npu_greedy_sampling, use_hw_masking_for_npu, use_hw_cache_update_for_npu, use_hw_ple_for_npu) from.litertlmbundle metadata. - Behavior Change: Handwritten NPU components now default to disabled unless enabled in bundle metadata or runtime flags (except KV-cache updates on ring-buffer models).
-
- Python 3.10 support is deprecated. Python 3.10 reached upstream
end-of-life on 2026-10-01 (PEP 619).
Importing
litert_lmon Python 3.10 now emits aFutureWarning. 0.20.0 is the last release that supports Python 3.10. The next release (0.21.0) will require Python ≥ 3.11 and will no longer publishcp310wheels. If you are on Python 3.10, upgrade to 3.11 or newer, or pinlitert-lm==0.20.*.
- Python 3.10 support is deprecated. Python 3.10 reached upstream
end-of-life on 2026-10-01 (PEP 619).
Importing
-
- Benchmark init time: No longer counts engine creation twice in the C, Kotlin, Swift and Python APIs and litert-lm benchmark.
-
- litert_lm_main: Now stops each reply after --max_output_tokens tokens when the flag is above 0.
-
- Reproducible .litertlm builds: With SOURCE_DATE_EPOCH set, litert-lm-builder now writes byte-identical files from the same inputs and uuid.
👉 Try Gemma4-E4B with MTP on Linux, macOS, Windows or Raspberry Pi with the LiteRT-LM CLI:
litert-lm run \
--from-huggingface-repo=litert-community/gemma-4-E4B-it-litert-lm \
gemma-4-E4B-it.litertlm \
--backend=gpu \
--speculative-decoding=on \
--prompt="What is the capital of France?"
🌟 Key Features
- 📱 Cross-Platform Support: Android, iOS, Web, Desktop, and IoT (e.g. Raspberry Pi).
- 🚀 Hardware Acceleration: Peak performance via GPU and NPU accelerators.
- 👁️ Multi-Modality: Support for vision and audio inputs.
- 🔧 Tool Use: Function calling support for agentic workflows.
- 📚 Broad Model Support: Gemma, Llama, Phi-4, Qwen, and more.
🚀 Production-Ready for Google's Products
LiteRT-LM powers on-device GenAI experiences in Chrome, Chromebook Plus, Pixel Watch, and more.
You can also try the Google AI Edge Gallery app to run models immediately on your device.
| Install the app today from Google Play | Install the app today from App Store |
|---|---|
![]() |
|
📰 Blogs & Announcements
| Link | Description |
|---|---|
| Bringing Gemma 4 12B to your Laptop: Unlocking Local, Agentic Workflows with Google AI Edge | Bring agentic, multimodal AI capabilities to everyday laptops, enabling local data processing and visual insight generation. |
| Blazing-fast on-device GenAI with LiteRT-LM | Unlock Gemma 4's full potential with blazing speed and incredible efficiency using newly added Swift, JavaScript, and Flutter APIs. |
| Accelerating Gemma 4: faster inference with multi-token prediction drafters | An overview of how Multi-Token Prediction (MTP) drafters are making Gemma 4 models up to 3x faster at inference. |
| Bring state-of-the-art agentic skills to the edge with Gemma 4 | Deploy Gemma 4 in-app and across a broader range of devices with stellar performance and broad reach using LiteRT-LM. |
| On-device GenAI in Chrome, Chromebook Plus and Pixel Watch | Deploy language models on wearables and browser-based platforms using LiteRT-LM at scale. |
| On-device Function Calling in Google AI Edge Gallery | Explore how to fine-tune FunctionGemma and enable function calling capabilities powered by LiteRT-LM Tool Use APIs. |
| Google AI Edge small language models, multimodality, and function calling | Latest insights on RAG, multimodality, and function calling for edge language models. |
🏃 Quick Start
🔗 Key Links
- 👉 Technical Overview including performance benchmarks, model support, and more.
- 👉 LiteRT-LM CLI Guide including installation, getting started, and advanced usage.
⚡ Quick Try (No Code)
Try LiteRT-LM immediately from your terminal without writing a single line of
code using uv:
uv tool install litert-lm
litert-lm run \
--from-huggingface-repo=google/gemma-3n-E2B-it-litert-lm \
gemma-3n-E2B-it-int4 \
--prompt="What is the capital of France?"
📚 Supported Language APIs
Ready to get started? Explore our language-specific guides and setup instructions.
| Language | Status | Best For... | Documentation |
|---|---|---|---|
| Python | ✅ Stable | Prototyping & Scripting | Python Guide |
| Kotlin | ✅ Stable | Android apps & JVM | Kotlin Guide |
| Swift | 🚀 Early Preview | Native iOS & macOS | Swift Guide |
| JavaScript (web) | 🚀 Early Preview | Browser environments | JavaScript Guide |
| Flutter | 🚀 Community | Cross-platform mobile | Flutter Guide |
| C++ | ✅ Stable | High-performance native | C++ Guide |
🏗️ Build From Source
This guide shows how you can compile
LiteRT-LM from source. If you want to build the program from source, you should
checkout the stable
tag.

