paperbot · PL 论文追踪

全部论文 待读 收藏

P2 <scp>Medusa:</scp> Accelerating Serverless LLM Inference with Materialization

Medusa:以物化加速无服务器 LLM 推理
ASPLOS Proceedings of the 30th ACM International Conference on Architectural Support for Programming Languages and Operating Systems, Volume 12025匹配度 2/10 · 该论文属于 LLM 推理服务系统/运行时优化(通过离线物化 CUDA 图与 KV 缓存初始化信息降低冷启动延迟),虽涉及 ML 系统与运行时,但不涉及静态分析、形式化验证、浮点程序分析或贝叶斯程序分析,与画像中 PL→AI / AI→PL 的核心研究问题基本无交集。引用 32 inbox
Shaoxun Zeng, Minhui Xie, Shiwei Gao, Youmin Chen, Youyou Lu
crossref: 2026-09-12dblp: 2026-09-12

AI 速览

一句话:通过离线物化 CUDA 图和 KV 缓存初始化信息,降低无服务器 LLM 推理冷启动延迟。

无服务器模型推理面临严重冷启动延迟:需要将模型加载到设备,而 LLM 还额外引入 KV 缓存初始化阶段(分析并预留内存)和 CUDA 图捕获阶段(针对不同批大小动态构建图)。这些阶段对推理性能至关重要,却成为冷启动瓶颈。本文提出 Medusa,通过状态物化缓解长冷启动延迟:在离线阶段物化 CUDA 图及 KV 缓存初始化所需信息,在线阶段高效恢复;并引入离线-在线协同参数恢复与触发内核增强的内核地址恢复两项技术,处理 CUDA 图中的非确定性问题。Medusa 成功物化并恢复 10 个模型共 139364 个 CUDA 图节点,将模型加载延迟降低 42.5%;在真实 LLM 推理负载下,将首 token 时间(TTFT)尾延迟降低 53.0%。

问题
无服务器 LLM 推理的冷启动需加载模型,并额外执行 KV 缓存初始化与 CUDA 图捕获,导致高延迟。
方法
Medusa 在离线阶段物化 CUDA 图和 KV 缓存初始化信息,在线阶段高效恢复,并用协同参数恢复与触发内核增强的地址恢复处理非确定性。
评估
在 10 个模型共 139364 个 CUDA 图节点上验证物化与恢复,测量模型加载延迟和真实负载下 TTFT 尾延迟。
原文摘要(Abstract)

Serverless is a promising paradigm to provide scalable, cost-efficient, and easy-to-use model inference services. However, the cold start of model inference functions requires loading models to the devices, which incurs high latencies and undermines the benefits of serverless computing. In LLMs, things get even worse since two extra stages are introduced: a KV cache initialization stage that profiles and anticipates memory reservation for KV cache, and a capturing stage which dynamically constructs CUDA graphs for different batch sizes. Both stages are paramount to the inference performance, but become the main culprit of cold start latency. This paper proposes Medusa to mitigate the long cold start latency through state materialization. Instead of dynamic profiling and construction in the runtime, Medusa materializes the CUDA graphs as well as the information needed by the KV cache initialization in the offline phase, and restores them efficiently in the online phase. Medusa further introduces two novel techniques -- offline-online cooperated parameters restoration and triggering-kernels enhanced kernel address restoration -- to tackle non-deterministic issues in CUDA graphs. Medusa successfully materializes and restores CUDA graphs across 10 models (with a total of 139364 CUDA graph nodes), and reduces the latency of model loading by 42.5%. Under real-world LLM inference workloads, Medusa reduces the tail latency of the time to first token (TTFT) by 53.0%.

链接与引用

DOI 原文 · PDF(开放获取) · DBLP

BibTeX
@inproceedings{ZengXGCL25,
  title = {<scp>Medusa:</scp>
                    Accelerating Serverless LLM Inference with Materialization},
  author = {Shaoxun Zeng and Minhui Xie and Shiwei Gao and Youmin Chen and Youyou Lu},
  booktitle = {ASPLOS},
  year = {2025},
  doi = {10.1145/3669940.3707285}
}