Google recently released a new JavaScript library - LiteRT.js, designed to significantly improve the processing speed of machine learning and artificial intelligence workloads on the web browser side. This move signals that Google is bringing its mobile-optimized LiteRT runtime to the Web platform, allowing AI models to run efficiently directly in the local browser environment without relying on server-side processing.

Compared with the existing TensorFlow.js, LiteRT.js shows obvious performance advantages. It is reported that the library utilizes WebAssembly technology and deeply integrates hardware acceleration interfaces such as WebGPU and WebNN to replace the previous TensorFlow.js based on the JavaScript kernel, thereby achieving more efficient computing capabilities. Tests conducted by Google on the 2024 MacBook Pro equipped with the M4 chip show that the processing speed of this new runtime is three times that of the existing solution.

Previously, the LiteRT runtime mainly served Android and iOS mobile platforms. With this update, developers can now obtain more powerful AI deployment capabilities on the web through WebAssembly. For developers who are using TensorFlow.js, the migration process is relatively smooth. If you already have a .tflite file, you only need to switch the JavaScript runtime to LiteRT.js; if you are using the TensorFlow/Keras SavedModel format, you can adapt it through the built-in LiteRT converter in the Python TensorFlow package.

The release sparked interest in the industry, with many beginning to speculate whether Google would phase out or de-prioritize support for TensorFlow.js and look forward to how the library would actually perform on a wider range of devices beyond Apple hardware.