Hugging Face has released @huggingface/kernels, a library for loading and running optimized WebGPU kernels from the Hugging Face Hub, alongside an initial collection of 207 kernels. The release also introduces Fleet, an in-browser GPU benchmarking suite that crowdsources performance and correctness evidence from users' devices.

  • The kernel collection includes operations like matrix multiplications and attention primitives, each published as a versioned repository with manifests, correctness tests, and WGSL shader templates.
  • @huggingface/kernels provides a JavaScript loader that downloads and executes kernels directly from the Hub using explicit contract versions.
  • Benchmarks on an Apple M4 GPU showed the new kernels were 2.57x faster by geometric mean compared to ORT WebGPU, with specific cases like bilinear Einsum running over 10,000x faster.
  • Fleet allows users to run tests on their hardware, contributing private evidence to help identify failures and improve kernel variants across diverse real-world devices.

This foundation aims to make fast local inference easier to use across the WebAI ecosystem by providing transparent, versioned operation contracts and broad, real-world performance data.