Google launches LiteRT.js: Run .tflite models in browsers with WebGPU

Discover LiteRT.js: Run .tflite models in the browser with WebGPU. Up to 3x faster, privacy, and no server costs. Local inference.

15 jul 2026 • 5 min read • Q2BSTUDIO Team

In-Browser AI Inference with LiteRT.js

Artificial intelligence is undergoing a quiet but profound transformation: the center of gravity is shifting from cloud servers to end-user devices. Google has just taken a decisive step in that direction with the launch of LiteRT.js, a library that allows you to run .tflite models directly in the browser, taking advantage of WebGPU acceleration. This move not only promises to reduce costs and improve privacy, but it reconfigures the possibilities of modern web applications. To understand its true scope, it is useful to analyze it from a technical, business and practical perspective.

LiteRT.js is not a new format or an experimental framework. It's essentially the same native inference engine that Google has optimized for years for Android, iOS, and embedded systems—formerly known as TensorFlow Lite—now compiled to WebAssembly and exposed to JavaScript. This means that optimizations developed for the mobile world, such as advanced quantization, multithreaded kernels or support for hardware accelerators, reach the browser without the need to reimplement anything. The result is model execution up to three times faster than previous web solutions, and between five and sixty times faster when using GPUs or NPUs versus the browser's own CPU.

The LiteRT.js architecture rests on three well-differentiated backends: CPU, via XNNPACK with multithreaded support and relaxed SIMD; GPU, using ML Drift over WebGPU, and NPU, relying on the experimental WebNN API of Chrome and Edge. This tiering allows you to choose the most appropriate level of acceleration for each use case, although with an important rule: partial delegation is not allowed. If a model cannot run fully on the selected accelerator, the system automatically drops to WebAssembly. This design decision simplifies memory management and avoids bottlenecks between contexts, but limits flexibility in highly heterogeneous models.

From the point of view of the development experience, a novelty LiteRT.js introduced that many teams will have to assimilate: manual management of tensioners. Unlike TensorFlow.js, where the JavaScript garbage collector is responsible for freeing up memory, here each tensor must be explicitly removed with .delete(). Google warns that skipping this step causes memory leaks on devices, especially GPUs. This approach, more typical of C++ or Rust, offers finer control of performance, but demands discipline from the programmer. For companies developing custom applications with AI components, this feature can pose an additional challenge in team building and code quality.

Support for PyTorch models is solved by LiteRT Torch, a direct conversion tool that transforms .pt to .tflite models in a single step. However, the requirements are strict: the model must be exportable with torch.export.export, it cannot contain conditional branching dependent on dynamic values, and the input and output dimensions must be fixed, including the batch size. This rules out architectures that require variable input, such as certain natural language processing transformers. To compensate, the ecosystem includes AI Edge Quantizer, which allows you to configure quantization schemes per layer, and a growing repository of pre-trained models in Kaggle and Hugging Face.

What does this mean for the business fabric? First, the ability to run AI inference entirely in the browser opens the door to a new generation of AI without reliance on external servers. Object detection, audio transcription, image enhancement, or semantic search can be performed with ultra-low latency and without sending data to the cloud, bolstering cybersecurity and user privacy. For sectors such as healthcare, banking or defense, where the confidentiality of information is critical, this architecture represents a decisive competitive advantage. Companies that integrate these flows into their web portals will be able to offer AI functionalities for companies without recurring infrastructure costs.

In addition, LiteRT.js does not compete head-on with TensorFlow.js, but is positioned as a specialized complement for .tflite models. Google recommends keeping TensorFlow.js for preprocessing and postprocessing tasks, and using LiteRT.js for heavy inference. The @litertjs/tfjs-interop package allows tensioners to be passed between the two libraries without unnecessary copies, as long as the use of dataSync, which penalizes WebGPU performance, is avoided. This coexistence opens up an interesting scenario for development teams that already work with machine learning frameworks on the frontend.

