TFLite Support is a toolkit that helps users to develop ML and deploy TFLite models onto mobile / ioT devices.
Find a file
A. Unique TensorFlower 2fc3e0d076 Automated Code Change
PiperOrigin-RevId: 826312840
2025-10-30 21:39:31 -07:00
tensorflow_lite_support Automated Code Change 2025-10-30 21:39:31 -07:00
third_party Automated Code Change 2025-07-17 23:18:46 -07:00
.bazelrc Plumb with_rules_cc argument to TensorFlow 2022-08-17 10:42:14 -07:00
.bazelversion Upgrade tflite_support to manylinux2014 and bazel 5.1.1 2022-04-19 12:30:46 -07:00
BUILD Move metadata, codegen and java lib into the new repo. 2020-06-30 19:22:11 -07:00
LICENSE Internal change 2020-06-05 23:04:24 +08:00
README.md Remove dynamically quantized FC and Conv2D from latest ops. 2025-08-21 01:35:32 -07:00
WORKSPACE Add workspace.bzl to tensorflow_lite_support 2022-07-19 09:50:13 -07:00
workspace0.bzl Plumb with_rules_cc argument to TensorFlow 2022-08-17 10:42:14 -07:00
workspace1.bzl Add load() statements for the builtin Bazel java rules 2024-04-05 08:51:37 -07:00
workspace2.bzl Add load() statements for the builtin Bazel java rules 2024-04-05 08:51:37 -07:00
workspace3.bzl Plumb with_rules_cc argument to TensorFlow 2022-08-17 10:42:14 -07:00
workspace4.bzl Plumb with_rules_cc argument to TensorFlow 2022-08-17 10:42:14 -07:00
workspace5.bzl Plumb with_rules_cc argument to TensorFlow 2022-08-17 10:42:14 -07:00
workspace6.bzl Install Maven dependencies before loading TF 2022-12-07 16:07:33 -08:00
workspace7.bzl Add load() statements for the builtin Bazel java rules 2024-04-05 08:51:37 -07:00
workspace8.bzl Internal change 2022-12-06 08:32:00 -08:00
workspace9.bzl Use version of Eigen from tensorflow. 2023-10-06 13:43:11 -07:00

TensorFlow Lite Support

TFLite Support is a toolkit that helps users to develop ML and deploy TFLite models onto mobile devices. It works cross-Platform and is supported on Java, C++ (WIP), and Swift (WIP). The TFLite Support project consists of the following major components:

  • TFLite Support Library: a cross-platform library that helps to deploy TFLite models onto mobile devices.
  • TFLite Model Metadata: (metadata populator and metadata extractor library): includes both human and machine readable information about what a model does and how to use the model.
  • TFLite Support Codegen Tool: an executable that generates model wrapper automatically based on the Support Library and the metadata.
  • TFLite Support Task Library: a flexible and ready-to-use library for common machine learning model types, such as classification and detection, client can also build their own native/Android/iOS inference API on Task Library infra.

TFLite Support library serves different tiers of deployment requirements from easy onboarding to fully customizable. There are three major use cases that TFLite Support targets at:

  • Provide ready-to-use APIs for users to interact with the model.
    This is achieved by the TFLite Support Codegen tool, where users can get the model interface (contains ready-to-use APIs) simply by passing the model to the codegen tool. The automatic codegen strategy is designed based on the TFLite metadata.

  • Provide optimized model interface for popular ML tasks.
    The model interfaces provided by the TFLite Support Task Library are specifically optimized compared to the codegen version in terms of both usability and performance. Users can also swap their own custom models with the default models in each task.

  • Provide the flexibility to customize model interface and build inference pipelines.
    The TFLite Support Util Library contains varieties of util methods and data structures to perform pre/post processing and data conversion. It is also designed to match the behavior of TensorFlow modules, such as TF.Image and TF.text, ensuring consistency from training to inferencing.

See the documentation on tensorflow.org for more instruction and examples.

Build Instructions

We use Bazel to build the project. When you're building the Java (Android) Utils, you need to set up following env variables correctly:

  • ANDROID_NDK_HOME
  • ANDROID_SDK_HOME
  • ANDROID_NDK_API_LEVEL
  • ANDROID_SDK_API_LEVEL
  • ANDROID_BUILD_TOOLS_VERSION

How to contribute

Please issue a pull request and assign @lu-wang-g for a code review.

Contact us

Let us know what you think about TFLite Support by creating a new Github issue, or email us at tflite-support-team@google.com.