Hugging Face ships 207 WebGPU kernels for local, in-browser AI
The Apache-2.0 npm package runs matmul, attention and more on the GPU in any WebGPU browser — up to 2.57x faster than ORT, no server or CUDA.

Copy markdown
npm install, then call a kernel
@huggingface/kernels ships 207 GPU kernels under Apache-2.0. Install with npm install @huggingface/kernels@preview, then getKernel("webgpu-kernels/ai.onnx.Add") and run it on typed arrays — no native build, no CUDA, no inference server.
2.57x faster than ORT WebGPU
Across 809 comparable ops on an Apple M4 GPU, the kernels ran 2.57x faster by geometric mean (1.90x median) than ORT WebGPU 1.30, with one bilinear Einsum op posting a 10,000x outlier.
Covers the ops real models need
The set spans matrix multiplies, normalizations, convolutions, attention primitives, quantization, and data-layout transforms, all following ONNX names like ai.onnx.MatMul — so it drops in under Transformers.js-style local inference.
What you could ship this weekend
GPU inference running client-side in any WebGPU browser means private, offline-capable AI — a local transcriber, an on-device classifier or semantic search — that costs nothing per call and never sends user data to a server.
The catch: WebGPU only, still preview
It needs a browser with WebGPU and working GPU drivers, and the package is tagged @preview — fine for prototypes, but check coverage for your exact ops before betting a shipping feature on it. A crowdsourced 'Fleet' suite tracks per-device performance.