FlashAttention-2 significantly boosts GPU utilization from 25-40% (FlashAttention 1) to 50-73% of theoretical peak FLOPs/s on A100 GPUs, closely matching the efficiency of raw matrix multiplication operations. This improved hardware efficiency enables training Large Language Models with 2x longer context windows at the same computational cost.