Issue with downloadprogress event resetting to 0% on page refresh for LanguageModel.create()

49 views
Skip to first unread message

Alan Corn

unread,
Mar 3, 2026, 3:43:56 AMMar 3
to Chrome Built-in AI Early Preview Program Discussions

Hi everyone,

I have noticed an issue regarding the download progress monitoring of the on-device LanguageModel.

I need to display a download progress bar on my page. However, when I use the following code to monitor the download progress, the value retrieved from e.loaded always restarts calculation from 0. This means that if the page is refreshed, the download progress resets to 0, which is confusing for users.

I verified the actual status by checking chrome://on-device-internals/ > Model Status. It clearly shows that the actual download progress is not 0% (provided the browser process is not closed).

Code Snippet:

```javascript

await LanguageModel.create({
    monitor: (m) => {
        m.addEventListener('downloadprogress', (e) => {
            console.log(`DownloadProgress: ${parseFloat((e.loaded * 100).toFixed(2))} %`);
        });
    },
    expectedInputs: [
        { type: 'text', languages: ['en'] }
    ],
});

```

Environment:
Browser Version: Chrome 144+

Steps to Reproduce:

  1. Execute the script above in the console.
  2. Observe that the progress starts printing from 0%.
  3. When the download progress reaches 5%, open a new tab, open the console, and execute the same script.

Expected Result:
In the new tab, the download progress should reflect the actual status (e.g., starting from 5%).

Actual Result:

  1. In the new tab, the download progress resets and starts printing from 0%.
  2. After reaching approximately 95%, it pauses for a moment and then jumps directly to 100%.

Has anyone else encountered this behavior? Any insights would be appreciated.

Thanks!

Thomas Steiner

unread,
Mar 3, 2026, 4:37:30 AMMar 3
to Alan Corn, Chrome Built-in AI Early Preview Program Discussions
Hi Alan,

This is actually working as intended. Each tab reports its 0 to 1 progress based on what has already been downloaded. Let's assume a 1GB model. You open tab1 and the model downloads 250MB, so tab1's download progress is at 0.25. Then you open tab2, and we have 750MB left to download. But rather than starting at the absolutely correct value of 0.25, tab2's download progress again starts at 0, but reaching 1 is now only 750MB away. We do it this way to prevent malicious sites from matching users on different sites by monitoring their model download progress. 

Cheers,
Tom

--
You received this message because you are subscribed to the Google Groups "Chrome Built-in AI Early Preview Program Discussions" group.
To unsubscribe from this group and stop receiving emails from it, send an email to chrome-ai-dev-previe...@chromium.org.
To view this discussion visit https://groups.google.com/a/chromium.org/d/msgid/chrome-ai-dev-preview-discuss/ed0d3e50-d44b-4826-b690-d46733a78147n%40chromium.org.


--
Thomas Steiner, PhD—Developer Relations Engineer (blog.tomayac.comtoot.cafe/@tomayac)

Google Spain, S.L.U.
Torre Picasso, Pl. Pablo Ruiz Picasso, 1, Tetuán, 28020 Madrid, Spain

CIF: B63272603
Inscrita en el Registro Mercantil de Madrid, sección 8, Hoja M­-435397 Tomo 24227 Folio 25

----- BEGIN PGP SIGNATURE -----
Version: GnuPG v2.4.8 (GNU/Linux)

iFy0uwAntT0bE3xtRa5AfeCheCkthAtTh3reSabiGbl0ck
0fjumBl3DCharaCTersAttH3b0ttom.xKcd.cOm/1181.
----- END PGP SIGNATURE -----

Alan Corn

unread,
Mar 4, 2026, 2:54:08 AMMar 4
to Chrome Built-in AI Early Preview Program Discussions, Thomas Steiner, Chrome Built-in AI Early Preview Program Discussions, Alan Corn
 Appreciate the explanation. Thank you very much!
Reply all
Reply to author
Forward
0 new messages