Foundry:基于模板的CUDA图上下文材料化用于快速LLM服务冷启动
Foundry: Template-Based CUDA Graph Context Materialization for Fast LLM Serving Cold Start
AI总结:
Foundry通过模板化CUDA图上下文材料化,减少LLM服务冷启动延迟,提升启动速度并保持吞吐量。
摘要:
现代LLM服务提供商越来越多地依赖自动扩展和并行重配置来响应快速变化的工作负载,但冷启动延迟仍然是主要瓶颈。尽管最近的系统已将模型权重加载时间减少到几秒钟,但CUDA图捕获仍需要几十秒到几分钟,且通常主导启动过程。不幸的是,CUDA图不能简单地序列化:除了图拓扑外,它们还紧密耦合到执行上下文,包括内核参数中嵌入的设备地址和在预热期间懒加载的内核代码。现有方法要么依赖于易碎的内核特定修补,要么依赖于重量级的过程级检查点/恢复,这些方法对动态并行切换缺乏灵活性。我们提出了Foundry,一种基于模板的CUDA图上下文材料化系统,在离线处理阶段持久化图拓扑和执行上下文,并通过几乎无开销的方式在线重建可执行图。Foundry强制确定性的内存布局,自动提取和重新加载所需捕获图的内核二进制文件,并通过拓扑基于的模板减少在线重建成本。对于分布式服务,Foundry进一步使单GPU离线捕获能够为多GPU部署生成模板,仅通过修补仅依赖于排名的通信状态。在密集和MoE模型上,最多235B参数,Foundry将冷启动延迟减少高达99%,将Qwen3-235B-A22B的初始化时间从10分钟减少到3.9秒,同时保持CUDA图的吞吐量增益。
英文摘要:
Modern LLM service providers increasingly rely on autoscaling and parallelism reconfiguration to respond to rapidly changing workloads, but cold-start latency remains a major bottleneck. While recent systems have reduced model weight loading to seconds, CUDA graph capture still takes tens of seconds to minutes and often dominates startup. Unfortunately, CUDA graphs cannot be naively serialized: beyond graph topology, they are tightly coupled to execution context, including device addresses embedded in kernel arguments and kernel code lazily loaded during warmup. Existing approaches either rely on brittle kernel-specific patching or heavyweight process-level checkpoint/restore that are inflexible to dynamic parallelism switching. We present Foundry, a template-based CUDA graph context materialization system that persists both graph topology and execution context during an offline processing stage, and reconstructs executable graphs online with negligible overhead. Foundry enforces deterministic memory layouts, automatically extracts and reloads kernel binaries required by captured graphs, and reduces online reconstruction costs through topology-based templating. For distributed serving, Foundry further enables a single-GPU offline capture to generate templates for multi-GPU deployments by patching only rank-dependent communication state. Across dense and MoE models up to 235B parameters, Foundry reduces cold-start latency by up to 99%, cutting the initialization time of Qwen3-235B-A22B from 10 minutes to 3.9 seconds while preserving the throughput gains of CUDA graphs.
机构、总结、中文摘要均由AI分析而来,可能存在错误,请以论文正文为准。