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
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"