- Main
Memory-Efficient LLM Inference Algorithms
Abstract
The rise of generative Large Language Models (LLMs) as a strong algorithmic paradigm across language processing tasks has made efficient LLM inference a predominant systems challenge. However, LLM serving is becoming increasingly resource-intensive, with LLM model size scaling rapidly outpacing hardware memory scaling, and with applications requiring longer context lengths, more complex reasoning, and multi-turn agentic workflows. Additionally, inherent sequential dependencies with LLM generation mean that the workload is heavily memory bandwidth-bound, creating a critical memory bottleneck for LLM inference. These challenges have led to a growing bottleneck between memory-hungry LLMs and memory-constrained hardware platforms that limits adoption. To tackle this challenge, this thesis presents several memory-efficient LLM inference algorithms to enable serving large models with long context lengths. It first presents a profiling and performance modeling analysis of LLM inference (Chapter 2), establishing that the main bottleneck for LLM inference is memory bandwidth rather than compute, and identifying that the main source of memory traffic shifts from model weights to KV cache as context length grows. Guided by this analysis, it then presents work on quantizing model weights to fit large models on memory-constrained GPUs (Chapter 3), followed by methods to accelerate long context inference workloads through quantizing KV cache activations (Chapter 4). It then outlines algorithms that aim to accelerate LLM inference by only loading important context from memory, demonstrating this for two target applications: shared prefix workloads (Chapter 5) and reasoning workloads (Chapter 6). Finally, Chapter 7 provides a summary of the contributions of this thesis and outlines avenues for future work.