{"slug": "litert-vs-tensorflow-lite-what-changed-plus-the-old-name-new-name-cheat-sheet", "title": "LiteRT vs TensorFlow Lite: what changed, plus the old-name new-name cheat sheet", "summary": "Google's LiteRT, the renamed TensorFlow Lite, has evolved with new package names and APIs, including the CompiledModel interface and litert-torch for PyTorch conversion. The TensorFlow Lite packages are now in maintenance mode, receiving only critical updates, while LiteRT 2.2.0 offers a unified dependency for Android, Python, and PyTorch workflows.", "body_md": "**Last verified: 2026-09-05** — LiteRT 2.2.0, LiteRT-LM 0.16.1, litert-torch 0.9.4, ai-edge-litert 2.2.0. Every version and link below was read on that date. On-device tooling moves monthly; check the linked page before you pin anything.\n\nLiteRT is TensorFlow Lite, renamed on 2024-09-04. Same `.tflite` file format, same models, same `Interpreter` API. Four things changed since then:\n\n`org.tensorflow:tensorflow-lite` → `com.google.ai.edge.litert:litert`. Python `tflite-runtime` → `ai-edge-litert`. PyTorch converter `ai-edge-torch` → `litert-torch`.` CompiledModel`.` torch.export` straight to `.tflite`. No ONNX step, no TensorFlow graph.\nTensorFlow Lite packages are in maintenance mode. The tensorflow/lite README says they \"only receive critical security and stability updates\".\n\nIf you start today: `com.google.ai.edge.litert:litert:2.2.0` with `CompiledModel` on Android, `ai-edge-litert` in Python, `litert-torch` for PyTorch models, LiteRT-LM for on-device LLMs. An existing TensorFlow Lite app keeps working. You can move one package at a time.\n\n| You have | Use instead | Notes | \n|---|---|---|\n| `org.tensorflow:tensorflow-lite:2.17.0` | `com.google.ai.edge.litert:litert:2.2.0` | Google Maven only, not Maven Central. Contains both `Interpreter` and`CompiledModel` ; minSdk 23. The 1.4.x line is`Interpreter` -only, minSdk 21. | \n| `org.tensorflow:tensorflow-lite-gpu` | nothing extra on 2.x; the GPU accelerator is inside `litert` | `litert-gpu` stops at 1.4.2 (Interpreter API). | \n| `org.tensorflow:tensorflow-lite-support` /`-metadata` | `com.google.ai.edge.litert:litert-support` /`litert-metadata` 1.4.2 | No 2.x release of either. | \n| `-select-tf-ops` ,`-task-*` ,`-hexagon` | no LiteRT-named artifact | Task Library and Model Maker stay under the TensorFlow Lite name. | \n| `com.google.android.gms:play-services-tflite-*` | unchanged (16.5.0) | The Play services runtime keeps the `tflite` name. No code change. | \n| `GpuDelegate` /`NnApiDelegate` on`Interpreter` | `CompiledModel.Options(Accelerator.GPU)` or`Accelerator.NPU` | NNAPI is deprecated from Android 15 (Android docs). | \n| Qualcomm `qnn-litert-delegate` +`qnn-runtime` | `Accelerator.NPU` on`CompiledModel` , one dependency | NPU page lists Google Tensor, Qualcomm, MediaTek, Samsung, Intel. | \n\n| You have | Use instead | Notes | \n|---|---|---|\n| `pip install tflite-runtime` (`tflite_runtime.interpreter` ) | `pip install ai-edge-litert` (`ai_edge_litert.interpreter.Interpreter` ,`ai_edge_litert.compiled_model.CompiledModel` ) | `tflite-runtime` last shipped 2023-10 with wheels up to Python 3.11 and carries no deprecation note.`ai-edge-litert` 2.2.0 ships cp310 to cp314; its PyPI classifiers still say 3.8–3.11, ignore them. | \n| `tf.lite.Interpreter` for inference | `ai-edge-litert` | — | \n| `tf.lite.TFLiteConverter` (TensorFlow / Keras →`.tflite` ) | unchanged | Still the converter for TensorFlow models. | \n| `pip install ai-edge-torch` (`ai_edge_torch.convert` ) | `pip install litert-torch` (`litert_torch.convert(model, sample_inputs)` ) | `ai-edge-torch` 0.7.2 is a deprecation stub that says so.`litert-torch` 0.9.4 is a pure-Python wheel; its native part,`litert-converter` 0.4.0, has cp310–cp314 wheels. Installing pulls torch, jax and transformers (2.0 GB, 93 packages on 2026-09-05), not TensorFlow. | \n| — | `pip install ai-edge-quantizer` | Post-training quantization for LiteRT. | \n| — | `pip install litert-lm` | LiteRT-LM CLI (Python ≥ 3.10) to run `.litertlm` bundles on a desktop. | \n\n| Area | State on 2026-09-05 | \n|---|---|\n| iOS / Swift | The official quickstart still says `pod 'TensorFlowLiteSwift'` 2.17.0.`LiteRTSwift` on CocoaPods is nightly-only and stopped in 2025-06. No LiteRT core Swift package. LiteRT-LM has one (`import LiteRTLM` , early preview). | \n| Web | `@tensorflow/tfjs-tflite` →`@litertjs/core` 2.5.3 (WebGPU, Wasm/XNNPack, WebNN).`@litertjs/tfjs-interop` bridges TF.js tensors. | \n| LLMs | The MediaPipe LLM Inference page says it is \"in maintenance-only mode. New features and optimizations will be focused on LiteRT-LM\". LiteRT-LM: `com.google.ai.edge.litertlm:litertlm-android` 0.16.1 (`litertlm-jvm` for desktop),`.litertlm` bundles, Kotlin / Python / C++ stable, Swift / JS early preview. | \n\n| Situation | Pick | Why | \n|---|---|---|\n| New Android app, GPU or NPU with one line | `CompiledModel` in`litert` 2.x | Accelerator is an option; no delegate wiring. | \n| Existing TensorFlow Lite app, minSdk < 23 | `litert` 1.4.x (`Interpreter` ) | Same API surface, minSdk 21. | \n| App already on Play services | keep `play-services-tflite-*` | Officially unchanged. | \n| Detection / segmentation / audio with pre- and post-processing done for you | MediaPipe Tasks | Some MediaPipe models (Selfie Segmenter, for one) use MediaPipe-only ops such as `Convolution2DTransposeBias` ; they do not load in plain LiteRT. | \n| On-device LLM | LiteRT-LM | MediaPipe LLM Inference is maintenance-only. | \n| PyTorch model to Android | `litert-torch` →`.tflite` →`CompiledModel` | Direct `torch.export` path. | \n\n```\n// build.gradle.kts — served from Google Maven, not Maven Central\ndependencies { implementation(\"com.google.ai.edge.litert:litert:2.2.0\") }\n// keep the asset mmappable:  android { androidResources { noCompress += \"tflite\" } }\npython\nimport com.google.ai.edge.litert.Accelerator\nimport com.google.ai.edge.litert.CompiledModel\n\nval model = CompiledModel.create(\n    context.assets, \"model.tflite\",\n    CompiledModel.Options(Accelerator.GPU),   // NPU with GPU fallback: Options(Accelerator.NPU, Accelerator.GPU)\n    null)                                     // Environment; null = default\nval inputs = model.createInputBuffers()\nval outputs = model.createOutputBuffers()\ninputs[0].writeFloat(inputArray)             // FloatArray in the layout you exported (NCHW from litert-torch)\nmodel.run(inputs, outputs)                   // enqueues on the GPU\nval logits = outputs[0].readFloat()          // the readback is what waits\n// TensorBuffer and CompiledModel are AutoCloseable; close them or you leak native memory.\n```\n\nTwo rules that are easy to miss: with `Accelerator.GPU`, every op in the graph must be GPU-compatible (there is no CPU fallback inside `CompiledModel`), and GPU tensors are rank 4 at most.\n\n```\npython3.12 -m venv .venv && . .venv/bin/activate   # ran on 3.12.13 and 3.14.6 on 2026-09-05\npip install ai-edge-litert litert-torch            # pulls torch, jax, transformers; ~2 GB; no TensorFlow\npython\nimport numpy as np, torch, litert_torch\nfrom ai_edge_litert.interpreter import Interpreter\n\nx = torch.randn(1, 3, 224, 224)\nlitert_torch.convert(model.eval(), (x,)).export(\"model.tflite\")   # torch.export → .tflite, nothing in between\n\nit = Interpreter(model_path=\"model.tflite\"); it.allocate_tensors()\ninp, out = it.get_input_details()[0], it.get_output_details()[0]\nit.set_tensor(inp[\"index\"], x.numpy()); it.invoke()\nprint(it.get_tensor(out[\"index\"]))\n\n# Same file through CompiledModel, the API Android uses (CPU here; GPU on macOS is Metal)\nfrom ai_edge_litert.compiled_model import CompiledModel\nfrom ai_edge_litert.hardware_accelerator import HardwareAccelerator\ncm = CompiledModel.from_file(\"model.tflite\", HardwareAccelerator.CPU)\nins, outs = cm.create_input_buffers(0), cm.create_output_buffers(0)\nins[0].write(x.numpy()); cm.run_by_index(0, ins, outs)\nprint(outs[0].read(10, np.float32))\n```\n\nRun on 2026-09-05 with a conv + `nn.MultiheadAttention` model: conversion took 1–2 s, outputs were within 7e-7 of PyTorch, identical results on Python 3.12 and 3.14.\n\nUse it when you deploy `.tflite` models on Android with GPU or NPU, when you want a `torch.export`-based converter, or when you need a Google-maintained LLM runtime with NPU backends.\n\nDo not pick it for an iOS-only app today. The iOS path is still the TensorFlow Lite pod, and Core ML, MLX and llama.cpp have more direct iOS routes. For arbitrary Hugging Face LLMs on a Mac, GGUF with llama.cpp or MLX needs no conversion step; LiteRT-LM needs a `.litertlm` bundle (Hugging Face `litert-community` has 343 models on 2026-09-05, many ungated, Qwen2.5-1.5B-Instruct among them).\n\nExecuTorch (PyTorch's own runtime, `torch.export` → `.pte`), ONNX Runtime Mobile (Maven AAR, NNAPI / XNNPACK / QNN providers), llama.cpp (GGUF, Metal / Vulkan / CPU), MLX (Apple Silicon). All four are reasonable defaults. This page is about what LiteRT calls things, not a ranking.\n\n`pip install tflite-runtime`.` litert:2.1.0` next to a table that lists 2.2.0 as latest.`/edge/litert/next/*`). Blogs say LiteRT; the version-bearing statement is the GitHub v2.1.0 note (\"beta… officially recommending that developers begin their transition\").`mediapipe/util/tflite/operations/`) and issues.`.task` and `.litertlm`.\n**Is TensorFlow Lite deprecated?** Maintenance mode: \"only receive critical security and stability updates. All active on-device ML development… transitioned to LiteRT\" (tensorflow/lite README).\n\n**Do my `.tflite` files still work?** Yes. Format and extension are unchanged.\n\n**Does LiteRT run on iOS?** Through the TensorFlow Lite pod for now. LiteRT-LM has a Swift package in early preview.\n\n**Where are ready-made models?** Hugging Face `litert-community` (343 models, `.tflite` and `.litertlm`) and Kaggle Models (the filter is still named `tfLite`).", "url": "https://wpnews.pro/news/litert-vs-tensorflow-lite-what-changed-plus-the-old-name-new-name-cheat-sheet", "canonical_source": "https://dev.to/john-rocky/litert-vs-tensorflow-lite-what-changed-plus-the-old-name-new-name-cheat-sheet-40nl", "published_at": "2026-09-08 05:34:17+00:00", "updated_at": "2026-09-08 06:02:00.438017+00:00", "lang": "en", "topics": ["developer-tools", "machine-learning", "ai-infrastructure"], "entities": ["Google", "LiteRT", "TensorFlow Lite", "PyTorch", "Qualcomm", "MediaTek", "Samsung", "Intel"], "alternates": {"html": "https://wpnews.pro/news/litert-vs-tensorflow-lite-what-changed-plus-the-old-name-new-name-cheat-sheet", "markdown": "https://wpnews.pro/news/litert-vs-tensorflow-lite-what-changed-plus-the-old-name-new-name-cheat-sheet.md", "text": "https://wpnews.pro/news/litert-vs-tensorflow-lite-what-changed-plus-the-old-name-new-name-cheat-sheet.txt", "jsonld": "https://wpnews.pro/news/litert-vs-tensorflow-lite-what-changed-plus-the-old-name-new-name-cheat-sheet.jsonld"}}