GooglePing Yu, Marko Ristić, Matthew Soulanille, Chintan ParikhAnnouncement
LiteRT.js, Google's high performance Web AI Inference
Summary
Google announces LiteRT.js, a JavaScript binding of LiteRT that runs .tflite AI and ML models directly in web browsers. It targets local inference for JavaScript and TypeScript applications, with privacy benefits, zero server costs, and low latency, while providing smoother deployment for existing .tflite models. Through WebAssembly, it exposes LiteRT’s optimized runtime across XNNPACK CPU, ML Drift with WebGPU, and experimental WebNN for NPUs; LiteRT Torch supports one-step PyTorch conversion, and AI Edge Quantizer enables layer-specific quantization. The initial release includes the @litertjs/core npm package, demos, and examples covering YOLO26, depth estimation, and Real-ESRGAN upscaling. In controlled benchmarks on a 2024 Apple MacBook Pro with M4, it outperformed other web runtimes by up to 3x, while WebGPU or WebNN delivered 5–60x speedups over CPU execution; results may vary with hardware, thermal conditions, and browser drivers.
Context
The source presents LiteRT.js as a way to run AI directly in web browsers. It addresses the lower performance of JavaScript-based kernels used by prior web AI solutions, while targeting local processing, user privacy, zero server costs, low latency, and smoother deployment of existing .tflite models.
Approach / What changed
LiteRT.js exposes LiteRT through WebAssembly and supports JavaScript and TypeScript applications. It uses XNNPACK for CPU acceleration, ML Drift and WebGPU for GPU acceleration, and experimental WebNN for NPUs. The release also provides LiteRT Torch conversion, AI Edge Quantizer, the @litertjs/core npm package, demos, and browser-oriented model examples.
Takeaways
LiteRT.js uses XNNPACK for CPU inference, ML Drift with WebGPU for GPU inference, and experimental WebNN to target NPUs.
LiteRT Torch converts PyTorch models in a single step, while AI Edge Quantizer supports configurable quantization schemes across model layers.
Controlled tests on a 2024 M4 Apple MacBook Pro reported up to 3x speedups over other web runtimes and 5–60x speedups from WebGPU or WebNN over CPU execution.
Source and freshness
- Source
- developers.googleblog.com
- Published
- Added to Yomu
Summaries are generated from the original by a language model. Check the original before relying on it.
Keep reading
Related reading
The Good Stuff
Paid picks we use ourselves. Links carry a referral code — a subscription through one earns us a commission at no extra cost to you.
The best engineering reads, once a week
One useful email. Unsubscribe anytime.