Next upHack for Humanity: San Francisco (powered by Google Gemini)
News

Hugging Face releases 207 WebGPU kernels for local AI

Hugging Face released @huggingface/kernels, a JavaScript loader and 207 Apache-2.0 WebGPU kernels published as versioned Hub repositories, alongside Fleet, an in-browser testing and benchmarking suite.

D
Sep 2, 2026 · 2 min read

Hugging Face released @huggingface/kernels, a JavaScript loader and an initial collection of 207 WebGPU compute kernels for browser-based AI, on September 1. The Apache-2.0 kernels are published as individual repositories in the company’s webgpu-kernels organization on the Hugging Face Hub.

The release gives developers reusable versions of the low-level GPU operations used in browser inference, plus a way to load, test and benchmark them across WebGPU-capable devices. A kernel is a small program that runs one operation on a GPU, such as matrix multiplication. WebGPU is the browser interface that dispatches that work to a device’s GPU. The project is a browser-local infrastructure effort, distinct from Hugging Face’s recent open speech-to-speech pipeline with Cerebras, which ran on Cerebras hardware.

Each kernel repository packages a versioned operation contract rather than a bare shader. Hugging Face said repositories include a manifest.json defining inputs, outputs, attributes, type constraints and shape-derivation rules; a metadata.json containing the kernel identifier, digests and provenance; test.json correctness cases; bench.json benchmark and tuning cases; and parameterized WGSL shader templates.

The loader accepts a Hub repository ID and contract version. It downloads and prepares the kernel, derives the output shape and data type from the manifest and supplied inputs, allocates the output tensor, and selects an implementation variant for the current device. Hugging Face said versioned contracts allow implementations and variants to change without altering the JavaScript-facing interface.

Fleet runs the kernels inside a visitor’s browser. Hugging Face said that, with the participant’s consent, each run contributes private evidence intended to identify incorrect results and unusually slow cases, improve kernel variants, and inform optimization decisions across hardware. The announcement does not provide enough information to independently assess Fleet’s complete data-handling lifecycle.

Hugging Face reported a 2.57-times geometric-mean speedup and a 1.90-times median speedup against ORT WebGPU 1.30.0-dev on an Apple M4 GPU. The comparison retained 809 operation-level cases from 1,756, recording 629 wins, 176 losses and four ties. The results are Hugging Face’s own and were not independently reproduced in the released material.

The company said the comparison measured GPU work only, excluding setup, shader compilation and data transfer. It also cautioned that the tests covered individual operations rather than complete models, results will vary across GPUs and browsers, and GPU caching can benefit small cases. The figures therefore do not establish end-to-end application speedups.

Hugging Face said it is working with the ONNX Runtime team to upstream the improvements so they can reach the broader ONNX Runtime Web ecosystem. The announcement does not say that upstream integration has been completed.

More news