LinkedIn analytics tracking pixel for AIDOLS AI consulting website performance measurement
Infrastructure

FlashAttention

FlashAttention is an exact attention algorithm that reorders computation to minimize GPU high-bandwidth-memory (HBM) reads and writes, making attention 2-4x faster than standard implementations without changing outputs.

Full definition

Introduced by Dao et al. (Stanford, 2022), FlashAttention recognizes that standard attention is memory-bound, not compute-bound: most time is spent reading the N×N attention matrix to and from HBM. FlashAttention tiles the computation, computes softmax online, and never materializes the full matrix — yielding wall-clock speedups of 2-4x on training and inference. FlashAttention-2 (2023) and FlashAttention-3 (2024) extend this to Hopper GPUs with asynchronous tensor cores, hitting 75% of theoretical FP16 throughput on H100.

Why it matters

FlashAttention is the default in every modern training stack (PyTorch SDPA, vLLM, TensorRT-LLM, Hugging Face). Workloads still on vanilla attention are paying 2-4x more for the same compute — a clear signal of an immature serving stack.

Example

A research team retrains a 7B model with FlashAttention-2; training time drops from 14 days to 6 days on the same 64xA100 cluster, with bit-identical losses.

Source & further reading

Primary source: Dao et al. — "FlashAttention: Fast and Memory-Efficient Exact Attention with IO-Awareness" (NeurIPS) (2022).

Citation policy: this entry is part of the AIDOLS AI Implementation Glossary and may be quoted for research, journalism, and education with attribution to aidolsgroup.com/es/glossary/flash-attention/.