Lune

SOSP2024Top-tier venue

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

Bingyang Wu, Shengyu Liu, Yinmin Zhong, Peng Sun, Xuanzhe Liu, Xin Jin

Abstract

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 across 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 throughput by up to 3.85× compared to chunked prefill and 5.81× compared to prefill-decoding disaggregation.

Ask Lune

Know this paper in minutes, not an afternoon.

Lune can read every page of it and the top-tier papers that cite it, and gives you its claims, its evidence and its limits, each one cited to the paper it comes from. No skimming, no AI slop.

46 top-tier papers have cited it since. Know what they found before your reviewers do.

Questions to start from

Lune can draw on

the full paper · the top-tier papers that cite it · related work

Get the answer

Free to start. No credit card required.

Lineage

  • Efficient Streaming Language Models with Attention Sinks cites FlashAttention: Fast and Memory-Efficient Exact Attention with IO-Awareness
  • Efficient Streaming Language Models with Attention Sinks cites H2O: Heavy-Hitter Oracle for Efficient Generative Inference of Large Language Models
  • H2O: Heavy-Hitter Oracle for Efficient Generative Inference of Large Language Models cites Efficient Streaming Language Models with Attention Sinks
  • Efficient Streaming Language Models with Attention Sinks cites FlashAttention-2: Faster Attention with Better Parallelism and Work Partitioning
  • ServeGen: Workload Characterization and Generation of Large Language Model Serving in Production cites Mooncake: Trading More Storage for Less Computation - A KVCache-centric Architecture for Serving LLM Chatbot
  • ServeGen: Workload Characterization and Generation of Large Language Model Serving in Production cites Efficient Memory Management for Large Language Model Serving with PagedAttention
  • CacheBlend: Fast Large Language Model Serving for RAG with Cached Knowledge Fusion cites CacheGen: KV Cache Compression and Streaming for Fast Large Language Model Serving
  • CacheGen: KV Cache Compression and Streaming for Fast Large Language Model Serving cites CacheBlend: Fast Large Language Model Serving for RAG with Cached Knowledge Fusion
  • CacheBlend: Fast Large Language Model Serving for RAG with Cached Knowledge Fusion cites H2O: Heavy-Hitter Oracle for Efficient Generative Inference of Large Language Models
  • CacheBlend: Fast Large Language Model Serving for RAG with Cached Knowledge Fusion cites Efficient Memory Management for Large Language Model Serving with PagedAttention
  • CacheGen: KV Cache Compression and Streaming for Fast Large Language Model Serving cites FlashAttention: Fast and Memory-Efficient Exact Attention with IO-Awareness
  • CacheGen: KV Cache Compression and Streaming for Fast Large Language Model Serving cites H2O: Heavy-Hitter Oracle for Efficient Generative Inference of Large Language Models
  • CacheGen: KV Cache Compression and Streaming for Fast Large Language Model Serving cites Efficient Memory Management for Large Language Model Serving with PagedAttention
  • H2O: Heavy-Hitter Oracle for Efficient Generative Inference of Large Language Models cites FlashAttention: Fast and Memory-Efficient Exact Attention with IO-Awareness
  • FlashAttention-2: Faster Attention with Better Parallelism and Work Partitioning cites FlashAttention: Fast and Memory-Efficient Exact Attention with IO-Awareness
  • Mooncake: Trading More Storage for Less Computation - A KVCache-centric Architecture for Serving LLM Chatbot cites CacheGen: KV Cache Compression and Streaming for Fast Large Language Model Serving
  • Mooncake: Trading More Storage for Less Computation - A KVCache-centric Architecture for Serving LLM Chatbot cites Efficient Memory Management for Large Language Model Serving with PagedAttention
  • KVCOMM: Online Cross-context KV-cache Communication for Efficient LLM-based Multi-agent Systems cites Efficient Streaming Language Models with Attention Sinks
  • KVCOMM: Online Cross-context KV-cache Communication for Efficient LLM-based Multi-agent Systems cites CacheBlend: Fast Large Language Model Serving for RAG with Cached Knowledge Fusion
  • KVCOMM: Online Cross-context KV-cache Communication for Efficient LLM-based Multi-agent Systems cites CacheGen: KV Cache Compression and Streaming for Fast Large Language Model Serving
  • KVCOMM: Online Cross-context KV-cache Communication for Efficient LLM-based Multi-agent Systems cites Efficient Memory Management for Large Language Model Serving with PagedAttention
  • Efficient Memory Management for Large Language Model Serving with PagedAttention cites FlashAttention: Fast and Memory-Efficient Exact Attention with IO-Awareness
