arXivDaily arXiv每日学术速递 周一至周五更新
arXiv周末暂无论文更新,休息一下吧,周末愉快~~
arXiv 2408.08147cs.DCcs.CLcs.LG
收藏

P/D-Serve:大规模服务解聚式大语言模型

P/D-Serve: Serving Disaggregated Large Language Model at Scale

Huawei Technologies Co., Ltd.(华为技术有限公司)
Yibo Jin, Tao Wang, Huimin Lin, Mingyang Song, Peiyang Li, Yipeng Ma, Yicheng Shan, Zhengfan Yuan, Cailong Li, Yajing Sun, Tiandeng Wu, Xing Chu, Ruizhi Huan, L… 展开作者

Yibo Jin, Tao Wang, Huimin Lin, Mingyang Song, Peiyang Li, Yipeng Ma, Yicheng Shan, Zhengfan Yuan, Cailong Li, Yajing Sun, Tiandeng Wu, Xing Chu, Ruizhi Huan, Li Ma, Xiao You, Wenting Zhou, Yunpeng Ye, Wen Liu, Xiangkun Xu, Yongsheng Zhang, Tiantian Dong, Jiawei Zhu, Zhe Wang, Xijian Ju, Jianxun Song, Haoliang Cheng, Xiaojing Li, Jiandong Ding, Hefei Guo, Zhengyong Zhang

AI总结:

针对大规模解聚式LLM服务的性能难题,提出P/D-Serve系统,通过细粒度P/D组织、按需转发和优化D2D传输,实现吞吐量等多维度性能提升,已在数万NPU规模商用。

摘要:

在数万个xPU设备(GPU或NPU)上服务解聚式大语言模型(LLM)并保证性能可靠性面临多重挑战。1)忽视请求多样性(各异的前缀与潮汐式请求)、将所有提示词放入混合池处理的方式存在不足。为提升各场景下的相似度、最小化预填充(prefill)与解码(decoding,简称P/D)处理的内部不匹配,需要细粒度组织机制,动态调整P/D比例以优化性能。2)由于对工作负载(队列状态或维护的连接)估计不准确,全局调度器极易在预填充阶段引发不必要的超时。3)跨集群级RDMA(远程直接内存访问)的固定块设备间(D2D)KVCache传输无法达到预期的D2D利用率。\n为解决上述问题,本文提出端到端系统P/D-Serve,遵循MLOps(机器学习运维)范式,对端到端(E2E)P/D性能建模,并实现以下功能:1)细粒度P/D组织,按需将服务与RoCE(融合以太网上的RDMA)映射,促进同类处理并动态调整P/D比例;2)预填充空闲时基于拒绝的按需转发,将调度器与常规不准确上报、本地队理解耦,避免预填充超时;3)通过优化的D2D访问实现高效KVCache传输。\nP/D-Serve基于昇腾(Ascend)和MindSpore实现,已在数万个NPU上部署商用超过8个月,在端到端吞吐量、首令牌时间(TTFT)服务水平目标(SLO)和D2D传输时间上分别实现60%、42%和46%的提升。作为具备上述优化的端到端系统,P/D-Serve的吞吐量较聚合式LLM提升6.7倍。

英文摘要:

Serving disaggregated large language models (LLMs) over tens of thousands of xPU devices (GPUs or NPUs) with reliable performance faces multiple challenges. 1) Ignoring the diversity (various prefixes and tidal requests), treating all the prompts in a mixed pool is inadequate. To facilitate the similarity per scenario and minimize the inner mismatch on P/D (prefill and decoding) processing, fine-grained organization is required, dynamically adjusting P/D ratios for better performance. 2) Due to inaccurate estimation on workload (queue status or maintained connections), the global scheduler easily incurs unnecessary timeouts in prefill. 3) Block-fixed device-to-device (D2D) KVCache transfer over cluster-level RDMA (remote direct memory access) fails to achieve desired D2D utilization as expected. To overcome previous problems, this paper proposes an end-to-end system P/D-Serve, complying with the paradigm of MLOps (machine learning operations), which models end-to-end (E2E) P/D performance and enables: 1) fine-grained P/D organization, mapping the service with RoCE (RDMA over converged ethernet) as needed, to facilitate similar processing and dynamic adjustments on P/D ratios; 2) on-demand forwarding upon rejections for idle prefill, decoupling the scheduler from regular inaccurate reports and local queues, to avoid timeouts in prefill; and 3) efficient KVCache transfer via optimized D2D access. P/D-Serve is implemented upon Ascend and MindSpore, has been deployed over tens of thousands of NPUs for more than eight months in commercial use, and further achieves 60\%, 42\% and 46\% improvements on E2E throughput, time-to-first-token (TTFT) SLO (service level objective) and D2D transfer time. As the E2E system with optimizations, P/D-Serve achieves 6.7x increase on throughput, compared with aggregated LLMs.

机构、总结、中文摘要均由AI分析而来,可能存在错误,请以论文正文为准。

↑