KV cache restoration has emerged as a dominant bottleneck in serving long-context LLM workloads, including multi-turn conversations, retrieval-augmented generation, and agentic pipelines. Existing approaches treat restoration as a per-request tradeoff between recomputation and I/O transfer, recomputing KV states from scratch or offloading them from external storage (e.g., CPU memory or remote machines). However, existing advances fail to exploit parallelism across tokens, layers, and distributed deployments, and critically ignore resource contention under batched serving. We present CacheFlow, a KV cache restoration framework that rethinks cache restoration as a multi-dimensional parallel execution problem. CacheFlow introduces a unified 3D parallelism abstraction across tokens, layers, and GPUs, enabling fine-grained overlap of recomputation and I/O along the structural dependencies of transformer inference. At the core of CacheFlow is a batch-aware two-pointer scheduler that jointly optimizes compute and I/O allocation across requests by prioritizing operations with the highest marginal reduction in recomputation cost. Our evaluations show that CacheFlow reduces Time-To-First-Token (TTFT) by 10%-62% over existing advances across diverse models, workloads, and hardware.


翻译:KV缓存恢复已成为服务长上下文LLM工作负载(包括多轮对话、检索增强生成和代理管道)的主要瓶颈。现有方法将缓存恢复视为每个请求中重计算与I/O传输之间的权衡,通常从零开始重计算KV状态或从外部存储(如CPU内存或远程机器)卸载缓存。然而,现有方案未能充分利用令牌、层和分布式部署间的并行性,且严重忽略了批处理服务下的资源竞争问题。我们提出CacheFlow——一种将缓存恢复重构为多维并行执行问题的KV缓存恢复框架。CacheFlow引入了跨令牌、层和GPU的统一3D并行抽象,可沿Transformer推理的结构依赖关系实现重计算与I/O的细粒度重叠。其核心是一种批感知双指针调度器,通过优先执行边际重计算成本降幅最高的操作,联合优化跨请求的计算与I/O分配。实验表明,在不同模型、工作负载和硬件平台上,CacheFlow相比现有方案可将首令牌响应时间(TTFT)降低10%-62%。

0
下载
关闭预览

相关内容

TransMLA:多头潜在注意力(MLA)即为所需
专知会员服务
23+阅读 · 2025年2月13日
【ICML2022】用于视频恢复的无监督流对齐序列到序列学习
【Flink】基于 Flink 的流式数据实时去重
AINLP
14+阅读 · 2020年9月29日
三维重建 3D reconstruction 有哪些实用算法?
极市平台
13+阅读 · 2020年2月23日
复现 | FastDVDNet:实时视频去噪算法
CVer
13+阅读 · 2019年7月12日
【学界】DeepMind论文:深度压缩感知,新框架提升GAN性能
GAN生成式对抗网络
14+阅读 · 2019年5月23日
TensorFlow 2.0新特性之Ragged Tensor
深度学习每日摘要
18+阅读 · 2019年4月5日
Deep Image Prior——图像恢复入门
中国人工智能学会
15+阅读 · 2019年2月16日
【推荐】用Tensorflow理解LSTM
机器学习研究会
36+阅读 · 2017年9月11日
国家自然科学基金
1+阅读 · 2017年12月31日
国家自然科学基金
0+阅读 · 2015年12月31日
国家自然科学基金
0+阅读 · 2015年12月31日
国家自然科学基金
0+阅读 · 2015年12月31日
国家自然科学基金
0+阅读 · 2015年12月31日
国家自然科学基金
4+阅读 · 2015年12月31日
国家自然科学基金
0+阅读 · 2015年12月31日
国家自然科学基金
0+阅读 · 2015年12月31日
国家自然科学基金
2+阅读 · 2014年12月31日
VIP会员
最新内容
重新思考无人机时代的生存能力
专知会员服务
3+阅读 · 今天7:44
装甲突击旅:现代战争思考、战斗与组织
专知会员服务
3+阅读 · 今天7:28
在人工智能加速决策环境中拓展OODA循环
专知会员服务
4+阅读 · 今天7:18
军事欺骗:供作战战术指挥官使用的工具
专知会员服务
4+阅读 · 今天7:03
综述 | 世界动作模型:少做梦,多行动
专知会员服务
5+阅读 · 6月23日
美以伊冲突:无人机与人工智能的运用
专知会员服务
10+阅读 · 6月23日
《特种部队在透明战场中的生存力》最新报告
专知会员服务
5+阅读 · 6月23日
相关资讯
【Flink】基于 Flink 的流式数据实时去重
AINLP
14+阅读 · 2020年9月29日
三维重建 3D reconstruction 有哪些实用算法?
极市平台
13+阅读 · 2020年2月23日
复现 | FastDVDNet:实时视频去噪算法
CVer
13+阅读 · 2019年7月12日
【学界】DeepMind论文:深度压缩感知,新框架提升GAN性能
GAN生成式对抗网络
14+阅读 · 2019年5月23日
TensorFlow 2.0新特性之Ragged Tensor
深度学习每日摘要
18+阅读 · 2019年4月5日
Deep Image Prior——图像恢复入门
中国人工智能学会
15+阅读 · 2019年2月16日
【推荐】用Tensorflow理解LSTM
机器学习研究会
36+阅读 · 2017年9月11日
相关基金
国家自然科学基金
1+阅读 · 2017年12月31日
国家自然科学基金
0+阅读 · 2015年12月31日
国家自然科学基金
0+阅读 · 2015年12月31日
国家自然科学基金
0+阅读 · 2015年12月31日
国家自然科学基金
0+阅读 · 2015年12月31日
国家自然科学基金
4+阅读 · 2015年12月31日
国家自然科学基金
0+阅读 · 2015年12月31日
国家自然科学基金
0+阅读 · 2015年12月31日
国家自然科学基金
2+阅读 · 2014年12月31日
Top
微信扫码咨询专知VIP会员