Pianificazione efficiente di LLM tramite apprendimento per il ranking
Efficient LLM Scheduling by Learning to Rank
August 28, 2024
Autori: Yichao Fu, Siqi Zhu, Runlong Su, Aurick Qiao, Ion Stoica, Hao Zhang
cs.AI
Abstract
Nell'inferenza del Grande Modello Linguistico (LLM), la lunghezza dell'output di una richiesta LLM è tipicamente considerata non nota a priori. Di conseguenza, la maggior parte dei sistemi di servizio LLM utilizza una semplice strategia di scheduling First-come-first-serve (FCFS), che porta al blocco Head-Of-Line (HOL) e a una ridotta capacità e qualità del servizio. In questo articolo, riesaminiamo questa assunzione -- dimostriamo che, sebbene sia impossibile prevedere esattamente la lunghezza di generazione di ciascuna richiesta, è possibile prevedere i ranghi relativi delle lunghezze di output in un batch di richieste, utilizzando il learning to rank. Le informazioni sul ranking offrono preziose indicazioni per lo scheduling delle richieste. Sviluppando questa intuizione, progettiamo un nuovo scheduler per l'inferenza e il servizio LLM che può approssimare meglio il programma shortest-job-first (SJF) rispetto agli approcci esistenti. Integrando questo scheduler con il sistema di servizio LLM all'avanguardia, mostriamo un significativo miglioramento delle prestazioni in diverse applicazioni importanti: una riduzione del 2,8x della latenza nel servizio di chatbot e un aumento del 6,5x della capacità di generazione di dati sintetici. Il nostro codice è disponibile su https://github.com/hao-ai-lab/vllm-ltr.git
English
In Large Language Model (LLM) inference, the output length of an LLM request
is typically regarded as not known a priori. Consequently, most LLM serving
systems employ a simple First-come-first-serve (FCFS) scheduling strategy,
leading to Head-Of-Line (HOL) blocking and reduced throughput and service
quality. In this paper, we reexamine this assumption -- we show that, although
predicting the exact generation length of each request is infeasible, it is
possible to predict the relative ranks of output lengths in a batch of
requests, using learning to rank. The ranking information offers valuable
guidance for scheduling requests. Building on this insight, we develop a novel
scheduler for LLM inference and serving that can approximate the
shortest-job-first (SJF) schedule better than existing approaches. We integrate
this scheduler with the state-of-the-art LLM serving system and show
significant performance improvement in several important applications: 2.8x
lower latency in chatbot serving and 6.5x higher throughput in synthetic data
generation. Our code is available at https://github.com/hao-ai-lab/vllm-ltr.git