MEMORY AND LATENCY OPTIMIZATION IN LARGE LANGUAGE MODELS VIA KEY-VALUE CACHING

The article examines the problem of optimizing memory and latency during the inference of large language models (LLMs) by efficiently managing the key–value cache, a central element of the autoregressive text generation mechanism. The relevance of the topic is driven by the exponential growth in the scale of modern LLMs and the sharp increase in computational and monetary costs in the inference phase, where memory capacity and bandwidth become the limiting factors of performance. The study aims to systematize and comparatively analyze contemporary approaches to KV-cache optimization at three levels, system, kernel, and algorithmic, while identifying their synergistic effects and engineering trade-offs. The novelty of the work lies in proposing a unified taxonomic structure that brings together heterogeneous methods traditionally considered in isolation: memory virtualization mechanisms (PagedAttention), IO-aware computational kernels (FlashAttention), cache compression methods via quantization (FP8, INT8), and intelligent token eviction policies (AhaKV, SAGE-KV, Attention-Gate). The study demonstrates that maximum efficiency is achieved by combining system and algorithmic techniques. Page-based memory organization eliminates fragmentation and increases GPU utilization, while IO-optimized attention kernels reduce latency. Additionally, quantization, combined with adaptive token eviction, ensures the scaling of context length while preserving generation quality. It is substantiated that further advances hinge on the creation of dynamic, self-learning policies for KV-cache management and on GPU architectures specialized for the memory access patterns of LLMs, as well as on integrating privacy-aware mechanisms that prevent data leakage when caches are shared among users. The article will be helpful to researchers and engineers involved in designing LLM inference systems, optimizing GPU performance, and developing highly efficient AI architectures.

Institutions

Publication Details

Journal
Zenodo (CERN European Organization for Nuclear Research)
Published
2025-11-07
DOI
https://doi.org/10.5281/zenodo.17552697
Primary Topic
Big Data and Digital Economy
Type
article
Field-Weighted Citation Impact
0.00
Controls
|||
ALL TIME
JAN
FEB
MAR
APR
MAY
JUN
JUL
AUG
SEP
OCT
article

MEMORY AND LATENCY OPTIMIZATION IN LARGE LANGUAGE MODELS VIA KEY-VALUE CACHING

Zenodo (CERN European Organization for Nuclear Research)
Big Data and Digital Economy
article

MEMORY AND LATENCY OPTIMIZATION IN LARGE LANGUAGE MODELS VIA KEY-VALUE CACHING

article en

Abstract

The article examines the problem of optimizing memory and latency during the inference of large language models (LLMs) by efficiently managing the key–value cache, a central element of the autoregressive text generation mechanism. The relevance of the topic is driven by the exponential growth in the scale of modern LLMs and the sharp increase in computational and monetary costs in the inference phase, where memory capacity and bandwidth become the limiting factors of performance. The study aims to systematize and comparatively analyze contemporary approaches to KV-cache optimization at three levels, system, kernel, and algorithmic, while identifying their synergistic effects and engineering trade-offs. The novelty of the work lies in proposing a unified taxonomic structure that brings together heterogeneous methods traditionally considered in isolation: memory virtualization mechanisms (PagedAttention), IO-aware computational kernels (FlashAttention), cache compression methods via quantization (FP8, INT8), and intelligent token eviction policies (AhaKV, SAGE-KV, Attention-Gate). The study demonstrates that maximum efficiency is achieved by combining system and algorithmic techniques. Page-based memory organization eliminates fragmentation and increases GPU utilization, while IO-optimized attention kernels reduce latency. Additionally, quantization, combined with adaptive token eviction, ensures the scaling of context length while preserving generation quality. It is substantiated that further advances hinge on the creation of dynamic, self-learning policies for KV-cache management and on GPU architectures specialized for the memory access patterns of LLMs, as well as on integrating privacy-aware mechanisms that prevent data leakage when caches are shared among users. The article will be helpful to researchers and engineers involved in designing LLM inference systems, optimizing GPU performance, and developing highly efficient AI architectures.

Zenodo (CERN European Organization for Nuclear Research)
ATA Engineering (United States) (US)
Openalex Percentile: Top 32%
Big Data and Digital Economy
AI Navigator

Ask Laika to Summarize, Analyze, and Connect papers live on the map.

Summarize Papers & Methodologies

Extract key findings, datasets, and comparative methods across publications.

Benchmark Rankings & Visual Analytics

Rank top research institutions, authors, funders, topics, and journals by Field-Weighted Citation Impact (FWCI) and paper volume with instant charts.

Connect Distant Disciplines

Bridge topological clusters on the map to find hidden collaborative intersections.

MEMORY AND LATENCY OPTIMIZATION IN LARGE LANGUAGE MODELS VIA KEY-VALUE CACHING · Zenodo (CERN European Organization for Nuclear Research) (2025) | TGRS Research Map | TGRS