flâneur

What is Flash Attention? · Biao's Blog

hebiao064.github.io · 1,261 words · saved by 1 readers

A blog about my thoughts on ML Sys and LLMs

Blog What is Flash Attention? A visual explanation of Flash Attention and how IO-aware tiling reduces memory traffic for modern attention kernels. April 3, 2025 Water Lilies Claude Monet, 1906 Art Institute of Chicago Introduction Flash Attention1 is an IO-aware exact attention algorithm that uses tiling to reduce the number of memory reads/writes between GPU high bandwidth memory (HBM) and GPU on-chip SRAM. It has been widely used in LLM inference and training, and is the default attention backend in modern serving engines like SGLang, vLLM, etc. Naive Attention Calculation Before…

saved by

related reading