PipeLive: 高效的动态LLM服务中实时管道并行性重新配置
PipeLive: Efficient Live In-place Pipeline Parallelism Reconfiguration for Dynamic LLM Serving
AI总结:
PipeLive通过实时在地管道并行性重新配置提升动态LLM服务效率,采用改进的KV缓存布局和PageAttention扩展,实现KV缓存动态调整与增量修补机制,显著降低TTFT和重新配置开销。
摘要:
管道并行性(PP)广泛用于将大语言模型(LLM)的层跨GPU分区,以实现大规模推理。然而,现有系统依赖静态PP配置,无法适应动态环境,如无服务器平台和异构GPU环境。重新配置PP需停止并重新部署服务,导致不可接受的停机时间,因此必须实时在地重新配置,不中断推理。然而,实时在地PP重新配置本质上极具挑战性。GPU已满载模型权重和KV缓存,留不下空间放置新层,需要KV缓存调整,与vLLM等系统预先分配以提高吞吐量相冲突。在执行过程中维护KV一致性困难:停止和复制引入大停顿,而后台同步可能因状态演变导致不一致。我们提出了PipeLive,通过改进的KV缓存布局和PageAttention扩展,实现实时KV缓存调整。它进一步采用受实时虚拟机迁移启发的增量KV修补机制,同步源和目标配置之间的KV状态并识别安全切换点。PipeLive相比禁用KV缓存调整,将时间到第一个token(TTFT)减少2.5倍,且无KV缓存溢出。此外,与无KV修补变体相比,它将重新配置开销从秒级降至10毫秒以下,并将TTFT和时间每输出token(TPOT)分别提高54.7%和14.7%。
英文摘要:
Pipeline parallelism (PP) is widely used to partition layers of large language models (LLMs) across GPUs, enabling scalable inference for large models. However, existing systems rely on static PP configurations that fail to adapt to dynamic settings, such as serverless platforms and heterogeneous GPU environments. Reconfiguring PP by stopping and redeploying service incurs prohibitive downtime, so reconfiguration must instead proceed live and in place, without interrupting inference. However, live in-place PP reconfiguration is fundamentally challenging. GPUs are already saturated with model weights and KV cache, leaving little room for new layer placements and necessitating KV cache resizing, at odds with systems like vLLM that preallocate for throughput. Moreover, maintaining KV consistency during execution is difficult: stop-and-copy introduces large pauses, while background synchronization risks inconsistency as states evolve. We present PipeLive, which enables live in-place PP reconfiguration with minimal disruption. PipeLive introduces a redesigned KV cache layout together with a co-designed extension to PageAttention, forming a unified mechanism for live KV resizing. It further adopts an incremental KV patching mechanism, inspired by live virtual machine migration, to synchronize KV states between source and target configurations and identify a safe switch point. PipeLive achieves a 2.5X reduction in time-to-first-token (TTFT) without KV cache overflow compared to disabling KV resizing. Furthermore, compared to a variant without KV patching, it reduces reconfiguration overhead from seconds to under 10ms, and improves TTFT and time-per-output-token (TPOT) by up to 54.7% and 14.7%, respectively.
机构、总结、中文摘要均由AI分析而来,可能存在错误,请以论文正文为准。