WebGPUNotAvailableError: WebGPU is not supported in
your current environment, but it is necessary to
run the WebLLM engine.
On both, FireFox and Chromium on Linux.
noir_lord 1 days ago [-]
For firefox you may need to enable `dom.webgpu.enabled` in `about:config`
It's on by default on Windows iirc - it's considered a potential security risk on Linux by Mozilla, so they ship it but it's turned off and it's up to the user to decide.
I think the reasoning is just because of how varied graphics drivers/stacks are on Linux compared to Windows/OSX and the attack surface been larger.
toto007 2 days ago [-]
You can enable WebGPU support in Google Chrome by turning on hardware acceleration and activating the WebGPU flag. It Works.
gpugreg 1 days ago [-]
I tried it and the experience was not great. I first enabled chrome://flags/#force-enable-webgpu-interop which did nothing. Next, I enabled chrome://flags/#enable-unsafe-webgpu which made some WebGPU demos work, but they all use my CPU's integrated GPU, which is worse than using no GPU acceleration at all. Next, I found out that there is a powerPreference: 'high-performance' option. It can be enabled with chrome://flags/#enable-webgpu-developer-features and I can now request a GPU with 'high-performance' power preference, although there is no way to check whether this actually selected the correct GPU, and it is useless to do it like that anyway, since no website actually sets this (experimental) option. Fortunately, there is the flag chrome://flags/#force-high-performance-gpu which should solve this, but it is not available for my platform. I have a fairly standard RTX 3060, but apparently, the most common GPU (according to the steam hardware survey) is not supported.
Unfortunately, Firefox does not work any better. After setting the flag dom.webgpu.enabled to true in about:config, a few WebGPU examples (e.g. https://webgpu.github.io/webgpu-samples/?sample=helloTriangl...) work, but many other examples crash the browser. And of course, Firefox can't select the correct GPU either.
erichdongubler 21 hours ago [-]
Hey, Firefox Web GPU engineer here. We would love to hear about crashers on any platform! If you need help filing a Bugzilla bug, or want to email me so I can do it, please LMK.
gpugreg 17 hours ago [-]
Thanks, that is very kind of you. I have submitted bugs in the past and was enthusiastic for GPU support for over 15 years now, but I lost my faith.
rzzzt 1 days ago [-]
Pretty much the same here with Edge,#enable-unsafe-webgpu got me the emulated swiftshader adapter, but only #force-high-performance-gpu made the dGPU appear in the adapter list of https://webgpureport.org/.
mandeepj 1 days ago [-]
It is kinda obvious, but maybe that's why it's not stated anywhere: each browser session will result in a download of 500 MB to ~1 GB, depending on your model selection. So, it's better to add a disclaimer if you end up using WebLLM in a customer-facing site.
MarioMan 1 days ago [-]
I really enjoy this engine. I’ve used it for personal projects, but it hasn’t been updated since Gemma 2. I suggest using Transformers.js instead these days.
karuppiah7890 17 hours ago [-]
I love it! It works fine for me on Google Chrome on my MacBook Pro 14-inch M5 16GB RAM and 10 Cores CPU and 10 Cores GPU, with Metal 4 support
refulgentis 2 days ago [-]
Project is de facto dead, used it for many years and had to rip it out 6 months ago, don't waste your time.
woadwarrior01 21 hours ago [-]
Yeah, both WebLLM and mlc-llm have been mostly abandoned since NVIDIA acquired OctoAI in late 2024.
And ONNX is what Transformers.js uses as well, at least for the moment.
vatsachak 1 days ago [-]
Yeah ONNX runtime or Burn-rs are great because they compile to wasm
theanonymousone 2 days ago [-]
Transformers.js supports a lot of models since v4
refulgentis 2 days ago [-]
There's, quietly, a llama.cpp WebGPU backend that works *great*.
Some hacking required, it's unsupported, a side project for one of the lead maintainers and someone in school.
Note of caution, llama.cpp isn't what it was, the grunt-level maintainers are left to their own devices. There's one key subsystem where things break regularly and the engineering is poor, and the "lead maintainer" is aggro and isn't really involved after delivering their big refactor that was DOA, other than telling people on issues he's never seen their repro himself. Carefully pick models you can support down to "I can patch around the Jinja template engine". Go through the same llama web server APIs. c.f. github / telosnex / fllama if you need a reference
(n.b. seeing peer comments, its much better than ONNX, ONNX never got within spitting distance of llama.cpp, my understanding from watching the LLM runtime is its used for Windows AI features so their models probably work great on Windows x Qualcomm. ONNX is great for smol models though, like VAD, a god send even.)
roflcopter69 21 hours ago [-]
I seem to be out of the loop when it comes to llama.cpp? What happened? Can you please provide some more pointers to sources so one can verify your claims? Do you see alternatives to llama.cpp in whose future you have more trust?
> Error: Cannot initialize runtime because of requested maxStorageBuffersPerShaderStage exceeds limit. requested=10, limit=9.
erichdongubler 12 hours ago [-]
What browser and hardware are you using?
adastra22 1 days ago [-]
A WebX technology that actually involves browsers!
LoganDark 19 hours ago [-]
Oh nice, this actually works in Safari on my Mac! Prefill: 181.2 tok/s, Decode: 58.5 tok/s on my M4 Max -- not too impressive for 1B, but definitely impressive that it runs in my browser!
topaitools_xyz 23 hours ago [-]
[flagged]
juggle73 23 hours ago [-]
[dead]
paidx 1 days ago [-]
[flagged]
nnevatie 2 days ago [-]
[flagged]
1 days ago [-]
ycCantCode 2 days ago [-]
[dead]
asyncze 2 days ago [-]
[dead]
Rendered at 05:35:59 GMT+0000 (Coordinated Universal Time) with Vercel.
https://chat.webllm.ai/
I am getting:
On both, FireFox and Chromium on Linux.It's on by default on Windows iirc - it's considered a potential security risk on Linux by Mozilla, so they ship it but it's turned off and it's up to the user to decide.
I think the reasoning is just because of how varied graphics drivers/stacks are on Linux compared to Windows/OSX and the attack surface been larger.
Unfortunately, Firefox does not work any better. After setting the flag dom.webgpu.enabled to true in about:config, a few WebGPU examples (e.g. https://webgpu.github.io/webgpu-samples/?sample=helloTriangl...) work, but many other examples crash the browser. And of course, Firefox can't select the correct GPU either.
Some hacking required, it's unsupported, a side project for one of the lead maintainers and someone in school.
Note of caution, llama.cpp isn't what it was, the grunt-level maintainers are left to their own devices. There's one key subsystem where things break regularly and the engineering is poor, and the "lead maintainer" is aggro and isn't really involved after delivering their big refactor that was DOA, other than telling people on issues he's never seen their repro himself. Carefully pick models you can support down to "I can patch around the Jinja template engine". Go through the same llama web server APIs. c.f. github / telosnex / fllama if you need a reference
(n.b. seeing peer comments, its much better than ONNX, ONNX never got within spitting distance of llama.cpp, my understanding from watching the LLM runtime is its used for Windows AI features so their models probably work great on Windows x Qualcomm. ONNX is great for smol models though, like VAD, a god send even.)
responds with
> Error: Cannot initialize runtime because of requested maxStorageBuffersPerShaderStage exceeds limit. requested=10, limit=9.