# Dao-AILab/flash-attention

Fast and memory-efficient exact attention

Repository: https://github.com/Dao-AILab/flash-attention
Canonical: https://ross.abutalabs.com/products/flash-attention
Language: Python
License: BSD-3-Clause
License Family: permissive
Last push: 2026-08-26T08:47:00+00:00

## Health v2 (maintenance only)
Score: 95/100 (v2, computed 2026-09-03T02:20:16.233290+00:00)
- activity 99, release rhythm 87, longevity 100
- inputs: {"age_days": 1567, "days_push": 7, "days_rel": 84, "gap_med": 0, "n_releases_24m": 24}
- flags: none
- formula: round(0.45*activity + 0.35*rhythm + 0.20*longevity); archived -> min(score, 10)

## Adoption (not part of the score)
Stars 24787, forks 3010 (observed 2026-08-28T04:11:37.642717+00:00)

## What it is
Official implementation of FlashAttention, FlashAttention-2, -3, and -4: fast and memory-efficient exact attention kernels for GPUs. It accelerates transformer training and inference on NVIDIA (and ROCm) hardware with IO-aware CUDA kernels.

## Use cases
- speed up transformer training on GPUs
- reduce memory usage of attention in LLM training
- run attention efficiently on H100 GPUs
- train large language models faster
- use exact attention instead of approximations
- benchmark attention kernel performance

## When to choose
- you train or fine-tune transformers on NVIDIA GPUs and need faster, memory-efficient attention
- you need exact attention with long sequences that would otherwise OOM
- you target Hopper/Blackwell GPUs and want optimized FP16/BF16/FP8 kernels

## When to avoid
- you are not using GPU-accelerated PyTorch with CUDA or ROCm
- you need Windows support or non-CUDA hardware
- you only need a high-level API and prefer frameworks that bundle attention kernels already

## Facets
- artifact type: library
- maturity: active
- function: machine-learning, deep-learning, gpu-computing, benchmarking
- domain: deep-learning, large-language-models, gpu-computing, machine-learning
- platform: python
- tags: attention, transformers, cuda-kernels, pytorch, memory-efficiency, flash-attention, linux, gpu, cuda

## Member repositories
- Dao-AILab/flash-attention (main) score 95

## Provenance
- Observed fields: from GitHub, fetched 2026-08-28T04:11:37.642717+00:00.
- Health v2: computed from the inputs above; adoption is never an input.
- Inferred fields (summary, facets, guidance): AI-extracted, prompt v1, taxonomy v1, on 2026-08-29T16:56:09.518640+00:00, confidence not recorded.
  - readme: https://github.com/Dao-AILab/flash-attention (fetched 2026-08-28T04:11:37.642717+00:00, sha e0f876a0d696)
- Data as of 2026-08-30T08:39:29.467469+00:00.
