Valerio Como

← Back to blog

Published on Wed Nov 25 2026 09:20:00 GMT+0000 (Coordinated Universal Time) by Valerio Como

Why Run AI in the Browser?

Benefits, limits and the tech stack behind running AI models directly in the browser. The map for the Web AI series.

Why Run AI in the Browser?

Most AI features on the web work the same way: the page sends your text to a server, a model runs in a data center, and the answer comes back. The model can also run on the user’s device, inside the browser tab. This post explains why you would want that, what it costs, and which technologies make it possible.

This post is part 0 of the series “Web AI – LLMs in the Browser”.

A real example: this blog

If you open a post on this blog, you can ask for an AI summary. No server is involved. The page first tries Chrome’s built-in Summarizer API. If the browser doesn’t have it, a Web Worker loads a small summarization model with Transformers.js and picks the best backend available:

const device =
  "ml" in navigator ? "webnn" :
  "gpu" in navigator ? "webgpu" :
  "wasm";

That fallback chain covers most of this series: a browser API, a library and three runtimes.

Why bother

The catch

Running models on the client moves the cost from your servers to your users’ devices.

The stack, layer by layer

Think of Web AI as four layers. Each part of the series zooms into one of them.

A minimal glossary

What’s next

Client-side AI trades server cost for download size and hardware uncertainty. It is a good fit for focused, frequent, privacy-sensitive tasks, as long as you plan a fallback.

Sources

Written by Valerio Como

← Back to blog