动态调度推理阶段,让大模型服务更快更省资源。
DuetServe: Harmonizing Prefill and Decode for LLM Serving via Adaptive GPU Multiplexing
- 按需分拆计算与解码,仅在冲突时才隔离执行
- 吞吐量最高提升30%,生成延迟保持低水平
- 适合追求高并发且对延迟敏感的部署场景
现代大模型服务系统需在计算密集的预填充阶段和内存受限的解码阶段同时维持高吞吐量与严格的延迟SLO。现有方法要么将两阶段共享在同一GPU上,导致相互干扰、增加Token间时间(TBT);要么将两阶段分离到不同GPU,虽改善延迟但造成模型与键值缓存重复传输、资源浪费。我们提出DuetServe,一种统一的服务框架,在单个GPU内实现解耦级隔离。默认以聚合模式运行,当预测到TBT恶化时,动态启用SM级空间多路复用。其核心思想是仅在竞争威胁延迟目标时,通过细粒度自适应的SM分区实现阶段隔离。DuetServe集成三项技术:(1) 基于注意力的屋顶模型,用于预测迭代延迟;(2) 分区优化器,选择最优的SM划分以在满足TBT约束下最大化吞吐量;(3) 无中断执行引擎,消除CPU-GPU同步开销。评估表明,相比当前最优框架,DuetServe可提升总吞吐量达1.3倍,同时保持低生成延迟。
原文摘要 · Abstract (English)
Modern LLM serving systems must sustain high throughput while meeting strict latency SLOs across two distinct inference phases: compute-intensive prefill and memory-bound decode phases. Existing approaches either (1) aggregate both phases on shared GPUs, leading to interference between prefill and decode phases, which degrades Time-Between-Tokens (TBT); or (2) disaggregate the two phases across GPUs, improving latency but wasting resources through duplicated models and KV cache transfers. We present DuetServe, a unified LLM serving framework that achieves disaggregation-level isolation within a single GPU. DuetServe operates in aggregated mode by default and dynamically activates SM-level GPU spatial multiplexing when TBT degradation is predicted. Its key idea is to decouple prefill and decode execution only when needed through fine-grained, adaptive SM partitioning that provides phase isolation only when contention threatens latency service level objectives. DuetServe integrates (1) an attention-aware roofline model to forecast iteration latency, (2) a partitioning optimizer that selects the optimal SM split to maximize throughput under TBT constraints, and (3) an interruption-free execution engine that eliminates CPU-GPU synchronization overhead. Evaluations show that DuetServe improves total throughput by up to 1.3x while maintaining low generation latency compared to state-of-the-art frameworks.
Thank you to arXiv for use of its open access interoperability. PaperDance 不是 arXiv 官方产品;中文卡片由大模型生成,请以原文为准。