<!-- mobian-agent-page publisher="dailydev" canonical="https://daily.dev/posts/introducing-huggingface-kernels-200-webgpu-kernels-for-local-ai-acmz1w1ld" -->

---
title: Introducing @huggingface/kernels: 200+ WebGPU Kernels...
description: Hugging Face released @huggingface/kernels, a JavaScript library for loading and running optimized WebGPU kernels directly from the Hugging Face Hub, alongside...
canonical: https://daily.dev/posts/introducing-huggingface-kernels-200-webgpu-kernels-for-local-ai-acmz1w1ld
twitter:card: summary_large_image
twitter:site: @dailydotdev
og:type: website
og:site_name: daily.dev
og:title: Introducing @huggingface/kernels: 200+ WebGPU Kernels for Local AI | daily.dev
og:description: Hugging Face released @huggingface/kernels, a JavaScript library for loading and running optimized WebGPU kernels directly from the Hugging Face Hub, alongside...
og:url: https://daily.dev/posts/introducing-huggingface-kernels-200-webgpu-kernels-for-local-ai-acmz1w1ld
og:image: https://api.daily.dev/og/posts/aCMZ1w1Ld.png
og:image:alt: Introducing @huggingface/kernels: 200+ WebGPU Kernels for Local AI
og:image:width: 1200
og:image:height: 630
og:locale: en
---

> ## Documentation Index
> Fetch the complete documentation index at: https://daily.dev/llms.txt
> Use this file to discover all available pages before exploring further.

# Introducing @huggingface/kernels: 200+ WebGPU Kernels for Local AI

