litert-google-tensor
Installation
SKILL.md
LiteRT on Google Tensor: compile, benchmark, package for apps
Three scriptable workflows for Pixel TPUs:
- Compile a plain
.tfliteinto a Google Tensor AOT-compiled.tflitewith the public LiteRT Python API (ai_edge_litert.aot), locally on Linuxx86_64or on a Google Colab VM (--colab, viagoogle-colab-cli) when the user is on macOS/Windows or lacks a Linux box. - Benchmark a compiled model on a connected Pixel with LiteRT's
benchmark_model, NPU-only, optionally next to a CPU baseline, including TPU tile time (pure TPU compute time) and TPU energy per inference. - Package compiled builds for an Android (Gradle) app as a Google Play AI pack with the Google Tensor NPU runtime and a Kotlin loader (or, for an app that already ships Google Tensor builds, only the files to replace), apply the plan to the project when the user agrees, and check the app on a Pixel.