Google's LiteRT.js Runs AI Models in Browsers up to 60x Faster
Google's LiteRT.js brings native on-device AI inference to the browser via WebGPU and WebAssembly, outperforming existing web runtimes by up to 3x

- LiteRT.js launched: Google's new JavaScript runtime runs
.tfliteML models entirely in the browser using WebAssembly and WebGPU. - Up to 3x faster than alternatives: Outperforms ONNX Runtime Web and TensorFlow.js on both CPU and GPU benchmarks across vision and audio models.
- Three hardware backends: CPU (XNNPACK), GPU (ML Drift + WebGPU), and NPU (WebNN, experimental in Chrome/Edge) -- all from one API.
- Simpler PyTorch path: Direct PyTorch-to-LiteRT conversion replaces the old PyTorch → ONNX → TensorFlow → TF.js chain.
- TF.js compatible: Drop-in for existing TensorFlow.js pipelines -- only the model needs to change, not pre/post-processing code.
- Free and available now: Install via
npm install @litertjs/core; models on Hugging Face LiteRT Community.
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.