litert-torch
Support PyTorch model conversion with LiteRT.
Decision gist · record as of 2026-08-14
Yes, if you are converting PyTorch models for on-device deployment and targeting Android, iOS, or IoT. The library is actively maintained, has low install friction, and offers both general and LLM-specific conversion paths. Conditions: requires Python 3.10 through 3.13 (3.11 recommended), Linux, and a large dependency footprint; the Generative API is Alpha, so production LLM workflows should expect iteration.AI-flagged interpretation of the facts on this page — verify before relying
Before you install
- Python >=3.10 and <3.14 required; Python 3.11 highly recommended.
- Linux only.
- Requires PyTorch >=2.4.0 and tf-nightly.
License · maintenance · safety
permissive license (permissive) — Permissive license allows commercial and private use with minimal restrictions.
last release 2026-08-04 (10 days) · last repo commit 2026-08-14 · 1,079 stars
0 known vulnerabilities (OSV.dev, 2026-08-14) · 166,622 downloads/mo, #10,487 on PyPI
Alternatives
Verify before relying
pip install litert-torch
import torch
import litert_torch
model = torch.nn.Linear(10, 2)
with torch.no_grad():
sample_inputs = (torch.randn(1, 10),)
edge_model = litert_torch.convert(model.eval(), sample_inputs)
edge_model.export("model.tflite")- Specific coverage of Core ATen operators and which PyTorch operations are unsupported in conversion
- Performance benchmarks or latency comparisons for converted models on target devices
- Quantization support details beyond the mention of Generative API quantization
- Whether GPU/NPU support is production-ready or experimental
What it is and what it does
LiteRT Torch bridges PyTorch and on-device deployment by converting trained PyTorch models into LiteRT's .tflite format. The library integrates with torch.export() to capture models, then serializes them for execution on mobile and IoT hardware. It provides two main workflows: a PyTorch Converter (Beta) for general model conversion, and a Generative API (Alpha) specialized for transformer-based models and large language models with quantization support.
The package targets developers building edge ML applications where models must run entirely on-device without cloud connectivity. It handles the conversion pipeline and offers initial support for CPU, GPU, and NPU execution. With 19 runtime dependencies including torch, transformers, jax, and tf-nightly, it brings a substantial environment; deployment of the converted .tflite files themselves requires the separate LiteRT runtime.
Use it for
- Convert a trained vision model to .tflite for inference on Android or iOS devices
- Quantize and optimize a transformer-based LLM for on-device deployment using the Generative API
- Export a PyTorch model for IoT edge devices that cannot reach cloud inference services
- Package a converted model and tokenizer into a .litertlm container for production mobile deployment
- Benchmark model performance on target hardware using LiteRT's compiled model API after conversion
Worth the install?
AI-flagged interpretation of the facts on this page. Verify before relying on it.
Yes, if you are converting PyTorch models for on-device deployment and targeting Android, iOS, or IoT.
The library is actively maintained, has low install friction, and offers both general and LLM-specific conversion paths. Conditions: requires Python 3.10 through 3.13 (3.11 recommended), Linux, and a large dependency footprint; the Generative API is Alpha, so production LLM workflows should expect iteration.
Install
litert-torch on PyPI
Before you install
Low friction; pure Python wheel. Active maintenance with release 10 days old and recent commits. However, 19 runtime dependencies including torch, transformers, jax, and tf-nightly create a substantial environment footprint.
Python >=3.10 and <3.14 required; Python 3.11 highly recommended. Linux only. Requires PyTorch >=2.4.0 and tf-nightly.
License in practice
Permissive license allows commercial and private use with minimal restrictions.
Quickstart
pip install litert-torch
import torch
import litert_torch
model = torch.nn.Linear(10, 2)
with torch.no_grad():
sample_inputs = (torch.randn(1, 10),)
edge_model = litert_torch.convert(model.eval(), sample_inputs)
edge_model.export("model.tflite")
Verify before relying
- Specific coverage of Core ATen operators and which PyTorch operations are unsupported in conversion
- Performance benchmarks or latency comparisons for converted models on target devices
- Quantization support details beyond the mention of Generative API quantization
- Whether GPU/NPU support is production-ready or experimental
Package facts
| License | permissive license permissive |
| Python support | Supports the current Python release >=3.10 |
| Install friction | Low. Pure-Python wheel |
| Runtime dependencies | 19 packagesabsl-pynumpyscipysafetensorsmultipledispatchtransformerskagglehubtabulatetorchai-edge-litertai-edge-quantizerlitert-convertertorchaojaxjaxtypingfiresentencepiecerichlitert-lm-builder |
| Maintenance | Actively maintained 10 days since the last release |
| Last repo commit | |
| First released | |
| Downloads | 166,622 / month, #10,487 on PyPI 30-day window, as of 2026-08-14 |
| Known vulnerabilities | None known OSV.dev, checked 2026-08-14 |
| Classifiers | Development Status :: 4 - BetaIntended Audience :: DevelopersIntended Audience :: EducationIntended Audience :: Science/ResearchLicense :: OSI Approved :: Apache Software LicenseProgramming Language :: Python :: 3Programming Language :: Python :: 3 :: OnlyProgramming Language :: Python :: 3.10Programming Language :: Python :: 3.11Programming Language :: Python :: 3.12Programming Language :: Python :: 3.13Topic :: Scientific/EngineeringTopic :: Scientific/Engineering :: Artificial IntelligenceTopic :: Scientific/Engineering :: MathematicsTopic :: Software DevelopmentTopic :: Software Development :: LibrariesTopic :: Software Development :: Libraries :: Python Modules |
Evidence: litert_torch-0.9.3-py3-none-any.whl
Tags
Let your AI agent find packages like this
Example. Real query, live index.
You found this page by searching. An agent finds it by wishing: SkillFed indexes 14,416 PyPI packages by what they can do, searchable in plain language.
wish › “pytorch to tflite conversion”
- litert-torchConverts PyTorch models to .tflite format for on-device deployment on…
- onnx2tfConverts ONNX model files to LiteRT, TensorFlow, PyTorch,…
- ai-edge-model-explorerVisualizes and debugs machine learning model graphs with hierarchical…
Give your agent the search over MCP, or paste the wish link into any chat.
More Software Development packages
Provides backported and experimental type hints for Python 3.9+, allowing use of newer typing features on older Python versions and enabling early experimentation with type system PEPs before they enter the standard library.
NumPy provides an N-dimensional array object and a comprehensive suite of mathematical, linear algebra, Fourier transform, and random number functions for scientific computing in Python.
FastAPI is a Python web framework for building REST APIs using type hints, with automatic request validation, serialization, and interactive API documentation.
Provides a way to document function parameters, class attributes, return types, and variables inline using Python's `Annotated` type hint syntax instead of traditional docstrings.
Typer builds command-line applications from Python functions using type hints, automatically generating help text, argument parsing, and shell completion.
Install it if you are building CLIs in Python.
Distlib provides low-level packaging utilities for building, distributing, and managing Python software—including metadata handling, version specifiers, wheel support, script installation, and dependency resolution.
See also ai-edge-litert · onnx2tf · litert-converter · litert-lm-builder · ai-edge-litert-nightly · tflite-runtime · pnnx · ai-edge-quantizer · executorch · pte-adapter-model-explorer