arXiv(opens in a new tab)cs.DCAug 2026Cited by 2 papers on PaperVantage

Manuscript Offprint

arXiv:2608.26523

VPP: Virtual Pipeline Parallelism for Efficient Chunked Prefill in Long-Context LLM Inference

Yan Shi, Xiaochao Wang, Jingchun Gao, Jintao Luo, Xinyi Zhou, Feng Liu, Kui Luo, Xushi Li, Xinjie Guo, Liangjun Feng

ABSTRACT

Chunked prefill pipeline parallelism (CPP) is a key technique for LLM inference. However, equal-size chunks exhibit imbalanced latency, as later chunks attend longer prefix KV caches and incur higher attention costs, leading to pipeline bubbles. Existing approaches mitigate this imbalance through dynamic chunk resizing (Dynamic CPP, DCPP), but our measurements show that this trades scheduling overhead for load balancing, which becomes unfavorable on long sequences. In this study, we propose Virtual Pipeline Parallelism (VPP), which keeps chunk sizes fixed and optimizes the pipeline layout through virtual stages. A V-shaped virtual-stage traversal overlaps each chunk's expensive middle stages with the lighter head and tail stages of its neighbors, while asynchronous communication and pipelined packing further reduce communication stalls and cross-request drain bubbles. We implement VPP in vLLM-Ascend and evaluate it on three MoE-based LLMs with sequences up to 1M tokens on 16 Ascend 910C NPUs. VPP improves throughput by up to 13.1% over DCPP on long sequences and 6.7% on mixed workloads, while preserving performance on short sequences. On a 512K-token DeepSeek-V3.1 prefill workload, VPP reduces the pipeline bubble ratio from 6.4% to 0.1%, achieving a 98.0% reduction compared with DCPP.

1 INTRODUCTION

The rapid development of large language model (LLM) applications (OpenAI, 2023; Zhao et al., 2023), particularly agent-based systems (Xi et al., 2025; Wang et al., 2024; Yao et al., 2023) for multi-turn dialog (Ouyang et al., 2022), tool invocation (Schick et al., 2023), knowledge retrieval (Lewis et al., 2020), and complex reasoning (Wei et al., 2022), has driven LLM inference workloads toward increasingly long and variable contexts (Xiang et al., 2026; Yuan et al., 2026). Serving sequences ranging from dozens to millions of tokens poses substantial challenges, including head-of-line (HOL) blocking, inefficient accelerator utilization, and growing memory pressure (Yu et al., 2022; Kwon et al., 2023; Agrawal et al., 2023).

These challenges are particularly pronounced during pre-fill, which processes the input prompt in parallel and is generally compute-intensive. A long prefill can occupy accelerators for an extended period, delaying ongoing decodes and short requests queued behind it, increasing time-to-first-token (TTFT), and introducing inter-token latency (ITL) jitter. Chunked prefill (Agrawal et al., 2023) mitigates this problem by dividing a long prompt into smaller scheduling units that can be interleaved with decoding and other requests. Systems such as Sarathi (Agrawal et al., 2023) and Medha (Agrawal et al., 2024) exploit this finer granularity to improve utilization and alleviate HOL blocking.

As model size and context length continue to grow, scheduling alone is insufficient, and multi-device parallelism becomes essential. Among existing parallel strategies, pipeline parallelism (PP) (Huang et al., 2019) is particularly attractive for large-scale deployment because it partitions the model by layers and communicates only intermediate activations between neighboring stages, requiring less frequent communication than tensor parallelism (TP) (Shoeybi et al., 2019) and sequence parallelism (SP) (Korthikanti et al., 2023). Combining chunked prefill with PP leads to Chunked Prefill Pipeline Parallelism (CPP), where prefill chunks become the fundamental work units flowing through pipeline stages. However, equal-sized chunking in CPP leads to progressively higher attention costs for later chunks due to their longer prefix KV caches, resulting in increasing chunk latency along the sequence, which in turn causes uneven pipeline progress and substantial bubbles.

Existing approaches mitigate this imbalance by dynamically adjusting chunk boundaries to equalize execution times (Li et al., 2021; Sun et al., 2024; LMSYS Org, 2026; vLLM-Ascend Community, 2026), a paradigm we refer to

*Equal contribution 1^{1}Huawei Technologies Co., Ltd., Shanghai, China 2^{2}Shanghai Jiao Tong University, Shanghai, China. Correspondence to: Xushi Li lixushi@huawei.com.

as Dynamic Chunked Prefill Pipeline Parallelism (DCPP). However, dynamic resizing introduces additional system complexity, requiring accurate cost estimation, runtime calibration, and careful parameter tuning. More importantly, it fragments execution into finer-grained units. Our measurements show that, as sequence length grows, the resulting computation and communication overhead can eventually outweigh the benefit of bubble reduction.

Our key insight is that the heterogeneous latency of fixed-size prefill chunks is not arbitrary. As the prefix context grows, successive chunks exhibit an approximately linear increase in execution latency. Instead of eliminating this heterogeneity through dynamic resizing, we exploit its predictable growth to construct a balanced pipeline schedule. Based on this insight, we propose Virtual Pipeline Parallelism (VPP), which keeps chunk sizes fixed and reshapes the pipeline layout through virtual stages. A V-shaped stage traversal interleaves neighboring chunks such that the heavier middle stages of one chunk are paired with the lighter head and tail stages of adjacent chunks, absorbing the increasing chunk cost into parallel execution and substantially reducing imbalance-induced bubbles.

To further reduce communication stalls and pipeline drain bubbles, VPP incorporates two complementary optimizations. First, asynchronous communication with cross-chunk stage reordering improves communication-computation overlap and reduces exposed communication latency. Second, pipelined packing fills otherwise idle drain periods with the leading chunks of the next request, reducing cross-request bubbles. Together, these mechanisms address computation imbalance, exposed communication, and cross-request idle time without dynamically resizing chunks.

We implement VPP in vLLM-Ascend 1^{1} and evaluate it on three representative MoE-based LLMs—Qwen3, DeepSeek-V3.1, and GLM-5.2—using 16 Huawei Ascend 910C NPUs. Our evaluation covers short (4K–16K), long (64K–1M), and mixed-length workloads, and includes detailed performance breakdowns, ablation studies, and chunk-size sensitivity analysis. In summary, the main contributions of our paper include:

• We quantify the limitations of Dynamic Chunked pre-fill Pipeline Parallelism (DCPP), showing that the execution fragmentation introduced by dynamic chunk resizing can outweigh its load-balancing benefit on long sequences.

• We propose and implement VPP on vLLM-Ascend. Instead of eliminating unequal chunk latency through dynamic resizing, VPP exploits its predictable growth to construct a balanced pipeline schedule. It keeps chunk sizes fixed and reshapes the pipeline layout through V-shaped stage traversal, asynchronous communication reordering, and pipelined packing.

• We evaluate VPP on three MoE models across short, long, and mixed workloads, demonstrating up to 13.1% (long) and 6.7% (mixed) throughput gains over DCPP while preserving short-sequence performance. On a 512K-token DeepSeek-V3.1 prefill workload, VPP reduces the pipeline bubble ratio from 6.4% to 0.1%, achieving a 98.0% reduction compared with DCPP.

References (26)