Skip to main content

colabfold-legacy-kernels

Prebuilt CUDA kernels to make ColabFold fast on Volta and Turing NVIDIA GPUs. This package has three kernels that replace the Ampere+ Pallas/Triton kernels: Attention, layer norm and the gated dual projection.

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.4.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.4.0
File Interpreter ABI Platform
colabfold_legacy_kernels-0.4.0-py3-none-manylinux_2_28_x86_64.whl Python 3 none Linux glibc 2.28+ x86-64 Details

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

Download URL colabfold_legacy_kernels-0.4.0-py3-none-manylinux_2_28_x86_64.whl
Size 8.1 MB
Tags Linux glibc 2.28+ x86-64 Python 3
SHA-256 checksum
How to use checksums
27f8f6d64997e27155fb23ad73276afe27a08ff7414165941a69b09c59ea1cec
BLAKE2b-256 checksum
How to use checksums
23916a1bcc67e09e1cfbb1c437216f1510ee2a9b09331ae2fe3966e7c5999b00
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
Yes
Uploaded via twine/7.0.0 CPython/3.13.14

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 Sep 22, 2026.

Transparency log

Release history Release notifications | RSS feed

0.5.0

1 release file

This release

0.4.0 This release

1 release file

0.3.0

1 release file

0.2.0

1 release file

0.1.0

1 release file

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