Everything WebGPU

Engine API

Any Firefox extension drives this engine by messaging that ID — runtime.sendMessage for request/response, runtime.connect for streaming. Send raw requests: the engine schedules a shared GPU, it does not author prompts, so prompts stay on your side and survive a model change.

One task holds one engine, so a whole batch occupies one and can never starve a completion. A second engine is built only when a second task is waiting, and on this model it is worth ~1.06x — it buys isolation, not speed. Full reference in AI.md.

Add a model

Drop a compiled MLC model folder here

Files are copied straight into this extension's Cache Storage — nothing is downloaded. The folder needs mlc-chat-config.json, tensor-cache.json (or ndarray-cache.json), every params_shard_*.bin, tokenizer.json, and exactly one *-webgpu.wasm model library.

Local models

ModelSizeShardsLibraryCache

Storage in use:

Generation defaults

Firefox setup (macOS)

WebGPU/Metal must be enabled in about:config before a model can load:

dom.webgpu.enabledtrueExposes navigator.gpu.
gfx.webgpu.ignore-blocklisttrueOnly if your Mac's GPU is blocklisted.
dom.webgpu.service-workers.enabledtrueHarmless; needed on builds that gate worker contexts.

Restart Firefox after changing these. Nightly on Apple Silicon is the best-tested combination.