LoopServe: An Adaptive Dual-phase LLM Inference Acceleration System for Multi-Turn Dialogues

Fuente: arXiv
Enregistré dans:
Détails bibliographiques
Auteurs principaux: Li, Haoyang, Xu, Zhanchao, Li, Yiming, Chen, Xuejia, Li, Darian, Tian, Anxin, Xiao, Qingfa, Deng, Cheng, Wang, Jun, Li, Qing, Chen, Lei, Yuan, Mingxuan
Format: Preprint
Publié: 2025
Sujets:
Accès en ligne:
Tags: Ajouter un tag
Pas de tags, Soyez le premier à ajouter un tag!
_version_ 1866915515779252224
author Li, Haoyang
Xu, Zhanchao
Li, Yiming
Chen, Xuejia
Li, Darian
Tian, Anxin
Xiao, Qingfa
Deng, Cheng
Wang, Jun
Li, Qing
Chen, Lei
Yuan, Mingxuan
author_facet Li, Haoyang
Xu, Zhanchao
Li, Yiming
Chen, Xuejia
Li, Darian
Tian, Anxin
Xiao, Qingfa
Deng, Cheng
Wang, Jun
Li, Qing
Chen, Lei
Yuan, Mingxuan
contents Multi-turn dialogues are essential in many real-world applications of large language models, such as chatbots and virtual assistants. As conversation histories become longer, existing large language models face increasing computational and memory challenges, which hinder their ability to provide efficient and responsive interactions. Most current acceleration methods either compress the context or optimize key value caching, but they often rely on fixed or position-based heuristics that do not adapt well to the dynamic and unpredictable patterns found in actual multi-turn conversations. As a result, these models cannot accurately identify and prioritize the most relevant context, leading to degraded response quality. In this paper, we present LoopServe, an adaptive dual-phase inference acceleration framework for large language models in multi-turn dialogues. LoopServe introduces two main innovations. First, it performs online sparsification during the prefilling phase by dynamically selecting the most important parts of the attention matrix for each new input. Second, it uses progressive key value compression during decoding by adaptively maintaining a relevant and efficient cache based on the most recently generated output tokens. We also propose a new benchmark with eleven multi-turn datasets that reflect realistic query positions and conversational dependencies. Extensive experiments demonstrate that LoopServe consistently achieves superior effectiveness compared to existing baselines and significantly accelerates LLM inference across a wide range of long-context dialogue tasks.
format Preprint
id arxiv_https___arxiv_org_abs_2507_13681
institution arXiv
publishDate 2025
record_format arxiv
spellingShingle LoopServe: An Adaptive Dual-phase LLM Inference Acceleration System for Multi-Turn Dialogues
Li, Haoyang
Xu, Zhanchao
Li, Yiming
Chen, Xuejia
Li, Darian
Tian, Anxin
Xiao, Qingfa
Deng, Cheng
Wang, Jun
Li, Qing
Chen, Lei
Yuan, Mingxuan
Computation and Language
Artificial Intelligence
Multi-turn dialogues are essential in many real-world applications of large language models, such as chatbots and virtual assistants. As conversation histories become longer, existing large language models face increasing computational and memory challenges, which hinder their ability to provide efficient and responsive interactions. Most current acceleration methods either compress the context or optimize key value caching, but they often rely on fixed or position-based heuristics that do not adapt well to the dynamic and unpredictable patterns found in actual multi-turn conversations. As a result, these models cannot accurately identify and prioritize the most relevant context, leading to degraded response quality. In this paper, we present LoopServe, an adaptive dual-phase inference acceleration framework for large language models in multi-turn dialogues. LoopServe introduces two main innovations. First, it performs online sparsification during the prefilling phase by dynamically selecting the most important parts of the attention matrix for each new input. Second, it uses progressive key value compression during decoding by adaptively maintaining a relevant and efficient cache based on the most recently generated output tokens. We also propose a new benchmark with eleven multi-turn datasets that reflect realistic query positions and conversational dependencies. Extensive experiments demonstrate that LoopServe consistently achieves superior effectiveness compared to existing baselines and significantly accelerates LLM inference across a wide range of long-context dialogue tasks.
title LoopServe: An Adaptive Dual-phase LLM Inference Acceleration System for Multi-Turn Dialogues
topic Computation and Language
Artificial Intelligence
url https://arxiv.org/abs/2507.13681