Cadence:调控 LLM 推理服务中的投机解码负外部性
Cadence: Regulating the Speculation Externality in LLM Serving
AI 导读
arXiv 论文提出 Cadence,一种面向 LLM 推理服务的逐步控制器,用于约束投机解码中的“投机外部性”,避免批内部分请求比自回归解码更慢。
正文 · 原文
Abstract:Speculative decoding (SD) speeds up LLM inference: a small model drafts several tokens, which the target model verifies in one pass. Speculating for mean throughput hides a cost: every request in a batch waits through the same decode step, so one request's draft tokens can lengthen the step for all, while only requests whose draft tokens are accepted are repaid. We call this shared cost the speculation externality: the step's latency beyond one autoregressive (AR) step, which generates one token per request. Acceptance varies across requests and over time, and requests with too few accepted draft tokens regress, running slower than under AR decoding. In one step with 112 requests, SGLang's default SD (SGL-SD) raises throughput 13% over AR decoding while 26% of requests regress. We introduce Cadence, a per-step controller that caps each request's delay, the time it loses compared with AR steps. Every step generates at least one token per request, so the most a step can add to any request's delay is its latency beyond one AR step, known before drafting. The caps therefore reduce to one allowed step latency, set by the request closest to its cap. Within this limit, an all-or-none floor makes every speculative step verify each request's first draft token whenever there is headroom for one per request. Cadence then fills the rest of each possible step within this limit with the draft tokens expected to add the most utility, using one offline acceptance curve, the same for every request, and runs the one that an operator's utility scores highest. On Qwen3-32B under high load (33.8 requests/s on average), Cadence raises throughput 1.30x over AR decoding and 1.26x over SGL-SD while cutting the regression rate, the share of requests that regress, from SGL-SD's 31.4% to 0.53%.
| Subjects: | Distributed, Parallel, and Cluster Computing (cs.DC); Artificial Intelligence (cs.AI); Computation and Language (cs.CL) |
| Cite as: | arXiv:2612.04294 [cs.DC] |
| (or arXiv:2612.04294v1 [cs.DC] for this version) | |
| https://doi.org/10.48550/arXiv.2612.04294 arXiv-issued DOI via DataCite (pending registration) |
Submission history
From: Swapnil Gandhi [view email]
[v1]
Wed, 2 Dec 2026 18:31:39 UTC (299 KB)
来源:arXiv cs.AI · arxiv.org