Chalmers University of Technology
Adaptive KV Cache Management for Efficient Transformer-based LLM Inference - Leveraging Attention Sparsity for Memory Optimization
Abstract
dc:description.abstractThis Master’s thesis addresses the critical challenge of memory inefficiency in Transformerbased Large Language Models (LLMs) during inference, specifically focusing on the prohibitive memory footprint of the Key-Value (KV) cache. As LLMs scale, the KV cache becomes a significant bottleneck, limiting longer context windows and overall operational efficiency. To mitigate this issue, we propose and evaluate Adap-KV, a novel adaptive memory management strategy for the KV cache. Adap-KV employs a layer-aware dynamic allocation approach that intelligently adjusts KV cache size in real-time, leveraging insights from attention sparsity patterns. Our method aims to optimize memory utilization without compromising the performance or quality of LLM inference. Experimental results demonstrate that Adap-KV significantly reduces KV cache memory consumption, thereby enhancing the efficiency and scalability of Transformer-based LLMs, making them more amenable for real-world deployments with extended context capabilities.
Degree
thesis:*- Level thesis:degree_level
- H
- Department dc:contributor.department
- Chalmers tekniska högskola / Institutionen för data och informationsteknik
- Year dc:date.issued
- 2025
Author and committee
dc:creator, dc:contributor.*- Author dc:creator
-
- Xu, Dikai
- Advisor dc:contributor.supervisor
-
- Ali-Eldin Hassan, Ahmed
- Committee member dc:contributor.committeemember
-
- Ali-Eldin Hassan, Ahmed
Subjects
dc:subject × 8Rights
- Language dc:language.iso
- eng
Identifiers
dc:identifier.*- Dc Identifier Coursecode
- DATX05