arXivDaily arXiv每日学术速递 周一至周五更新
arXiv 2602.01519cs.LGcs.AI
收藏

你需要为原生位置无关缓存添加编码器

You Need an Encoder for Native Position-Independent Caching

State Key Laboratory for Novel Software Technology, Nanjing University, China(新型软件技术国家重点实验室,南京大学,中国);School of Computer Science, Peking University, China(计算机学院,北京大学,中国)

Shiju Zhao, Junhao Hu, Jiaqi Zheng, Guihai Chen

AI总结:

本文提出原生PIC方法,通过在解码器-only LLMs中引入编码器并训练其支持PIC,开发了COMB缓存系统,显著提升了TTFT和吞吐量,同时保持精度。

摘要:

大型语言模型(LLMs)的键值(KV)缓存是前缀基于的,这使得在处理任意顺序检索的上下文时效率极低。位置无关缓存(PIC)已被提出,以启用无需位置约束的KV重用;然而,现有方法往往导致显著的精度下降,限制了其实际应用。为了解决这个问题,我们提出原生PIC,通过将编码器重新引入广泛使用的解码器-only LLMs,并显式训练它以支持PIC。我们进一步开发了COMB,一种PIC-aware的缓存系统,能够无缝集成到现有的推理框架中。实验结果表明,COMB将时间到第一个标记(TTFT)减少了51-94%,并提高了吞吐量3倍,同时保持了可比的精度。此外,使用DeepSeek-V2-Lite-Chat时质量的提升表明COMB适用于其他类型的解码器-only LLMs。我们的代码可在https://github.com/shijuzhao/Comb上获得。

英文摘要:

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 3$\times$ 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.

机构、总结、中文摘要均由AI分析而来,可能存在错误,请以论文正文为准。

↑