arXiv:2608.24004cs.CL2026-08

提升大模型代理批量推理速度,解决高并发下生成效率下降问题

AgentSpec: Speculative Decoding for Batch Inference of LLM Agents

论文配图:AgentSpec: Speculative Decoding for Batch Inference of LLM Agents
图 1 · 摘自论文原文
  • 通过语义隔离草案减少无效生成路径,降低拒绝率
  • 动态分配预算,更好利用空闲计算资源,提速显著
  • 适用于需要高并发推理的智能代理系统开发

基于大语言模型(LLM)的代理应用常面临响应延迟高的问题。推测解码是一种提升推理效率且不损害生成质量的有前景方法。然而,现有最优推测解码算法在大批次场景下性能显著下降,限制了其在真实代理应用中的部署。本文首先对LLM代理的推测解码进行系统分析,识别出两大性能瓶颈:推测令牌的高拒绝率与动态令牌预算的低利用率。基于此,提出AgentSpec,一种针对LLM代理的推测解码算法。AgentSpec采用结构隔离式草案机制,将推测限制在代理工作流中语义连贯的片段内,有效避免无关语义路径的生成,实现极低的拒绝率。同时,引入冗余感知预算分配策略,利用代理级信息更高效地利用动态释放的令牌预算。我们在vLLM框架上对五种不同工作负载及四类来自四个LLM家族的模型进行了实现与评估,结果表明AgentSpec在各项指标上均优于现有最先进方法。

原文摘要 · Abstract (English)

Large language model (LLM)-based agent applications often incur high response time. Speculative decoding is a promising solution to improve the inference efficiency of LLM agents without impacting generation quality. However, state-of-the-art speculative decoding algorithms exhibit substantial speed degradation under large batch sizes, limiting their effectiveness to deploy in real-world agent applications. In this work, we first present a systematic analysis of speculative decoding for LLM agents and identify two dominant factors of speedup degradation: high rejection rate of speculative tokens, and under-utilization of dynamic token budgets.B ased on these observations, we propose AgentSpec, a speculative decoding algorithm that addresses the limitations of existing methods for LLM agents. AgentSpec incorporates structure-isolated drafting that constrains speculation to semantically coherent segments of the agent workflow, reducing the drafts of irrelevant semantic paths and achieving an extremely low rejection rate. Moreover, AgentSpec adopts redundancy-aware budget allocation that exploits agent-level information to better utilize the dynamically-free token budget during the agent inference. We implement and evaluate AgentSpec on five different workloads and four different models from four different LLM families in vLLM. Our results demonstrate the superiority of AgentSpec over state-of-the-arts.

推理加速大模型代理推测解码

Thank you to arXiv for use of its open access interoperability. PaperDance 不是 arXiv 官方产品;中文卡片由大模型生成,请以原文为准。