LiteRT.js: Browser AI, Hardware Support, and Privacy
AI websites need not send every image, audio clip, or text to servers. Google's LiteRT.js lets developers run .tflite models in-browser with device acceleration where supported. Privacy and speed benefits come with design trade-offs.

LiteRT.js is a runtime for running models on the web.
LiteRT.js provides JavaScript bindings for loading and running .tflite models in the browser through WebAssembly and supported hardware accelerators. Possible tasks include image classification, object detection, audio processing, and text generation without sending raw inputs to a server for every request.
Google positions LiteRT.js as a path building on TensorFlow.js for .tflite users seeking a shared runtime across Android, iOS, and desktop. TensorFlow.js remains usable; goals and suitable model formats differ.
The main benefits are local-first, latency and server costs.
- Privacy: Images, sounds, or text can remain on the user's device throughout the inference.
- Fast response: Real-time work reduces the time it takes to send data back and forth to the network.
- Partially works when offline: after downloading the required models and resources
- Reduce backend load: Processing is distributed across devices instead of using a server for every request.
Running locally still requires downloading the model and using the user’s memory, battery, and processing power. For large files, explain the download size and let users choose when to download.
Check each accelerator on the target device
LiteRT.js supports CPU via XNNPACK, GPU via WebGPU, and NPU direction via WebNN, which is still experimental on some browsers. Google reports that in its testing suite, LiteRT.js is up to 3 times faster than some runtimes, and the GPU or NPU backend can be several times faster than CPU runs in some tasks.
These figures come from a controlled M4 MacBook Pro environment. Actual performance depends on drivers, thermal throttling, browser support, and model architecture. Production sites need feature detection and fallbacks, not assumptions that every user has WebGPU or WebNN.
Compare CPU and GPU with the same model and input. Separate download, loading/compilation, warm-up, and subsequent inference; record browser, device, actual backend, and verified output. Do not call all first-run latency inference or guarantee later speed. This is a proposed plan, not a KrobClick benchmark.
Model size and quantization matter to the web experience.
Accurate models hundreds of megabytes in size may slow page loads, consume data plans, and exhaust browser memory. LiteRT supports PyTorch conversion and quantization for smaller, faster models, but reduced precision can affect quality.
You should measure both the time after the first visit to the website and the time for subsequent visits, separating download, compile, warm-up, and inference times. Also, test low-end machines, not just new laptops.
Check network traffic across the page even when the model runs in the browser
Local inference can reduce input sent to a backend, but the page may still download models from a CDN, send analytics, or call other APIs. Explain these data flows. Running inference locally does not establish that no data leaves the device.
Downloaded models and runtimes need versions, integrity checks, and clear update policies. Supply-chain risks and modified models remain concerns even with browser-based inference.
LiteRT.js is suitable for jobs that are small enough and benefit from proximity to the user.
Suitable uses include pre-upload image checks, short transcription, local search, and immediate interactions. Large models, lengthy tasks, or resource-limited devices may still favor backends or hybrid designs.
A good starting point is to prototype with a single model. Set a budget for file size and time, then benchmark on multiple levels of mobile and PC, with fallback available when hardware acceleration isn't available.
Sources
- Google Developers Blog: LiteRT.js, Google high performance Web AI Inference
- Google for Developers: Get started with LiteRT.js
- Google for Developers
This article is based on Google's announcement and test results as of 7 October 2026. Performance figures are measured in specified environments and may vary based on browser, hardware, temperature, and model. It should be benchmarked against an actual target device.