ChatPaper.aiChatPaper

KV Packet: Cache KV Livre de Recomputação e Independente de Contexto para LLMs

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

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

Resumo

Os Modelos de Linguagem de Grande Porte (LLMs) dependem fortemente do cache Chave-Valor (KV) para minimizar a latência de inferência. No entanto, os caches KV padrão são dependentes do contexto: reutilizar um documento em cache em um novo contexto exige o recálculo dos estados KV para contabilizar mudanças na distribuição de atenção. Soluções existentes, como CacheBlend, EPIC e SAM-KV, mitigam esse problema ao recalcular seletivamente um subconjunto de tokens; entretanto, elas ainda incorrem em sobrecarga computacional (FLOPs) não negligenciável e aumento da latência do Tempo para o Primeiro Token (TTFT). Neste artigo, propomos o KV Packet, uma estrutura de reutilização de cache livre de recálculo que trata documentos em cache como "pacotes" imutáveis encapsulados em adaptadores de tokens leves e treináveis, os quais são treinados via destilação auto supervisionada para superar descontinuidades de contexto. Experimentos com Llama-3.1 e Qwen2.5 demonstram que o método KV Packet proposto alcança FLOPs próximos de zero e TTFT menor do que as linhas de base baseadas em recálculo, mantendo escores F1 comparáveis aos da linha de base de recálculo 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