Google just launched LiteRT.js, a JavaScript binding of its on-device inference library LiteRT that lets you run ML models entirely inside the browser -- no server, no cloud API call. It's the web-facing layer of the same runtime that powers AI on Android, iOS, and desktop, now compiled to WebAssembly and wired up to WebGPU for GPU acceleration.

If you've been using TensorFlow.js, this is the intended upgrade path. For developers with existing .tflite models, LiteRT.js makes deployment to mobile and desktop web browsers smoother than ever, serving as a powerful evolution from TensorFlow.js for executing .tflite models.

Why TensorFlow.js wasn't enough

The core problem with TensorFlow.js was always performance. Prior web AI solutions like TensorFlow.js relied on less performant JavaScript-based kernels. LiteRT.js replaces those with a native C++ runtime compiled to WebAssembly, giving you the same optimized inference path that runs on-device on mobile -- just delivered through the browser sandbox.

The conversion story is also much cleaner. The LiteRT.js conversion path goes directly from PyTorch to LiteRT. The PyTorch to TensorFlow.js conversion path is significantly more complicated, requiring you to go from PyTorch to ONNX to TensorFlow to TensorFlow.js. That multi-step chain was a real friction point, and LiteRT.js eliminates it.

Three hardware backends, one API

LiteRT.js exposes three inference backends, each targeting a different piece of hardware:

  • CPU via XNNPACK: XNNPACK is Google's highly optimized library for on-device CPU acceleration, providing robust multi-thread support and a relaxed SIMD build for enhanced performance.
  • GPU via ML Drift + WebGPU: ML Drift is Google's leading solution for on-device GPU acceleration. LiteRT.js leverages WebGPU to enable state-of-the-art GPU acceleration on the web.
Alpha Signal

Don't miss what's next in AI

Join 300,000+ engineers and researchers who get the signal, not the noise.

  • Full access to in-depth AI research breakdowns
  • Be the first to know what's trending before it hits mainstream
  • Daily curated papers, repos, and industry moves