LiteRT and LiteRT-LM sample apps, model recipes, agent skills and utilities.
427
stars
687
commits
Python
primary language
Sep 11, 2026
updated
This repository contains official and community contributed sample applications, model recipes, agent skills and utilities for LiteRT (formerly known as TensorFlow Lite), Google's open source, high-performance on-device machine learning framework and LiteRT-LM, a specialized orchestration layer for running LLMs with LiteRT, unlocking maximum performance and efficiency.
Note Please access the interactive web page with a collections of demos there at: https://google-ai-edge.github.io/litert-samples/
The samples demonstrate different API paradigms (LiteRT CompiledModel API and legacy Interpreter API, Tensor API, LiteRT-LM) and provide end-to-end model conversion and deployment pipelines.
samples/litert/text_to_speech_streaming/).samples/litert/phototalk_sample_app/).models/bonsai/bonsai_image_4b/).skills/: conversion, quantization, on-device verification, app scaffolding), a GPU conversion toolkit (utilities/litert_gpu_toolkit/), and shared Kotlin helpers (utilities/common/).samples/ β Application SamplesAll runnable sample applications and interactive playgrounds are organized under samples/:
samples/litert/: Standard samples using the LiteRT CompiledModel API. Designed for modern hardware acceleration (GPU/NPU) and asynchronous execution.
samples/litert_interpreter/: Legacy samples using the Interpreter API.
samples/litert_lm/: High-level Engine samples for Large Language Models (LLM/SLM).samples/end_to_end/: Complete full-system pipelines (e.g. ImageNet model conversion, preprocessing, and classification).samples/tensor_api_playground/: Interactive Web/WASM playground demonstrating LiteRT Tensor API capabilities directly in the browser (Gemma 3, Image Segmentation, Mandelbrot, Game of Life).models/ β Model Recipes & Export PipelinesContains standalone model conversion scripts, export recipes, and model-specific utilities. Many are working in process.
utilities/ β Shared Tools & Helper Scriptsutilities/common/: Shared Kotlin helpers for Android samples (camera pipeline, audio capture, CompiledModel runner, image/tensor and math helpers).utilities/litert_gpu_toolkit/: Pre-conversion patches that rewrite common PyTorch patterns into forms the LiteRT GPU delegate accepts, plus a post-conversion checker.skills/ β Agent Automation & SkillsCustom AI agent skills that carry a model through the LiteRT deployment lifecycle, in order β see skills/README.md for the full index:
gpu-clean-conversion/: PyTorch / Hugging Face model β GPU-resident LiteRT model.accuracy-safe-quantization/: Quantize (fp16 / int8 / int4) without losing accuracy.on-device-verification/: Prove the converted model on the actual device.compiled-model-app-scaffolding/: Build an Android app around the verified model.litert-compiled-model-migration/: Android TFLite β LiteRT CompiledModel V2 with NPU JIT acceleration and zero-copy buffers.pip install ai-edge-litert.samples/litert/<sample_name>.README.md.Visit "Interactive Web" tab, or open
samples/tensor_api_playground/index.html or run index.html at the repository root
via a local HTTP server.
Contributions are welcome!
Apache License 2.0. See LICENSE for details.
Disclaimer: This is a sample repository maintained by Google. It is provided "as is" without warranty of any kind.
(top 30 of 38)
Python
53.7%
C++
30.2%
HTML
8.0%
Kotlin
4.0%
Starlark
4.0%
LiteRT and LiteRT-LM sample apps, model recipes, agent skills and utilities.
427
stars
687
commits
Python
primary language
Sep 11, 2026
updated
This repository contains official and community contributed sample applications, model recipes, agent skills and utilities for LiteRT (formerly known as TensorFlow Lite), Google's open source, high-performance on-device machine learning framework and LiteRT-LM, a specialized orchestration layer for running LLMs with LiteRT, unlocking maximum performance and efficiency.
Note Please access the interactive web page with a collections of demos there at: https://google-ai-edge.github.io/litert-samples/
The samples demonstrate different API paradigms (LiteRT CompiledModel API and legacy Interpreter API, Tensor API, LiteRT-LM) and provide end-to-end model conversion and deployment pipelines.
samples/litert/text_to_speech_streaming/).samples/litert/phototalk_sample_app/).models/bonsai/bonsai_image_4b/).skills/: conversion, quantization, on-device verification, app scaffolding), a GPU conversion toolkit (utilities/litert_gpu_toolkit/), and shared Kotlin helpers (utilities/common/).samples/ β Application SamplesAll runnable sample applications and interactive playgrounds are organized under samples/:
samples/litert/: Standard samples using the LiteRT CompiledModel API. Designed for modern hardware acceleration (GPU/NPU) and asynchronous execution.
samples/litert_interpreter/: Legacy samples using the Interpreter API.
samples/litert_lm/: High-level Engine samples for Large Language Models (LLM/SLM).samples/end_to_end/: Complete full-system pipelines (e.g. ImageNet model conversion, preprocessing, and classification).samples/tensor_api_playground/: Interactive Web/WASM playground demonstrating LiteRT Tensor API capabilities directly in the browser (Gemma 3, Image Segmentation, Mandelbrot, Game of Life).models/ β Model Recipes & Export PipelinesContains standalone model conversion scripts, export recipes, and model-specific utilities. Many are working in process.
utilities/ β Shared Tools & Helper Scriptsutilities/common/: Shared Kotlin helpers for Android samples (camera pipeline, audio capture, CompiledModel runner, image/tensor and math helpers).utilities/litert_gpu_toolkit/: Pre-conversion patches that rewrite common PyTorch patterns into forms the LiteRT GPU delegate accepts, plus a post-conversion checker.skills/ β Agent Automation & SkillsCustom AI agent skills that carry a model through the LiteRT deployment lifecycle, in order β see skills/README.md for the full index:
gpu-clean-conversion/: PyTorch / Hugging Face model β GPU-resident LiteRT model.accuracy-safe-quantization/: Quantize (fp16 / int8 / int4) without losing accuracy.on-device-verification/: Prove the converted model on the actual device.compiled-model-app-scaffolding/: Build an Android app around the verified model.litert-compiled-model-migration/: Android TFLite β LiteRT CompiledModel V2 with NPU JIT acceleration and zero-copy buffers.pip install ai-edge-litert.samples/litert/<sample_name>.README.md.Visit "Interactive Web" tab, or open
samples/tensor_api_playground/index.html or run index.html at the repository root
via a local HTTP server.
Contributions are welcome!
Apache License 2.0. See LICENSE for details.
Disclaimer: This is a sample repository maintained by Google. It is provided "as is" without warranty of any kind.
(top 30 of 38)
Python
53.7%
C++
30.2%
HTML
8.0%
Kotlin
4.0%
Starlark
4.0%