Hacker News
WebLLM: high-performance in-browser LLM inference engine
mandeepj
|next
[-]
TekMol
|next
|previous
[-]
I am getting:
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
|root
|parent
|next
[-]
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
|root
|parent
|previous
[-]
gpugreg
|root
|parent
[-]
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.
rzzzt
|root
|parent
[-]
MarioMan
|next
|previous
[-]
refulgentis
|next
|previous
[-]
skybrian
|root
|parent
[-]
seamossfet
|root
|parent
|next
[-]
refulgentis
|root
|parent
|next
|previous
[-]
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.)