google-ai-edge/litert-torch/validation
Claude Code and agent skill by google-ai-edge/litert-torch
- community
Checking that the SKILL.md file is still in the repository.
Validates equivalence between LiteRT models (litert_lm) and PyTorch models (transformers). Use when you need to verify that an exported LiteRT model produces the same outputs as the original Hugging Face model. Supports multi-turn conversations and custom prompts.
Install
npx vskill@latest install google-ai-edge/litert-torch/validationSKILL.md
LiteRT Model Equivalence Test
This skill provides instructions for running equivalence tests between LiteRT models and their PyTorch source models.
Usage
Use the equivalence_test script to compare the outputs of a Hugging Face model and its exported LiteRT version.
Running the Test
Run the test using bazel run from your workspace:
Flags
-
--model_id: The Hugging Face model ID to validate (e.g.,
google/gemma-3-270m-it).
-
--prompt: Prompt to test. Specify multiple times for multi-turn
conversations.
-
--prompt_file: Path to a file containing one (complex) prompt. Overrides
--prompt.
-
--max_new_tokens: Maximum new tokens to generate per turn (default: 20). -
--max_num_tokens: KV cache length for the model (default: 2048). -
--work_dir: Base directory for model export. If not specified, a
temporary directory under HOME is used.
-
--externalize_embedder: Externalize the embedder during export (default:
False).
-
--single_token_embedder: Use single token embedder during export (default:
False).
-
--split_cache: Split KV cache during export (default: False). -
--sliding_window_ring_buffer_size: Size of the sliding window ring buffer
(default: None).
-
--apply_gpu_composites: Apply GPU composites during export (default:
False).
-
--use_bool_mask: Use boolean mask during export (default: False). -
--use_sdpa_composite: Use SDPA composite during export (default: False). -
--backend: Hardware backend to use for LiteRT LM (cpu | npu, default:
cpu).
Examples
Single-turn test with custom prompt:
Multi-turn test:
Testing with a prompt file:
Testing with externalized embedder:
Testing NPU export variant:
Security
- Security scanPassed, 90 of 100Pattern checks on the skill's files.
- Model reviewPassed
Quality evaluation
- Task evaluationNot runNo evaluation yet. Run one in Skill Studio.
Source
- SKILL.md in the repositoryCheckinglitert_torch/generative/export_hf/experimental/validation/SKILL.md
Popularity
- Repository stars
- 1,092
- Repository forks
- 188
- 7-day trend score
- 35
Stars and forks are for the whole GitHub repository, not this skill alone. Refreshed 9 Sep 2026, a month ago.
Works with
Any agent vskill installs to: 56 targets in all. These 39 have a page on this site.
- Claude Code
- Cursor
- GitHub Copilot
- Windsurf
- Codex
- Gemini CLI
- Cline
- Amp
- Roo Code
- Goose
- Continue
- Kilo Code
- Junie
- Trae
- OpenHands
- Qwen Code
- AI Agent
- Tabnine Chat
- Sourcegraph Cody
- Amazon Q
- Firebase Genkit
- Sweep
- Devin
- Phind
- Mentat
- Claude Desktop
- Aider
- GPT Pilot
- Plandex
- bolt.new
- v0
- Replit Agent
- Anse
- TypingMind
- BetterChatGPT
- LibreChat
- Warp AI
- Pieces
- Fig AI
Embed badge
[](https://verified-skill.com/skills/google-ai-edge/litert-torch/validation)