Registry / ai-ml / tflite-runtime

tflite-runtime

JSON →
library2.14.0pypypiunverified

TensorFlow Lite Runtime is a lightweight library for on-device machine learning inference, optimized for mobile and embedded devices. Version 2.14.0 supports model conversion and execution with hardware acceleration. Releases are tied to TensorFlow Lite versions.

pip install tflite-runtime
INSTALL
IMPORT
SIG · TFLITE-RUNTIME
T
tflite-runtime
ai-mlpythonv2.14.0
Install
3.9s avg
Import
230ms
Disk
98MB
Pass rate
3/ 10
Env Coverage3 / 10
glibc
3.93.13
musl
3.93.13
Install & Compatibility
Where this runs
tested against v2.14.0 · pip install
no network on importno background threads
Install × environment matrix
Each cell = how many times install + import succeeded across repeated harness runs. Partial = flaky.
glibc = Debian/Ubuntu slim · musl = Alpine Linux
musl
glibc
py 3.10
✕ build_error
✓ 3.6s
py 3.11
✕ build_error
✓ 3.6s
py 3.12
✕ build_error
✕ build_error
py 3.13
✕ build_error
✕ build_error
py 3.9
✕ build_error
✓ 4.4s
98MB installed
● package 98MB
Code
Verified usage

Verified import paths — ran on the pinned version, not inferred.

Interpreter
from tflite_runtime.interpreter import Interpreter
from tflite_runtime import Interpreter
Interpreter is in tflite_runtime.interpreter module, not top-level.
load_delegate
from tflite_runtime.interpreter import load_delegate
Use for GPU or Edge TPU delegates.

Basic inference with TFLite Runtime.

import numpy as np from tflite_runtime.interpreter import Interpreter interpreter = Interpreter(model_path='model.tflite') interpreter.allocate_tensors() input_details = interpreter.get_input_details() output_details = interpreter.get_output_details() input_data = np.array([[1.0, 2.0, 3.0]], dtype=np.float32) interpreter.set_tensor(input_details[0]['index'], input_data) interpreter.invoke() output_data = interpreter.get_tensor(output_details[0]['index']) print(output_data)
Debug
Known issues
breakingtflite_runtime does not include training ops. If your model uses custom ops or training-only ops, inference may fail.
fix
Use full TensorFlow for training; export to TFLite and ensure ops are supported.
affects: all
gotchaThe Interpreter class must be imported from tflite_runtime.interpreter, not from top-level tflite_runtime. Common mistake: `from tflite_runtime import Interpreter` -> AttributeError.
fix
Use `from tflite_runtime.interpreter import Interpreter`.
affects: all
deprecatedSupport for Python 3.6 ended in tflite-runtime 2.7. Check your Python version if you encounter installation errors.
fix
Upgrade to Python 3.7+ or use an older tflite-runtime version if absolutely necessary.
affects: >=2.7
Upgrade
Version history
2.14.0latest on PyPI · released Oct 3, 2023
Audit
Dependencies

No dependency data recorded yet.

Agent activity
24 hits · last 30 days
node
22
OpenAI (training)
1
Resources
tflite-runtime — pip install tflite-runtime · libregistry