From a business perspective, LiteRT.js fits perfectly with the trend towards the decentralization of artificial intelligence. AI agents that work entirely on the device can operate offline, react in real-time, and scale without the need to provision servers. This is especially relevant for augmented reality applications, personal assistants, accessibility tools, and industrial monitoring systems. The ability to run complex models in the browser also reduces reliance on AWS and Azure cloud services, even if these are still needed for training, aggregated data storage, or larger models. Precisely for this reason, many organizations choose to combine on-premises inference with a hybrid architecture, where the cloud takes care of the heavy logic and the device offers an immediate response.

In this context, having a technology partner who is proficient in both custom software development and artificial intelligence integration is critical. Q2BSTUDIO, as a software development company, has accompanied multiple clients in the adoption of these technologies, from prototyping with TensorFlow.js to deploying optimized models in browsers and mobile devices. The accumulated experience in business intelligence services and cloud platforms allows us to offer complete solutions ranging from data capture to real-time visualization, including predictive analysis and process automation.

The adoption of LiteRT.js is likely to accelerate when WebGPU reaches universal coverage and WebNN matures as a standard. For now, the most practical backend is WebGPU, which is already available on Chrome, Edge, and Firefox Nightly. Google's performance tests on an M4-powered MacBook Pro show significant improvements, though they caution that results vary depending on local GPU, thermal management, and drivers. For companies looking to reduce infrastructure costs and improve the user experience, the time to explore this technology is now.

In short, LiteRT.js is not just a technical update: it is a paradigm shift that brings artificial intelligence closer to the end user with all the advantages of the web. For development teams, it involves learning new memory management practices and understanding delegation limitations. For product managers, it means being able to offer AI capabilities without relying on internet connections or expensive servers. And for companies looking to differentiate themselves, it represents an opportunity to build faster, more secure, and more scalable web applications. The question is no longer whether AI will make it to the browser, but who will take advantage of it first.

A BREAK?

Play for a moment before you go

OUR SERVICES

How we can help you

Artificial intelligence

AI agents, chatbots, and intelligent assistants that automate tasks and serve your customers 24/7 to improve the efficiency of your business.

More info

Software Development

Web, mobile, and desktop applications, intranets, e-commerce, SaaS, and management platforms designed for your company's specific needs.

More info

Cloud services

Migration, infrastructure, managed hosting, high availability, and security on Microsoft Azure and Amazon Web Services to help your business scale without limits.

More info

Cybersecurity and pentesting

Security audits, penetration testing and protection of applications, data and infrastructure on-premise and cloud, with ethical hacking and regulatory compliance.

More info

Business Intelligence

Dashboards and data analysis with Power BI: we integrate your sources, design dashboards and KPIs and turn your data into decisions.

More info

Process automation

We automate repetitive tasks and connect your applications with n8n, Power Automate, Make, and RPA, eliminating manual work and increasing productivity.

More info

Training for Companies

We train your teams in technology with criteria: web development, databases, Git, best practices and security, automation with n8n, artificial intelligence for companies and creation of AI solutions with Azure AI Foundry.

More info

Code Auditing

We audit the code that you, your team or an AI create: we tell you what is good and what to improve, we secure it and make it ready for production, web or app.

More info

AI Image Generation

We create for you the images that your business needs with artificial intelligence: product, networks, advertising, illustration and avatars. You tell us what you want and we deliver it ready to use.

More info

AI Video Generation

We create videos with artificial intelligence for you: promotional, networking, virtual presenters, dubbing and animations. You tell us the idea and we will deliver it assembled and ready to publish.

More info

AI Conversational Avatars

We create conversational avatars with AI – digital humans with a face and voice – that serve your customers and teams with the knowledge of your company, on your website, interactive monitors, WhatsApp or Teams.

More info

Online Marketing and AI

Google Ads, Meta Ads, LinkedIn Ads and AI Engine Positioning (GEO/AEO): we attract customers and make your brand appear where they search for you, also on ChatGPT, Gemini and Perplexity.

More info

Do you have a project in mind?

Tell us your vision and we'll turn it into a software solution. Whatever the scope, we make your idea real.