Glean 拾遗
Recent picks

1pick · chronological

07-05

DSpark: Semi-Autoregressive Drafting and Confidence-Scheduled Verification for Speculative Decoding

This article provides a deep technical analysis of DSpark, DeepSeek's newly open-sourced speculative decoding framework. Starting from the mathematical foundations (rejection sampling, speedup formula), it systematically traces the evolution from traditional autoregressive drafting, tree-based speculation, multi-head/feature-level methods (Medusa, EAGLE series), MTP training integration, to the parallel diffusion paradigm (DFlash, DDTree, JetSpec). The core focus is on DSpark's two key innovations: 1) Semi-Autoregressive Generation: a parallel backbone (DFlash) produces base logits in one forward pass, and a lightweight Markov/RNN head injects sequential dependencies, adding ~1% drafting overhead while improving draft quality by 30%. 2) Confidence-Scheduled Verification: a confidence head predicts per-position conditional acceptance probabilities, calibrated via Sequential Temperature Scaling. A hardware-aware scheduler then formalizes verification length selection as a global throughput maximization problem, dynamically pruning low-confidence suffixes under high concurrency. The article also reveals a critical production adaptation: a two-step delayed asynchronous scheduling mechanism that resolves the conflict between causality and hardware's jagged throughput curves, enabling seamless integration with CUDA Graph replay. DSpark has replaced MTP-1 in DeepSeek-V4 production, delivering 50%+ aggregate throughput gains at moderate SLA targets and maintaining viable interactivity where the baseline fails. With code-level walkthroughs including the training loop, this piece is a must-read for inference system engineers and AI infra practitioners.

mp.weixin.qq.com · 89 min · Confidence Scheduling · DSpark · Inference Optimization