Everything K-culture — comebacks to K-beauty, straight to your inboxGet it in your inbox

METAL MEDIA

google-ai-edge/litert-samples

391PythonApache-2.0

A Google-built cookbook for running AI models directly on phones and edge devices

This repository collects sample apps, model conversion recipes, and automation tools for LiteRT, Google's on-device machine learning framework, and LiteRT-LM, a layer for running large language models efficiently with LiteRT. It includes working end-to-end apps for things like speech recognition, image generation, and streaming text-to-speech, plus pipelines that convert PyTorch or Hugging Face models into a form that runs on-device. The project is written mainly in Python and has 391 stars.

What it does

  1. LiteRT (formerly TensorFlow Lite) runs machine learning models directly on devices like phones using GPU/NPU hardware acceleration; LiteRT-LM is a dedicated layer built on top of it for running large language models (LLMs) efficiently
  2. The repo is organized into four areas: samples (runnable apps), models (conversion recipes), utilities (shared tools), and skills (automated agent workflows)
  3. Recent additions include a tiny 15-million-parameter, 32 MB streaming text-to-speech app (KittenTTS nano), an automatic speech recognition (ASR) sample, a multimodal app called PhotoTalk that combines vision and audio/text generation, Qwen3-based speech models, and a text-to-image diffusion model called Bonsai Image 4B
  4. The skills folder offers a step-by-step lifecycle: converting a model to run cleanly on GPU, quantizing it (compressing to fp16/int8/int4) without losing accuracy, verifying it on real hardware, and scaffolding an Android app around it
  5. Samples run across Android, iOS, Python, and web/WebAssembly platforms, using either the newer CompiledModel API or the legacy Interpreter API

Why it matters

For developers who want models running on a user's device rather than a cloud server, this repo works as a practical reference covering the full path from conversion to optimization, verification, and app-building. Having ready-made speech, image, and LLM examples that use modern NPU/GPU acceleration makes it easier to start building on-device AI apps quickly.

Terms in this repo

  • LiteRT · Google's framework for running machine learning models on-device, formerly known as TensorFlow Lite
  • LiteRT-LM · A specialized layer built on LiteRT for efficiently running large language models
  • CompiledModel API · A modern model-execution interface supporting GPU/NPU acceleration and asynchronous execution
  • Interpreter API · An older, broadly compatible model-execution interface
  • Quantization · A technique that reduces a model's numeric precision (e.g., fp16, int8, int4) to shrink size and computation
  • NPU · A hardware chip specialized for accelerating neural network computation

Repository description (English)

LiteRT and LiteRT-LM sample apps, model recipes, agent skills and utilities.

Owner · google-deepmind

Open on GitHub

Trending repos

All repos →

Latest from METAL MEDIA