# FlashAttention

> Fast, memory-efficient exact attention kernels for training and running transformers on GPUs

Source: https://talira.ai/catalog/flashattention-7z5qwqsr
Every listing: https://talira.ai/catalog.md

- Kind: Open source
- Types: Library
- Categories: [ai / ml / gpu kernels](https://talira.ai/categories/ai/ml/gpu-kernels)
- Platforms: linux[^1]
- Licence: BSD-3-Clause[^2]
- Pricing: Free and open source[^1]
- Free tier: yes[^1]
- Backed by: [Dao AI Lab](https://talira.ai/orgs/dao-ai-lab.md)

FlashAttention is the official implementation of FlashAttention and FlashAttention-2, fast and memory-efficient exact attention for transformers, from Tri Dao and colleagues' papers. It installs from PyPI as flash-attn for PyTorch on NVIDIA CUDA or AMD ROCm. The repository also carries FlashAttention-3, a beta optimised for Hopper GPUs such as the H100, and FlashAttention-4, written in CuTeDSL for Hopper and Blackwell GPUs and published as flash-attn-4.

## Links

- GitHub: https://github.com/Dao-AILab/flash-attention

## Problems it solves

- speed up transformer training and cut its GPU memory use
- fit longer sequences into my GPU's memory when training a model
- use the fastest attention kernels on H100 or Blackwell GPUs

## Features

- FlashAttention and FlashAttention-2 exact attention
- NVIDIA CUDA and AMD ROCm support
- FlashAttention-3 beta for Hopper GPUs
- FlashAttention-4 in CuTeDSL for Hopper and Blackwell

## Limitations

- Linux only; Windows may work from v2.3.2 but isn't well tested[^1]
- Needs a CUDA or ROCm toolkit and PyTorch 2.2+, and compiling without ninja can take about two hours[^1]

## Trust

Overall: 0.75 out of 1.
Signals: maintenance 1.00, adoption 0.88, momentum 0.81, community 0.95, backing 0.30, extensibility 0.00.

- last commit today
- 121 commits in the last 90 days
- latest release v2.8.3.post2 48 days ago
- 25.4k GitHub stars
- 234 contributors
- backed by Dao AI Lab

## Alternatives

- [FlashMLA](https://talira.ai/catalog/flashmla-381p09b0.md): DeepSeek's optimized Multi-head Latent Attention kernels for LLM inference on NVIDIA GPUs and Ascend NPUs

## Sources

[^1]: https://github.com/Dao-AILab/flash-attention/blob/main/README.md (checked 29 Nov 2026)
[^2]: https://github.com/Dao-AILab/flash-attention/blob/main/LICENSE (checked 29 Nov 2026)
