mjun0812/flash-attention-prebuild-wheels

Provide with pre-build flash-attention 2 and 3 package wheels on Linux and Windows using GitHub Actions

What it solves

Building flash-attention from source takes a very long time and uses a lot of computing resources. This project saves you that effort by providing pre-built wheel files (ready-to-install packages) for flash-attention, including combinations of CUDA and PyTorch versions that are not officially distributed by the flash-attention project itself.

How it works

The repository hosts compiled wheel files for flash-attention across many platforms (Linux x86_64, Linux ARM64, Windows, and Linux x86_64 with ROCm for AMD GPUs). Each wheel is named following a clear pattern that includes the flash-attention version, the CUDA version (or ROCm version), the PyTorch version, and the Python version. For example, flash_attn-2.6.3+cu124torch2.5-cp312-cp312-linux_x86_64.whl means flash-attention 2.6.3, CUDA 12.4, PyTorch 2.5, Python 3.12, Linux x86_64.

You can find the right wheel using the search page, the packages list, or the releases page. Then you either install directly with pip using a URL, or download the file and install it locally with pip.

The wheels are built using a mix of GitHub-hosted runners, self-hosted runners, and AWS CodeBuild. Since v0.8.0, Flash Attention 3 wheels are also available (they require Hopper GPUs or newer and CUDA 12.3+). Since v0.7.0, Linux x86_64 wheels are built with manylinux2_28, making them compatible with older glibc versions (<=2.17). Since v0.5.0, wheels include a local version label that records the CUDA and PyTorch versions (e.g., flash_attn==2.8.3+cu130torch2.9).

Who it’s for

This is for developers and researchers who use flash-attention in their PyTorch projects and need a quick, reliable install without compiling from source. It is especially useful when you need a version combination (Python version, CUDA version, PyTorch version) that isn’t provided by the official flash-attention releases, or when you are on ARM64 or Windows where building is even harder.

Highlights

  • Provides pre-built wheels for 1,112 combinations across Linux x86_64, Linux ARM64, Windows, and Linux x86_64 (ROCm), with 100% coverage of the officially available versions.
  • Includes wheels for Flash Attention 3 (since v0.8.0) and ROCm/AMD GPU support (Flash Attention 2, built with Composable Kernel backend, supporting MI200/MI300/MI350 and RDNA 3/3.5/4 GPUs).
  • Offers a search page to easily find the correct wheel file for your environment.
  • You can fork the repository and trigger your own build via GitHub Actions if a specific version is missing.
  • The maintainer accepts sponsorships to help cover the infrastructure costs of building and hosting these wheels.

Related

  • Project
  • Project
  • Project
  • Project
  • Project