CtrlK
BlogDocsLog inGet started
Tessl Logo

litert-torch

github.com/google-ai-edge/litert-torch

SkillAddedReview
converting-pytorch-to-litert

SKILL.md

Converts PyTorch models (e.g. ResNet, timm, HuggingFace transformers) directly to LiteRT (.tflite) flatbuffer format. Use when converting PyTorch models to TFLite, setting up export environments, or troubleshooting torch-to-litert conversion bugs. Don't use for ONNX exports or converting existing TensorFlow models.

59

export-hf-model-extension

litert_torch/generative/export_hf/model_ext/SKILL.md

Onboards and exports new or custom Hugging Face (or Diffusers/PyTorch) model architectures in `litert_torch.generative.export_hf` using pluggable `ModelExtension` classes (built-in under `model_ext/<arch>/` or out-of-tree via `--extension_modules`). Use when supporting a new `model_type` in `export_hf` or `litert_lm`, inspecting a checkpoint with `model_ext/inspector.py`, patching RMSNorm/SwiGLU/ShortConv/Attention/RoPE for `torch.export`, configuring fused weights or `LlmMetadata`, or verifying extensions with `model_ext/testing.py`. Don't use for generic non-generative PyTorch-to-TFLite conversion or standalone post-export equivalence evaluation.

72

litert-model-equivalence-test

litert_torch/generative/export_hf/experimental/validation/SKILL.md

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.

68

litert-quantization-calib

litert_torch/generative/export_hf/experimental/calib/skills/tflite_quantization_calib/SKILL.md

Assists the user to calibrate, merge, and statically quantize litert LLM models (such as Gemma 3) in standard open-source (OSS) environments. Use when the user wants to run LLM calibration, merge task JSON results, align KV cache parameters across models, protect sensitive layers in Float32, or run quantized inference testing. Don't use for JAX/PyTorch custom quantization configurations or non-litert models.

67