混合注意力语言模型间的KV缓存转换:MLA隐变量、线性注意力状态与稀疏注意力索引器
Translating KV Caches Between Hybrid-Attention Language Models: MLA Latents, Linear-Attention States and Sparse-Attention Indexers
AI总结:
该研究提出混合注意力语言模型间的KV缓存转换方法,通过映射不同模型的KV缓存格式实现无需重读上下文的对话接管,在多组16B-48B规模模型上验证了其召回率、速度等性能优势。
摘要:
接管另一模型对话的模型通常需要重新读取全部历史内容;文本交接仅通过丢弃内容缩短重新读取的过程。而KV缓存转换则将源模型的缓存映射为目标模型自身的格式,使目标模型无需重新读取完整上下文即可继续处理。该方法适用于分组查询注意力(GQA),但当前开源权重的前沿模型会缓存压缩隐变量(MLA)、稀疏注意力索引器键以及固定大小的线性注意力状态。我们在一对GQA模型上复现了KV-Lingo,随后针对上述每种对象,明确了其捕获与注入的位置,并提出了一种可达到原生质量的机制。我们研究了两对160亿至480亿参数规模的混合模型(双向转换):Kimi-VL-A3B与Kimi-Linear-48B(MLA与MLA+Kimi Delta Attention)、Qwen3.5-27B与Qwen3.8-27B(门控DeltaNet混合模型),以及一个稀疏注意力目标(Qwen3.8-27B与Qwen3.8-Flash-Next)。MLA隐变量通过逐词线性映射转换;循环状态通过闭式校正复制,或通过重放目标自身的循环生成。精确的长程召回需要 token 标识:从源模型第0层MLA隐变量解码token ID,可使2-32K长度的 needle 召回率从0.09提升至0.99,64K长度(为最长训练提示词的8倍)的召回率达0.83-1.00。全MLA混合方向在所有任务指标上均处于原生质量的配对置信区间内,同形状GDN混合模型双向转换均达到原生水平(除了从源模型继承的6%弃权(不执行)),在64K token 下的首token生成时间比重新读取缩短18.7至46.8倍。分段多轮转换保持重新预填充水平;朴素重新转换会失效。在稀疏注意力目标上,预测的索引器键的 needle 召回率与目标自身的键相当(一个种子)。我们提出了一个假设,说明这些转换方案如何迁移至3000亿参数以上的混合旗舰模型。
英文摘要:
A model that takes over another model's conversation must normally re-read the whole history; a text hand-off shortens the re-read only by dropping content. KV-cache translation instead maps the source's cache into the target's own format, so the target continues from the full context without re-reading it. It works for grouped-query attention (GQA), but open-weights frontier models now cache compressed latents (MLA), sparse-attention indexer keys and fixed-size linear-attention states. We replicate KV-Lingo on a GQA pair and then give, for each of these objects, where to capture and inject it and a mechanism that reaches native quality. We study two hybrid pairs at 16-48B scale in both directions, Kimi-VL-A3B - Kimi-Linear-48B (MLA - MLA + Kimi Delta Attention) and Qwen3.5-27B - Qwen3.8-27B (Gated DeltaNet hybrids), plus a sparse-attention target (Qwen3.8-27B - Qwen3.8-Flash-Next). MLA latents translate with token-wise linear maps; recurrent states are copied with a closed-form correction or synthesised by replaying the target's own recurrence. Exact long-range recall needs token identity: decoding token ids from the source's layer-0 MLA latent raises needle recall from 0.09 to 0.99 at 2-32K and to 0.83-1.00 at 64K, eight times the longest training prompt. The hybrid full-MLA direction is within the paired confidence interval of native quality on every task metric, and same-shape GDN hybrids reach the native level in both directions (apart from 6% refusals inherited from the source), with time to first token 18.7 and 46.8 times shorter than a re-read at 64K tokens. Segment-wise multi-turn transfer stays at the re-prefill level; naive re-translation collapses. On the sparse-attention target, predicted indexer keys recall the needle as well as the target's own keys (one seed). We state as a hypothesis how the recipes transfer to 300B+ hybrid flagships.
机构、总结、中文摘要均由AI分析而来,可能存在错误,请以论文正文为准。