web-llm icon indicating copy to clipboard operation
web-llm copied to clipboard

New demo not working

Open flatsiedatsie opened this issue 1 year ago • 10 comments

The new landing page design is so much nicer, well done!

It's not loading for me though:

Mac OS Brave

Screenshot 2024-05-25 at 20 23 09

flatsiedatsie avatar May 25 '24 18:05 flatsiedatsie

@flatsiedatsie Thank you so much for reporting the issue. It seems GitHub pages doesn't give proper CSP header required to run the demo webapp. We will work on a fix asap.

Neet-Nestor avatar May 26 '24 03:05 Neet-Nestor

A fix has been pushed https://github.com/mlc-ai/web-llm-chat/commit/2b66d04cee53ab31bc577ce725fb610bc96a132f and deployed.

@flatsiedatsie Could you please try visiting https://chat.webllm.ai and let me know if it loads correctly for you this time?

Neet-Nestor avatar May 26 '24 04:05 Neet-Nestor

It's still not working for me. I deleted the site cache and did a hard reload.

(Brave shields are disabled)

Screenshot 2024-05-26 at 13 02 13 Screenshot 2024-05-26 at 13 03 38

off topic: it would be nice if you could keep Google out of it?

Screenshot 2024-05-26 at 13 05 51

flatsiedatsie avatar May 26 '24 11:05 flatsiedatsie

This is weird as in your screenshot, the CSP is still set as worker-src 'none' even though we have updated it to allows 'self'. Could you please confirm whether you are using some kind of browser extension that rewrites CSP and blocks service workers from loading? Would you like to try loading the app with some extensions disbled?

For background context, we are currently using worker threads in the new demo page so that you don't need to initialize the models again and again in multiple page loads. However, if you prefer workers to be disabled, we can work on a fallback to vanilla WebLLM engine.

(side-note: Google analytics was used to collect exceptions internally before releasing. It has been removed from the site now. I will work on replace Google fonts API with local fonts too.)

Neet-Nestor avatar May 26 '24 19:05 Neet-Nestor

Google fonts API also removed.

For the CSP issue, it seems like not a really issue but just a report-only warning. Therefore, it should not prevent your page loading.

Neet-Nestor avatar May 26 '24 21:05 Neet-Nestor

Still not sure why service worker isn't available in your case, but I make a PR to fall back to web worker if it is unavailable. https://github.com/mlc-ai/web-llm-chat/commit/3cd1201ead340f246618919d485038e381abebb7

@flatsiedatsie Could you please make sure you toggle off this option "forbid web workers" in uMatrix extension and try agian?

Screenshot 2024-05-26 at 5 52 53 PM

Neet-Nestor avatar May 26 '24 21:05 Neet-Nestor

I tested again.

  • did a full browser cache clear first.
  • uMatrix is off (and forbid webworkers is not enabled, as my own project uses them too)
  • uBlock origin is off
  • Brave shields is off
  • Decentraleyes has no effect on this site
Screenshot 2024-05-27 at 19 55 46

It's now stuck on downloading.

CTRL-F5

and now I see:

Screenshot 2024-05-27 at 20 04 22

To my surprise it's once again stuck on 20%, and seems to have jumped there immediately.

flatsiedatsie avatar May 27 '24 18:05 flatsiedatsie

Screenshot 2024-05-27 at 20 06 49

Perhaps it's this Brave setting. *tests

flatsiedatsie avatar May 27 '24 18:05 flatsiedatsie

And now it's different again:

Screenshot 2024-05-27 at 20 08 42

flatsiedatsie avatar May 27 '24 18:05 flatsiedatsie

odd, the download (of a different model, just to avoid any issues there).. got stuck again.

Screenshot 2024-05-27 at 20 16 46

flatsiedatsie avatar May 27 '24 18:05 flatsiedatsie

I just tried again. This time the model loaded fully, and everything works.

Screenshot 2024-05-28 at 17 07 22

flatsiedatsie avatar May 28 '24 15:05 flatsiedatsie

Thanks for confirming. As the loading was successfully initialized but stuck in the middle and there were no error, I guess it was about Internet connection and slow download speed. Thanks for confirming that it's working for you now.

Neet-Nestor avatar May 28 '24 15:05 Neet-Nestor

Nice post on Reddit :-) #upvoted

flatsiedatsie avatar May 28 '24 19:05 flatsiedatsie