Slice-Level Scheduling for High Throughput and Load Balanced LLM Serving

Fuente: arXiv
Salvato in:
Dettagli Bibliografici
Autori principali: Cheng, Ke, Hu, Wen, Wang, Zhi, Peng, Hongen, Li, Jianguo, Zhang, Sheng
Natura: Preprint
Pubblicazione: 2024
Soggetti:
Accesso online:
Tags: Aggiungi Tag
Nessun Tag, puoi essere il primo ad aggiungerne!!
_version_ 1866929749770633216
author Cheng, Ke
Hu, Wen
Wang, Zhi
Peng, Hongen
Li, Jianguo
Zhang, Sheng
author_facet Cheng, Ke
Hu, Wen
Wang, Zhi
Peng, Hongen
Li, Jianguo
Zhang, Sheng
contents Large language models (LLMs) iteratively generate text token by token, with memory usage increasing with the length of generated token sequences. Since the request generation length is generally unpredictable, it is difficult to estimate the time and memory required to process requests, thus posing a challenge for effective request scheduling. Conventional sequence-level scheduling (SLS) serves requests in a first-come first-served (FCFS) manner with static batching where requests with short generation lengths are delayed until those with long ones have finished generation. Besides, to avoid out-of-memory (OOM) errors, SLS batches requests using a small batch size, which limits throughput. Recently proposed iteration-level scheduling (ILS) improves this with continuous batching, timely completing requests and dynamically adding new ones, but often limits the number of parallel-processing requests to OOM errors, thus compromising throughput. Moreover, both SLS and ILS fail to effectively balance workload across multiple LLM instances. To tackle these challenges, we propose slice-level scheduling (SCLS). By splitting the predefined maximal generation length limit into slices and serving batches slice by slice, it provides a precise range of serving time and memory usage for batched requests, laying the foundation for effective scheduling. Experiments confirm that compared with SLS and ILS schedulers, SCLS can improve throughput by up to 315.8% and greatly mitigate load imbalance with proposed batching and offloading algorithms.
format Preprint
id arxiv_https___arxiv_org_abs_2406_13511
institution arXiv
publishDate 2024
record_format arxiv
spellingShingle Slice-Level Scheduling for High Throughput and Load Balanced LLM Serving
Cheng, Ke
Hu, Wen
Wang, Zhi
Peng, Hongen
Li, Jianguo
Zhang, Sheng
Distributed, Parallel, and Cluster Computing
Large language models (LLMs) iteratively generate text token by token, with memory usage increasing with the length of generated token sequences. Since the request generation length is generally unpredictable, it is difficult to estimate the time and memory required to process requests, thus posing a challenge for effective request scheduling. Conventional sequence-level scheduling (SLS) serves requests in a first-come first-served (FCFS) manner with static batching where requests with short generation lengths are delayed until those with long ones have finished generation. Besides, to avoid out-of-memory (OOM) errors, SLS batches requests using a small batch size, which limits throughput. Recently proposed iteration-level scheduling (ILS) improves this with continuous batching, timely completing requests and dynamically adding new ones, but often limits the number of parallel-processing requests to OOM errors, thus compromising throughput. Moreover, both SLS and ILS fail to effectively balance workload across multiple LLM instances. To tackle these challenges, we propose slice-level scheduling (SCLS). By splitting the predefined maximal generation length limit into slices and serving batches slice by slice, it provides a precise range of serving time and memory usage for batched requests, laying the foundation for effective scheduling. Experiments confirm that compared with SLS and ILS schedulers, SCLS can improve throughput by up to 315.8% and greatly mitigate load imbalance with proposed batching and offloading algorithms.
title Slice-Level Scheduling for High Throughput and Load Balanced LLM Serving
topic Distributed, Parallel, and Cluster Computing
url https://arxiv.org/abs/2406.13511