**[Hugging Face](https://daily.dev/sources/huggingface)** · 9 min read · 0 upvotes · 0 comments

## Summary

Hugging Face released @huggingface/kernels, a JavaScript library for loading and running optimized WebGPU kernels directly from the Hugging Face Hub, alongside an initial collection of 207 kernels covering common machine learning operations (matmul, softmax, layer normalization, elementwise ops, etc.). Each kernel is published as a versioned repository with a manifest defining its contract, correctness tests, benchmark cases, and parameterized WGSL shader templates. Hugging Face also launched Fleet, a browser-based benchmarking and testing tool that crowdsources correctness and performance data across real-world GPUs. Benchmarks against ONNX Runtime Web on an Apple M4 GPU showed the new kernels were 2.57x faster by geometric mean and up to over 10,000x faster on specific difficult operations like a bilinear Einsum case. The kernels are Apache-2.0 licensed and intended as a foundational layer for faster local AI inference in the browser, with plans to upstream improvements to ONNX Runtime Web.

## Full article

daily.dev links to this article rather than hosting it. Read it at the original source: <https://huggingface.co/blog/webgpu-kernels>

## Questions this post answers

### How much faster is Hugging Face's WebGPU kernel library compared to ONNX Runtime Web?

Kernels from @huggingface/kernels ran 2.57x faster by geometric mean and 1.90x faster at the median than ORT WebGPU, tested on an Apple M4 GPU using ONNX Runtime Web 1.30.0-dev.20260826-b1f76d586a. Out of 809 compared test cases across 207 operations, the new kernels won 629 cases, lost 176, and tied 4, with some individual operations seeing speedups over 10,000x.

_developers benchmarking browser AI inference options can track results like this on daily.dev._

### How do I load and run a kernel from Hugging Face's webgpu-kernels collection in JavaScript?

Install @huggingface/kernels via npm, then call getKernel with a Hub repository ID such as webgpu-kernels/ai.onnx.Add and a contract version number, for example version 1. The returned function accepts typed input data and tensor shapes and automatically derives the output shape and data type from the kernel's manifest contract, allocating the output tensor for you.

_teams adopting new WebGPU tooling can follow setup details like this on daily.dev._

### What files make up a kernel repository in Hugging Face's webgpu-kernels collection?

Each kernel repository contains a manifest.json defining the operation contract (inputs, outputs, attributes, type constraints), a metadata.json with identifiers and provenance, a test.json with correctness cases, a bench.json with benchmark and tuning cases, and *.wgsl.jinja files with parameterized WGSL shader implementations for different devices and shapes.

_developers building custom WebGPU kernels can reference structures like this on daily.dev._

## Similar posts on daily.dev

- [WebGPU vs. WebGL: Performance Benchmarks for Client-Side Inference](https://daily.dev/posts/webgpu-vs-webgl-performance-benchmarks-for-client-side-inference-bxfaw5zzt) · SitePoint · 0 upvotes · 0 comments
- [WebGPU Browser AI: Client-Side Inference in JavaScript](https://daily.dev/posts/webgpu-browser-ai-client-side-inference-in-javascript-qmvpskeqv) · SitePoint · 0 upvotes · 0 comments
- [What GPU kernels mean for your distributed inference](https://daily.dev/posts/what-gpu-kernels-mean-for-your-distributed-inference-oppihpe7f) · Red Hat Developer · 0 upvotes · 0 comments

---

Tags: [#machine-learning](https://daily.dev/tags/machine-learning), [#huggingface](https://daily.dev/tags/huggingface), [#webgpu](https://daily.dev/tags/webgpu)

[View this post on daily.dev](https://daily.dev/posts/introducing-huggingface-kernels-200-webgpu-kernels-for-local-ai-acmz1w1ld)

```json
{"@context":"https://schema.org","@graph":[{"@type":"Organization","@id":"https://daily.dev/#organization","name":"daily.dev","url":"https://daily.dev","logo":{"@type":"ImageObject","url":"https://daily.dev/apple-touch-icon.png","width":180,"height":180},"sameAs":["https://twitter.com/dailydotdev","https://github.com/dailydotdev","https://www.linkedin.com/company/daily-dev-ltd"]},{"@type":"WebSite","@id":"https://daily.dev/#website","url":"https://daily.dev","name":"daily.dev","publisher":{"@id":"https://daily.dev/#organization"},"potentialAction":{"@type":"SearchAction","target":{"@type":"EntryPoint","urlTemplate":"https://daily.dev/search?q={search_term_string}"},"query-input":"required name=search_term_string"}}]}
{"@context":"https://schema.org","@type":"TechArticle","headline":"Introducing @huggingface/kernels: 200+ WebGPU Kernels for Local AI","url":"https://daily.dev/posts/introducing-huggingface-kernels-200-webgpu-kernels-for-local-ai-acmz1w1ld","mainEntityOfPage":{"@type":"WebPage","@id":"https://daily.dev/posts/introducing-huggingface-kernels-200-webgpu-kernels-for-local-ai-acmz1w1ld"},"datePublished":"2026-09-01T15:09:09.037Z","dateModified":"2026-09-14T06:20:44.491Z","description":"Hugging Face released @huggingface/kernels, a JavaScript library for loading and running optimized WebGPU kernels directly from the Hugging Face Hub, alongside...","image":"https://media.daily.dev/image/upload/f_auto,q_auto/v1/posts/b64086196ba52e6c3dfc399db568666b?_a=AQAEuop","thumbnailUrl":"https://media.daily.dev/image/upload/f_auto,q_auto/v1/posts/b64086196ba52e6c3dfc399db568666b?_a=AQAEuop","isAccessibleForFree":true,"articleSection":"Hugging Face","inLanguage":"en","publisher":{"@type":"Organization","name":"daily.dev","url":"https://daily.dev","logo":{"@type":"ImageObject","url":"https://daily.dev/apple-touch-icon.png","width":180,"height":180}},"author":{"@type":"Organization","name":"Hugging Face","logo":"https://media.daily.dev/image/upload/t_logo,f_auto/v1/logos/f1f55c67d81a4330acf5b90b26b0c8e1","url":"https://daily.dev/sources/huggingface"},"commentCount":0,"discussionUrl":"https://daily.dev/posts/introducing-huggingface-kernels-200-webgpu-kernels-for-local-ai-acmz1w1ld","interactionStatistic":[{"@type":"InteractionCounter","interactionType":{"@type":"LikeAction"},"userInteractionCount":0},{"@type":"InteractionCounter","interactionType":{"@type":"CommentAction"},"userInteractionCount":0}],"keywords":"machine-learning,huggingface,webgpu","timeRequired":"PT9M"}
{"@context":"https://schema.org","@type":"BreadcrumbList","itemListElement":[{"@type":"ListItem","position":1,"name":"Home","item":"https://daily.dev"},{"@type":"ListItem","position":2,"name":"Hugging Face","item":"https://daily.dev/sources/huggingface"},{"@type":"ListItem","position":3,"name":"Introducing @huggingface/kernels: 200+ WebGPU Kernels for Local AI"}]}
{"@context":"https://schema.org","@type":"FAQPage","@id":"https://daily.dev/posts/introducing-huggingface-kernels-200-webgpu-kernels-for-local-ai-acmz1w1ld#faq","mainEntity":[{"@type":"Question","name":"How much faster is Hugging Face's WebGPU kernel library compared to ONNX Runtime Web?","acceptedAnswer":{"@type":"Answer","text":"Kernels from @huggingface/kernels ran 2.57x faster by geometric mean and 1.90x faster at the median than ORT WebGPU, tested on an Apple M4 GPU using ONNX Runtime Web 1.30.0-dev.20260826-b1f76d586a. Out of 809 compared test cases across 207 operations, the new kernels won 629 cases, lost 176, and tied 4, with some individual operations seeing speedups over 10,000x. developers benchmarking browser AI inference options can track results like this on daily.dev."}},{"@type":"Question","name":"How do I load and run a kernel from Hugging Face's webgpu-kernels collection in JavaScript?","acceptedAnswer":{"@type":"Answer","text":"Install @huggingface/kernels via npm, then call getKernel with a Hub repository ID such as webgpu-kernels/ai.onnx.Add and a contract version number, for example version 1. The returned function accepts typed input data and tensor shapes and automatically derives the output shape and data type from the kernel's manifest contract, allocating the output tensor for you. teams adopting new WebGPU tooling can follow setup details like this on daily.dev."}},{"@type":"Question","name":"What files make up a kernel repository in Hugging Face's webgpu-kernels collection?","acceptedAnswer":{"@type":"Answer","text":"Each kernel repository contains a manifest.json defining the operation contract (inputs, outputs, attributes, type constraints), a metadata.json with identifiers and provenance, a test.json with correctness cases, a bench.json with benchmark and tuning cases, and *.wgsl.jinja files with parameterized WGSL shader implementations for different devices and shapes. developers building custom WebGPU kernels can reference structures like this on daily.dev."}}]}
```

