Clone this repo:
  1. 9ab8b8d Support multi-token decode_start_token_ids across ASR decoders for Whisper. by Byungchul Kim · 3 hours ago upstream/main
  2. c10c6c4 Support Swift nightly package distribution and fix macOS codesigning. by Google AI Edge · 4 hours ago
  3. 7659436 Copy host memory state snapshots into device buffers when restoring state. by Mohammadreza Heydary · 4 hours ago
  4. d6272ea Support Slaney mel filterbank and power-spectrum support to MelFilterbank. by Byungchul Kim · 4 hours ago
  5. 200545f Downstream mobile and embedded deployments of LiteRT-LM require fine-grained control over optional tokenizers, template engines, grammar parsers, constrained decoding engines, model-family data processors, and hardware backends to minimize binary size. Previously, ad-hoc `--define` flags were scattered across individual `BUILD` packages. by Salil Tambe · 5 hours ago

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.18.0

  • ✨ New Model Release (EmbeddingGemma 2): Shipped multimodal EmbeddingGemma 2 supporting text, vision, and audio embeddings with Matryoshka dimension truncation across Python, Kotlin, Swift, Web (JavaScript), and C++. Check out our DevSite documentation for more details!
  • 🛠️ CLI & Developer Experience: Added fast model imports (litert-lm import) and an OpenAI-compatible /v1/embeddings endpoint (litert-lm serve) for multimodal embedding models.
  • 🔍 Model Info API: Added ModelInfo and litert-lm describe for full model introspection—covering metadata, capabilities, and runtime requirements before loading.
  • ⚡ NPU & GPU Acceleration: Enabled dynamic on-demand KV cache growth on NPU and attention mask pruning optimizations on GPU.

👉 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 \
   --enable-speculative-decoding=true \
   --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 PlayInstall the app today from App Store

📰 Blogs & Announcements

LinkDescription
Bringing Gemma 4 12B to your Laptop: Unlocking Local, Agentic Workflows with Google AI EdgeBring agentic, multimodal AI capabilities to everyday laptops, enabling local data processing and visual insight generation.
Blazing-fast on-device GenAI with LiteRT-LMUnlock 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 draftersAn 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 4Deploy 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 WatchDeploy language models on wearables and browser-based platforms using LiteRT-LM at scale.
On-device Function Calling in Google AI Edge GalleryExplore 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 callingLatest insights on RAG, multimodality, and function calling for edge language models.

🏃 Quick Start

🔗 Key Links

⚡ 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.

LanguageStatusBest For...Documentation
Python✅ StablePrototyping & ScriptingPython Guide
Kotlin✅ StableAndroid apps & JVMKotlin Guide
Swift🚀 Early PreviewNative iOS & macOSSwift Guide
JavaScript (web)🚀 Early PreviewBrowser environmentsJavaScript Guide
Flutter🚀 CommunityCross-platform mobileFlutter Guide
C++✅ StableHigh-performance nativeC++ 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 Latest Release tag.