Google has officially released the new Web-based AI inference acceleration library LiteRT.js. This library uses WebAssembly technology and is deeply integrated with hardware acceleration capabilities such as WebGPU and WebNN, aiming to replace the traditional JavaScript kernel solution used by TensorFlow.js, significantly improving the performance of artificial intelligence and machine learning workloads in browsers.

WebAssembly is a binary instruction format that allows web pages to execute high-performance computing at near-native code speed in browsers. TensorFlow.js is Google's classic library developed earlier, which enables developers to deploy models built with TensorFlow directly into web browsers, achieving client-side AI features. The newly launched LiteRT.js is an architectural upgrade based on this foundation.
Tested 3x Speed Increase, Old Devices Also Have Their Uses
Google conducted tests on the 2024 MacBook Pro with M4 chip and found that the inference speed of LiteRT.js can be up to 3 times faster than the existing solution. However, Google also admitted that actual performance may vary when running on older hardware or using different browser engines.
From a technical perspective, Google is driving the Web-based AI inference from the pure JavaScript era to a new stage combining WebAssembly and hardware acceleration. As the speed of running AI models in browsers gradually approaches native application levels, the experience of using AI features without installing a client or opening a web page will become smoother, which is undoubtedly a strong boost for the popularization of edge-side AI.
