Skip to content
aicoolies logo
FlashAttention project logo

FlashAttention

Fast memory-efficient GPU attention kernels

FlashAttention is a fast and memory-efficient exact attention implementation that reduces GPU memory usage from quadratic to linear in sequence length. Created by Tri Dao, it achieves 3-4x speedups over baseline implementations through IO-aware tiling that minimizes HBM reads and writes. Versions include FlashAttention-2 with improved parallelism, FlashAttention-3 optimized for Hopper H100 GPUs, and FlashAttention-4 targeting Hopper and Blackwell architectures.

About FlashAttention

FlashAttention fundamentally changed how transformer models compute attention by restructuring the algorithm to be IO-aware. Standard attention implementations materialize the full N×N attention matrix in GPU high-bandwidth memory, creating a quadratic memory bottleneck that limits sequence length. FlashAttention instead tiles the computation so that softmax, masking, and matrix multiplication happen in fast on-chip SRAM, reducing HBM reads and writes by orders of magnitude while computing mathematically exact attention.

The project has evolved through four major versions. FlashAttention-2 improved parallelism and work partitioning for better GPU utilization. FlashAttention-3 introduced optimizations specific to NVIDIA Hopper architecture H100 GPUs, leveraging hardware features like TMA and FP8 support. FlashAttention-4, built with CuTeDSL, targets both Hopper and the newer Blackwell GPU architecture. Each version maintains the core principle of minimizing memory movement while maximizing compute throughput.

The impact on the LLM ecosystem has been significant: FlashAttention enables 10-20x memory savings at typical sequence lengths, allowing models to process much longer contexts on the same hardware. It achieves 3-4x wall-clock speedups over baseline implementations from Hugging Face and other frameworks. Most major LLM training and inference frameworks including PyTorch, Hugging Face Transformers, and vLLM have integrated FlashAttention as their default attention backend, making it one of the most widely deployed GPU kernels in modern AI infrastructure.

Pricing & Platform Specs

Pricing Summary

FlashAttention is a 100% free and open-source software library under the BSD 3-Clause license. Developed by Tri Dao and Dao-AILab, it accelerates Transformer training and inference on NVIDIA GPUs without any software licensing fees or subscriptions.

Supported Platforms

CUDA kernels; Python/PyTorch interface

Explore categories, tags & use cases

Categories

ML experiment tracking and model monitoring

Weights & Biases is an AI developer platform for experiment tracking, artifact and model lineage, model monitoring, and Weave-based LLM evaluation. It helps teams log runs, compare metrics, manage datasets and model artifacts, and collaborate through dashboards, reports, alerts, SSO/RBAC controls, and hosted or self-managed deployment options.

freemium

Data factory for AI teams and model training

Labelbox is a comprehensive data platform for AI teams handling reinforcement learning, evaluations, robotics, and human feedback workflows. Core capabilities include RL data generation with knowledge work rubrics, custom evaluations for private benchmarks and model comparisons, robotics data with full-stack video and trajectories, and an expert network of 1.5M+ knowledge workers including 50K+ PhDs. Trusted by 80% of leading AI labs for production data operations.

freemium

Community experience

Sources & verification

Sources checked
Content verified

Verification dates are editorial checks. Routine CMS saves and automatic updatedAt timestamps do not advance them.

FAQ

What is FlashAttention?

FlashAttention is a fast and memory-efficient exact attention implementation that reduces GPU memory usage from quadratic to linear in sequence length. Created by Tri Dao, it achieves 3-4x speedups over baseline implementations through IO-aware tiling that minimizes HBM reads and writes. Versions include FlashAttention-2 with improved parallelism, FlashAttention-3 optimized for Hopper H100 GPUs, and FlashAttention-4 targeting Hopper and Blackwell architectures.

Is FlashAttention free?

Yes — FlashAttention is open source and free to use. FlashAttention is a 100% free and open-source software library under the BSD 3-Clause license. Developed by Tri Dao and Dao-AILab, it accelerates Transformer training and inference on NVIDIA GPUs without any software licensing fees or subscriptions.

Is FlashAttention open source?

Yes — FlashAttention is open source.

Is FlashAttention still maintained?

Yes — FlashAttention is active. Its listing was last verified on August 26, 2026.

What are the best FlashAttention alternatives?

The first editor-selected FlashAttention alternatives are Weights & Biases, Labelbox.