Skip to content

v0.12.0

Choose a tag to compare

@github-actions github-actions released this 24 Jan 12:23
· 74 commits to main since this release

New features

Merge of kernels and kernel-builder repositories

kernel-builder has been merged into the kernels repository. This makes it easier for us to coordinate changes that affect both the kernels Python library and the builder. To switch to the new repo when building kernels, replace the following line in flake.nix

kernel-builder.url = "github:huggingface/kernel-builder";

by

kernel-builder.url = "github:huggingface/kernels";

As a result of the merge, the documentation of kernel-builder is now also available at: https://huggingface.co/docs/kernels/

Support for kernel versions

Before kernels 0.12, kernels could be pulled from a repository without specifying a version. This led to the issue that kernels would typically pull from main. As a result, incompatible changes to the main branch would break downstream use of kernels. To avoid this in the future, we introduce kernel versions. In the future, each kernel will have a major version and when a kernel is uploaded to the Hub, it will be uploaded to the corresponding version branch. The kernel author will bump the kernel version when there are incompatible changes. In this way, kernels can evolve their APIs without breakage for existing users. Versioning can be enabled for a kernel by specifying the version in build.toml:

[general]
version = 1

This will add the kernel version to the kernel's metadata and the kernel upload command will upload builds to the v1 version branch.

Kernel users can pull from a version branch using the version argument. For example:

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

For more information, refer to the guide to adopting kernel versions. Getting kernels without a version is deprecated in kernels 0.12 and will become an error in 0.14 (except for local kernels).

PyTorch 2.10 support

Support for PyTorch 2.10 has been added to the builder. Support for Torch 2.8 has been removed in accordance with our policy to support the two latest Torch versions.

Kernel benchmarks

kernels 0.12 adds the experimental kernels benchmark subcommand. This will run benchmarks for a given kernel, if available. The kernels benchmark command will be extended and documented in the upcoming releases.

What's Changed

New Contributors

  • @onel made their first contribution in #214

Full Changelog: v0.11.7...v0.12.0