按请求长度分桶动态批处理,提升大模型推理效率与稳定性
BucketServe: Bucket-Based Dynamic Batching for Smart and Efficient LLM Inference Serving
- 按序列长度分桶,动态调整批次大小减少填充开销
- 相比UELLM吞吐提升3.58倍,支持1.93倍更高负载仍达标SLO
- 适合高并发、长尾延迟敏感的大模型服务场景
大语言模型(LLMs)在多个领域广泛应用,传统业务正逐步从规则系统转向基于LLM的方案。然而,LLM推理资源消耗大且对延迟敏感,给服务系统带来挑战。现有服务系统多采用静态或连续批处理策略,导致GPU内存利用效率低、延迟高,尤其在异构工作负载下难以适应动态波动,造成吞吐下降和性能目标(SLO)未达成。本文提出BucketServe,一种基于分桶的动态批处理框架,通过按序列长度将请求分组为同质桶,最小化填充开销并实时调整批大小以优化显存使用,防止内存溢出(OOM)。引入自适应分桶拆分/合并与优先级感知调度,缓解资源碎片化问题,保障SLO达标。实验表明,BucketServe在吞吐上显著优于UELLM,最高提升3.58倍;在80% SLO达标率下可承载1.93倍于DistServe的请求负载,并实现1.975倍于UELLM的系统负载能力。
原文摘要 · Abstract (English)
Large language models (LLMs) have become increasingly popular in various areas, traditional business gradually shifting from rule-based systems to LLM-based solutions. However, the inference of LLMs is resource-intensive or latency-sensitive, posing significant challenges for serving systems. Existing LLM serving systems often use static or continuous batching strategies, which can lead to inefficient GPU memory utilization and increased latency, especially under heterogeneous workloads. These methods may also struggle to adapt to dynamic workload fluctuations, resulting in suboptimal throughput and potential service level objective (SLO) violations. In this paper, we introduce BucketServe, a bucket-based dynamic batching framework designed to optimize LLM inference performance. By grouping requests into size-homogeneous buckets based on sequence length, BucketServe minimizes padding overhead and optimizes GPU memory usage through real-time batch size adjustments preventing out-of-memory (OOM) errors. It introduces adaptive bucket splitting/merging and priority-aware scheduling to mitigate resource fragmentation and ensure SLO compliance. Experiment shows that BucketServe significantly outperforms UELLM in throughput, achieving up to 3.58x improvement. It can also handle 1.93x more request load under the SLO attainment of 80% compared with DistServe and demonstrates 1.975x higher system load capacity compared to the UELLM.
Thank you to arXiv for use of its open access interoperability. PaperDance 不是 arXiv 官方产品;中文卡片由大模型生成,请以原文为准。