Skip to main content

🦆 QuACK: A Quirky Assortment of CuTe Kernels 🦆

Kernels are written in the CuTe-DSL.

Installation

# For CUDA 12.9:
pip install tokenspeed-quack

# For CUDA 13.x:
pip install 'tokenspeed-quack[cu13]' --extra-index-url https://download.pytorch.org/whl/cu130

# Do not use uv for CUDA 13.x installs yet: it can race/install
# nvidia-cutlass-dsl[cu13] in the wrong order (NVIDIA/cutlass#3259):
# https://github.com/NVIDIA/cutlass/issues/3259

# Optional: install NVIDIA matmul heuristics for better untuned GEMM configs
pip install 'tokenspeed-quack[heuristics]'

# Optional: JAX bindings (pulls in jax and jax-tvm-ffi)
pip install 'tokenspeed-quack[jax]'

Requirements

  • H100, B200/B300, or RTX 50 GPU
  • CUDA toolkit 12.9+
  • Python 3.12

Kernels 🐥

  • 🦆 RMSNorm forward + backward
  • 🦆 Softmax forward + backward
  • 🦆 Cross entropy forward + backward
  • 🦆 Layernorm forward + backward
  • 🦆 Hopper gemm + epilogue
  • 🦆 Blackwell gemm + epilogue
  • 🦆 Blackwell GeForce gemm + epilogue

Usage

from quack import rmsnorm, softmax, cross_entropy

JAX bindings are also available for some kernels (see docs/jax.md):

from quack.softmax_jax import softmax

Documentations

  • JAX interface — optional jax + jax-tvm-ffi bindings, see quack/softmax_jax.py for an example.

[2025-07-10] We have a comprehensive blogpost on how to get memory-bound kernels to speed-of-light, right in the comfort of Python thanks to the CuTe-DSL.

Performance

See our blogpost for the details.

Development

To set up the development environment:

pip install -e '.[dev]'
pre-commit install

# For CUDA 13.x:
pip install 'tokenspeed-quack[dev,cu13]' --extra-index-url https://download.pytorch.org/whl/cu130

# Do not use uv for CUDA 13.x installs yet; use pip instead.
# See https://github.com/NVIDIA/cutlass/issues/3259

Download files

Download the file for your platform. If you're not sure which to choose, learn more about installing packages.

Source Distribution

tokenspeed_quack-0.6.4.post20260829.tar.gz (848.9 kB view details)

Uploaded Source

Built Distribution

If you're not sure about the file name format, learn more about wheel file names.

tokenspeed_quack-0.6.4.post20260829-py3-none-any.whl (730.8 kB view details)

Uploaded Python 3

File details

Details for the file tokenspeed_quack-0.6.4.post20260829.tar.gz.

File metadata

File hashes

Hashes for tokenspeed_quack-0.6.4.post20260829.tar.gz
Algorithm Hash digest
SHA256 897588ed465f09cca8d8f4ed79c84fc10493e645b53bbccbffd7eff69d418d87
MD5 4231fe74e127acaabb85449f0bb4b9b8
BLAKE2b-256 531ca11ab235ce01bef622d1439ba7861860d668d94af7d497e23d2f87dd7e8c

See more details on using hashes here.

Provenance

The following attestation bundles were made for tokenspeed_quack-0.6.4.post20260829.tar.gz:

Publisher: tokenspeed-quack.yml on lightseekorg/tokenspeed-third-party

Attestations: Values shown here reflect the state when the release was signed and may no longer be current.

File details

Details for the file tokenspeed_quack-0.6.4.post20260829-py3-none-any.whl.

File metadata

File hashes

Hashes for tokenspeed_quack-0.6.4.post20260829-py3-none-any.whl
Algorithm Hash digest
SHA256 fc846ce2d72aa76661d5c7d3026331e0ccc50d4de4674765cfbac7cb19f0880a
MD5 ba3d7282a7baa9aff1f941c49c5951e5
BLAKE2b-256 102675943cea6a4eb063e28ca04741cf2fcc6d3c810764e0ee731207c8cce59c

See more details on using hashes here.

Provenance

The following attestation bundles were made for tokenspeed_quack-0.6.4.post20260829-py3-none-any.whl:

Publisher: tokenspeed-quack.yml on lightseekorg/tokenspeed-third-party

Attestations: Values shown here reflect the state when the release was signed and may no longer be current.

Release history Release notifications | RSS feed

This release

0.6.4.post20260829 This release

2 files

Anthropic, PBC Visionary sponsor Bloomberg Visionary sponsor Hudson River Trading Visionary sponsor Meta Visionary sponsor NVIDIA Visionary sponsor Microsoft Sustainability sponsor Depot Continuous Integration AWS Cloud computing and Security Sponsor Datadog Monitoring Fastly CDN Google Download Analytics Sentry Error logging StatusPage Status page