42 comments

[ 3.0 ms ] story [ 62.2 ms ] thread
"sorry, to use our website, you must have at least 22 GB of free disk space."
It works, I've shipped this as a "local inference"/poor person's ollama for low-end llm tasks like search. The main win is that it's free and privacy preserving, and (mostly) transparent to users in that they don't have to do anything, which is great for giving non-technical users local inference without making them do scary native things.

But keep in mind the actual experience for users is not great; the model download is orders of magnitude greater than downloading the browser itself, and something that needs to happen before you get your first token back. That's unfixable until operating systems start reliably shipping their own prebaked models that an API like this could plug into.

It's a one-time download shared by all websites that use the Prompt API.

What's a bigger issue is that the models on most standard PCs are both tiny and slow. I was going to try using the Prompt API to change the text of (infocom) text adventures on the fly. But for many PCs, this will currently be too slow to be feasible.

(comment deleted)
Seems like a good way for a rogue JS script to offload token generation to a bunch of unsuspecting visitors

It would actually be pretty interesting to see if its possible to decentralize the compute to generate something useful from a larger prompt broken down and sent to a bunch of browsers using a subagent pattern or something like RLM, each working on a smaller part of the prompt

token generation of a tiny model. Hardly worth anything.
The model this uses is useless for anything beyond 2 round chat at the most.

If you want to do anything interesting you need transformers.js and a decent mode. Qwen 0.9B is where things start working usefully

Imagine a Vendor API that adds a way to link from the page straight into a device purchase workflow. As a trial of the API in Chrome you can order a new Google Pixel 9b directly from any page with the word Android in it!

Or a LocalNet API that integrates with trusted hardware devices on your local network. As a trial (Chrome beta programme — strictly limited but here’s 3x signup links to share with your friends) you can adjust your Google Next Mini underfloor heating directly from Chrome!

Or a DirectCast API that lets you stream <video> elements to a device of your choice even over a VPN. As a Chrome trial, you can use your Google Cloud account to stream directly from YouTube Premium to any linked Google Chromecast devices you own!

Domain names are a nice candidate for a Georgian tax
I think it's a step into a future of proper Model API. But it's just a small step. It reminds me of Apple's Foundation Models [1]

While many AI integrations are focused on text communication / chat style. A lot of software benefits from non-text interfaces.

I believe at some point OSes and browsers should provide an API to manage models so you'll have access to on-device/remote ones with a simplified interface for the app. Making something standardized that is cross-platform would be fantastic. It also needs to be on mobile devices, so the players that can easily make it happen are mostly Apple and Google. (Meta will follow or vice-versa I guess)

Key-point: it shouldn't be exclusive to promoted models.

(1) https://developer.apple.com/documentation/foundationmodels So the app would be able to query and get the right model(s).

Apple's Foundation models seem great on paper until you see the 4k context window. (though I know we are still early in this chapter).
The better part of this is having a local-first AI, particularly because it has tool-calling builtin & structured output.

I haven't pushed out a full version[1] which uses ducklake-wasm + this to make a completely local SQL answering machine, but for now all it does is retype prompts in the browser.

[1] - https://notmysock.org/code/voice-gemini-prompt.html

Slightly off-topic: Refreshing to see these two authors link to their Bluesky and Mastodon profiles. No Twitter/X in sight!
Can pass to it the current page contents for a AI-based AdBlock / cookie manager / etc.?
We use this for summarising our hack day write ups: https://remotehack.space/previous-hacks/

It's a tiny script that looks up the rss feed and uses the content to generate summaries; quite a nice fit with our static site. Sometime I'd like to extend it to ask different questions about the content.

Not long before all of the web content will be going through these AI pipelines where user might not even see original webpage.
This looks like it uses Gemini Nano under the hood. But the latest Gemma4 E2B and E4B models appear to be much better, so you'd probably be better off deploying quantized versions through an extension for now.

- Gemini Nano-1: 46% MMLU, 1.8B

- Gemini Nano-2: 56% MMLU, 3.25B

- Gemma4 E2B: 60.0% MMLU, 2.3B

- Gemma4 E4B: 69.4% MMLU, 4.5B

Sources:

- https://huggingface.co/google/gemma-4-E2B-it

- https://android-developers.googleblog.com/2024/10/gemini-nan...

> This looks like it uses Gemini Nano under the hood.

Yes; "With the Prompt API, you can send natural language requests to Gemini Nano in the browser."

The Prompt API uses the model that's available in your browser. For Edge I believe it's Phi4.
Gemini Nano, unlike Gemma, is not open-weight, right? I would be interested in dumping the model weights, unless someone has done that already
I’m just wondering how much more RAM and VRAM chrome will use after these changes
The idea of having local LLMs accessible in the browser for privacy concerning is nice i guess but when each browser has a different model attached to this API testing becomes even more a nightmare then now. I wonder if this will drive more users towards chrome because most of the usages of this API might be just tailored to fit the Gemini Nano model?
Fwiw - I did a fairly large comparison of Gemini Nano (the in browser ai model) vs a comparable free hosted model of Gemma (from OpenRouter) and the hosted model absolutely trashed the local model on every aspect of speed, reliability, availability, etc. [1]

I'm not particularly happy about that outcome as I wish we had more locally run AI models for reasons of privacy and efficiency, so this is more just a warning that at present there are some severe tradeoffs.

1 - https://sendcheckit.com/blog/ai-powered-subject-line-alterna...

Hey, Chrome PM for built-in AI here.

Thanks for the write-up and the comparison, but more importantly for using the API in production!

You’re highlighting the "state of the art" gap we’re working to close. Cloud models will always have the advantage of massive parameter counts, but our bet is that for a huge class of simpler or high-volume tasks, the upsides of on-device (e.g. zero-cost, permission-less start with no quotas/infra, network-resilience, privacy) make it a compelling trade-off.

The models have been getting better at a rapid clip, and the team is heads-down on optimizing performance and reliability. To that end, we're always grateful for feedback. If you hit specific bugs, crashes, or quality regressions, filing a report with repro steps is the best way to help us improve. You can file those on crbug.com under the "Chromium > Blink > AI" component.