规模化部署前先模拟:无需GPU的高保真大语言模型(LLM)推理规划
Simulate Before You Scale: High-Fidelity LLM Inference Planning Without GPUs
AI总结:
本文提出仅用CPU的BLIS模拟器,可高效准确规划LLM推理配置,其识别的Llama-2-70B部署方案满足SLO,相关策略已整合进开源平台llm-d并获显著性能提升。
摘要:
规模化部署大语言模型(LLM)推理时,需联合选择硬件布局、并行策略、调度策略、准入控制及请求路由,以满足延迟和吞吐量目标。这些选择相互影响:提升缓存局部性的路由决策会集中负载,仅在饱和时触发的准入阈值会导致队列过长,进而降低关键层级流量性能。在GPU集群上评估候选方案用于迭代探索成本过高,而现有预测工具要么忽略批处理和排队动态,要么仅对流水线的部分环节建模。本文提出BLIS,一种确定性、仅使用CPU的离散事件模拟器,可对完整的推理服务流水线(准入、路由、调度、预填/解码执行、KV缓存管理及抢占)进行建模。BLIS将分析基函数与学习到的缩放系数及开销项配对,这些项经全局拟合一次,即可预测步骤延迟,无需针对每个模型或GPU进行单独分析。在涉及6种模型和3种GPU类型的36项实验中,BLIS实现了6.7%的中位数端到端误差,运行速度约为实际执行的200倍。在针对Llama-2-70B的420种服务配置的搜索中,BLIS识别出一种4-GPU部署方案,可满足300毫秒的平均首包时间(TTFT)服务水平目标(SLO),而竞争工具要么需要两倍的GPU,要么推荐的配置在负载下失效。两项完全在模拟中演化的策略已在真实硬件上验证,并被整合进llm-d(一款广泛采用的分布式LLM服务开源平台):一项准入策略可将关键层级TTFT的P90降低多达82%,一项流量控制策略可在过载工作负载下将端到端P50延迟降低32%-48%。
英文摘要:
Deploying large language model (LLM) inference at scale requires jointly selecting hardware layout, parallelism strategy, scheduling policy, admission control, and request routing to meet latency and throughput targets. These choices interact: a routing decision that improves cache locality can concentrate load, and an admission threshold that triggers only at saturation allows queues to grow deep enough to degrade critical-tier traffic. Evaluating candidates on GPU clusters is too expensive for iterative exploration, yet existing predictive tools either ignore batching and queueing dynamics or model only fragments of the pipeline. In this paper, we present BLIS, a deterministic, CPU-only discrete-event simulator that models the full inference serving pipeline (admission, routing, scheduling, prefill/decode execution, KV-cache management, and preemption). BLIS pairs analytical basis functions with learned scaling coefficients and overhead terms, fit once globally, to predict step latency without per-model or per-GPU profiling. Across 36 experiments spanning six models and three GPU types, BLIS achieves 6.7% median end-to-end error while running around 200 times faster than real execution. In a configuration search over 420 serving configurations for Llama-2-70B, BLIS identifies a 4-GPU deployment that meets a 300ms mean TTFT service-level objective (SLO), whereas competing tools either require double the GPUs or recommend configurations that fail under load. Two policies evolved entirely in simulation were validated on real hardware and merged into llm-d, a widely adopted open-source platform for distributed LLM serving: an admission policy that reduces critical-tier TTFT P90 by up to 82%, and a flow-control policy that reduces E2E P50 latency by 32-48% on overloaded workloads.
机构、总结、中文摘要均由AI分析而来,可能存在错误,请以论文正文为准。