Skip to main content

colabfold-legacy-kernels

Prebuilt CUDA kernels to make ColabFold fast on Volta and Turing NVIDIA GPUs. This package has kernels that replace the Ampere+ Pallas/Triton kernels: Attention, layer norm and the gated dual projection, and the AF2 pair-stack fusions that fold a LayerNorm into the projection after it: the tri-mul gated projection and epilogue, the attention input and output projections and the transition (ln_gated_dual_proj, trimul_epilogue, ln_projection, output_projection, transition; widths 64 and 128).

import colabfold_legacy_kernels as clk
clk.available(cc=70)                  # True if the wheel has kernels for sm_70
clk.library_path("attention", cc=70)  # path of the shared library
clk.symbol("attention", cc=70)        # XLA FFI target name to register

The attention kernel also has a backward pass on both architectures, so a model can be trained or designed against it. It returns dQ, dK, dV and dBias. MSA attention takes q, k and v from the MSA and the pair representation only as that bias, so dBias is the one path a gradient has back to the pair trunk.

clk.symbol("attention_bwd", cc=75)  # VoltaMmaBwd   dq, dk, dv, dbias
clk.symbol("attention_bwd", cc=70)  # VoltaWmmaBwd  the same, with wmma

The backward rebuilds the softmax from lse, the second result of the forward. Pass want_lse=False and a one element buffer for it when only inferring, and want_dbias=False when the bias takes no gradient.

To build the kernels, run the build script. It needs nvcc and the XLA FFI headers, and fetches CUTLASS itself.

NVCC=/usr/local/cuda-12.9/bin/nvcc scripts/build_all.sh   # sm_70 and sm_75
ARCH=75 scripts/build_kernels.sh                          # one architecture

Metadata

Release files for colabfold-legacy-kernels 0.6.0

For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.

Built distribution (wheel)

Table of built distributions (wheels) for colabfold-legacy-kernels 0.6.0
File Interpreter ABI Platform Actions
colabfold_legacy_kernels-0.6.0-py3-none-manylinux_2_28_x86_64.whl Python 3 none Linux glibc 2.28+ x86-64 Details for colabfold_legacy_kernels-0.6.0-py3-none-manylinux_2_28_x86_64.whl

Release files / colabfold_legacy_kernels-0.6.0-py3-none-manylinux_2_28_x86_64.whl

Download URL colabfold_legacy_kernels-0.6.0-py3-none-manylinux_2_28_x86_64.whl
Size 10.1 MB
Tags Linux glibc 2.28+ x86-64 Python 3
SHA-256 checksum
How to use checksums
71d53745a3b6985ca45698358e2c5cae53ea1378cc7c9fbb90526ab9a8f76608
BLAKE2b-256 checksum
How to use checksums
41b609a4a0cbbbd031a97a4d44d2a83f253e5a06bcca473e2f26fafde5a169ec
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
Yes
Uploaded via twine/7.0.0 CPython/3.13.16

Provenance

Provenance describes where a file came from. On PyPI, provenance is shared via attestations, which provide a verifiable record of the build or publishing details. View details, limitations and caveats.

PyPI Publish Attestation

PyPI verified that this artifact, at this checksum, originated from the publisher listed below.

Signed by GitHub Actions, verified by PyPI on Oct 23, 2026.

Transparency log

Security for colabfold-legacy-kernels 0.6.0

Provenance

Provenance describes where a file came from. On PyPI, provenance is shared via attestations, which provide a verifiable record of the build or publishing details. View details, limitations and caveats.

Full provenance

All 1 file in this release has been uploaded with provenance metadata.

Attestation for colabfold_legacy_kernels-0.6.0-py3-none-manylinux_2_28_x86_64.whl

PyPI Publish Attestation

PyPI verified that this artifact, at this checksum, originated from the publisher listed below.

Signed by GitHub Actions, verified by PyPI on Oct 23, 2026.

Transparency log

A note on package security

PyPI is a repository for distributing packages, not a service for auditing them. While third-party security researchers and our staff do their best to detect and remove malicious packages, PyPI cannot guarantee the quality, security or suitability of any given package.

To learn more about protecting yourself from malicious actors, visit our package security documentation.

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