Summary
bycloud explains why FlashAttention became one of the most important algorithms behind practical large language models. As context windows grow from 64,000 to 256,000 tokens and toward 1 million, the attention matrix grows quadratically, making attention a central efficiency bottleneck that techniques like quantization, mixture of experts, grouped query attention, and speculative decoding do not directly solve.
The video shows that the real problem is not arithmetic but memory movement. Standard attention writes giant intermediate matrices to GPU high-bandwidth memory (HBM) and reads them back repeatedly, creating a memory wall that leaves the GPU idle. FlashAttention avoids this by computing attention in blocks with an online softmax that rescales partial results, cutting HBM reads and writes from about 40.3 GB to 4.4 GB and runtime from 41.7 ms to 7.3 ms versus a PyTorch baseline, while keeping the exact same math.
It then covers FlashAttention 2, which addressed the fact that the first version reached only 25 to 40% of an A100’s theoretical throughput versus 80 to 90% for optimized matrix multiplication. The changes include parallelizing across sequence length to improve occupancy and rethinking how warps divide work inside thread blocks.
📺 Source: bycloud · Published December 01, 2026
🏷️ Format: Deep Dive







