current-time
GOgoogle-ai-edge/litert-samples508近 7 天新增 8 个 star
LiteRT and LiteRT-LM sample apps, model recipes, agent skills and utilities.
---
name: current-time
description: Get the current local time, date and day of the week.
GOgoogle-ai-edge/litert-samples508近 7 天新增 8 个 star+8
---
name: device-info
description: Say which models, backends and accelerators this app is running and how much memory the device has.
GOgoogle-ai-edge/litert-samples508近 7 天新增 8 个 star+8
---
name: accuracy-safe-quantization
description: Shrink a converted LiteRT model with ai-edge-quantizer (fp16 / int8 / int4) without losing accuracy, verifying parity against the float source after every step. Use when choosing a quantization recipe for a new model, when a quantized model fails to load, degrades on a task benchmark, or degenerates over long generations, or when deciding between dynamic-range, weight-only, and blockwise variants.
GOgoogle-ai-edge/litert-samples508近 7 天新增 8 个 star+8
---
name: litert-lm
description: Builds an Android app that runs an open text LLM on the device, on the CPU or the GPU, with the LiteRT-LM Kotlin API (com.google.ai.edge.litertlm:litertlm-android). Use this skill when creating a chat, summarization, or extraction feature with a .litertlm model from Hugging Face litert-community (Gemma, Qwen, Llama, Phi), including the Gradle dependency, the GPU manifest entries, getting the model file onto the device, Engine initialization off the main thread, a streamed multi-turn Conversation with sendMessageAsync, and the AndroidViewModel and Compose screen. Don't use for running .tflite vision, audio, or embedding models with the CompiledModel API, for image or audio input, tool calling, or NPU backends, or for converting models.
GOgoogle-ai-edge/litert-samples508近 7 天新增 8 个 star+8
---
name: litert-runtime
description: Configures and implements LiteRT (.tflite) on-device inference on Android in Kotlin using the CompiledModel API on CPU and GPU. Use this skill for any Android LiteRT or .tflite task, including Gradle setup, image classification or vision/audio/embedding helpers, TensorBuffer reuse, CPU memory optimization, Bitmap preprocessing, AndroidViewModel GPU-to-CPU fallback with warm-up on a single-thread dispatcher, LiteRT in Google Play services (play-services-litert), migrating from legacy org.tensorflow.lite.Interpreter, GpuDelegate, or play-services-tflite, and latency benchmarking. Don't use for running generative text LLMs with .litertlm files or for Python model conversion.
GOgoogle-ai-edge/litert-samples508近 7 天新增 8 个 star+8
---
name: benchmark-on-ddp
description: Measure a LiteRT .tflite model with `benchmark_model` on Developer Device Platform (DDP) lab phones through `litert benchmark --ddp`, or on the Mac you run it from, and turn the session into rows of the performance leaderboard under benchmark/leaderboard - one matrix entry per model, one session per accelerator, collect results.pb and runtime_info.pb, rebuild board.json, check the page, commit the data. Use when a model needs latency and memory numbers per platform, device and accelerator, or when a new benchmark_model release means re-measuring the board.
GOgoogle-ai-edge/litert-samples508近 7 天新增 8 个 star+8
---
name: compiled-model-app-scaffolding
description: Build a new Android app (Kotlin, Compose) around a verified LiteRT model using the CompiledModel API - the app architecture, the inference-layer lifecycle rules, model delivery, and the UI traps that masquerade as model bugs. Use when turning a converted and device-verified model into a demo or product app, when an app's inference layer leaks memory or blocks the UI, or when a model that verified clean looks wrong inside an app.
GOgoogle-ai-edge/litert-samples508近 7 天新增 8 个 star+8
---
name: gpu-clean-conversion
description: Convert a PyTorch or Hugging Face model into a LiteRT model that runs fully on the GPU via the CompiledModel API with verified-correct output, and lay it out as a model recipe. Use when converting a new model, or when a converted model is rejected by the GPU, falls back to CPU, or returns wrong numbers on device.
GOgoogle-ai-edge/litert-samples508近 7 天新增 8 个 star+8
---
name: litert-compiled-model-migration
description: Rapidly migrate an Android application from legacy TensorFlow Lite (TFLite) to the modern LiteRT CompiledModel API (2.x) in Open Source GitHub repositories, keeping the TensorFlow Lite Support Library as LiteRT Support (litert-support 2.3.0). Covers buffer reuse, NPU JIT compilation, a reference implementation, and a two-stage verification gate (compile check, then an on-device parity test against a golden output).
GOgoogle-ai-edge/litert-samples508近 7 天新增 8 个 star+8
---
name: litert-conversion-workflow
description: Convert a Hugging Face LLM or vision-language model checkpoint into a .litertlm bundle that runs on the LiteRT-LM runtime with verified quality - classify the architecture against known runtime walls, pick the recipe family (dense, reasoning, hybrid SSM, VLM), export, quantize, gate the result against the source model, and publish. Use when converting a new LLM or VLM to LiteRT-LM, when a converted bundle crashes on the first message or dies at engine creation, when a quantized model answers worse than its source, or when deciding whether a model is convertible at all.
GOgoogle-ai-edge/litert-samples508近 7 天新增 8 个 star+8
---
name: litert-google-tensor
description: Compiles LiteRT (.tflite) models ahead-of-time for Google Tensor TPUs (Tensor G5 on Pixel 10, Tensor G6 on Pixel 11) locally on Linux x86_64 or remotely via Google Colab (--colab on macOS, Windows, or ARM hosts), benchmarks them on a USB-attached Pixel with LiteRT's benchmark_model (NPU latency, peak memory, TPU tile time, TPU energy, optional CPU baseline), and packages compiled models for an Android Gradle app as a Google Play AI pack with the Tensor NPU runtime module and a Kotlin loader, applies it to the app and verifies it on a Pixel. Use when the user asks to compile, AOT-compile, or prepare a .tflite model for the Pixel TPU/NPU, check whether a .tflite is already Tensor-compiled, measure on-device NPU performance of a compiled model, or package or deploy a compiled model into their Android app (or replace the one it ships). Don't use for Qualcomm, MediaTek, or Samsung NPUs, GPU-only benchmarking, LiteRT-LM or LLM (.litertlm) models, on-device JIT compilation, non-Gradle builds, or publishing to Google Play.
GOgoogle-ai-edge/litert-samples508近 7 天新增 8 个 star+8
---
name: add-litert-omni-model
description: Guides end-to-end bring-up of a new LiteRT Omni multimodal model (Any-to-Any, ASR, TTS, or Text-to-Image) under models/ in google-ai-edge/litert-samples without modifying upstream LiteRT-LM or litert-torch packages. Use when adding a new Omni C++ runtime pipeline, custom protobuf metadata schema, standalone runner binary, out-of-tree Hugging Face PyTorch exporter extension, or hermetic cross-language tests under models/. Don't use for LiteRT Tensor API LLM bring-up (see google-ai-edge/LiteRT tensor/README.md), upstreaming stabilized models into LiteRT-LM, or general model inference debugging.
GOgoogle-ai-edge/litert-samples508近 7 天新增 8 个 star+8
---
name: on-device-verification
description: Prove a converted or quantized LiteRT model on the actual device via the CompiledModel API - confirm GPU residency, compare device output against the source model, and diagnose device-only failures such as silent CPU fallback, whole-graph compile ceilings, and fp16 range breaks. Use after conversion or quantization, when device output is wrong or NaN, when a clean graph fails to compile only on device, or when GPU and CPU outputs are suspiciously identical.
GOgoogle-ai-edge/litert-samples508近 7 天新增 8 个 star+8