ChatPaper.aiChatPaper

Hai Bisogno di un Encoder per la Cache Nativa Indipendente dalla Posizione

You Need an Encoder for Native Position-Independent Caching

February 2, 2026
Autori: Shiju Zhao, Junhao Hu, Jiaqi Zheng, Guihai Chen
cs.AI

Abstract

La cache Key-Value (KV) dei Large Language Model (LLM) è basata sui prefissi, rendendola altamente inefficiente per l'elaborazione di contesti recuperati in ordine arbitrario. È stato proposto il Position-Independent Caching (PIC) per consentire il riutilizzo della KV senza vincoli posizionali; tuttavia, gli approcci esistenti comportano spesso un degrado sostanziale dell'accuratezza, limitandone l'adozione pratica. Per risolvere questo problema, proponiamo il PIC nativo reintroducendo l'encoder nei diffusi LLM a solo decoder e addestrandolo esplicitamente per supportare il PIC. Sviluppiamo inoltre COMB, un sistema di caching consapevole del PIC che si integra perfettamente con i framework di inferenza esistenti. I risultati sperimentali mostrano che COMB riduce il Time-to-First-Token (TTFT) del 51-94% e aumenta il throughput di 3 volte con un'accuratezza comparabile. Inoltre, il miglioramento qualitativo ottenuto utilizzando DeepSeek-V2-Lite-Chat dimostra l'applicabilità di COMB ad altri tipi di LLM a solo decoder. Il nostro codice è disponibile all'indirizzo https://github.com/shijuzhao/Comb.
English
The Key-Value (KV) cache of Large Language Models (LLMs) is prefix-based, making it highly inefficient for processing contexts retrieved in arbitrary order. Position-Independent Caching (PIC) has been proposed to enable KV reuse without positional constraints; however, existing approaches often incur substantial accuracy degradation, limiting their practical adoption. To address this issue, we propose native PIC by reintroducing the encoder to prevalent decoder-only LLMs and explicitly training it to support PIC. We further develop COMB, a PIC-aware caching system that integrates seamlessly with existing inference frameworks. Experimental results show that COMB reduces Time-to-First-Token (TTFT) by 51-94% and increases throughput by 3times with comparable accuracy. Furthermore, the quality improvement when using DeepSeek-V2-Lite-Chat demonstrates the applicability of COMB to other types of decoder-only LLMs. Our code is available at https://github.com/shijuzhao/Comb.
PDF03March 19, 2026