No description
  • C++ 73.3%
  • Python 6.9%
  • TypeScript 5.8%
  • Starlark 4%
  • CMake 3.5%
  • Other 6.3%
Find a file
Repository files (latest commit first)
Filename Latest commit message Latest commit date
2026-11-04 22:18:10 -03:00
.github build: speed up CMake build with centralized shallow Git fetches and parallel subbuilds 2026-11-04 09:56:40 -08:00
agents/skills [litertlm] Move README.md under LiteRT-LM Agent Skills directory. 2026-06-02 11:01:13 -07:00
build_config Enable the LiteRT-LM debugger at runtime through EngineSettings, the C API and the Python Engine instead of a build-time define. 2026-11-03 16:48:23 -08:00
c Enable the LiteRT-LM debugger at runtime through EngineSettings, the C API and the Python Engine instead of a build-time define. 2026-11-03 16:48:23 -08:00
cmake build: speed up CMake build with centralized shallow Git fetches and parallel subbuilds 2026-11-04 09:56:40 -08:00
cxxbridge_cmd Add cxxbridge-cmd, a binary for generating C/C++ bindings to Rust libraries. 2025-12-12 11:00:22 -08:00
docs Keep the caller's uuid and creation_timestamp when SOURCE_DATE_EPOCH is set 2026-10-30 15:20:59 -07:00
js Wait for GPU process to start in web tests 2026-11-03 12:06:49 -08:00
kotlin Count engine creation once in the benchmark init time 2026-11-02 20:35:34 -08:00
models Small Gemma 4 LLM metadata fixes: 2026-10-27 16:23:21 -07:00
omni Add support for raw pcm16 output 2026-11-04 22:18:10 -03:00
prebuilt chore: remove unused prebuilt/windows_x86_64/libwebgpu_dawn.dll 2026-10-27 22:13:32 -07:00
python fix(python): register shared library directory for Windows DLL resolution 2026-11-04 16:52:04 -08:00
runtime Disable flaky accelerator_memory_apple_test. 2026-11-04 15:08:05 -08:00
rust Added the preprocessing libraries back to LiteRT-LM repo. 2026-08-05 17:02:43 -07:00
samples/ios_and_mac Support Swift nightly package distribution and fix macOS codesigning. 2026-10-12 14:15:02 -07:00
schema Expose LlmInferenceCapability::supports_draft_verification in model_info. 2026-11-04 10:05:27 -08:00
src Refactor LiteRT-LM CMake structure for cross-compilation and Android support. 2026-03-27 13:06:12 -07:00
support Speed up image preprocessing 3-3.7x with stb_image_resize2, fused normalization and a portable Highway kernel. 2026-11-02 15:06:19 -08:00
swift Expose LiteRT_LM_Swift_srcs filegroup in swift/BUILD for SwiftPM packaging. 2026-11-04 16:45:26 -08:00
third_party Internal changes only 2026-10-21 15:36:30 -07:00
tools/pytest build: build dynamic GPU accelerators from source and update OSS test workflows 2026-10-27 17:02:40 -07:00
.bazeliskrc Use GitHub mirror for BCR to work around bcr.bazel.build outages 2025-12-26 14:25:33 -08:00
.bazelrc ci: add --remote_download_all to github_actions_bazel_cache config 2026-10-24 09:37:49 -07:00
.bazelversion Copybara setup completed. 2025-04-29 12:13:13 -07:00
.gitattributes Fix .gitattributes 2026-01-31 17:58:07 -08:00
.gitignore Test the LiteRT-LM Web npm package in its OSS build before publishing. 2026-10-21 12:59:42 -07:00
.lfsconfig Configure Git LFS endpoint in .lfsconfig for LiteRT-LM. 2026-10-09 11:01:28 -07:00
__init__.py Fix the run time error of python reader and writer for .litertlm file 2025-07-24 10:31:01 -07:00
android_ndk_env.bzl Update bazel files compatible to Windows 2025-05-28 19:21:01 -07:00
BUILD Remove litert_lm_link_capi_so config settings. 2025-08-20 09:14:51 -07:00
BUILD.llguidance Implement LlgConstraintProvider and ExternalConstraintProvider. 2026-01-23 12:44:27 -08:00
cargo-bazel-lock.json Update llguidance to 1.9.1 in the open-source build. 2026-10-23 16:54:42 -07:00
Cargo.lock Update llguidance to 1.9.1 in the open-source build. 2026-10-23 16:54:42 -07:00
Cargo.toml Update llguidance to 1.9.1 in the open-source build. 2026-10-23 16:54:42 -07:00
CMakeLists.txt build: speed up CMake build with centralized shallow Git fetches and parallel subbuilds 2026-11-04 09:56:40 -08:00
CMakePresets.json Update LiteRT-LM CMake build system for Android x86_64 cross-compilation. 2026-09-17 14:06:51 -07:00
CODE_OF_CONDUCT.md Add CODE_OF_CONDUCT.md and list individual maintainers in CODEOWNERS. 2026-10-15 08:49:06 -07:00
CONTRIBUTING.md Add Zizmor security scanning, Dependabot configuration, and harden GitHub Actions workflows: 2026-10-28 02:11:42 -07:00
GOVERNANCE.md This is an internal change 2026-09-25 22:12:15 -07:00
LICENSE Create LICENSE 2025-04-17 11:30:48 -07:00
Package.swift Update LiteRT-LM Swift package to v0.19.0. 2026-10-30 16:31:55 -07:00
PATCH.llguidance_grammar Update llguidance to 1.9.1 in the open-source build. 2026-10-23 16:54:42 -07:00
PATCH.llguidance_numeric Update llguidance to 1.9.1 in the open-source build. 2026-10-23 16:54:42 -07:00
PATCH.llguidance_perf Update llguidance to 1.9.1 in the open-source build. 2026-10-23 16:54:42 -07:00
PATCH.llguidance_regexvec Update llguidance to 1.9.1 in the open-source build. 2026-10-23 16:54:42 -07:00
PATCH.toktrie Update llguidance to 1.9.1 in the open-source build. 2026-10-23 16:54:42 -07:00
README.md Update LiteRT-LM Swift package to v0.19.0. 2026-10-30 16:31:55 -07:00
requirements.txt Bump certifi to 2026.10.23 in LiteRT-LM requirements.txt. 2026-10-23 15:53:44 -07:00
rust_cxx_bridge.bzl Add cxxbridge-cmd, a binary for generating C/C++ bindings to Rust libraries. 2025-12-12 11:00:22 -08:00
version.bzl build: add LITERT_VERSION for LiteRT Maven dependency 2026-11-03 18:32:49 -08:00
WORKSPACE Speed up image preprocessing 3-3.7x with stb_image_resize2, fused normalization and a portable Highway kernel. 2026-11-02 15:06:19 -08:00

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

    • 🎯 Accelerated Logit Masking: Enables faster constrained decoding on GPUs, with full support for MTP-enabled decoding.
    • 🌐 Web SDK: @litert-lm/core now stream-loads all models, defaults to the GPU backend, and supports image and audio inputs.
    • 🎙️ Speech Models: Added support for multiple ASR and TTS models, including Qwen3-ASR, Kokoro, and Qwen3-TTS.
    • 🧱 C API 1.0.0 (Breaking): Functions that can fail now return LiteRtLmStatusCode with results in out_* parameters, and only litert_lm_* symbols are exported.
    • ⚙️ Performance & Platform: GPU sampling now matches CPU for the same seed, ModelInfo is faster and uses less memory.

👉 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
Get it on Google Play Download on the 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

⚡ 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 Latest Release tag.