google-ai-edge/litert-samples
LiteRT and LiteRT-LM sample apps, model recipes, agent skills and utilities.
What it solves
This repository provides a comprehensive collection of sample applications, model recipes, and deployment tools for LiteRT (formerly TensorFlow Lite) and LiteRT-LM. It helps developers move machine learning models from training to on-device execution across Android, iOS, Python, and Web/WASM platforms, specifically focusing on maximizing hardware acceleration (GPU/NPU) and efficiency.
How it works
The project is organized into four main areas:
- Application Samples: Runnable apps demonstrating various API paradigms, including the modern CompiledModel API for hardware acceleration, the legacy Interpreter API, and a specialized orchestration layer for LLMs (LiteRT-LM).
- Model Recipes: Scripts and pipelines for converting and exporting models to the LiteRT format.
- Utilities: Shared helper scripts and a GPU toolkit that optimizes PyTorch patterns for LiteRT GPU delegates.
- Agent Skills: A set of automated "skills" that guide a model through the deployment lifecycle, covering conversion, quantization, on-device verification, and app scaffolding.
Who it’s for
Developers building on-device AI applications for mobile devices (Android/iOS) and web browsers who need practical examples of how to implement speech recognition, text-to-speech, image generation, and LLMs using Google's edge AI framework.
Highlights
- Diverse Modalities: Includes samples for streaming TTS, ASR, multimodal vision-audio-text apps, and text-to-image diffusion.
- LMM/LLM Support: Specialized samples for running Large Language Models via LiteRT-LM.
- Hardware Optimization: Tools for GPU/NPU acceleration, including a GPU conversion toolkit and NPU JIT acceleration.
- Deployment Lifecycle Automation: Agent-driven skills for accuracy-safe quantization and on-device verification.
Related
- Project
- Project
- Project
- Project
- Project