Blogs›Together AI›FlashAttention-4 Algorithm and Kernel Co-Design
FlashAttention-4 Algorithm and Kernel Co-Design
FlashAttention-4 introduces algorithm and kernel co-design for asymmetric hardware scaling, specifically targeting Blackwell GPUs. It features new pipelining for maximum overlap of tensor cores, softmax exponential, and memory operations. The forward pass includes software emulation of the exponential function and conditional online softmax rescaling. The backward pass utilizes tensor memory to store intermediate results, reducing shared-memory traffic, and supports a 2-CTA MMA mode. New tile sc. This post details the development and impact of the Kernels Lab, highlighting their work on FlashAttention and the ThunderKittens library for optimizing NVIDIA Blackwell GPUs. It also showcases the Together Megakernel implementation for real-time voice agent workloads, achieving significant latency reductions. The team's approach emphasizes academic-industry symbiosis and customer-facing collaboration for custom kernel optimization.