TensorFlow 2.20 Sets the Stage for TensorFlow Lite's Deprecation, Supplantation by LiteRT Next

If you're using tf.lite at the moment, it's time to start leaning how to switch across to its next-generation independent replacement.

The TensorFlow team has announced the release of TensorFlow 2.20, which sets the stage for a breaking change: the removal of the traditional tf.lite module in favor of spinning TensorFlow Lite out into the separate LiteRT Next project.

"The tf.lite module will be deprecated with development for on-device inference moving to a new, independent repository: LiteRT [Next]," the TensorFlow maintainers explain in the software's latest release announcement. "The new APIs [Application Programming Interface] are available in Kotlin and C++. This code base will decouple from the TensorFlow repository and tf.lite will be removed from future TensorFlow Python packages, so we encourage migration of projects to LiteRT to receive the latest updates."

Time to say goodbye to TensorFlow Lite, and hello to its replacement: LiteRT Next. (📷: LiteRT)

Announced at the Google I/O conference, LiteRT — in the form of the LiteRT Next project — aims to replace TensorFlow Lite with a range of improvements for running machine learning and artificial intelligence (ML and AI) workloads on-device but with the aid of neural coprocessor or graphics processor acceleration.

Rather than using tf.lite within TensorFlow, the maintainers explain, LiteRT will run as a standalone project that provides a unified interface for cross-vendor acceleration — meaning, in theory at least, developers won't need to worry about what sort of accelerator hardware a device may have on board. "This approach avoids many device-specific complications," the team claims, "boosts performance for real-time and large-model inference, and minimizes memory copies through zero-copy hardware buffer usage."

The latest release of TensorFlow proper is available on GitHub under the permissive Apache 2.0 license; LiteRT Next is available in a separate repository under the same license, with links to documentation on getting started.

ghalfacree

Freelance journalist, technical author, hacker, tinkerer, erstwhile sysadmin. For hire: freelance@halfacree.co.uk.

Latest Articles