SpotServe:在可抢占实例上服务生成式大语言模型
SpotServe: Serving Generative Large Language Models on Preemptible Instances
AI总结:
提出首个在可抢占实例上服务的分布式LLM系统SpotServe,通过动态调整并行化配置、二分图匹配优化迁移及有状态推理恢复技术,显著降低尾部延迟并节省54%成本。
摘要:
生成式大语言模型(LLM)的高计算和内存需求使得廉价地为其提供服务变得极具挑战性。本文旨在通过利用现代云中的可抢占 GPU 实例来降低服务 LLM 的货币成本,这些实例以比常规实例便宜得多的价格提供对闲置 GPU 的访问,但可能随时被云抢占。在可抢占实例上服务 LLM 需要解决由频繁的实例抢占所引发的挑战,以及迁移实例以处理这些抢占的必要性。本文提出了 SpotServe,这是首个在可抢占实例上的分布式 LLM 服务系统。SpotServe 中的几项关键技术实现了在廉价可抢占实例上快速可靠地服务生成式 LLM。首先,SpotServe 针对动态实例可用性和波动的工作负载动态调整 LLM 并行化配置,同时平衡整体吞吐量、推理延迟和货币成本之间的权衡。其次,为了最小化用于动态重新并行化的实例迁移成本,将实例迁移任务表述为二分图匹配问题,该问题使用 Kuhn-Munkres 算法来识别最小化通信的最优迁移计划。最后,为了利用现代云提供的宽限期,我们引入了有状态推理恢复,这是一种新的推理机制,它以更细的粒度提交推理进度,并允许 SpotServe 在发生抢占时廉价地恢复推理。我们在真实的 spot 实例抢占轨迹和各种流行的 LLM 上进行评估,结果表明,与现有的最佳 LLM 服务系统相比,SpotServe 可以将 P99 尾部延迟降低 2.4 至 9.1 倍。我们还表明,SpotServe 能够利用抢占式实例的价格优势,与仅使用按需实例相比节省了 54% 的货币成本。
英文摘要:
The high computational and memory requirements of generative large language models (LLMs) make it challenging to serve them cheaply. This paper aims to reduce the monetary cost for serving LLMs by leveraging preemptible GPU instances on modern clouds, which offer accesses to spare GPUs at a much cheaper price than regular instances but may be preempted by the cloud at any time. Serving LLMs on preemptible instances requires addressing challenges induced by frequent instance preemptions and the necessity of migrating instances to handle these preemptions. This paper presents SpotServe, the first distributed LLM serving system on preemptible instances. Several key techniques in SpotServe realize fast and reliable serving of generative LLMs on cheap preemptible instances. First, SpotServe dynamically adapts the LLM parallelization configuration for dynamic instance availability and fluctuating workload, while balancing the trade-off among the overall throughput, inference latency and monetary costs. Second, to minimize the cost of migrating instances for dynamic reparallelization, the task of migrating instances is formulated as a bipartite graph matching problem, which uses the Kuhn-Munkres algorithm to identify an optimal migration plan that minimizes communications. Finally, to take advantage of the grace period offered by modern clouds, we introduce stateful inference recovery, a new inference mechanism that commits inference progress at a much finer granularity and allows SpotServe to cheaply resume inference upon preemption. We evaluate on real spot instance preemption traces and various popular LLMs and show that SpotServe can reduce the P99 tail latency by 2.4 - 9.1x compared with the best existing LLM serving systems. We also show that SpotServe can leverage the price advantage of preemptive instances, saving 54% monetary cost compared with only using on-demand instances.
机构、总结、中文摘要均由AI分析而来,可能存在错误,请以论文正文为准。