LoongServe: Efficiently Serving Long-Context Large Language Models with Elastic Sequence Parallelism

Fuente: arXiv
Guardado en:
Detalles Bibliográficos
Autores principales: Wu, Bingyang, Liu, Shengyu, Zhong, Yinmin, Sun, Peng, Liu, Xuanzhe, Jin, Xin
Formato: Preprint
Publicado: 2024
Materias:
Acceso en línea:
Etiquetas: Agregar Etiqueta
Sin Etiquetas, Sea el primero en etiquetar este registro!
_version_ 1866913566637948928
author Wu, Bingyang
Liu, Shengyu
Zhong, Yinmin
Sun, Peng
Liu, Xuanzhe
Jin, Xin
author_facet Wu, Bingyang
Liu, Shengyu
Zhong, Yinmin
Sun, Peng
Liu, Xuanzhe
Jin, Xin
contents The context window of large language models (LLMs) is rapidly increasing, leading to a huge variance in resource usage between different requests as well as between different phases of the same request. Restricted by static parallelism strategies, existing LLM serving systems cannot efficiently utilize the underlying resources to serve variable-length requests in different phases. To address this problem, we propose a new parallelism paradigm, elastic sequence parallelism (ESP), to elastically adapt to the variance between different requests and phases. Based on ESP, we design and build LoongServe, an LLM serving system that (1) improves computation efficiency by elastically adjusting the degree of parallelism in real-time, (2) improves communication efficiency by reducing key-value cache migration overhead and overlapping partial decoding communication with computation, and (3) improves GPU memory efficiency by reducing key-value cache fragmentation across instances. Our evaluation under diverse real-world datasets shows that LoongServe improves the maximum throughput by up to 3.85$\times$ compared to the chunked prefill and 5.81$\times$ compared to the prefill-decoding disaggregation.
format Preprint
id arxiv_https___arxiv_org_abs_2404_09526
institution arXiv
publishDate 2024
record_format arxiv
spellingShingle LoongServe: Efficiently Serving Long-Context Large Language Models with Elastic Sequence Parallelism
Wu, Bingyang
Liu, Shengyu
Zhong, Yinmin
Sun, Peng
Liu, Xuanzhe
Jin, Xin
Distributed, Parallel, and Cluster Computing
Machine Learning
The context window of large language models (LLMs) is rapidly increasing, leading to a huge variance in resource usage between different requests as well as between different phases of the same request. Restricted by static parallelism strategies, existing LLM serving systems cannot efficiently utilize the underlying resources to serve variable-length requests in different phases. To address this problem, we propose a new parallelism paradigm, elastic sequence parallelism (ESP), to elastically adapt to the variance between different requests and phases. Based on ESP, we design and build LoongServe, an LLM serving system that (1) improves computation efficiency by elastically adjusting the degree of parallelism in real-time, (2) improves communication efficiency by reducing key-value cache migration overhead and overlapping partial decoding communication with computation, and (3) improves GPU memory efficiency by reducing key-value cache fragmentation across instances. Our evaluation under diverse real-world datasets shows that LoongServe improves the maximum throughput by up to 3.85$\times$ compared to the chunked prefill and 5.81$\times$ compared to the prefill-decoding disaggregation.
title LoongServe: Efficiently Serving Long-Context Large Language Models with Elastic Sequence Parallelism
topic Distributed, Parallel, and Cluster Computing
Machine Learning
url https://arxiv.org/abs/2404.09526