We shipped 207 WebGPU Kernels for Browser AI

Video by Hugging Face via YouTube
We shipped 207 WebGPU Kernels for Browser AI

We shipped 207 WebGPU kernels for browser AI, all open source on the Hugging Face Hub, plus @huggingface/kernels, a library that loads, validates, renders and runs them for you.

This video walks through how it works: what an op is vs a kernel, why WGSL, and why we ship Jinja templates instead of fixed WGSL files. The browser picks the data types and workgroup sizes your device supports and builds the fastest kernel for that hardware.
Then two demos built on top of it: an attention mechanism with the tinyBERT weights in ~20 lines of JavaScript, and a 1M+ cell wave animation driven by a single matmul kernel, capped only by requestAnimationFrame.

Finally, Fleet: run the kernel benchmarks on your own GPU. The results help us optimize the kernels for the thousands of devices we can’t test ourselves.

Links
Blog post: https://huggingface.co/blog/webgpu-kernels
Kernel playground: https://huggingface.co/spaces/nico-martin/webgpu-kernels
npm: https://www.npmjs.com/package/@huggingface/kernels
Kernels on the Hub: https://huggingface.co/webgpu-kernels
Fleet: https://webgpu-kernels-fleet.hf.space/

Source