Cadence:为投机解码的外部性加上延迟上限
Cadence: Regulating the Speculation Externality in LLM Serving
SGLang 的投机解码虽然整体吞吐高 13%,但近三成请求反而变慢,这个问题很多部署团队都踩过。Cadence 用延迟上限把回退率压到 0.53%,还在 Qwen3-32B 上跑出 1.30 倍吞吐。做推理服务或 SLO 敏感业务的工程师值得看看这套控制器思路。
arXiv 论文提出投机解码存在"投机外部性":一个 batch 内所有请求都要等同一个 decode step,而只有草稿 token 被接受的请求能获得补偿。实测中 SGLang 默认投机解码(SGL-SD)在 112 个请求的 step 里将吞吐比自回归解码提高 13%,但 26% 的请求出现回退,速度反而更慢。
论文提出的 Cadence 是一个逐 step 控制器,为每个请求设定延迟上限——即该 step 相对一次自回归 step 的额外时延,这在起草前就已知。控制器先用 all-or-none 下限保证每个请求的首个草稿 token 被验证,再用统一的离线接受率曲线,在限额内填充预期效用最高的草稿 token,由运营方的效用评分决定运行哪个方案。
在 Qwen3-32B 上高负载测试(平均 33.8 请求/秒)中,Cadence 吞吐达到自回归解码的 1.30 倍、SGL-SD 的 1.26 倍,同时把请求回退率从 SGL-SD 的 31.4% 降到 0.53%。
Cadence: Regulating the Speculation Externality in LLM Serving
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%.
This report is categorized under AITOP's "Papers" desk, focusing on US frontier AI labs and Silicon Valley technology leaders. Within our cross-regional analytical framework, it directly maps to AI developer toolchains, coding agents, and engineering workflows and AI regulation, compliance frameworks, and sovereign compute policy. Key entities and technical topics under continuous tracking include speculative decoding, SGLang, Qwen3, LLM inference.
Source attribution: curated from arXiv cs.AI (@Swapnil Gandhi, Christos Kozyrakis).