FlashAttention

IO-aware attention, FlashAttention-2, FlashAttention-3

Infrastructure

Foundations

Soft glowing orange and yellow light with a gradient blending into black background.
TL;DR
An IO-aware, exact attention algorithm that accelerates Transformer training and inference by optimizing memory transfers between different levels of GPU memory.

In depth

Standard attention implementations are heavily bottlenecked by memory read and write operations because they store intermediate attention matrices of quadratic size in high-bandwidth memory. This algorithm resolves this limitation by dividing the attention computation into smaller tiles that fit directly inside the GPU's fast, on-chip static random-access memory. By strategically tiling inputs and using an online softmax procedure, it calculates exact attention results without ever writing the massive intermediate matrices back to the slower main memory.

Why this matters for your business

This breakthrough dramatically speeds up Transformer execution, lowering training costs and making massive context windows of millions of tokens economically viable.

Ready to Scale AI Across Your Organization?

Talk to an AI expert
Exit cross icon
Exit cross icon