Medusa: Accelerating Serverless LLM Inference with Materialization
Shaoxun Zeng, Minhui Xie, Shiwei Gao, Youmin Chen, Youyou Lu
摘要
Serverless is a promising paradigm to provide scalable, costefficient, 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%.
问 Lune
几分钟读透这篇 Paper,不用再花一下午。
Lune 能读完全文,也能读引用它的顶会 Paper,讲清它的结论、证据和局限,每一点都注明出自哪篇 Paper。不用硬啃,也不靠猜。
已有 5 篇顶会 Paper 引用了它。别等审稿人问起,先弄清它们发现了什么。
脉络
- FlexPipe: Adapting Dynamic LLM Serving Through Inflight Pipeline Refactoring in Fragmented Serverless Clusters 引用了 Taming Throughput-Latency Tradeoff in LLM Inference with Sarathi-Serve
- FlexPipe: Adapting Dynamic LLM Serving Through Inflight Pipeline Refactoring in Fragmented Serverless Clusters 引用了 Serverless in the Wild: Characterizing and Optimizing the Serverless Workload at a Large Cloud Provider
- FlexPipe: Adapting Dynamic LLM Serving Through Inflight Pipeline Refactoring in Fragmented Serverless Clusters 引用了 Efficient Memory Management for Large Language Model Serving with PagedAttention
- HydraServe: Minimizing Cold Start Latency for Serverless LLM Serving in Public Clouds 引用了 Serverless in the Wild: Characterizing and Optimizing the Serverless Workload at a Large Cloud Provider
- HydraServe: Minimizing Cold Start Latency for Serverless LLM Serving in Public Clouds 引用了 Efficient Memory Management for Large Language Model Serving with PagedAttention
- D i F low : A System for Micro-Serving Text-to-image Di ffusion Work flows 引用了 Taming Throughput-Latency Tradeoff in LLM Inference with Sarathi-Serve
- Towards Resource-Efficient Serverless LLM Inference with SLINFER 引用了 Taming Throughput-Latency Tradeoff in LLM Inference with Sarathi-Serve
- Towards Resource-Efficient Serverless LLM Inference with SLINFER 引用了 Serverless in the Wild: Characterizing and Optimizing the Serverless Workload at a Large Cloud Provider
- Towards Resource-Efficient Serverless LLM Inference with SLINFER 引用了 Efficient Memory Management for Large Language Model Serving with PagedAttention
引用它的顶会 Paper5
- HydraServe: Minimizing Cold Start Latency for Serverless LLM Serving in Public CloudsChiheng Lou, Sheng Qi, Chao Jin, Dapeng Nie 等NSDI 2026 · 22 次引用
- FlexPipe: Adapting Dynamic LLM Serving Through Inflight Pipeline Refactoring in Fragmented Serverless ClustersYanying Lin, Shijie Peng, Chengzhi Lu, ChengZhong Xu 等EuroSys 2026 · 4 次引用
- Re-architecting End-host Networking with CXL: Coherence, Memory, and OffloadingHouxiang Ji, Yifan Yuan, Yang Zhou, Ipoom Jeong 等MICRO 2025 · 3 次引用
- D i F low : A System for Micro-Serving Text-to-image Di ffusion Work flowsLingyun Yang, Suyi Li, Tianyu Feng, Xiaoxiao Jiang 等SOSP 2026
- Towards Resource-Efficient Serverless LLM Inference with SLINFERChuhao Xu, Zijun Li, Quan Chen, Han Zhao 等HPCA 2026
它引用的 Paper23
- Efficient Memory Management for Large Language Model Serving with PagedAttentionWoosuk Kwon, Zhuohan Li, Siyuan Zhuang, Ying Sheng 等SOSP 2023 · 1,016 次引用
- Serverless in the Wild: Characterizing and Optimizing the Serverless Workload at a Large Cloud ProviderMohammad Shahrad, Rodrigo Fonseca, Iñigo Goiri, Gohar Irfan Chaudhry 等USENIX ATC 2020 · 946 次引用
- PyTorch 2: Faster Machine Learning Through Dynamic Python Bytecode Transformation and Graph CompilationJason Ansel, Edward Z. Yang, Horace He, Natalia Gimelshein 等ASPLOS 2024 · 693 次引用
- Taming Throughput-Latency Tradeoff in LLM Inference with Sarathi-ServeAmey Agrawal, Nitin Kedia, Ashish Panwar, Jayashree Mohan 等OSDI 2024 · 537 次引用
- Faasm: Lightweight Isolation for Efficient Stateful Serverless ComputingSimon Shillaker, Peter R. PietzuchUSENIX ATC 2020 · 382 次引用
相关 Paper
- Optimus: Warming Serverless ML Inference via Inter-Function Model TransformationZicong Hong, Jian Lin, Song Guo, Sifu Luo 等EuroSys 2024 · 29 次引用
- ServerlessLLM: Low-Latency Serverless Inference for Large Language ModelsYao Fu, Leyang Xue, Yeqi Huang, Andrei-Octavian Brabete 等OSDI 2024 · 125 次引用
- PASK: Cold Start Mitigation for Inference with Proactive and Selective Kernel Loading on GPUsXuanteng Huang, Jiangsu Du, Nong Xiao, XianWei ZhangDAC 2025
- FaSei: Fast Serverless Edge Inference with Synergistic Lazy Loading and Layer-wise CachingZhaowu Huang, Fang Dong, Xiaolin Guo, Daheng YinINFOCOM 2025 · 4 次引用
- SMIless: Serving DAG-based Inference with Dynamic Invocations under Serverless ComputingChengzhi Lu, Huanle Xu, Yudan Li, Wenyan Chen 等SC 2024 · 8 次引用
