Kernels documentation
Installation
Getting started
Using kernels
QuickstartUsing LayersLocking Kernel VersionsEnvironment VariablesFAQMigrating from older versionsIntegrating kernels into a project
Building kernels
Writing KernelsBuilding kernelsLocal DevelopmentKernel RequirementsSecurityWhy Nix?Metal NotesBuild VariantsBuilding kernels with agents
API Reference
CLI Reference
You are viewing main version, which requires installation from source. If you'd like
regular pip install, checkout the latest stable version (v0.14.1).
Installation
Install the kernels package with pip (requires torch>=2.5 and CUDA):
pip install kernels
or with uv
uv pip install kernels
or if you want the latest version from the main branch:
pip install "kernels[benchmark] @ git+https://github.com/huggingface/kernels#subdirectory=kernels"