arXiv:2504.19867cs.CLcs.DC2025-04被引 25

通过分阶段计算与统一存储,提升大模型服务效率。

semi-PD: Towards Efficient LLM Serving via Phase-Wise Disaggregated Computation and Unified Storage

  • 将计算分离至不同SM,实现两阶段异步处理
  • 在高并发下延迟降低1.27-2.58倍,吞吐提升1.55-1.72倍
  • 适合需要低延迟和高吞吐的实时大模型服务场景

现有大语言模型(LLM)服务系统分为两类:统一系统将预填充与解码阶段共置于同一GPU,共享计算与存储资源;拆分系统则将两阶段部署于不同GPU。后者虽缓解了延迟干扰与调度复杂性问题,却带来存储挑战:1)两阶段重复存储权重,限制灵活部署;2)KV缓存跨阶段传输开销大;3)存储不均衡导致显存浪费严重;4)KV缓存迁移困难,资源调配不佳。这些缺陷使系统在高请求率下性能低下。本文发现拆分系统的本质优势在于计算资源拆分,实现两阶段异步计算。为此提出新型系统semi-PD,采用分阶段计算与统一存储设计。通过计算资源控制器在流式多处理器(SM)级实现计算拆分,用统一内存管理器协调两阶段异步访问。semi-PD具备低开销资源调整机制与面向服务等级目标(SLO)的动态分区算法,优化延迟达标率。相比现有最优系统,semi-PD在DeepSeek系列模型上平均端到端延迟降低1.27–2.58倍,在Llama系列模型上满足延迟约束的前提下可服务1.55–1.72倍更多请求。

原文摘要 · Abstract (English)

Existing large language model (LLM) serving systems fall into two categories: 1) a unified system where prefill phase and decode phase are co-located on the same GPU, sharing the unified computational resource and storage, and 2) a disaggregated system where the two phases are disaggregated to different GPUs. The design of the disaggregated system addresses the latency interference and sophisticated scheduling issues in the unified system but leads to storage challenges including 1) replicated weights for both phases that prevent flexible deployment, 2) KV cache transfer overhead between the two phases, 3) storage imbalance that causes substantial wasted space of the GPU capacity, and 4) suboptimal resource adjustment arising from the difficulties in migrating KV cache. Such storage inefficiency delivers poor serving performance under high request rates. In this paper, we identify that the advantage of the disaggregated system lies in the disaggregated computation, i.e., partitioning the computational resource to enable the asynchronous computation of two phases. Thus, we propose a novel LLM serving system, semi-PD, characterized by disaggregated computation and unified storage. In semi-PD, we introduce a computation resource controller to achieve disaggregated computation at the streaming multi-processor (SM) level, and a unified memory manager to manage the asynchronous memory access from both phases. semi-PD has a low-overhead resource adjustment mechanism between the two phases, and a service-level objective (SLO) aware dynamic partitioning algorithm to optimize the SLO attainment. Compared to state-of-the-art systems, semi-PD maintains lower latency at higher request rates, reducing the average end-to-end latency per request by 1.27-2.58x on DeepSeek series models, and serves 1.55-1.72x more requests adhering to latency constraints on Llama series models.

大模型服务推理优化存储管理异步计算

Thank you to arXiv for use of its open access interoperability. PaperDance 不是 arXiv 官方产品;中文卡片由大模型生成,请以原文为准。