[{"data":1,"prerenderedAt":-1},["ShallowReactive",2],{"detail-sidebar-cat-0-en-105":3,"doc-seo-273671-105":59,"doc-detail-273671-en":131},{"code":4,"msg":5,"data":6},0,"success",[7,13,18,23,28,33,38,43,48,51,55],{"id":8,"doc_module":4,"doc_module_name":9,"category_name":10,"show_sort_weight":11,"slug":12},1,"Document","Story & Novel",90,"story-novel",{"id":14,"doc_module":4,"doc_module_name":9,"category_name":15,"show_sort_weight":16,"slug":17},2,"Literature",80,"literature",{"id":19,"doc_module":4,"doc_module_name":9,"category_name":20,"show_sort_weight":21,"slug":22},4,"Exam",70,"exam",{"id":24,"doc_module":4,"doc_module_name":9,"category_name":25,"show_sort_weight":26,"slug":27},5,"Comic",60,"comic",{"id":29,"doc_module":4,"doc_module_name":9,"category_name":30,"show_sort_weight":31,"slug":32},6,"Technology",50,"technology",{"id":34,"doc_module":4,"doc_module_name":9,"category_name":35,"show_sort_weight":36,"slug":37},7,"Healthcare",40,"healthcare",{"id":39,"doc_module":4,"doc_module_name":9,"category_name":40,"show_sort_weight":41,"slug":42},8,"Research & Report",30,"research-report",{"id":44,"doc_module":4,"doc_module_name":9,"category_name":45,"show_sort_weight":46,"slug":47},9,"Religion & Spirituality",20,"religion-spirituality",{"id":46,"doc_module":4,"doc_module_name":9,"category_name":49,"show_sort_weight":46,"slug":50},"World Cup","world-cup",{"id":52,"doc_module":4,"doc_module_name":9,"category_name":53,"show_sort_weight":52,"slug":54},10,"Lifestyle","lifestyle",{"id":56,"doc_module":4,"doc_module_name":9,"category_name":57,"show_sort_weight":24,"slug":58},19,"General","general",{"code":4,"msg":60,"data":61},"ok",{"site_id":62,"language":63,"slug":64,"title":65,"keywords":66,"description":67,"schema_data":68,"social_meta":124,"head_meta":126,"extra_data":128,"updated_unix":130},105,"en","flashprefill-v2-block-sparse-prefill-attention-for-long-context-llm-serving","FlashPrefill V2 - Block-Sparse Prefill Attention for Long-Context LLM Serving","","Long-context modeling is a key capability for large language models, but self-attention’s quadratic complexity is a major bottleneck during the compute-intensive prefill phase. FlashPrefill reduces this cost via instantaneous pattern discovery and max-based dynamic thresholding, yet it remains a prototype. This paper proposes FlashPrefill V2 to move toward production serving: mean correction to bound approximation error under extreme sparsity, a redesigned sparse attention operator using PackGQA memory access and pipelining with FP8 support, and native paged KV cache plus continuous batching for modern inference frameworks. Experiments on NVIDIA H20 show up to 47.26× and 27.19× speedups over FlashAttention-2 at 128K context length under FP8 and BF16, respectively, with 30.49× against an FA3/4-aligned dense baseline in FP8.",{"@graph":69,"@context":123},[70,84,106],{"@type":71,"itemListElement":72},"BreadcrumbList",[73,77,79,82],{"item":74,"name":75,"@type":76,"position":8},"https://docshare.wps.com","Home","ListItem",{"item":78,"name":9,"@type":76,"position":14},"https://docshare.wps.com/document/",{"item":80,"name":30,"@type":76,"position":81},"https://docshare.wps.com/document/technology/",3,{"item":83,"name":65,"@type":76,"position":19},"https://docshare.wps.com/document/flashprefill-v2-block-sparse-prefill-attention-for-long-context-llm-serving/273671/",{"url":83,"name":65,"@type":85,"image":86,"author":91,"headline":65,"publisher":94,"fileFormat":97,"inLanguage":63,"description":67,"dateModified":98,"datePublished":99,"encodingFormat":97,"isAccessibleForFree":100,"interactionStatistic":101},"DigitalDocument",{"url":87,"@type":88,"width":89,"height":90},"https://docshare.wps.com/thumbnails/flashprefill-v2-block-sparse-prefill-attention-for-long-context-llm-serving/273671.png","ImageObject",300,407,{"name":92,"@type":93},"Rowan","Person",{"url":74,"name":95,"@type":96},"DocShare","Organization","application/pdf","2026-10-16","2026-09-15",true,{"@type":102,"interactionType":103,"userInteractionCount":105},"InteractionCounter",{"@type":104},"ViewAction",13,{"@type":107,"mainEntity":108},"FAQPage",[109,115,119],{"name":110,"@type":111,"acceptedAnswer":112},"What problem does FlashPrefill V2 address in long-context LLM serving?","Question",{"text":113,"@type":114},"It targets the quadratic cost of self-attention that becomes especially severe during the compute-intensive prefill stage for long-context sequences.","Answer",{"name":116,"@type":111,"acceptedAnswer":117},"How does FlashPrefill V2 improve accuracy under extreme sparsity?",{"text":118,"@type":114},"It introduces a mean correction term that suppresses approximation error, keeping performance degradation manageable even at extreme sparsity levels.",{"name":120,"@type":111,"acceptedAnswer":121},"Which implementation and deployment techniques does FlashPrefill V2 use?",{"text":122,"@type":114},"It redesigns sparse attention for Hopper using PackGQA memory access, warp specialization, and pingpong pipelining, supports FP8 inference, and natively provides paged KV cache and continuous batching for integration into frameworks like SGLang.","https://schema.org",{"og:url":83,"og:type":125,"og:title":65,"og:site_name":95,"og:description":67},"article",{"robots":127,"canonical":83},"index,follow",{"doc_id":129,"site_id":62},273671,1789970883,{"code":4,"msg":5,"data":132},{"doc_id":129,"user_id":133,"nickname":92,"user_avatar":134,"doc_module":4,"category_id":29,"category_name":30,"doc_title":65,"doc_description":67,"doc_content":135,"file_id":136,"file_url":137,"file_type":138,"file_size":139,"view_count":105,"is_deleted":4,"is_public":8,"is_downloadable":8,"audit_status":8,"page_count":46,"language":140,"language_code":63,"site_id":62,"html_lang":63,"table_of_contents":141,"faqs":142,"seo_title":143,"seo_description":67,"update_tm":144,"read_time":31},1099514067415,"https://ap-avatar.wpscdn.com/avatar/100002539d78ffe74a7?x-image-process=image/resize,m_fixed,w_180,h_180&k=1779092875211072502","arXiv : 2608 . 19758v 1 [cs .CL] 20 Aug 2026  \nFlashPrefill V2: Block-Sparse Prefill Attention for Long-Context  \nLLM Serving  \nQihang Fan1,2,3,∗, Huaibo Huang1,2,†, Zhiying Wu3, Bingning Wang3,‡, Ran He1,2  \n1MAIS&NLPR, CASIA 2UCAS 3WeChat, Tencent  \n§ [https://github.com/qhfan/FlashPrefillv2](https://github.com/qhfan/FlashPrefillv2)  \nAbstract  \nLong-context modeling is a pivotal capability for Large Language Models, yet the quadratic complexity of attention remains a critical bottleneck, particularly during the compute-intensive prefilling phase. Our previous work, FlashPrefill [8], mitigates this cost through instantaneous pattern discovery and max-based dynamic thresholding; however, it remains an algorithmic prototype that is still distant from production deployment. In this paper, we present FlashPrefill V2, which evolves FlashPrefill from a prototype toward practical long-context serving along three dimensions. First, we introduce a mean correction term that effectively suppresses the approximation error, keeping performance degradation manageable even at extreme sparsity levels. Second, we redesign the sparse attention operator with PackGQA memory access, warp specialization, and pingpong pipelining, fully aligning with the latest FlashAttention-3/4 implementations [22, 38] and supporting FP8 inference to meet practical quantization requirements. Third, FlashPrefill V2 natively supports paged KV cache and continuous batching, allowing integration as an attention backend in modern inference frameworks such as SGLang [42] . Extensive evaluations on NVIDIA H20 GPUs—among the most widely deployed inference accelerators—demonstrate that FlashPrefill V2 delivers up to 47.26× and 27.19× speedups over FlashAttention-2 at 128K context length under FP8 and BF16 precision, respectively, and, in FP8, still achieves a 30.49× speedup against an FA3/4-aligned dense baseline.  \n1. Introduction  \nRecent years have witnessed the rapid evolution of Large Language Models (LLMs) [9, 27, 28] . However, the quadratic complexity of self-attention incurs prohibitive overhead on long-context sequences [29], a bottleneck that is particularly salient during the compute-intensive prefill stage. To mitigate this cost, various sparse attention mechanisms have been proposed [11, 14, 35]: they  \n† Corresponding Author.  \n‡ Project Leader.  \n∗ Work done during internship at WeChat.  \nRobustness under Extreme Sparsity  \nMean Correction Term  \n50 60 70 80 90 Sparsity (%)  \nFA3/4-Aligned Kernel  \nPackGQA · Warp Spec. Pingpong · FP8  \nSpeedup @128K  \n50  \n40  \n30  \n20  \n10  \n0  \n\n| 1.00× | 1.55× | 27.19× |  | 47.26×\u003Cbr>|\n| --- | --- | --- | --- | --- |\n|  |  |  |  |  |\n\nFA2 FA3/4 V2 V2  \nFP8  \nDeployment-Ready Integration  \nPaged KV · Continuous Batching  \nPaged KV Cache  \nSGLang  \nr1 r2 r3 r4 r5  \n···  \nContinuous Batching  \nFigure 1 | FlashPrefill V2 evolves FlashPrefill [8] from an algorithmic prototype toward practical long-context serving along three dimensions: (1) a mean correction term that preserves model accuracy under extreme sparsity; (2) an FA3/4-aligned sparse attention kernel with PackGQA memory access, warp specialization, pingpong pipelining, and FP8 support; and (3) native compatibility with paged KV cache and continuous batching for integration as an attention backend in modern serving frameworks such as SGLang [42] .  \ncoarsely estimate attention scores to identify salient blocks with Top-􀀹/Top-􀀾 selection, and restrict fine-grained computation to these critical tokens.  \nOur previous work, FlashPrefill [8], pushes this line of research further with instantaneous pattern discovery and max-based dynamic thresholding, eliminating the sorting latency of Top-􀀹/Top-􀀾 selection. Nevertheless, it remains an algorithmic prototype that is still distant from production deployment: its accuracy can degrade uncontrollably under aggressive sparsity; its kernel is built upon FlashAttention-2 [5] and lags behind state-of-the-art dense implementations","cbCaisVHuCdikgM2","https://ap.wps.com/l/cbCaisVHuCdikgM2","pdf",763336,"English","# Abstract\n# 1. Introduction\n## Robustness under Extreme Sparsity\n## Mean Correction Term\n## Deployment-Ready Integration","[{\"question\":\"What problem does FlashPrefill V2 address in long-context LLM serving?\",\"answer\":\"It targets the quadratic cost of self-attention that becomes especially severe during the compute-intensive prefill stage for long-context sequences.\"},{\"question\":\"How does FlashPrefill V2 improve accuracy under extreme sparsity?\",\"answer\":\"It introduces a mean correction term that suppresses approximation error, keeping performance degradation manageable even at extreme sparsity levels.\"},{\"question\":\"Which implementation and deployment techniques does FlashPrefill V2 use?\",\"answer\":\"It redesigns sparse attention for Hopper using PackGQA memory access, warp specialization, and pingpong pipelining, supports FP8 inference, and natively provides paged KV cache and continuous batching for integration into frameworks like SGLang.\"}]","FlashPrefill V2 - Block-Sparse Prefill Attention for Long-Context LLM Serving | PDF",1789472433]