On Device Verification
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.
Install
npx skills add google-ai-edge/litert-samples --skill on-device-verificationgit 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/on-device-verification ~/.claude/skills/on-device-verificationPersonal skills live in ~/.claude/skills. Use .claude/skills in a project folder to share a skill with your team.
From the SKILL.md
# On-device verification A device result is done when three things hold: 1. the model compiles and runs on the accelerator you claim it runs on, 2. the output matches the source model numerically **and** on a task-level gate, 3. the record names the device, the runtime version, and the residency line. A number without those is not reproducible and not a result. Host-side checks (the CompiledModel checker used in `gpu-clean-conversion`) exercise the host GPU. The device has its own shader compiler, its own precision behavior, and its own memory ceiling — every failure mode in the table below was hit by a model that had already passed on the host. The Python API below runs on the host only (`ai-edge-litert` ships wheels for Linux, macOS and Windows); on a phone the same inputs go through the app's inference class or a push-run-pull binary (last bullet of "Watch for"). ## Loop **1. Dump references from the source model, once.** Fixed inputs — one real sample plus fixed-seed random — saved as `.npy` next to the recipe (`dump_*_ref.py`). These are ground truth for every later step; regenerate them only when the source model changes. **2. Run the same inputs on the host runtime, CPU then GPU, then on the device.** One argument switches the accelerator (`ai-edge-litert` 2.2.0, 2.3.0):
Details
- Skill name
on-device-verification- Repository
- google-ai-edge/litert-samples
- Path
skills/on-device-verification/SKILL.md- License
- Apache-2.0
- Repo updated
- 17 November 2026
FAQ
What does the On Device Verification skill do?
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.
How do I install the On Device Verification skill?
skills CLI (Claude Code, Cursor, Codex and more): npx skills add google-ai-edge/litert-samples --skill on-device-verification. Skills go in ~/.claude/skills (personal) or .claude/skills (project), and Claude loads them automatically when a task matches the description.
Is On Device Verification 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.
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.
Litert Google Tensor
499google-ai-edge/litert-samples
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
Writing for Agents
559KunoLu/640-skills
Writing documents for agents. Use when creating or editing skills, or modifying AGENTS.md or CLAUDE.md.
Browse the most popular Claude skills, all ai, llms & agents skills, or write your own with the skills generator.