Kernels documentation

Installation

Hugging Face's logo
Join the Hugging Face community

and get access to the augmented documentation experience

to get started

Installation

Install the kernels package with pip (requires torch>=2.5 and CUDA):

pip install kernels

Using kernels in a Docker container

Build and run the reference examples/basic.py in a Docker container with the following commands:

docker build --platform linux/amd64 -t kernels-reference -f docker/Dockerfile.reference .
docker run --gpus all -it --rm -e HF_TOKEN=$HF_TOKEN kernels-reference
< > Update on GitHub