SYMPHONY: Improving Memory Management for LLM Inference Workloads

Fuente: arXiv
Saved in:
Bibliographic Details
Main Authors: Agarwal, Saurabh, Mao, Anyong, Akella, Aditya, Venkataraman, Shivaram
Format: Preprint
Published: 2024
Subjects:
Online Access:
Tags: Add Tag
No Tags, Be the first to tag this record!
_version_ 1866929643979800576
author Agarwal, Saurabh
Mao, Anyong
Akella, Aditya
Venkataraman, Shivaram
author_facet Agarwal, Saurabh
Mao, Anyong
Akella, Aditya
Venkataraman, Shivaram
contents Large Language Models (LLMs) are increasingly being deployed in applications such as chatbots, code editors, and conversational agents. A key feature of LLMs is their ability to engage in multi-turn interactions with humans or external tools, enabling a wide range of tasks. Each new request in a multi-turn interaction depends on the intermediate state, specifically the key-value (K,V) caches, from previous requests in the ongoing interaction. Existing serving engines either recompute the K,V caches or offload them to main memory. Profiling reveals that recomputation can result in over 99% of processed tokens being redundant. On the other hand, offloading K,V caches from GPU memory makes inference serving stateful, leading to load imbalances across the cluster. To address these challenges, we developed SYMPHONY. SYMPHONY leverages the observation that multi-turn work loads provide additional hints that allow K,V caches to be migrated off the critical serving path. By utilizing these hints, SYMPHONY dynamically migrates K,V caches to enable finegrained scheduling of inference requests. Our experiments demonstrate that SYMPHONY can handle over 8x the number of requests compared to state-of-the-art baselines, with a similar latency profile.
format Preprint
id arxiv_https___arxiv_org_abs_2412_16434
institution arXiv
publishDate 2024
record_format arxiv
spellingShingle SYMPHONY: Improving Memory Management for LLM Inference Workloads
Agarwal, Saurabh
Mao, Anyong
Akella, Aditya
Venkataraman, Shivaram
Distributed, Parallel, and Cluster Computing
Large Language Models (LLMs) are increasingly being deployed in applications such as chatbots, code editors, and conversational agents. A key feature of LLMs is their ability to engage in multi-turn interactions with humans or external tools, enabling a wide range of tasks. Each new request in a multi-turn interaction depends on the intermediate state, specifically the key-value (K,V) caches, from previous requests in the ongoing interaction. Existing serving engines either recompute the K,V caches or offload them to main memory. Profiling reveals that recomputation can result in over 99% of processed tokens being redundant. On the other hand, offloading K,V caches from GPU memory makes inference serving stateful, leading to load imbalances across the cluster. To address these challenges, we developed SYMPHONY. SYMPHONY leverages the observation that multi-turn work loads provide additional hints that allow K,V caches to be migrated off the critical serving path. By utilizing these hints, SYMPHONY dynamically migrates K,V caches to enable finegrained scheduling of inference requests. Our experiments demonstrate that SYMPHONY can handle over 8x the number of requests compared to state-of-the-art baselines, with a similar latency profile.
title SYMPHONY: Improving Memory Management for LLM Inference Workloads
topic Distributed, Parallel, and Cluster Computing
url https://arxiv.org/abs/2412.16434