Cadence: Regulating Speculative Decoding Tail Latency in SGLang

Cadence (arXiv:2612.04294) eliminates the "speculation externality" in batched speculative decoding, where unaccepted requests stall behind long verification steps for other requests in the batch. Using a per-step slack controller in SGLang on H200 with Qwen3-32B and EAGLE-3, Cadence raises throughput 1.30x over autoregressive decoding and 1.26x over SGL-SD while slashing request regression from 31.4% to 0.53%.
Cadence: Regulating Speculative Decoding Tail Latency in SGLang: Cadence (arXiv:2612.04294) eliminates the "speculation externality" in batched speculative decoding, where unaccepted requests stall behind long verification steps for other requests in the batch. Using a per-step slack controller in SGLang on H200 with Qwen3-32B and EAGLE-3, Cadence raises throughput 1.30x over autoregressive decoding and 1.26x over SGL-SD while slashing request regression from 31.4% to 0.53%. Designed as a zero-dependency, open-source TypeScript architecture under the MIT License with native Model Context Protocol (MCP) support and deterministic phase state machines.
- Cuts Regressed Requests from 31.4% to 0.53%: Caps each request's accumulated delay relative to autoregressive (AR) decoding on every decode step.
- 1.30x Throughput Over AR & 1.26x Over SGL-SD: Under 33.8 req/s Azure trace saturation on Qwen3-32B BF16 + EAGLE-3, Cadence beats both AR and unthrottled SGLang SD.
- Zero Drafter-Confidence Dependency: Decides draft depth (0, 1, 3, or 7) and per-request speculation length before drafting using one offline acceptance curve and hardware latency profile.
- 1.9% Profile MAPE & 0.05 ms Median Overshoot: Lightweight offline startup profiling enables accurate step-latency bounding with CUDA graphs and overlap scheduling.
import { createAgent } from '@smoke-monkey/harness';// Dispatch high-concurrency agent bursts to an SGLang server with Cadence slack controlconst agent = createAgent({agentId: 'cadence-low-regression-agent',provider: 'openai-compatible',baseUrl: 'http://127.0.0.1:30000/v1',model: 'Qwen/Qwen3-32B',workspacePath: process.cwd(),mcpServers: {servingTelemetry: {command: 'npx',args: ['-y', '@smoke-monkey/mcp-sglang-stats', '--controller', 'cadence'],env: {CADENCE_DELAY_CAP_EPS: '0.25',CADENCE_SLACK_PACE_RHO: '1.0',CADENCE_DRAFT_DEPTHS: '1,3,7',},},},permissions: {read_file: 'allow',write_file: 'ask',run_command: 'ask',},});async function main() {const result = await agent.run('Benchmark 112-concurrency agent turns and confirm <1% request regression against AR baseline.');console.log('Telemetry:', result.summary);}main().catch(console.error);
Watch: Related Video Guides
Serve Your Own LLM: vLLM & SGLang, End-to-End
How inference works at scale? vLLM and SGLang inference engines
What Is the Speculation Externality in Batched LLM Serving?
Cadence (arXiv:2612.04294) is a per-step speculative decoding (SD) controller that bounds how much decode latency any individual request can lose compared to autoregressive (AR) decoding. On Qwen3-32B BF16 with EAGLE-3 on an H200 GPU, Cadence raises high-load throughput by 1.30x over AR while dropping regressed requests from SGLang default SD's 31.4% down to 0.53%.
In continuous batching, every request in a batch waits through the same synchronized decode step. When a batch of 112 requests speculates deeply for mean throughput, requests whose draft tokens are rejected suffer longer step times with zero token reward—causing SGLang default SD (SGL-SD) to regress 31.4% of all requests (and 76.8% of a 10% slow-acceptance class at saturation).
| Serving Policy (Qwen3-32B + EAGLE-3, H200) | Throughput / Cadence | Regression-Free Thr. / Cadence | Regressed Requests (%) | Slow Class Over Cap (eps=0.25 / 0.1) |
|---|---|---|---|---|
| Cadence (Per-Step Slack Control) | 1.00x (1.30x vs AR) | 1.00x | 0.53% | 0% / 0.03% |
| SGL-SD (SGLang Default SD) | 0.79x | 0.56x | 31.4% | 76.8% / 84.7% |
| D-cut Rule (Full Depth 7) | 0.89x | 0.83x | 8.7% | 1.2% / 35.0% |
| DSpark Rule (Full Depth 7) | 0.91x | 0.82x | 10.7% | 13.4% / 57.3% |
How Per-Step Slack Regulation and the All-or-None Floor Work
Because every decode step produces at least one verified token per request, the worst-case delay any single step adds to a request is L_meas - L_AR(B), which is known from offline hardware profiling before drafting begins:
- Per-Request Delay Accounting: Cadence maintains each request's accumulated delay
H_r <- H_r + L_meas - A_r * L_AR(B)against capH_r <= eps * T_r^AR + beta. The critical request with minimal slackmin_q R_qsets the allowed step latencytau = (1 + eps) * L_AR(B) + rho * min_q R_q. - All-or-None First-Token Floor: Whenever an admissible verification budget
(depth, K)fits insidetauwith headroom for one draft token per request, Cadence assigns every request its first draft token before allocating deeper tokens—preventing fast-accepting requests from starving others. - Offline Latency Profile Accuracy: Across a 600-second mixed Azure Inference Trace (low, high at 67.7 req/s bursts, and moderate load), Cadence's startup latency profile maintains 1.9% MAPE, 0.05 ms median overshoot, and only 0.18% of steps exceeding
eps * L_AR(B).
Use Depth Choice Together With Delay Caps
Pairing D-cut or DSpark confidence ranking with Cadence's dynamic draft-depth selection (0, 1, 3, or 7) drops regression from 8.7%-10.7% down to 0.53%-0.75%, proving that bounding step latency before drafting is the decisive control lever.
Reproducible Step-Latency Bound (tau) Calculator
Test how Cadence converts per-request slack into an allowed step latency tau and filters candidate verification budgets before running an EAGLE-3 draft pass:
# Reproduce Cadence allowed step latency tau and budget filtering (Eq. 4)
def compute_tau(L_ar, eps, min_slack, rho=1.0):
if min_slack >= 0:
return (1.0 + eps) * L_ar + rho * min_slack
return (1.0 + eps) * L_ar + min_slack
L_ar_112 = 32.9 # ms for batch size B=112 on Qwen3-32B BF16 H200
for slack in [12.0, 2.0, -3.5]:
tau = compute_tau(L_ar_112, eps=0.25, min_slack=slack, rho=1.0)
print(f"min_slack={slack:+5.1f} ms -> tau={tau:5.2f} ms (fallback to AR if tau < {L_ar_112:.1f})")Frequently Asked Questions
Q:What is the speculation externality in LLM serving?
In batched speculative decoding, every request waits for the slowest verification step in the batch. Requests whose draft tokens are rejected absorb the extra verification latency without gaining extra tokens, causing them to decode slower than under autoregressive steps.
Q:Does Cadence require reading per-token drafter confidence scores?
No. Cadence decides the draft depth and per-request speculation lengths before drafting starts, using each request's remaining delay slack and a single shared offline token-acceptance curve.
Q:How does Cadence fall back when a request runs out of delay slack?
If the critical request has zero or negative slack such that no speculative plan fits within tau, Cadence selects draft depth 0—executing a clean autoregressive step that generates one token per request and replenishes slack.
Q:Which hardware and serving stack were used to benchmark Cadence?
Evaluations ran Qwen3-32B in BF16 with EAGLE-3 on an NVIDIA H200 (141 GB) inside SGLang with CUDA graphs, overlap scheduling, and up to 112 concurrent requests.
Related Alternatives & Comparisons
Related Architecture Guides
View all guidesBest Open Source Coding Agents in 2026: Free, Local & Fully Hackable Harnesses
MCP Server Security Best Practices: Hardening Model Context Protocol Agents in 2026
Open Source Coding Agent Harness: Build a Forkable, Local AI Engineering Runtime
Build with Smoke Monkey Harness
Zero dependencies. 24 built-in tools. Human-in-the-loop safety. 100% open source under the MIT License.