arXivDaily arXiv每日学术速递 周一至周五更新
arXiv 2604.25080cs.DC
收藏

CacheFlow: 高效的大语言模型服务中的3D并行KV缓存恢复

CacheFlow: Efficient LLM Serving via Automated 3D-Parallel KV Cache Restoration

University of Illinois Urbana-Champaign(伊利诺伊大学厄巴纳-香槟分校);Carnegie Mellon University(卡内基梅隆大学)

Sean Nian, Hanzhang Shen, Zhiyu Wu, Jiahao Fang, Qilong Feng, Fan Lai

AI总结:

本文提出CacheFlow框架,通过3D并行抽象优化KV缓存恢复,减少TTFT时间,提升大语言模型服务效率。

摘要:

KV缓存恢复已成为长上下文LLM工作负载中的主要瓶颈,包括多轮对话、检索增强生成和代理流水线。现有方法将恢复视为每个请求的重新计算与I/O传输的权衡,但未能利用跨token、层和分布式部署的并行性,并忽略了批量服务中的资源竞争。我们提出CacheFlow,将缓存恢复视为多维并行执行问题,引入跨token、层和GPU的统一3D并行抽象,通过Transformer推理的结构依赖性实现细粒度的重计算与I/O重叠。核心是批量感知的双指针调度器,通过优先优化计算和I/O分配减少重计算成本。评估显示,CacheFlow在多样化的模型、工作负载和硬件上将TTFT减少10%-62%。

英文摘要:

KV cache restoration is becoming a major bottleneck in long-context LLM serving, including multi-turn conversations, agentic workloads, and RAG. Existing advances largely treat restoration as a coarse per-request choice between recomputing cached states and loading them from external storage (e.g., CPU memory or remote machines), overlooking structured parallelism within the model and resource contention across batched requests. Increasingly, modern hybrid architectures complicate restoration as their interleaved attention and recurrent layers introduce heterogeneous compute costs and state footprints. We present CacheFlow, which rethinks restoration as a multi-dimensional parallel execution problem. To our knowledge, CacheFlow is the first framework to jointly exploit restoration parallelism across tokens, layers, and GPUs. CacheFlow unifies token- and layer-wise restoration as a staircase partition of the token-layer space, while lightweight boundary activations enable concurrent restoration across model shards. A batch-aware dynamic-programming planner jointly determines what to recompute and what to load across requests and layer blocks, balancing GPU computation against shared I/O resources. Across dense and hybrid models spanning single-digit to hundred-billion parameters, diverse workloads, and hardware conditions, CacheFlow reduces restoration latency by 2.24$\times$-3.00$\times$ on average over existing advances, directly improving end-to-end serving latency by 1.64$\times$.

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

↑