FlashPrefill V2 speeds up long-context LLM prefill up to 47x

Long-context inference in large language models is bottlenecked by the quadratic cost of attention, especially during the compute-heavy prefill phase that processes the input before generation begins. An earlier system called FlashPrefill addressed this with instantaneous pattern discovery and max-based dynamic thresholding to skip unnecessary computation, but it stayed an algorithmic prototype, far from something a production inference stack could run.
FlashPrefill V2 moves that prototype toward practical serving along three lines of work. First, the authors add a mean correction term that suppresses the approximation error introduced by sparsity, keeping accuracy loss manageable even at extreme sparsity levels. Second, they redesign the sparse attention operator itself: PackGQA memory access, warp specialization and pingpong pipelining bring it in line with the latest FlashAttention-3/4 implementations, and it now supports FP8 inference for practical quantized deployments. Third, FlashPrefill V2 natively handles paged KV cache and continuous batching, so it can plug in as an attention backend inside serving frameworks such as SGLang rather than staying a standalone benchmark.
Tested on Nvidia H20 GPUs, described by the authors as among the most widely deployed inference accelerators, FlashPrefill V2 delivers up to 47.26x and 27.19x speedups over FlashAttention-2 at a 128K context length, under FP8 and BF16 precision respectively. Even against a dense attention baseline aligned with FlashAttention-3/4, FP8 inference with FlashPrefill V2 still achieves a 30.49x speedup.
Key facts
- FlashPrefill V2 extends the earlier FlashPrefill prototype from an algorithmic proof of concept toward production-ready long-context serving.
- A new mean correction term suppresses the approximation error from sparse attention, keeping accuracy loss manageable even at extreme sparsity.
- The sparse attention operator is redesigned with PackGQA memory access, warp specialization and pingpong pipelining, aligned with FlashAttention-3/4 and supporting FP8 inference.
- It natively supports paged KV cache and continuous batching, letting it work as an attention backend inside serving frameworks such as SGLang.
- On Nvidia H20 GPUs at 128K context length, it reaches up to 47.26x (FP8) and 27.19x (BF16) speedups over FlashAttention-2, and 30.49x over an FA3/4-aligned dense baseline in FP8.
Why it matters
Prefill, the pass that processes an entire long prompt before generation starts, scales quadratically with context length and is a major bottleneck for long-context LLM serving. The original FlashPrefill cut that cost algorithmically but never left prototype stage. FlashPrefill V2 closes the gap between a research idea and something an inference stack can actually run in production, with error correction, a hardware-aligned kernel redesign and native support for the batching mechanics real serving systems use.
Who it affects
Teams that operate long-context LLM inference at scale, particularly those running on Nvidia H20 GPUs, which the authors describe as among the most widely deployed inference accelerators. Because FlashPrefill V2 is built to slot into serving frameworks such as SGLang as an attention backend, it is relevant to infrastructure and inference engineers rather than end users of a chat product.
How to use it
FlashPrefill V2 is designed as a drop-in attention backend: it supports FP8 inference for quantized deployments and natively handles paged KV cache and continuous batching, the mechanisms modern inference frameworks like SGLang rely on for serving many requests at once. The source gives no pricing, license terms, or confirmation that code or weights have been released.
How solid is it
The results come from the paper's own benchmarks on Nvidia H20 GPUs at a 128K context length, comparing FlashPrefill V2 against FlashAttention-2 and against a dense baseline aligned with FlashAttention-3/4. The abstract names no authors or institutions and gives no publication venue or release date, so the claims have not been independently verified here.
Risks and caveats
All performance figures are self-reported and limited to one GPU, the Nvidia H20, and one context length, 128K; the source gives no numbers for other hardware or context sizes, and no mention of open-source code or model weights being released. Speedups obtained at extreme sparsity depend on the mean correction term holding up outside the tested conditions, which is not something the abstract addresses.