JS$^2$:联合调度与投机解码优化智能体推理
JS$^2$: Joint Scheduling and Speculative Decoding for Efficient Agentic LLM Inference
做智能体服务的开发者可以看看这篇系统论文。它把投机解码和任务调度放在一起优化,在 vLLM 和 SGLang 上实现,平均任务完成时间最高提速 2.10 倍,比单纯做调度或单纯做投机解码的方案更完整,还开源了代码。
论文提出 JS$^2$,一个面向 LLM 智能体服务的推理系统,将投机解码(Speculative Decoding)与智能体级调度联合优化,目标是最小化端到端任务完成时间(JCT)。
作者实测发现,推理瓶颈随并发度变化:低并发时主要受解码延迟影响,高并发时则变成排队延迟。为此 JS$^2$ 用独立 CUDA Graph 实现原生投机解码与非投机路径的迭代级切换,降低禁用投机时的开销。
系统还通过显式计划、提示词派生的执行状态和历史轨迹的层级匹配来估计任务剩余 LLM 请求数,并据此优先调度剩余步骤少的任务,同时结合离线 profiling 和负载估计动态选择是否启用投机解码。JS$^2$ 基于 vLLM 和 SGLang 实现,在 3 个 LLM、4 种负载、3 种工作流、2 种 GPU 平台和 2 条真实服务 trace 上评估,相比最优基线平均 JCT 加速最高达 2.
10 倍,尾延迟和吞吐量保持相当水平。代码已在 GitHub 开源。
JS$^2$: Joint Scheduling and Speculative Decoding for Efficient Agentic LLM Inference
LLM-powered agents execute tasks through interdependent LLM calls interleaved with tool executions, making end-to-end Job Completion Time (JCT) a central serving objective. Our measurements reveal that the dominant LLM inference bottleneck shifts from decoding latency at low concurrency to queueing delay at high concurrency. Speculative Decoding (SD) accelerates decoding but may degrade performance under heavy load. Dynamic arrivals and intermittent tool executions cause batch-size fluctuations in online agent serving. Existing Adaptive Speculative Decoding (ASD) approaches rely on reactive feedback, incur overhead when speculation is disabled, and offer limited upper-layer control. Agent-level scheduling mitigates queueing delays but overlooks the load-dependent effectiveness of SD. Our key insight is that prioritizing tasks with fewer remaining LLM requests reduces queueing delays and shortens high-batch periods, creating additional SD opportunities. We present JS$^2$, a bottleneck-aware LLM serving system that jointly optimizes SD and agent-level scheduling. JS$^2$ enables externally controllable, iteration-level switching between native SD and non-SD paths using separate CUDA Graphs, minimizing disabled-SD overhead while preserving ASD compatibility. It estimates remaining steps using explicit plans, prompt-derived execution states, and hierarchical matching of historical trajectories. JS$^2$ coordinates remaining-step-aware scheduling with load-adaptive SD selection based on offline profiling and near-future load estimation. We implement JS$^2$ on vLLM and SGLang and evaluate it across three LLMs, four workloads, three workflows, two GPU platforms, and two real-world serving traces. JS$^2$ achieves up to a 2.10$\times$ speedup in average JCT over the best baselines, while maintaining comparable tail latency and throughput. Our code is available at https://github.com/Wenz0101/JS2.
本条情报归属 AITOP「论文」核心追踪栏目。在跨区域产业观察坐标中,该动态直接关联「AI 开发者工具链、Coding Agent 与工程化实践」研究主线,反映出当前技术演进与商业落地的最新风向。涉及核心实体与技术议题包括:投机解码、vLLM、SGLang、智能体,读者可通过下方标签进入对应专题页查阅历史脉络与关联对比。
信源核验说明:本文原始线索采编自「arXiv cs.AI」(@Zijian Wen, Liangkun Chen, Jiamin Cao, Ennan Zhai, Songjun Huang, Xu Chen, Xiaoxi Zhang),经 AITOP 多维评分管线结构化提炼。