Will it run?
Models

Hugging Face releases 207 WebGPU kernels and a browser benchmark suite

By Rae Whitlock Clawpit staff
Hugging Face releases 207 WebGPU kernels and a browser benchmark suite

Hugging Face has launched @huggingface/kernels, a minimal JavaScript library for loading and executing WebGPU kernels directly from the company’s Hub, together with an initial collection of 207 kernels in the webgpu-kernels repository. At the same time it introduced Fleet, a benchmark and testing suite that runs in the browser and ranks the kernels on the user’s hardware; with consent, every run contributes performance and correctness evidence that helps locate failures, improve variants and make optimization decisions based on real devices that a lab cannot cover.

Running a model in the browser ultimately reduces to a sequence of GPU operations: matrix multiplications, normalizations, convolutions, attention primitives, quantization steps, data layout transformations and more. WebGPU provides a portable API for modern browsers and WGSL as a common shader language, but portability does not guarantee performance. Two shaders may implement the same operation and produce identical output while behaving completely differently on different accelerators, work-group sizes, memory-access patterns, vectorization, data types and fusion strategies; the optimal choice therefore varies with input shape, device, browser and the capabilities exposed by WebGPU.

Each kernel in the collection is published as a versioned package: the interface, shader templates, correctness cases, benchmark cases and usage instructions all reside together in the Hub under an Apache-2.0 license. Every kernel has its own repository and a kernel card that records semantics, inputs, outputs, attributes, supported data types, source files and a ready-to-run example with @huggingface/kernels. Behind the card are the files that enable understanding and evaluating the implementation: manifest.json is the source of truth for the operation contract, defining inputs, outputs, attributes, type constraints and shape-inference rules; metadata.json records the identifier, digests and origin; test.json contains correctness cases for verification against expected behavior; bench.json holds benchmark and tuning cases that represent the workloads used for evaluation.

For example, ai.onnx.Add implements element-wise addition with multi-directional broadcasting, a simple operation that appears everywhere from residual connections to bias addition. Its kernel card documents the two inputs, the output shape after broadcasting, supported data types and the variants available for different formats and quantizations. This structure repeats across all kernels: a stable contract, correctness tests, performance cases and interchangeable versions that do not break the layers above.

Kernels form a foundational layer for fast inference in the browser; a high-level runtime can be efficient only as much as the operations it dispatches. When operations are discoverable, testable, benchmarked and versioned separately, the base can be improved independently while preserving a stable contract for upper layers. Fleet makes this improvement cyclical: the community contributes evidence from real devices, the system flags slow or erroneous edge cases, and new kernel versions are released with an unbroken contract.