AI/TLDR

Google · 2026-07-09 · major

LiteRT.js — Google brings its on-device AI runtime to the browser

LiteRT.js is Google's new JavaScript binding for LiteRT, running .tflite models directly in the browser through WebAssembly. Google reports up to 3x speedups over other web runtimes on CPU and GPU on an M4 MacBook Pro.

LiteRT.js blog banner announcing Google's Web AI runtime

LiteRT.js runs Google's on-device inference stack inside the browser, so web apps can execute .tflite models with WebGPU and WebNN acceleration.

Quick facts

MakerGoogle AI Edge
Package@litertjs/core (npm)
BackendsWASM / XNNPACK (CPU), ML Drift (WebGPU), WebNN (NPU)
Model format.tflite; converters for PyTorch, JAX, TensorFlow
SpeedupUp to 3x over prior web runtimes on M4 MacBook Pro
LicenseApache-2.0
Announced2026-07-09

What is it?

LiteRT.js is a new JavaScript library from Google that runs machine-learning models inside a web page with no server call. It ships as the npm package @litertjs/core, executes any .tflite model, and works with PyTorch, JAX, and TensorFlow after conversion. Google positions it as the successor path for TensorFlow.js developers who want a faster, hardware-aware runtime.

How does it work?

The library compiles Google's native LiteRT C++ runtime to WebAssembly and swaps in three backends: XNNPACK for the CPU, ML Drift over WebGPU for the GPU, and the experimental WebNN API for NPUs. Unsupported operations fall back to CPU. A companion @litertjs/tfjs-interop package lets existing TensorFlow.js apps mix in LiteRT.js models incrementally.

Why does it matter?

Running a modern AI model client-side used to mean giving up half of the GPU. LiteRT.js closes that gap — on Google's M4 MacBook Pro benchmarks it delivered up to 3x speedups over prior web runtimes for vision and audio models, and 5–60x when moving from CPU to GPU or NPU. That is what makes on-device AI features (local voice, translation, image edit) viable in a normal web app without a server bill or a round-trip.

Who is it for?

web and browser developers who want on-device inference

Frequently asked questions

How does LiteRT.js compare to TensorFlow.js?
LiteRT.js is Google's replacement for the TensorFlow.js kernel stack. It swaps TensorFlow.js's JavaScript kernels for Google's native cross-platform runtime compiled to WebAssembly, which is what delivers the up-to-3x speedups. A separate @litertjs/tfjs-interop package lets TensorFlow.js apps adopt LiteRT.js one model at a time instead of rewriting the whole pipeline.
Which browsers support the GPU and NPU backends?
LiteRT.js runs on any modern browser via its WebAssembly CPU path, and reaches the GPU through WebGPU where available (Chrome, Edge, and Safari Technology Preview). The NPU backend rides on the experimental WebNN API, so it works only where the browser exposes WebNN — today that means recent Chromium builds on Windows and ChromeOS with Intel and Qualcomm NPUs.
Can existing .tflite models run without changes?
Yes. LiteRT.js is drop-in for any .tflite file that the LiteRT native runtime already supports, including quantized models. Models trained in PyTorch or JAX need one conversion step through Google's LiteRT converters, but no code change on the browser side. Public demos launched with the runtime include YOLO object detection, depth estimation, and 4x image upscaling.
What license does LiteRT.js ship under?
LiteRT.js is Apache-2.0, matching the rest of Google's LiteRT stack. That covers the @litertjs/core npm package and the interop package. The documentation on the Google Edge site is CC-BY 4.0 and code samples are Apache-2.0, so both library and examples are safe to use in commercial products without a paid license.

Try it

npm install @litertjs/core

Sources · 3 outlets

Tags

  • google
  • litert
  • on-device
  • browser
  • web-ai
  • javascript
  • webassembly
  • webgpu
  • webnn
  • xnnpack
  • tflite
  • inference-runtime

← All releases · Learn AI