arXivDaily arXiv每日学术速递 周一至周五更新
arXiv 2604.21231cs.NIcs.AIcs.PF
收藏

SparKV:面向设备的大语言模型高效推断的开销感知KV缓存加载

SparKV: Overhead-Aware KV Cache Loading for Efficient On-Device LLM Inference

Hongyao Liu, Liuqun Zhai, Junyi Wang, Zhengru Fang, Jingshu Chen, Jun Huang

AI总结:

SparKV通过结合云端KV流和设备端计算,优化KV缓存加载策略,降低延迟并提升推断效率,实验显示在不同数据集和设备上均有效降低时延和能耗。

摘要:

高效的设备端大语言模型(LLM)推断仍面临挑战,由于硬件资源有限和预填阶段处理完整输入上下文构建键值(KV)缓存的成本高。我们提出SparKV,一种自适应的KV加载框架,结合云端KV流与设备端计算。SparKV建模单个KV块的成本,并决定每个块应流式传输还是本地计算,同时重叠两种执行路径以减少延迟。为处理无线连接波动和边缘资源可用性变化,SparKV进一步在运行时细化离线生成的调度计划以重新平衡通信和计算成本。在多样化的数据集、LLM和边缘设备上的实验表明,SparKV将Time-to-First-Token减少1.3x至5.1x,对响应质量影响极小,同时降低每个请求的能耗1.5x至3.3x,证明其在实际设备部署中的鲁棒性和实用性。

英文摘要:

Efficient inference for on-device Large Language Models (LLMs) remains challenging due to limited hardware resources and the high cost of the prefill stage, which processes the full input context to construct Key-Value (KV) caches. We present SparKV, an adaptive KV loading framework that combines cloud-based KV streaming with on-device computation. SparKV models the cost of individual KV chunks and decides whether each chunk should be streamed or computed locally, while overlapping the two execution paths to reduce latency. To handle fluctuations in wireless connectivity and edge resource availability, SparKV further refines offline-generated schedules at runtime to rebalance communication and computation costs. Experiments across diverse datasets, LLMs, and edge devices show that SparKV reduces Time-to-First-Token by 1.3$x-5.1x with negligible impact on response quality, while lowering per-request energy consumption by 1.5x to 3.3x, demonstrating its robustness and practicality for real-world on-device deployment.

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

↑