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

ICaRus:相同缓存重用以实现高效的多模型推理

ICaRus: Identical Cache Reuse for Efficient Multi Model Inference

NAVER Cloud(NAVER云)

Sunghyeon Woo, Jaeeun Kil, Hoseung Kim, Minsub Kim, Joonghoon Kim, Ahreum Seo, Sungjae Lee, Minjung Jo, Jiwon Ryu, Baeseong Park, Se Jung Kwon, Dongsoo Lee

AI总结:

本文提出ICaRus架构,通过共享KV缓存减少多模型推理中的内存消耗和重计算开销,提升效率和可扩展性。

摘要:

多模型推理近期已成为重要范式,尤其在代理AI系统开发中。然而,在此类场景中,每个模型必须维护自己的键值(KV)缓存以处理相同提示,导致显著的内存消耗。这种KV缓存的爆炸性增长迫使LLM服务系统驱逐先前存储的缓存,从而在需要再次使用驱逐缓存时引入显著的重计算开销。此外,前缀缓存在不同模型之间本质上不可行,迫使每个模型为相同提示重新计算KV缓存,导致显著开销。为缓解这些问题,我们提出了ICaRus,一种新的架构,允许多个模型在所有层共享相同的KV缓存。ICaRus基于一个关键观察,即解码器-only Transformer可以概念上分解为一个逻辑编码器,生成KV缓存,和一个逻辑解码器,从KV缓存预测输出标记。ICaRus仅微调逻辑解码器,而冻结逻辑编码器,使多个模型能够共享相同的KV缓存。这消除了缓存内存爆炸和意外驱逐,同时允许跨模型重用KV缓存用于新输入标记,从而在多模型推理中消除冗余重计算,实现效率和可扩展性。此外,通过整合轻量级适配器如LoRA,ICaRus在解码过程中并行化KV缓存生成和下一个标记预测。ICaRus在多样化的任务上实现了与任务特定微调模型相当的准确性,同时允许多个专门模型完全共享KV缓存。ICaRus在具有8种不同模型的多代理工作流中,实现了比传统多模型系统低11.1倍的P95延迟和3.8倍更高的吞吐量。

英文摘要:

Multi model inference has recently emerged as a prominent paradigm, particularly in the development of agentic AI systems. However, in such scenarios, each model must maintain its own Key-Value (KV) cache for the identical prompt, leading to substantial memory consumption. This explosive growth of KV caches forces LLM serving systems to evict previously stored caches, which in turn introduces significant recomputation overhead whenever the evicted caches are required again. Moreover, prefix caching is inherently infeasible across different models, forcing each model to recompute KV cache for the identical prompt, which leads to significant overhead. To alleviate these issues, we propose Identical Cache Reuse (ICaRus), a novel architecture that allows multiple models to share identical KV caches across all layers. ICaRus is based on the key observation that a decoder-only Transformer can be conceptually decomposed into a logical encoder, which generates KV caches, and a logical decoder, which predicts output tokens from the KV caches. ICaRus fine-tunes only the logical decoder while freezing the logical encoder, enabling multiple models to share an identical KV cache. This eliminates cache memory explosion and unexpected evictions while also allowing cross-model reuse of KV caches for new input tokens, thereby removing redundant recomputation in multi model inference achieving both efficiency and scalability. Moreover, by incorporating lightweight adapters such as LoRA, ICaRus parallelizes KV cache generation and next-token prediction during decoding. ICaRus achieves comparable accuracy to task-specific fine-tuned model across a diverse set of tasks, while allowing multiple specialized models to fully share KV caches. ICaRus achieves up to 11.1x lower P95 latency and 3.8x higher throughput in multi agent workflow with 8 different models, compared to conventional multi model system.

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

↑