🤗 Kernels: Major Updates
By Jakub Antkiewicz
•2026-07-06T12:04:19Z
Hugging Face Standardizes Custom Compute with Major Kernels Project Update
Hugging Face has rolled out a significant redesign of its 🤗 Kernels project, introducing a dedicated 'kernel' repository type on its Hub to standardize how custom, high-performance compute kernels are packaged, distributed, and used. This update directly addresses critical security and usability issues that have historically created friction for developers working with low-level code for AI accelerators. By treating kernels as first-class citizens on the Hub, the initiative aims to make performance optimization more accessible, discoverable, and secure for the broader AI community.
The overhaul introduces several new layers of security and expands technical capabilities. At the forefront is a new 'trusted publisher' system, which by default prevents the loading of kernels from unverified sources unless a user explicitly opts in. This is complemented by a code-signing mechanism using Sigstore's `cosign` to protect against credential compromises. The project also revamps its command-line interfaces for a cleaner separation of concerns between loading (`kernels`) and building (`kernel-builder`) and extends its backend support.
- New Repository Type: A dedicated 'kernel' repo on the Hugging Face Hub improves discoverability and provides metadata on supported accelerators, OS, and backend versions.
- Trusted Publishers: Kernels from untrusted sources are blocked by default, requiring explicit user consent (`trust_remote_code=True`) to run.
- Code Signing: Protects against malicious code being uploaded to a compromised repository from a trusted publisher.
- Expanded Framework Support: Added support for the PyTorch Stable ABI and Apache TVM FFI, enabling kernels that can run across different frameworks.
- Reproducible Builds: The use of Nix ensures builds are pure and can be recompiled to verify they match public sources.
Paving the Way for Agentic Optimization
These foundational updates are explicitly designed to support the nascent field of agentic kernel development, where AI agents can be used to automatically generate and optimize hardware-specific code. The revamped CLIs and predictable project structure provide a stable environment for agents to scaffold, build, benchmark, and iteratively improve kernels. By integrating with HF Jobs for benchmarking across different hardware, Hugging Face is creating a feedback loop that allows an agent to validate performance gains and identify further optimization paths, potentially automating a task that has traditionally required deep and scarce human expertise.
Hugging Face is building the infrastructure to treat custom compute kernels not as one-off, artisanal code, but as first-class, verifiable software assets, setting the stage for AI agents to automate the complex task of performance optimization.