π€ Kernels: Major Updates
Summary
Hugging Face has significantly updated its π€ Kernels project, introducing a new "kernel" repository type on the Hub as of July 6, 2026. This new type standardizes custom kernel packaging and distribution, offering users detailed information on supported accelerators, operating systems, and backend versions, enhancing discoverability. A major focus has been on security, implementing "trusted kernel publishers" and code signing using Sigstore's cosign with ephemeral private keys to prevent malicious kernel execution and protect against compromised credentials. The project also revamped its CLIs for `kernels` and `kernel-builder` for clearer separation of concerns, extended framework support to include Torch Stable ABI and Apache TVM FFI, and laid a foundation for agentic kernel development by integrating with HF Jobs for automated benchmarking. Environment setup is simplified with an installation script and Terraform guide, and system cards provide essential kernel information.
Key takeaway
For AI Security Engineers or ML Engineers deploying custom kernels, Hugging Face's updated Kernels project significantly enhances security and reliability. You should prioritize loading kernels only from trusted publishers by default, and explicitly use `trust_remote_code=True` with extreme caution for unverified sources. Utilize the new `kernels verify-signature` tool to validate signed kernels, mitigating risks from compromised credentials. This framework streamlines secure kernel integration and development.
Key insights
The π€ Kernels project now offers a secure, standardized Hub for custom kernels, supporting agentic development and broad framework compatibility.
Principles
- Security for native code execution requires multi-layered defense.
- Reproducibility and provenance are critical for trusted kernel builds.
- Standardized interfaces enable cross-framework kernel interoperability.
Method
The article describes a process for agentic kernel development: scaffold, build, benchmark, and iteratively optimize kernels using `kernel-builder` and `kernels` CLIs, integrated with HF Jobs for performance evaluation across hardware.
In practice
- Use `get_kernel` with `trust_remote_code=True` for untrusted kernels.
- Verify kernel compatibility with `has_kernel()` or `get_kernel_variants()`.
- Set up `kernel-builder` with the quick install script or Terraform.
Topics
- Hugging Face Kernels
- Custom Kernel Development
- AI Security
- Code Signing
- Agentic AI
- Apache TVM FFI
Code references
Best for: CTO, VP of Engineering/Data, Director of AI/ML, Machine Learning Engineer, AI Engineer, AI Security Engineer
Related on AIssential
Editorial summary, takeaway, and curation by AIssential. Original article published by Hugging Face - Blog.