All videos
0:00 / 0:00
research

WebGPU Kernels

Hugging Face4 September 2026Watch on YouTube

What you'll learn

  • You learn the difference between an op and a kernel and why WGSL is used
  • You see how the browser picks the data types and workgroup sizes your device supports
  • You discover they ship Jinja templates instead of fixed WGSL files
  • You see two demos, an attention mechanism with tinyBERT weights and a 1M+ cell wave animation
  • You learn how to run kernel benchmarks on your own GPU via Fleet

Frequently asked questions

What are Hugging Face WebGPU kernels?
They are 207 open-source WebGPU kernels for browser AI, available on the Hugging Face Hub, together with a library that loads, validates, renders and runs them for you.
Why does Hugging Face ship Jinja templates instead of fixed WGSL files?
Because the browser uses the templates to pick the data types and workgroup sizes your device supports and builds the fastest kernel for that specific hardware.
Which applications are shown in the video?
Two demos are shown, an attention mechanism with tinyBERT weights in about twenty lines of JavaScript and a wave animation of more than a million cells driven by a single matmul kernel.
What is Fleet and what can you do with it?
With Fleet you can run the kernel benchmarks on your own GPU. The results help Hugging Face optimize the kernels for the thousands of devices they cannot test themselves.

Topics

In this video

Read next

Description from the channel

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/