Edited by humans. Written by AI. How our editing works
All articles

AI Models Now Run in Your Browser. That Shouldn't Work.

Transformers.js v4 brings 20-billion parameter AI models to web browsers. The technical achievement is remarkable. The implications are just beginning.

Bob Reynolds

Written by AI. Bob Reynolds

March 30, 20265 min read
Share:
A bearded man in a gray shirt holds a phone next to large "V4" text with Transformers.js logo and celebratory graphics on a…

Photo: Hugging Face / YouTube

The browser was never meant for this. It was designed to display documents, maybe run some animation scripts. Now HuggingFace's Transformers.js [version 4 is running AI models with 20 billion parameters inside Chrome tabs.

The technical details matter here because they explain why this particular release represents more than incremental improvement. Developers Nico and Joshua rewrote the entire WebGPU backend in C++, abandoning the JavaScript-only approach that locked earlier versions into browser-only deployment. The new architecture runs across Python, C++, C#, and JavaScript—meaning the same code works in browsers, Node, Bun, and Deno.

"Our previous WebGPU backend was JavaScript only, accessing the browser's WebGPU API directly," the developers explain in their release video. "That worked but locked us into the browser. The new C++ backend changes everything."

What changed is platform independence. WebGPU acceleration no longer requires a browser. That's architecturally significant because it removes the constraint that made browser-based AI feel like a novelty rather than infrastructure.

The Performance Question

The real test isn't whether models run—it's whether they run fast enough to be useful. Version 4 demonstrates GPT-OSS, a 20-billion parameter model, generating 40 tokens per second in-browser. For context, that's readable speed. Not blazing, but functional.

The trick is mixture of experts architecture. Instead of activating the entire 20 billion parameters for each token, the model routes each request to specialized sub-networks. Only the relevant experts fire. This keeps inference computationally feasible on hardware that was never designed for this workload.

LiquidAI's LFM 2.5, a 1.2-billion parameter model, runs even faster. The developers reimplemented these architectures "operation by operation," leveraging fused kernels—optimizations that combine multiple operations into single GPU calls. It's painstaking work. You don't get press releases about kernel fusion, but it's what makes the difference between a demo and a tool.

What Actually Works

The release includes nearly 3,000 compatible models spanning 200 architectures. Some highlights reveal the breadth: TranslateGemma handles 55 languages. Voxtral delivers real-time speech recognition entirely locally. Chatterbox Turbo clones voices from five-second audio samples, complete with emotional tags like [chuckle] and [gasp].

Qwen 3.5, a multimodal model, reportedly performs at GPT-4o levels from "a couple of years ago." That qualifier matters. AI performance benchmarks shift fast enough that age-stamping comparisons is necessary. What impressed in 2023 is baseline in 2025.

The video demonstration shows these models running locally with no server calls. The privacy implications are straightforward: data never leaves the device. The practical implications are more complex. Local inference means offline capability but also means performance scales with user hardware. A MacBook Pro and a Chromebook deliver different experiences.

Developer Infrastructure

The ModelRegistry addition addresses a problem that sounds minor until you've hit it: not knowing what a model requires before you load it. The new system exposes file requirements, calculates total download size, checks cache status, and allows cache clearing. Steven Roussey, described as "a very active member of our community," added precision type checking.

These features matter for production deployment. Showing users accurate loading bars requires knowing total progress across all files. Supporting offline mode requires reliable caching. Authenticated model access requires custom fetch functions with proper headers. Version 4 provides hooks for all of this.

The build system migration to esbuild dropped compile times from two seconds to 200 milliseconds. File sizes decreased slightly. The codebase split from a monolithic models file into separate per-model modules. These are housekeeping improvements that compound over time—faster iteration, easier debugging, simpler onboarding.

The Harder Questions

What's missing from the announcement is any discussion of limitations. Twenty billion parameters in a browser is impressive. It's also computationally expensive in ways that don't show up in token-per-second metrics. Battery drain. Thermal throttling. Memory pressure that degrades performance of other tabs.

The mixture of experts approach mitigates some of this by activating only relevant sub-networks per token. But "mitigates" is not "solves." Running these models on constrained devices—the phrase appears in the video—means running them on phones and tablets with limited cooling and battery capacity.

