---
title: "Making FlashAttention-4 faster for inference"
description: "Modal engineers extended the FlashAttention-4 kernel for decode-heavy LLM inference on Blackwell GPUs through two kinds of change: new parallelism strategies, such as split-KV parallelism across the key/value dimension, and support for irregular memory access via cp.async in place of TMA bulk loads."
url: "https://swe.quest/articles/making-flashattention-4-faster-for-inference-dc917e70c20e0f22"
canonical: "https://modal.com/blog/flash-attention-4-faster"
source: "Modal"
published: "2026-06-11"
difficulty: "hard"
kind: "Deep dive"
reading_minutes: 14
tags: ["inference","hardware","performance","llms"]
---

# Making FlashAttention-4 faster for inference

A post on [Modal](https://swe.quest/sources/modal.md), published 2026-06-11, 14 min read, Deep dive. Original: [https://modal.com/blog/flash-attention-4-faster](https://modal.com/blog/flash-attention-4-faster)

## Summary

Modal engineers extended the FlashAttention-4 kernel for decode-heavy LLM inference on Blackwell GPUs through two kinds of change: new parallelism strategies, such as split-KV parallelism across the key/value dimension, and support for irregular memory access via cp.async in place of TMA bulk loads. FP8 inputs gave up to 1.16x throughput over bf16, likely limited by the softmax, which still runs at higher precision. Arbitrary KV page sizes help prefix sharing, reduce fragmentation and suit speculative decoding, and a transposed warp-level address-generation scheme made them up to 2.4x faster. Split-KV raised small-query memory throughput by up to 4.37x, keeping SMs busy that the original query-parallel design left idle.

Written by swe.quest, not by the author.

**Difficulty:** Hard: written for specialists in the field

## Topics

- [Inference & serving](https://swe.quest/tags/inference.md) (AI & ML)
- [Hardware](https://swe.quest/tags/hardware.md) (Infrastructure)
- [Performance engineering](https://swe.quest/tags/performance.md) (Reliability & operations)
- [LLMs](https://swe.quest/tags/llms.md) (AI & ML)

## Prerequisites

- GPU programming with CUDA ([easy posts on Hardware](https://swe.quest/tags/hardware.md?difficulty=easy))
- attention mechanism
- paged KV cache ([easy posts on Caching](https://swe.quest/tags/caching.md?difficulty=easy))
- warp-level memory coalescing

## Keywords

FlashAttention-4, CuTe DSL, Blackwell, Tensor Memory Accelerator, cp.async, FP8, split-KV, B200

## Related posts

- [FlashAttention-4: Algorithm and Kernel Pipelining Co-Design for Asymmetric Hardware Scaling](https://swe.quest/articles/flashattention-4-algorithm-and-kernel-pipelining-co-design-for-asymmetric-67fe95e5005d9861.md): Together AI · 2026-03-05 · Hard · 11 min read · Inference & serving, Performance engineering, Hardware, Model training, LLMs
  FlashAttention-4 is an attention kernel co-designed for Blackwell GPUs, where tensor core throughput grew much faster than the exponential (SFU) units and shared memory bandwidth.
- [We reverse-engineered Flash Attention 4](https://swe.quest/articles/we-reverse-engineered-flash-attention-4-e0ddc41706e090a5.md): Modal · 2025-09-26 · Hard · 18 min read · Inference & serving, Hardware, Performance engineering, Concurrency, LLMs
  Flash Attention 4, Tri Dao's attention kernel for Nvidia Blackwell GPUs, reportedly runs about 20% faster than cuDNN's closed-source attention kernels.
- [Optimizing your LLM in production](https://swe.quest/articles/optimizing-your-llm-in-production-aa5bbb901928fa57.md): Hugging Face · 2023-09-15 · Medium · 31 min read · Inference & serving, LLMs, Performance engineering, Python
  Serving billion-parameter LLMs efficiently comes down to three levers: lower precision, Flash Attention, and inference-friendly architectures such as ALiBi, rotary embeddings, Multi-Query Attention and Grouped-Query Attention.
- [Key research and product announcements at the AI Native Conf](https://swe.quest/articles/key-research-and-product-announcements-at-the-ai-native-conf-07f3b657efde83f0.md): Together AI · 2026-03-05 · Hard · 7 min read · Inference & serving, Hardware, Model training, AI agents, Performance engineering
  Together AI announced seven research and product releases spanning GPU kernels, reinforcement learning infrastructure and inference optimization.
- [Profiling in PyTorch (Part 3): Attention is all you profile](https://swe.quest/articles/profiling-in-pytorch-part-3-attention-is-all-you-profile-44c4f73b7586bec2.md): Hugging Face · 2026-07-10 · Medium · 21 min read · Performance engineering, Inference & serving, Python, Hardware, LLMs
  Profiling attention variants in PyTorch on an A100 shows how each implementation appears in profiler traces.

Browse: [Latest posts](https://swe.quest/index.md) · [Topics](https://swe.quest/tags.md) · [Sources](https://swe.quest/sources.md) · [Topic map](https://swe.quest/map.md) · [Site guide (llms.txt)](https://swe.quest/llms.txt)
