logoalt Hacker News

scriptsmithyesterday at 8:26 AM14 repliesview on HN

If Chrome has the #optimization-guide-on-device-model and #prompt-api-for-gemini-nano flags enabled, either because it's part of some Origin Trial / Early Stable Release or something, then web pages will have access to the new Prompt API which allows any webpage to initiate the (one-time) download of the ~2.7 GiB CPU or ~4.0 GiB GPU model using LanguageModel.create()

https://developer.chrome.com/docs/ai/prompt-api

When Chrome 148 releases tomorrow, this will be the default behaviour on desktop.

To download, it should check for 22 GiB free disk space on the volume where your Chrome data dir is, and at least double the model size of free space in your tmp dir.


Replies

21asdffdsa12yesterday at 2:59 PM

First the tabs came for the RAM and i did not protest, for i had plenty. Then they came for the chip and i did not protest, for it was dark silcon anyway. Then they came for the HDD.

show 4 replies
maxlohyesterday at 2:31 PM

The more severe problem is that Google installs model weight files on a per-user basis, meaning Chrome occupies 4 more GB of space for every OS user on your device.

show 3 replies
sheeptyesterday at 3:16 PM

You can already trigger a 2 GB model download with the Summarizer API[0], which is already shipped in Chrome.

    Summarizer.create()
[0]: https://developer.chrome.com/docs/ai/summarizer-api#model-do...

I think this is a distinct model from the Prompt API, since the other shipped AI APIs use fine tuned models.

show 2 replies
ddtayloryesterday at 8:05 PM

The problem is that some of us are still on connections that charge per GB in rural areas. Here in Montana it's very common to pay about $0.25 per GB regardless of how much you use, so this is a $1 additional cost per desktop device. Places like public school districts have hundreds of computers and this will be somewhat significant for them.

show 2 replies
wuschelyesterday at 9:07 AM

It is a small model, so what utility can I / Google expect from it? What is the on-board model used for?

show 7 replies
tobylaneyesterday at 8:37 AM

Those two (and more) exist in chrome://flags in Chrome 147. I'm disabling them now, with the expectation that will prevent the new default.

One option I'm leaving as default is "Use LiteRT-LM runtime for on-device model service inference." Any comment on that?

show 3 replies
Twirrimyesterday at 9:54 PM

Searching about:flags for model comes up with a whole bunch:

#omnibox-ml-url-scoring-model

#omnibox-on-device-tail-suggestions

#optimization-guide-on-device-model

#text-safety-classifier

#prompt-api-for-gemini-nano

#writer-api-for-gemini-nano

#rewriter-api-for-gemini-nano

#proofreader-api-for-gemini-nano

#summarizer-api-for-gemini-nano

#on-device-model-litert-lm-backend

Then around gemini but not caught by the search for models: #skills (maybe? I think this is implied by "gemini in chrome"?)

edit: I don't see a carte blanch AI disabling option. As much as I dislike Mozilla's growing obsession with AI, at least they give me a top level option to disable all AI stuff. I only keep Chrome around for occasional testing reasons.

d3Xt3ryesterday at 9:10 PM

So my understanding of that is that the download happens only when sites call the Prompt API right?

Because my Chrome stable has been updated to v148 now, and I don't see any AI models in my user profile folder. My profile size is only 328 MB, with the Code Cache subfolder occupying the most space (135 MB).

show 1 reply
scriptsmithtoday at 4:23 AM

I wrote a more detailed blog post here:

https://news.ycombinator.com/item?id=48028662

codethiefyesterday at 6:49 PM

Next step: Invoke the prompt API from within online ads and run a "p2p" AI inference provider which forwards incoming LLM queries to website visitors. :-)

madducitoday at 7:49 AM

Do you know if also Chromium has thesenfkags enabled?

show 1 reply
jimmaswellyesterday at 4:49 PM

This sounds perfectly reasonable. No objection from me.

jadboxyesterday at 11:40 PM

I believe webpages that use the API must request from the user via a system permissions dialogue to aces the prompt API, according the docs a few months ago.

show 1 reply
BergAndCoyesterday at 4:41 PM

[dead]