SemPIC: Learning Semantic Position-Independent KV Caches
Hui Xie, Peng Xiao, Yutong Deng, Shuoran Dou, Jian Yang, Jinyang Guo
Abstract
Long-context retrieval and agentic workloads repeatedly reuse the same documents under changing instructions, histories, and document orders. Prefix caching cannot exploit this reuse, while position-independent caching (PIC) remains unreliable because independently compiled KV states lack the future context in which they will be consumed. Our diagnostics show that a learned boundary-conditioned baseline sharply reduces attention deviation near reusable-block boundaries but leaves interior and task-level residuals, motivating adaptation of the document representation itself. We present SemPIC, which trains a LoRA-enabled Writer to compile native per-layer document KVs through behavioral distillation while retaining the pretrained decoder as an unchanged Reader. Adaptation is confined to offline cache construction, preserving the standard KV interface and cache-hit decoding path. We further introduce KV Gradient Checkpointing, which reduces peak training memory without severing gradients through cached KVs. Across three models and four tasks, SemPIC raises mean micro-F1 over KV Packet from 0.53 to 0.60, approaching Full Recompute at 0.62. Code: https://github.com/jn12-29/SemPIC
Create a lesson
Related papers
LinearKV: One Cached State Suffices for Position-Independent Caching in Hybrid LLMs
Shared title terminologycs.AIYirui Liu, Ruoling Qi, Longwen Wang et al.
Faster and Better Query (FBQ): Learning Future-Position Probes from the First Generated Token
Shared title terminologycs.AIJiankun Zou, Daixing Chen, Tongtong Yuan
Collaborative Language Models for Semantic IoT Data Processing: Validation through Zero-Shot Human Activity Recognition
Shared title terminologycs.AIMohsen Shirali, Kean Ooi, Anna Knab et al.
LoomKV: Lossless KV Cache Compression from GPU Memory to SSD for LLM Serving
Shared title terminologycs.AIWentao Zhu, Ziao Sheng, Peng Deng et al.
VISE: Verifier-Independent Skill Self-Evolution with Feedback from Tool Implementations
Shared title terminologycs.AIYuxuan Liu, Chongyang Du, Yuhao Zhang et al.
Discovering Bandwidth-Efficient Prefetchers to Shrink the Cache Hierarchy
Shared title terminologycs.AIPatrick Tser Jern Kon, Akanksha Jain, Abraham Gonzalez et al.