There's also the question of what happens when everyone does this. If every website starts running billion-parameter models locally, we've shifted the computational burden from centralized servers to distributed clients. That's not automatically better. It's different, with different cost structures and failure modes.

What This Enables

The privacy advantages are real. Medical applications, financial tools, personal assistants—anything handling sensitive data benefits from processing that never touches external servers. The offline capability matters in regions with unreliable connectivity or for users who need functionality without network dependence.

The developers position this as democratizing access to AI capabilities. That argument holds if you accept that JavaScript developers should have the same model access as Python developers. The 8.3-kilobyte tokenizer package, now standalone, supports that case—zero dependencies, works everywhere.

What's genuinely new here is the combination of model sophistication and deployment simplicity. Voice cloning from five-second samples. Real-time video captioning. Multilingual translation across 55 languages. All of it running in the same environment that displays this article.

Whether that's progress or proliferation depends on what gets built next. The infrastructure now exists for browser-based AI that doesn't feel like a compromise. Five years ago, that would have seemed impossible. Two years ago, improbable. Now it's shipping code with release notes and GitHub repositories.

The question isn't whether AI runs in browsers anymore. It's what happens when it runs well enough that developers stop thinking about the constraints.

—Bob Reynolds, Senior Technology Correspondent

From the BuzzRAG Team

AI Moves Fast. We Keep You Current.

Framework breakdowns, tool comparisons, and AI coding insights — distilled from the best tech YouTube creators. Free, weekly.

Weekly digestNo spamUnsubscribe anytime

More Like This

Google Cloud logo with two smiling engineers holding a device in a lab setting, text reads "Should I even use AI?

Not Every Problem Needs AI. Here's How to Tell.

Google engineers explain when to use generative AI, traditional machine learning, or just plain code. The answer matters more than you'd think.

Bob Reynolds·5 months ago·6 min read
Man in black shirt with surprised expression against starry background with white text reading "AHEAD of schedule...

AI Models Are Now Building Their Next Versions

Major AI labs confirm their models now participate in their own development, handling 30-50% of research workflows autonomously. The recursive loop has begun.

Bob Reynolds·4 months ago·6 min read
Purple 3D box with eye logo and text "Horizon," "Beautiful queue monitoring," and "Laravel" on dark background

Master Queue Management with Laravel Horizon

Discover how Laravel Horizon enhances queue management with its intuitive dashboard and configuration tools. Optimize your job processing today.

Bob Reynolds·7 months ago·3 min read
Man in blazer gestures enthusiastically beside conditional probability formula with "SCIENCE" and "/mist" text on dark…

Rethinking AI: Smarter Models Over Bigger Ones

Dr. Jeff Beck proposes a shift in AI development towards smarter, brain-like models rather than just scaling up current technologies.

Bob Reynolds·7 months ago·3 min read
Man wearing glasses with confused expression next to computer terminal displaying hexadecimal code and "WTF..." text

This VoIP Phone Vulnerability Is Straight Out of 1995

A critical security flaw in Grandstream office phones exposes the persistent gap between consumer device expectations and embedded systems reality.

Bob Reynolds·5 months ago·6 min read
Man speaking at microphone during livestream with question marks overlay and AI model rankings displayed on right side

What Happens When AI Models Compete to Be Funny

A developer built Quiplop, an AI-driven comedy game, to test which language models are actually funny. The results reveal unexpected truths about AI.

Bob Reynolds·4 months ago·5 min read
Bold orange and white "CLAUDE DESIGN" text overlays a dark interface screenshot showing grid analytics and UI design tools…

Anthropic's Claude Design: The Latest Bid to Automate Creativity

Anthropic launches Claude Design, an AI tool that generates visual assets from text prompts. But can conversation replace craft in design work?

Bob Reynolds·3 months ago·5 min read
Man in beanie holding AI compute invoice totaling $287.43, with "Beat 20 People" text overlay on black background

The Karpathy Loop: When AI Runs 700 Experiments Overnight

Andre Karpathy's AI agent ran 700 experiments while he slept, found bugs he missed, and cut training time 11%. Here's what that means for everyone else.

Tyler Nakamura·3 months ago·7 min read

RAG·vector embedding

2026-04-15
1,347 tokens1536-dimmodel text-embedding-3-small

This article is indexed as a 1536-dimensional vector for semantic retrieval. Crawlers that parse structured data can use the embedded payload below.