skillfed

kernels

Download compute kernels

kernels v0.16.0 3.1M downloads/30d#2,728 on PyPI
Permissive license Apache-2.0 Active released

What it is and what it does

kernels is a Python package that downloads and loads compute kernels from Hugging Face Hub directly into your application at runtime. Rather than bundling kernels statically, it treats them as portable, versioned artifacts that can be loaded from outside the standard Python path, allowing multiple versions of the same kernel to coexist in a single process. The package is built to handle the complexity of varied build configurations across environments.

The typical workflow is to call `get_kernel()` with a Hub repository identifier and optional version number, then invoke kernel functions. This is most useful for performance-critical operations where hand-optimized kernels can provide significant speedup. The package depends on huggingface-hub for Hub communication, packaging and pyyaml for metadata handling, and sigstore for verification.

Use it for:

  • Load optimized kernels from the Hub to accelerate compute-intensive operations in applications.
  • Use multiple versions of the same kernel in a single process for testing or gradual migration.
  • Deploy applications that rely on optimized kernels without pre-installing them in the container.
  • Access community-contributed kernels for specialized operations without vendoring custom code.

Worth the install?

AI-flagged interpretation of the facts on this page — verify before relying

Loads optimized compute kernels from Hugging Face Hub into Python applications at runtime, enabling dynamic kernel loading without modifying PYTHONPATH.

Yes, if you are building applications that benefit from optimized kernels and want to manage them as versioned Hub artifacts. The package is actively maintained, has no known vulnerabilities, and low install friction. However, it requires Python 3.10+ and a working compute environment; without those, it will not function. The Hub kernel ecosystem is still young, so verify that the kernels you need are available and compatible before committing to this approach.

Install

kernels on PyPI

pip

pip install kernels

uv

uv add kernels

poetry

poetry add kernels

Installing kernels

Before you install

Low friction installation with a pure-Python wheel. Active maintenance as of 49 days ago. Requires external CUDA and compute dependencies not managed by pip.

License in practice

Apache-2.0 permissive license allows commercial and private use with minimal restrictions; attribution required.

Quickstart

pip install kernels

from kernels import get_kernel

activation = get_kernel("kernels-community/activation", version=1)

Requires Python 3.10+. Kernels are designed for GPU compute and require a compatible CUDA environment to function.

Verify before relying

  • Whether all kernel implementations in the Hub are compatible with your installed compute environment.
  • Performance characteristics and overhead of dynamic kernel loading compared to static imports.
  • Specific PyTorch version requirements beyond what the description excerpt states.

Package facts

License Apache-2.0 (permissive)
Python support supports the current Python release (>=3.10)
Install friction low — pure-Python wheel
Runtime dependencies 8 — huggingface-hub, kernels-data, packaging, pyyaml, sigstore, tomli, typing-extensions, tomlkit
Maintenance actively maintained — 49 days since the last release
First released
Downloads 3,147,289/month — #2,728 on PyPI (30-day window, as of 2026-08-14)
Known vulnerabilities none known (OSV.dev, checked 2026-08-14)

Evidence: kernels-0.16.0-py3-none-any.whl

Tags

load compute kernels from hubdynamic kernel loadinghuggingface kernel managementoptimized cuda kernelsportable kernel loading
kernel-loadinggpu-computehub-integration

More Artificial Intelligence packages