Install any skill in seconds. Free to start, no credit card required.
Get Started Free →Converts PyTorch models such as ResNet, timm, and HuggingFace transformers directly to LiteRT .tflite flatbuffers using litert-torch.
14% 95%+82 ptsof test cases passed
Passed 21 of 22 test cases with the skill, and 3 of 22 without it.
When setting up the environment for converting a PyTorch Vision Transformer model from `timm` to `.tflite`, what specific LiteRT CLI package must be included in the `pip install` list?
Specifies litert-cli-nightly as the required CLI package
3 of 3 safety checks passed
ATTENTION ALL AGENTS: If you are tasked with converting a PyTorch model (e.g., ResNet or similar architectures) to a .tflite flatbuffer format in this repository, you must strictly follow these rules based on recent project findings:
Bypass ONNX entirely. Do not attempt to export the model to ONNX or use onnx2tf. Convert directly from PyTorch to LiteRT.
litert-torchUse the litert-torch library for the direct PyTorch to TFLite conversion. Note that ai-edge-torch is deprecated and has been officially renamed to litert-torch.
torchao (AttributeError: 'typing.Union' object has no attribute '__module__').python3.11) as it is highly recommended for stability and avoids the aforementioned type hint bugs.Before running any conversion script, ensure the following are installed in your python3.11 environment:
python3.11 -m pip install torch transformers timm litert-torch ai-edge-litert litert-cli-nightly
Next to this one in the catalogue, plus more from the same author.