Skip to main content

FlashAttention-4 (CuTeDSL)

FlashAttention-4 is a CuTeDSL-based implementation of FlashAttention for Hopper and Blackwell GPUs.

Installation

pip install flash-attn-4

If you're on CUDA 13, install with the cu13 extra for best performance:

pip install "flash-attn-4[cu13]"

Usage

from flash_attn.cute import flash_attn_func, flash_attn_varlen_func

out = flash_attn_func(q, k, v, causal=True)

Development

git clone https://github.com/Dao-AILab/flash-attention.git
cd flash-attention
pip install -e "flash_attn/cute[dev]"       # CUDA 12.x
pip install -e "flash_attn/cute[dev,cu13]"  # CUDA 13.x (e.g. B200)
pytest tests/cute/

Download files

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

Source Distributions

No source distribution files available for this release.See tutorial on generating distribution archives.

Built Distribution

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

tokenspeed_fa4-4.0.0.post20260815-py3-none-any.whl (402.9 kB view details)

Uploaded Python 3

File details

Details for the file tokenspeed_fa4-4.0.0.post20260815-py3-none-any.whl.

File metadata

File hashes

Hashes for tokenspeed_fa4-4.0.0.post20260815-py3-none-any.whl
Algorithm Hash digest
SHA256 2d486c9904ed702e48a1afc9dcb12210df4a4319ea647f4a3c242c853221b3ac
MD5 be57943cd0a1fe76b7e10649bba8a4f1
BLAKE2b-256 e00a81650093e6f9e6f4c3666b3d3e207adf23cc87e28b976c1f0c5ac4941d46

See more details on using hashes here.

Provenance

The following attestation bundles were made for tokenspeed_fa4-4.0.0.post20260815-py3-none-any.whl:

Publisher: tokenspeed-fa4.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

4.0.0.post20260815 This release

1 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