ChatPaper.aiChatPaper

Pacchetto KV: Memorizzazione nella Cache KV Indipendente dal Contesto senza Ricalcolo per LLM

KV Packet: Recomputation-Free Context-Independent KV Caching for LLMs

April 14, 2026
Autori: Chuangtao Chen, Grace Li Zhang, Xunzhao Yin, Cheng Zhuo, Bing Li, Ulf Schlichtmann
cs.AI

Abstract

I Large Language Model (LLM) si basano pesantemente sulla memorizzazione nella cache Chiave-Valore (KV) per minimizzare la latenza di inferenza. Tuttavia, le cache KV standard sono dipendenti dal contesto: il riutilizzo di un documento memorizzato in un nuovo contesto richiede il ricalcolo degli stati KV per tenere conto degli spostamenti nella distribuzione dell'attenzione. Soluzioni esistenti come CacheBlend, EPIC e SAM-KV mitigano questo problema ricalcolando selettivamente un sottoinsieme di token; tuttavia, comportano comunque un overhead computazionale (FLOP) non trascurabile e una maggiore latenza del Time-to-First-Token (TTFT). In questo articolo, proponiamo KV Packet, un framework per il riutilizzo della cache senza ricalcolo che tratta i documenti memorizzati come "pacchetti" immutabili avvolti in adattatori soft-token addestrabili e leggeri, i quali vengono addestrati tramite distillazione auto-supervisionata per colmare le discontinuità contestuali. Esperimenti condotti su Llama-3.1 e Qwen2.5 dimostrano che il metodo KV Packet proposto raggiunge FLOPs prossimi allo zero e un TTFT inferiore rispetto ai baseline basati sul ricalcolo, mantenendo allo stesso tempo punteggi F1 comparabili a quelli del baseline di ricalcolo completo.
English
Large Language Models (LLMs) rely heavily on Key-Value (KV) caching to minimize inference latency. However, standard KV caches are context-dependent: reusing a cached document in a new context requires recomputing KV states to account for shifts in attention distribution. Existing solutions such as CacheBlend, EPIC, and SAM-KV mitigate this issue by selectively recomputing a subset of tokens; however, they still incur non-negligible computational overhead (FLOPs) and increased Time-to-First-Token (TTFT) latency. In this paper, we propose KV Packet, a recomputation-free cache reuse framework that treats cached documents as immutable ``packets'' wrapped in light-weight trainable soft-token adapters, which are trained via self-supervised distillation to bridge context discontinuities. Experiments on Llama-3.1 and Qwen2.5 demonstrate that the proposed KV Packet method achieves near-zero FLOPs and lower TTFT than recomputation-based baselines, while retaining F1 scores comparable to those of the full recomputation baseline.
PDF52April 18, 2026