# FlashAttention-3: Fast and Accurate Attention with Asynchrony and Low-precision

- **ID:** 575
- **Kind:** paper
- **URL:** https://arxiv.org/abs/2407.08608
- **Authors:** Jay Shah, Ganesh Bikshandi, Ying Zhang, Vijay Thakkar, Pradeep Ramani, Tri Dao
- **Venue:** arXiv / Colfax International / Meta / NVIDIA
- **Published:** 2024
- **License:** CC BY 4.0
- **License family:** Permissive (auto-classified)
- **Tags:** flashattention-3, hopper, wgmma, tma, fp8, warp-specialization, colfax, nvidia, meta, attention
- **Topics:** attention kernels, Hopper GPUs, FP8
- **Added:** 2026-10-01
- **Research status:** done
- **Page:** https://papers.projxon.ai/entries/575

## Summary

FlashAttention-3 redesigns FA2 for Hopper: warp-specialized TMA/WGMMA producer-consumer, pingpong scheduling so softmax hides under GEMM, and FP8 with in-kernel V transpose, block quantization, and Hadamard incoherent processing. H100 FP16 is 1.5-2.0× FA2 (up to 740 TFLOPs/s, 75% util) and 1.5-1.75× backward; FP8 reaches ~1.2 PFLOPs/s with 2.6× lower RMSE vs per-tensor FP8 on outlier-injected QKV. Competitive with or faster than cuDNN FA2 at seq≥1k. Code https://github.com/Dao-AILab/flash-attention.

## Attributes

- **Purpose:** Speed up exact attention on Hopper with warp-specialized asynchrony and FP8
- **Scale:** H100 80GB SXM5; seq 512–16k at 16k tokens, hidden 2048, headdim 64/128/256; FP16/FP8 fwd/bwd vs FA2, Triton FA2, cuDNN, PyTorch. Ablation {batch,seq,nheads,hdim}={4,8448,16,128}: 661 vs 570 TFLOPs/s without warp-spec+pipelining.
- **Time period:** 2024-07-11 (arXiv 2407.08608 v1); last revised 2024-07-12 (v2). HF paper publishedAt 2024-07-11.

## From the source (fetched 2026-10-03)

- **Published:** Jul 11, 2024 (arXiv)
- **Last revised:** Jul 12, 2024 (arXiv)
- **arXiv categories:** cs.LG, cs.AI (arXiv)
- **Citations:** 719 (75 influential) (Semantic Scholar)
- **References:** 61 (Semantic Scholar)
- **Published in:** Neural Information Processing Systems (Semantic Scholar)

## Abstract

Attention, as a core layer of the ubiquitous Transformer architecture, is the bottleneck for large language models and long-context applications. FlashAttention elaborated an approach to speed up attention on GPUs through minimizing memory reads/writes. However, it has yet to take advantage of new capabilities present in recent hardware, with FlashAttention-2 achieving only 35% utilization on the H100 GPU. We develop three main techniques to speed up attention on Hopper GPUs: exploiting asynchrony of the Tensor Cores and TMA to (1) overlap overall computation and data movement via warp-specialization and (2) interleave block-wise matmul and softmax operations, and (3) block quantization and incoherent processing that leverages hardware support for FP8 low-precision. We demonstrate that our method, FlashAttention-3, achieves speedup on H100 GPUs by 1.5-2.0$\times$ with FP16 reaching up to 740 TFLOPs/s (75% utilization), and with FP8 reaching close to 1.2 PFLOPs/s. We validate that FP8 FlashAttention-3 achieves 2.6$\times$ lower numerical error than a baseline FP8 attention.

## Research notes

- Primary: arxiv abs (cs.LG; also cs.AI). License CC BY 4.0 on HTML at check. Equal contrib Shah/Bikshandi (Colfax); Zhang Meta; Thakkar/Ramani NVIDIA; Dao tri@tridao.me. Code https://github.com/Dao-AILab/flash-attention (24,706 stars at check; BSD-3-Clause). HF paper page 2 upvotes; unofficial linked models ethanker/nanomind-step-002000 and AshenNav/twill-swp-ws not copied into hf_* fields. Discord posted abs. Kernel library, not a new corpus, so no datasets_local row.

## Cited by, within this collection

- [Parallax: Parameterized Local Linear Attention for Language Modeling](https://papers.projxon.ai/entries/497) (model 2026, #497)
- [DualKV: Shared-Prompt Flash Attention for Efficient RL Training with Large Rollouts and Long Contexts](https://papers.projxon.ai/entries/500) (paper 2026, #500)
- [SageAttention: Accurate 8-Bit Attention for Plug-and-play Inference Acceleration](https://papers.projxon.ai/entries/570) (paper 2024, #570)
- [How Much Is One Recurrence Worth? Iso-Depth Scaling Laws for Looped Language Models](https://papers.projxon.ai/entries/699) (paper 2026, #699)
- [Differential Transformer](https://papers.projxon.ai/entries/906) (paper 2024, #906)
- [Pretraining Large Language Models with NVFP4](https://papers.projxon.ai/entries/946) (paper 2025, #946)

## Similar entries

- [Flash-MSA: Accelerating Million-Token Training With Sparse Attention Kernels](https://papers.projxon.ai/entries/627) (other, #627)
- [xattn](https://papers.projxon.ai/entries/782) (code, #782)
- [High-Dimensional Learning Dynamics of Attention-Indexed Models](https://papers.projxon.ai/entries/823) (paper, #823)
- [MoBA: Mixture of Block Attention for Long-Context LLMs](https://papers.projxon.ai/entries/707) (paper, #707)
- [The Spike, the Sparse and the Sink: Anatomy of Massive Activations and Attention Sinks](https://papers.projxon.ai/entries/1263) (paper, #1263)
- [Emergent One-Third Scaling Law as Attention Tries to Concentrate](https://papers.projxon.ai/entries/852) (paper, #852)
