UPDF AI

Jenga: Effective Memory Management for Serving LLM with Heterogeneity

Chen Zhang,Kuntai Du,10 Authors,Ion Stoica

2025 · DOI: 10.1145/3731569.3764823
Symposium on Operating Systems Principles · 23 Citations

TLDR

Jenga is presented, a memory allocation framework for heterogeneous LLMs that employs an attention-property-aware allocator, leveraging the least common multiple of embedding sizes to optimize memory usage and performing cache eviction based on attention patterns to enhance memory reuse.

Abstract

Large language models are widely used but expensive to run. To reduce costs, it is crucial to maximize request batch size through efficient GPU memory management. Existing approaches, such as PagedAttention, struggle with modern LLMs because of the growing heterogeneity in the sizes of models' internal embeddings and attention mechanisms. In this paper, we present Jenga, a memory allocation framework for these heterogeneous LLMs. Jenga tackles two key challenges: (1) memory fragmentation caused by embeddings of different sizes, and (2) unpredictable memory usage from varying attention mechanisms across layers. Jenga employs an attention-property-aware allocator, leveraging the least common multiple (LCM) of embedding sizes to optimize memory usage and performing cache eviction based on attention patterns to enhance memory reuse. We implement Jenga in vLLM, and evaluate it with diverse LLMs, datasets, and GPUs. Evaluations show that Jenga improves GPU memory utilization by up to 83% and serving throughput by up to 2.16× (1.46× on average).