Install any skill in seconds. Free to start, no credit card required.
Get Started Free →Validates LiteRT-LM exports against their Hugging Face transformers source models by comparing generated outputs across prompts.
26% 96%+70 ptsof test cases passed
Passed 22 of 23 test cases with the skill, and 6 of 23 without it.
I want to run the LiteRT equivalence validation tool for Hugging Face model `google/gemma-3-270m-it`, saving the intermediate export files to `/tmp/model_export_dir` instead of the default location. What is the command?
Uses Bazel target //third_party/py/litert_torch/generative/export_hf/experimental/validation:equivalence_test
3 of 3 safety checks passed
This skill provides instructions for running equivalence tests between LiteRT models and their PyTorch source models.
Use the equivalence_test script to compare the outputs of a Hugging Face model
and its exported LiteRT version.
Run the test using bazel run from your workspace:
bazel run \
//third_party/py/litert_torch/generative/export_hf/experimental/validation:equivalence_test \
-- \
--model_id={model_id} \
[--prompt={prompt}] \
[--prompt_file={prompt_file}] \
[--max_new_tokens={max_new_tokens}] \
[--max_num_tokens={max_num_tokens}] \
[--work_dir={work_dir}] \
[--externalize_embedder] \
[--single_token_embedder] \
[--split_cache] \
[--backend={backend}]
--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).Next to this one in the catalogue, plus more from the same author.