arXivDaily arXiv每日学术速递 周一至周五更新
arXiv 2605.05696cs.DCcs.AIcs.LG
收藏

Irminsul:基于MLA的原生位置无关缓存用于代理LLM服务

Irminsul: MLA-Native Position-Independent Caching for Agentic LLM Serving

Erlangen National High Performance Computing Center(埃朗根国家高性能计算中心)

Bole Ma, Jan Eitzinger, Harald Köstler

AI总结:

本文提出Irminsul,一种基于MLA的原生位置无关缓存,通过内容哈希键和δ旋转规则提升代理LLM服务性能,实现高达83%的提示词恢复率和63%的预填能量节省。

摘要:

代理LLM工作负载在每个回合中将位相同的token置于移位位置,导致前缀缓存在首次字节差异处失效。操作员报告缓存命中回归范围从适度的延迟到严重的TTFT峰值,最高达10-16秒。先前的位置无关缓存系统纠正RoPE于完整的d_K维键上,这是由GQA架构造成的成本,而非缓存本身。多头潜在注意力(MLA)在DeepSeek-V2/V3/R1、Kimi-K2/Moonlight、GLM-5和Mistral Large 3中大规模部署,将每个KV行分解为位置无关的c_KV和64维k_r,可封闭形式纠正。这种结构使内容寻址缓存成为自然选择,而非GQA的退步。我们提出Irminsul,扩展SGLang的radix缓存,通过CDC分段的内容哈希键和δ旋转规则处理k_r。我们评估了三个原生MLA-MoE部署——DeepSeek-V2-Lite(16B/2.4B)、Kimi Moonlight-16B-A3B和JoyAI-Flash(48B/3B)——在所有三个上的输出一致性以及在两个端点上的恢复测量;Irminsul在代理流量中恢复多达约83%的提示词token,同时在每次缓存命中中提供63%的预填能量节省。我们主张内容寻址缓存应作为服务堆栈中的第一类原语,而非前缀匹配的退步。

英文摘要:

Agentic LLM workloads put bit-identical tokens at shifted positions every turn, voiding prefix caches at the first byte of divergence. Operators report cache-hit regressions ranging from moderate slowdowns to severe TTFT spikes of 10-16s on unchanged content. Prior position-independent caching systems correct RoPE on the full $d_K$-dimensional key, an architectural cost imposed by GQA, not by caching itself. Multi-Head Latent Attention, deployed at scale in DeepSeek-V2/V3/R1, Kimi-K2/Moonlight, GLM-5, and Mistral Large 3, factors each KV row into a position-free $c_{KV}$ and a 64-dim $k_r$ correctable in closed form; this structure motivates content-addressed caching as a natural fit rather than a GQA workaround. We present Irminsul, which extends SGLang's radix cache with content-hash keying over CDC-chunked segments and a $δ$-rotation rule for $k_r$. We evaluate three native MLA-MoE deployments - DeepSeek-V2-Lite (16B/2.4B), Kimi Moonlight-16B-A3B, and JoyAI-Flash (48B/3B) - with output-consistency on all three and recovery measured on the two endpoints; Irminsul recovers up to ~83% of prompt tokens above exact-prefix on agentic traffic while delivering 63% prefill energy savings per cache hit. We argue that content-addressed caching belongs in the serving stack as a first-class primitive, not a retrofit over prefix matching.

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

↑