ChatPaper.aiChatPaper

SeKV: Resolutie-adaptieve KV-cache met hiërarchisch semantisch geheugen voor lange-context LLM-inferentie

SeKV: Resolution-Adaptive KV Cache with Hierarchical Semantic Memory for Long-Context LLM Inference

June 30, 2026
Auteurs: Amirhossein Abaskohi, Giuseppe Carenini, Peter West, Yuhang He
cs.AI

Samenvatting

Grote taalmodellen werken steeds vaker met lange contexten, waarbij de KV-cache een dominant geheugenknelpunt wordt: de grootte neemt lineair toe met de sequentielengte en moet gedurende de volledige decodering worden behouden, waardoor volledige GPU-caching zonder compressie onbetaalbaar duur wordt. Bestaande compressiemethoden voor de KV-cache hebben moeite om efficiëntie te balanceren met getrouwe contextbehoud. Tokenverwijdering gooit informatie weg, terwijl semantische groepering compressiebeslissingen vastlegt tijdens de prefiltijd; geen van beide kan token-niveau details herstellen uit een gecomprimeerde span zodra deze relevant wordt tijdens de generatie. Als oplossing stellen we SeKV voor, een resolutie-adaptieve semantische KV-cache die context organiseert in entropie-gestuurde semantische spans en deze opslaat in een GPU-CPU geheugenhiërarchie zonder informatie weg te gooien. Elke span houdt een lichtgewicht samenvattingsvector op de GPU voor grove routering en een laagrangige SVD-basis op de CPU voor token-niveau reconstructie op aanvraag. Een getraind inzoommechanisme breidt selectief query-relevante spans uit tijdens de decodering, wat nauwkeurige ophaling mogelijk maakt zonder de volledige KV-cache op de GPU te materialiseren. SeKV maakt adaptieve reconstructie op token-niveau mogelijk terwijl het basis-LLM volledig bevroren blijft en er minder dan 0,05% trainbare parameters worden toegevoegd. Over vier benchmarks heen verbetert SeKV gemiddeld met 5,9% ten opzichte van de sterkste semantische compressiebaseline, terwijl het GPU-geheugen met 53,3% vermindert in vergelijking met volledige KV-caching bij 128K context. Code is beschikbaar op https://github.com/AmirAbaskohi/SeKV.
English
Large language models increasingly operate over long contexts, where the KV cache becomes a dominant memory bottleneck: its size grows linearly with sequence length and must be retained throughout decoding, making full GPU caching prohibitively expensive without compression. Existing KV cache compression methods struggle to balance efficiency with faithful context preservation. Token eviction discards information, while semantic grouping fixes compression decisions at prefill time; neither can recover token-level detail from a compressed span once it becomes relevant during generation. As a solution, we propose SeKV, a resolution-adaptive semantic KV cache that organizes context into entropy-guided semantic spans and stores them across a GPU-CPU memory hierarchy without discarding information. Each span keeps a lightweight summary vector on GPU for coarse routing and a low-rank SVD basis on CPU for on-demand token-level reconstruction. A trained zoom-in mechanism selectively expands query-relevant spans during decoding, enabling precise retrieval without materializing the full KV cache on GPU. SeKV enables adaptive token-level reconstruction while keeping the base LLM fully frozen and adding fewer than 0.05% trainable parameters. Across four benchmarks, SeKV improves over the strongest semantic compression baseline by 5.9% on average while reducing GPU memory by 53.3% versus full KV caching at 128K context. Code is available on https://github.com/AmirAbaskohi/SeKV.