Builds onCited byLeft to right by year; the more cited, the higher.

Cited by top-tier papers46

  1. Mooncake: Trading More Storage for Less Computation - A KVCache-centric Architecture for Serving LLM ChatbotRuoyu Qin, Zheming Li, Weiran He, Jialei Cui et al.FAST 2025 · 337 citations
  2. CacheGen: KV Cache Compression and Streaming for Fast Large Language Model ServingYuhan Liu, Hanchen Li, Yihua Cheng, Siddhant Ray et al.SIGCOMM 2024 · 111 citations
  3. CacheBlend: Fast Large Language Model Serving for RAG with Cached Knowledge FusionJiayi Yao, Hanchen Li, Yuhan Liu, Siddhant Ray et al.EuroSys 2025 · 68 citations
  4. ServeGen: Workload Characterization and Generation of Large Language Model Serving in ProductionYuxing Xiang, Xue Li, Kun Qian, Yan Zhang et al.NSDI 2026 · 58 citations
  5. KVCOMM: Online Cross-context KV-cache Communication for Efficient LLM-based Multi-agent SystemsHancheng Ye, Zhengqi Gao, Mingyuan Ma, Qinsi Wang et al.NeurIPS 2025 · 42 citations

Builds on18

  1. FlashAttention: Fast and Memory-Efficient Exact Attention with IO-AwarenessTri Dao, Daniel Y. Fu, Stefano Ermon, Atri Rudra et al.NeurIPS 2022 · 5,493 citations
  2. FlashAttention-2: Faster Attention with Better Parallelism and Work PartitioningTri DaoICLR 2024 · 2,600 citations
  3. Efficient Streaming Language Models with Attention SinksGuangxuan Xiao, Yuandong Tian, Beidi Chen, Song Han et al.ICLR 2024 · 1,714 citations
  4. Efficient Memory Management for Large Language Model Serving with PagedAttentionWoosuk Kwon, Zhuohan Li, Siyuan Zhuang, Ying Sheng et al.SOSP 2023 · 1,016 citations
  5. H2O: Heavy-Hitter Oracle for Efficient Generative Inference of Large Language ModelsZhenyu Zhang, Ying Sheng, Tianyi Zhou, Tianlong Chen et al.NeurIPS 2023 · 1,003 citations

Related papers

  1. DistServe: Disaggregating Prefill and Decoding for Goodput-optimized Large Language Model ServingYinmin Zhong, Shengyu Liu, Junda Chen, Jianbo Hu et al.OSDI 2024 · 646 citations
  2. Tetris: Efficient Long-context LLM Serving with Chunkwise Dynamic Sequence ParallelismCong Li, Yuzhe Yang, Xuegui Zheng, Qifan Yang et al.ISCA 2026
  3. WindServe: Efficient Phase-Disaggregated LLM Serving with Stream-based Dynamic SchedulingJingqi Feng, Yukai Huang, Rui Zhang, Sicheng Liang et al.ISCA 2025 · 16 citations
  4. MuxServe: Flexible Spatial-Temporal Multiplexing for Multiple LLM ServingJiangfei Duan, Runyu Lu, Haojie Duanmu, Xiuhong Li et al.ICML 2024 · 51 citations
  5. ElasticMM: Efficient Multimodal LLMs Serving with Elastic Multimodal ParallelismZedong Liu, Shenggan Cheng, Guangming Tan, Yang You et al.NeurIPS 2025 · 12 citations
Dusk over the sea between two cliffs drawn in fine vertical lines