Hugging Face releases 207 WebGPU kernels for in-browser AI

The new @huggingface/kernels library loads versioned WebGPU kernels from the Hub, alongside Fleet, an in-browser GPU benchmarking and testing suite.

Paylaş
Hugging Face releases 207 WebGPU kernels for in-browser AI

Hugging Face's WebAI team has published the first layer of its browser inference stack: @huggingface/kernels, a minimal library for loading and running optimized WebGPU kernels from the Hugging Face Hub. It ships with an initial collection of 207 kernels hosted at huggingface.co/webgpu-kernels.

The collection covers operations used across many machine learning architectures: matrix multiplications, normalizations, convolutions, attention primitives, quantization operations and data-layout transformations. Each kernel is published as a complete, versioned package, with its interface, shader templates, correctness cases, benchmark cases and usage instructions living in the same repository.

Kernel cards and a stable contract

Every kernel has its own repository and kernel card documenting the operation's semantics, inputs, outputs, attributes, supported data types, source files and a ready-to-run example. The example given is ai.onnx.Add, elementwise addition with multidirectional broadcasting. The published Add kernel includes variants for equal shapes, vectorized broadcasting, scalar processing and general broadcasting, so the runtime can pick an implementation suited to the call and the device without changing the application-facing API.

Developers call getKernel with a Hub repository ID and a contract version, then invoke the returned function with typed input data and tensor shapes. The loader derives the output shape and logical data type from the manifest contract and allocates the output automatically. The version: 1 option refers to the published kernel contract, kept separate from an ONNX opset, an operator's since_version or a model revision.

Fleet and the ORT comparison

Hugging Face also launched Fleet, an in-browser GPU benchmarking and testing suite that runs and scores the kernels on the user's own hardware. With user consent, each run contributes evidence that can surface incorrect results or pathologically slow cases across devices a conventional test lab could not cover.

For comparison, the team ran the collection against ORT WebGPU on an Apple M4 GPU using ONNX Runtime Web 1.30.0-dev.20260826-b1f76d586a. It started with 1,756 test cases across all 207 operations and kept the 809 cases where both sides produced matching outputs and reliable timings.

Running the kernels requires a browser with WebGPU support, which can be checked in JavaScript with "gpu" in navigator. Full details are in the Hugging Face announcement.

Devamını oku

Liquid AI تطلق أكبر نماذج LFM2.5 المفتوحة لتشغيل الوكلاء على الأجهزة

Liquid AI تطلق أكبر نماذج LFM2.5 المفتوحة لتشغيل الوكلاء على الأجهزة

أطلقت Liquid AI نموذج LFM2.5-24B-A2B كنموذج مفتوح، ويضم 24 مليار معامل إجمالا لكنه يشغل نحو 2.5 مليار منها في كل خطوة. وبحسب النتائج التي نشرتها الشركة، يولد النموذج المدرب للوكلاء الذين يستخدمون الأدوات 184 رمزا في الثانية على Apple M5 Max.

GlobalFeed Editor tarafından