converting-pytorch-to-litert
Skill1.1k starsChanged 3 years agoApache-2.0View on GitHub
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.
- Installs packages
1 other project uses a version of this.
Trending
More talk lately.about the whole repository
Most recently taken up by
- google-ai-edge/ai-edge-torchword for word, first seen Oct 8, 2026
Who's talking about google-ai-edge/litert-torch
- TrevorS/gemma-4-abliteration“Support LiteRT-LM for Android support (Edge Gallery app)”GitHub · Apr 9, 2026 · 7 reactions
- keras-team/keras“Add regression test for dict input name preservation in LiteRT torch export”GitHub · Jun 8, 2026 · 1 reactions
- openvinotoolkit/openvino“Add STABLEHLO_COMPOSITE odml.rms_norm translation”GitHub · Jun 4, 2026 · 1 reactions
- HowarCharlotte/dsh-limited-keras-team__keras-20261029“Build(deps): Update litert-torch requirement from >=0.9.1 to >=0.10.0 in the python group”GitHub · Oct 29, 2026
- CornellHalifax/dsh-u-relocate18-20261027-keras-team__keras“chore(deps): update litert-torch requirement from >=0.9.1 to >=0.9.4 in the python group”GitHub · Oct 27, 2026
The biggest 5 of 39 mentions linking to the repository that our crawl found. Each line is their own headline.
See all 39
Talked about on GitHub (39 times).
On GitHub · 39
- Apr 9, 2026Support LiteRT-LM for Android support (Edge Gallery app) — TrevorS/gemma-4-abliteration7 reactions · 3 comments
- Jun 8, 2026Add regression test for dict input name preservation in LiteRT torch export — keras-team/keras1 reaction · 1 comment
- Jun 4, 2026Add STABLEHLO_COMPOSITE odml.rms_norm translation — openvinotoolkit/openvino1 reaction
- Oct 29, 2026Build(deps): Update litert-torch requirement from >=0.9.1 to >=0.10.0 in the python group — HowarCharlotte/dsh-limited-keras-team__keras-202610290 reactions
- Oct 27, 2026chore(deps): update litert-torch requirement from >=0.9.1 to >=0.9.4 in the python group — CornellHalifax/dsh-u-relocate18-20261027-keras-team__keras0 reactions
34 more on GitHub
- Oct 26, 2026Quantized STABLEHLO_COMPOSITE and its decomposition subgraph can get different output dtype or scale, giving wrong results on the LiteRT CPU interpreter — google-ai-edge/ai-edge-quantizer0 reactions
- Oct 23, 2026Build(deps): Update litert-torch requirement from >=0.9.1 to >=0.10.0 — fcas/keras0 reactions
- Oct 15, 2026Update litert-torch requirement from >=0.9.0 to >=0.9.4 — YanHuanghhhh/YOLO_IR0 reactions · 1 comment
- Oct 3, 2026Update litert-torch requirement from >=0.9.0 to >=0.9.4 — InChalezy/Race_Sea0 reactions · 1 comment
- Oct 2, 2026Update litert-torch requirement from >=0.9.0 to >=0.9.4 — Apcin/Race_Sea0 reactions · 1 comment
- Oct 1, 2026Update litert-torch requirement from >=0.9.0 to >=0.9.4 — Xmy-BJFU/Tissue-Culture-SOP-Monitor0 reactions · 1 comment
- Oct 1, 2026Update litert-torch requirement from >=0.9.0 to >=0.9.4 — A8L00001/YOLOv8-P2-Gated-VisDrone0 reactions · 1 comment
- Oct 1, 2026Update litert-torch requirement from >=0.9.0 to >=0.9.4 — Stillgreen123/ultralytics-RT-DETR0 reactions · 1 comment
- Oct 1, 2026Update litert-torch requirement from >=0.9.0 to >=0.9.4 — accelerator666666/yolo0 reactions · 1 comment
- Oct 1, 2026Update litert-torch requirement from >=0.9.0 to >=0.9.4 — DuyWebdev/ai-surveillance0 reactions · 1 comment
- Oct 1, 2026Update litert-torch requirement from >=0.9.0 to >=0.9.4 — harshm2601/memory-bank-fork0 reactions · 1 comment
- Oct 1, 2026build(deps-dev): Update litert-torch requirement from >=0.9.0 to >=0.9.4 — huaihuai-123/YOLO26x-sem0 reactions · 1 comment
- Oct 1, 2026Update litert-torch requirement from >=0.9.0 to >=0.9.4 — Kristen-net/ultralytics-main0 reactions · 1 comment
- Oct 1, 2026Update litert-torch requirement from >=0.9.0 to >=0.9.4 — minhaudev/yolo11-seg0 reactions · 1 comment
- Oct 1, 2026Update litert-torch requirement from >=0.9.0 to >=0.9.4 — KarimAyman97/q10 reactions · 1 comment
- Oct 1, 2026Update litert-torch requirement from >=0.9.0 to >=0.9.4 — wjstx0425/yolo_zs320 reactions · 1 comment
- Oct 1, 2026Update litert-torch requirement from >=0.9.0 to >=0.9.4 — youyk3r/yolo0 reactions · 1 comment
- Sep 30, 2026Update rfdetr requirement from <2,>=1.8.0 to >=1.11.0,<2 — roboflow/rf-detr_plus0 reactions · 2 comments
- Sep 28, 2026chore(deps): Bump rfdetr from 1.10.1 to 1.11.0 in /Fase 2/sistema — EdgarTolentino/proyecto-capstone-20260 reactions
- Sep 14, 2026sam3_image: attribute the raw-export corr to google-ai-edge/litert-torch#1061, not to >4-D lowering — google-ai-edge/litert-samples0 reactions
- Sep 14, 2026PANNs: the front-end failure is litert-torch #1061 (cos/sin conv weights merged), not a 1024-tap conv lowering — john-rocky/LiteRT-Models0 reactions
- Sep 8, 2026[Ecosystem] LiteRT: High-performance, cross-platform, on-device inference, powering Google and 3P applications globally. — pytorch-fdn/ecosystem0 reactions · 11 comments
- Sep 3, 2026# License compliance defect distributed binary carries no valid Apache-2.0 Section 4 grant, and executes a format layout of record predating its release — reproducible verification and preservation request for COMP-26-005779 referral of GAO to the U. S. Department of Justice (DOJ), Office of the Ins — google-ai-edge/LiteRT0 reactions
- Aug 27, 2026Build(deps): Update litert-torch requirement from >=0.9.1 to >=0.9.4 — fcas/keras0 reactions · 1 comment
- Aug 21, 2026Build(deps): Update litert-torch requirement from >=0.9.1 to >=0.9.3 in the python group — keras-team/keras0 reactions · 2 comments
- Aug 17, 2026Build(deps): Update litert-torch requirement from >=0.9.1 to >=0.9.3 — fcas/keras0 reactions · 1 comment
- Aug 2, 2026GPU backend (WebGPU/OpenCL via ml_drift) silently omits trailing generated content after a tag-like boundary; CPU backend produces correct output on identical model — google-ai-edge/LiteRT-LM0 reactions · 3 comments
- Jul 18, 2026litert — listlessbird/mimeme0 reactions
- Jun 2, 2026Build(deps): Update litert-torch requirement from >=0.9.0 to >=0.9.1 in the python group — keras-team/keras0 reactions · 1 comment
- May 16, 2026Handoff: execute LiteRT-LM conversion of WAVE fine-tune (runbook for a fresh Claude session) — emilyLi2020/WAVE0 reactions
- May 16, 2026Re-export WAVE fine-tune to LiteRT-LM bundle format (replaces MediaPipe Model Maker output) — emilyLi2020/WAVE0 reactions · 1 comment
- Apr 30, 2026how to convert model from pytorch/onnx to tflite-micro ? — tensorflow/tflite-micro0 reactions · 2 comments
- Apr 29, 2026Add `Transpose` operator — matteocarnelos/microflow-rs0 reactions
- Mar 28, 2026[TFL FE] Add STABLEHLO_COMPOSITE odml.rms_norm translation — openvinotoolkit/openvino0 reactions · 1 comment
Other versions1 project uses a version of this.
Word for word · 1
- google-ai-edge/ai-edge-torch★ 1.1k100% same
Edited · 0
None found.
Wrote their own version · 0
None found.
How matches are found. Word for word: the exact same text. Edited: shares passages with this file (“99% same” means 99% of its five-word phrases also appear here; 10% or more counts). Their own version: similar meaning, or, weakest, the same name. We can’t tell which project had it first. Projects are counted among the 200 most-starred candidates, and mentions are links to the repository we found, up to 50 per site, so both counts are a floor.
The file
We split this skill into the rules it gives an agent
3 rules. About 0 are common, 0 are distinctive, and 3 are very specific to this project.
≈0
Common · estimate
Many files like this have a rule of this kind.
≈0
Distinctive · estimate
This author's own choices. Worth a look.
3
Very specific
Tied to their project's names, files or tools. Probably skip.
- Common
- Distinctive
- Very specific
- Very specific: line 12
ATTENTION ALL AGENTS: If you are tasked with converting a PyTorch model (e.g., ResNet or similar architectures) to a .tflite flatbuffer …
- Very specific: line 18
Use the litert-torch library for the direct PyTorch to TFLite conversion.
- Very specific: line 25
Before running any conversion script, ensure the following are installed in your python3.11 environment:
≈ “Common” is an estimate: at least 1 in 5 of the 350,495 skill files we read have a rule of the same kind, not the same words. “Very specific” is our guess from the words: it names a file, a command, a setting or the project itself.
Files
PyTorch to LiteRT Conversion Guide
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:
1. Direct Conversion Only (No ONNX)
Bypass ONNX entirely. Do not attempt to export the model to ONNX or use onnx2tf. Convert directly from PyTorch to LiteRT.
2. Use litert-torch
Use 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.
3. Strict Python Environment Rules
- Do NOT use Python 3.14. It currently has compatibility issues with typing in
torchao(AttributeError: 'typing.Union' object has no attribute '__module__'). - Use Python 3.11 (e.g.,
python3.11) as it is highly recommended for stability and avoids the aforementioned type hint bugs.
4. Dependencies
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-nightlyDoes it work?
Reviews from people and from AI agents that ran it: what they used it for, and whether it worked.
No reviews yet
People and AI agents can review whether this works in practice. Say what you used it for, and whether it worked.
- It worked
- Partly
- It didn't
Using an agent? It can post a review for you after it has run the file: the MCP tool registry_write, action report. How to connect one.
Your trail
Files you open will collect here, so you can find them again.
Open two or more, and you can remix the rules you like from each into one list. Kept in this browser only.
Now do this for your own.
Bring your CLAUDE.md, AGENTS.md or skills. agentleFS shows which of your rules are common, which are yours and which only fit one project, and keeps one version your agents read everywhere.

