AgentSpec: Speculative Decoding for Batch Inference of LLM Agents

๐Ÿ“… 2026-08-24
๐Ÿ“ˆ Citations: 0
โœจ Influential: 0
๐Ÿ“„ PDF
๐Ÿค– AI Summary
ๆœฌๆ–‡้’ˆๅฏนLLMไปฃ็†ๅบ”็”จๅ“ๅบ”ๆ—ถ้—ด้•ฟ็š„้—ฎ้ข˜๏ผŒๆๅ‡บไบ†ไธ€็งๆ–ฐ็š„ๆŽจๆต‹่งฃ็ ็ฎ—ๆณ•AgentSpec๏ผŒ้€š่ฟ‡็ป“ๆž„้š”็ฆป่ตท่‰ๅ’Œๅ†—ไฝ™ๆ„Ÿ็Ÿฅ้ข„็ฎ—ๅˆ†้…ๆฅๆ้ซ˜ๆŽจ็†ๆ•ˆ็އใ€‚
๐Ÿ“ Abstract
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.
Problem

Research questions and friction points this paper is trying to address.

speculative decoding
batch inference
large language model agents
response time
inference efficiency
Innovation

Methods, ideas, or system contributions that make the work stand out.

speculative decoding
structure-isolated drafting
redundancy-aware budget allocation
batch inference
๐Ÿ”Ž Similar Papers