Run LLMs on-device with LiteRT-LM
The production-ready orchestration layer to run LLMs with LiteRT, engineered for high-performance, cross-platform execution.
What's New (v0.20.1)
New Model Support (MedGemma 2): Added on-device support for MedGemma 2 E4B, enabling offline multimodal health AI workflows across text, medical images, audio, and tool calling on mobile, desktop, and web. See the MedGemma 2 documentation for details.
NPU Executor Metadata & Defaults: Added
Python 3.10 Deprecation: Python 3.10 reached end-of-life (PEP 619) and now emits a
Benchmarking, CLI & Reproducible Builds: Fixed double-counted engine creation in benchmark init time across C, Kotlin, Swift, Python, and
NPU Executor Metadata & Defaults: Added
LlmNpuExecutorMetadata to resolve unset NPU execution flags directly from .litertlm bundle metadata; handwritten NPU components now default to disabled unless enabled in metadata or runtime flags (except KV-cache updates on ring-buffer models).Python 3.10 Deprecation: Python 3.10 reached end-of-life (PEP 619) and now emits a
FutureWarning on import. The 0.20.x series is the last to support Python 3.10—upgrade to Python 3.11+ or pin litert-lm==0.20.* before v0.21.0.Benchmarking, CLI & Reproducible Builds: Fixed double-counted engine creation in benchmark init time across C, Kotlin, Swift, Python, and
litert-lm benchmark; updated litert_lm_main to enforce --max_output_tokens; and enabled byte-identical .litertlm builds in litert-lm-builder when SOURCE_DATE_EPOCH is set.
Why LiteRT-LM?
Cross-platform
Deploy LLMs across Android, iOS, Web, and Desktop.
Hardware accelerated
Maximize performance with GPU and NPU acceleration.
Broad GenAI Capabilities
Support for popular LLMs as well as multi-modality (Vision, Audio) and Tool Use.
Start building
Python
Python APIs with hardware acceleration on Linux, MacOS, Windows, Android, and Raspberry Pi.
Android
Native Android apps and JVM-based desktop tools.
iOS
Native iOS (macOS coming soon) Swift APIs.
Web
JavaScript and TypeScript APIs for browser-based web apps with WebGPU acceleration.
Flutter
Build cross-platform Flutter apps using the community-maintained flutter_gemma package.
C++
x-platform C++ APIs .
File Builder
Build .litertlm files from converted LiteRT models.
Join the Community
LiteRT-LM on GitHub
Contribute to the open-source project, report issues, and see examples.
Hugging Face
Download pre-converted models (Gemma, Qwen and more), and join the discussion.
Blogs and Announcements
Supercharge Gemma 4 on-device inference with Multi-Token Prediction (MTP)
Experience >2x faster decode speeds on mobile GPUs with zero quality degradation.
Blazing fast on-device GenAI with LiteRT-LM
Discover how LiteRT-LM supercharges on-device GenAI deployments, unlocking Gemma 4's full potential with Swift, JavaScript, and Flutter APIs.
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 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.