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/
Metadata
Release files for tokenspeed-fa4 4.0.0.post20260923
For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.
Built distribution (wheel)
| File | Interpreter | ABI | Platform | Reset |
|---|---|---|---|---|
| tokenspeed_fa4-4.0.0.post20260923-py3-none-any.whl | Python 3 | none | any | Details |
Release files / tokenspeed_fa4-4.0.0.post20260923-py3-none-any.whl
| Download URL | tokenspeed_fa4-4.0.0.post20260923-py3-none-any.whl |
|---|---|
| Size | 402.9 kB |
| Tags | Python 3 |
|
SHA-256 checksum How to use checksums |
cf429aa1d35ee5bacbeb671d6493e95a63c0f38783bd631281e4229a60bb791c
|
|
BLAKE2b-256 checksum How to use checksums |
f8e48e4efaca38b31584eaa94974c63039726dbbde3a375bcc0f4103cafba87b
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
Yes |
| Uploaded via |
twine/7.0.0 CPython/3.13.14
|