Litert Google Tensor
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 pr
Install
npx skills add google-ai-edge/litert-samples --skill litert-google-tensorgit clone --depth 1 https://github.com/google-ai-edge/litert-samples.git /tmp/litert-samples
mkdir -p ~/.claude/skills
cp -r /tmp/litert-samples/skills/litert-google-tensor ~/.claude/skills/litert-google-tensorPersonal skills live in ~/.claude/skills. Use .claude/skills in a project folder to share a skill with your team.
From the SKILL.md
# LiteRT on Google Tensor: compile, benchmark, package for apps
Three scriptable workflows for Pixel TPUs:
1. **Compile** a plain `.tflite` into a Google Tensor AOT-compiled `.tflite`
with the public LiteRT Python API (`ai_edge_litert.aot`) - either locally on
Linux `x86_64` or remotely on a Google Colab VM (`--colab` via
`google-colab-cli`) when the user is on macOS/Windows or lacks a Linux box.
2. **Benchmark** a compiled model on a connected Pixel with LiteRT's
`benchmark_model` binary, NPU-only, optionally next to a CPU baseline,
including TPU tile time (pure TPU compute time) and TPU energy per
inference, both from the Tensor runtime's hooks.
3. **Package** compiled builds for an Android (Gradle) app: a Google Play AI
pack written by LiteRT's own exporter (`ai_edge_litert.aot.ai_pack`) from
the files as they are, the Google Tensor NPU runtime as a feature module
(from Google Maven), a Kotlin loader and a step-by-step `INTEGRATION.md`.
For an app that already ships Google Tensor builds, it prepares only the
files to replace, under the app's own paths, with an `UPDATE.md`. When
the user agrees, the agent applies the plan to the project (one approval,
separate OKs for risky changes) and checks the app on a Pixel.
Everything runs synchronously in the user's terminal; the scripts never start
background processes and always clean up what they pushed to the phone orDetails
- Skill name
litert-google-tensor- Repository
- google-ai-edge/litert-samples
- Path
skills/litert-google-tensor/SKILL.md- License
- Apache-2.0
- Repo updated
- 17 November 2026
FAQ
What does the Litert Google Tensor skill do?
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 pr
How do I install the Litert Google Tensor skill?
skills CLI (Claude Code, Cursor, Codex and more): npx skills add google-ai-edge/litert-samples --skill litert-google-tensor. Skills go in ~/.claude/skills (personal) or .claude/skills (project), and Claude loads them automatically when a task matches the description.
Is Litert Google Tensor popular?
It lives in google-ai-edge/litert-samples, which has 499 GitHub stars and 134 forks.
Related skills
Litert Lm
499google-ai-edge/litert-samples
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 v
Litert Runtime
499google-ai-edge/litert-samples
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 r
Accuracy Safe Quantization
499google-ai-edge/litert-samples
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.
On Device Verification
499google-ai-edge/litert-samples
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.
Litert Compiled Model Migration
499google-ai-edge/litert-samples
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).
Tinker AI Skill
325drost-ai/tinker-ai-skill
Turn your own coding-agent session transcripts (Claude Code JSONL) into a supervised fine-tuning dataset and train a LoRA on Tinker with the tinker-cookbook. Use when the user wants to fine-tune a model on their agent sessions, build an SFT dataset from transcripts, anonymize or de-identify transcripts, slice long sessions to a context length with compaction context, or train and evaluate on Tinker. Covers collection, cleaning (secrets, PII, paths), chunking, train/val splits, training, sampling, and the pitfalls that cost us runs.
Browse the most popular Claude skills, all ai, llms & agents skills, or write your own with the skills generator.