HyperAIHyperAI

Command Palette

Search for a command to run...

DSpark: 준자가생적 생성과 함께 신뢰도 계획적 추측 디코딩

초록

추측 디코딩(Speculative decoding)은 초안 생성과 목표 검증 과정을 분리함으로써 대규모 언어 모델(LLM) 추론 속도를 가속화합니다. 최근 병렬 초안 작성기들은 단일 전파(single forward pass)에서 긴 토큰 시퀀스를 효율적으로 제안하지만, 토큰 간 의존성(inter-token dependencies) 부재로 인해 수용률이 급격히 감소하는 한계가 있습니다. 또한, 이러한 확장된 블록을 무차별적으로 검증하면 거부 가능성이 높은 토큰들에 대한 중요한 배치(batch) 용량이 낭비되어, 고동시성(high-concurrency) 서빙 시스템의 처리량(throughput)이 심각하게 저하됩니다.본 논문은 높은 처리량의 병렬 생성과 부하 인지型(load-aware) 적응형 검증을 통합한 추측 디코딩 프레임워크인 DSpark를 제안합니다. 초안의 품질을 유지하기 위해 DSpark는 병렬 백본(parallel backbone)과 경량 순차 모듈(lightweight sequential module)을 결합한 준자기회귀(semi-autoregressive) 아키텍처를 활용하여 블록 내 의존성(intra-block dependency) 모델링을 도입하고 접미사 감소(suffix decay)를 완화합니다. 시스템 효율성을 최적화하기 위해 DSpark는 확률 스케줄링 검증(confidence-scheduled verification)을 적용하여, 추정된 접두사 생존률(prefix survival probabilities)과 엔진별 처리량 프로파일에 따라 각 요청마다 검증 길이를 동적으로 조정합니다.다양한 도메인의 오프라인 벤치마크에서 DSpark는 최신 자기회귀(autoregressive) 및 병렬 초안 작성기들보다 수용 길이를 획기적으로 개선합니다. 실제 사용자 트래픽 하에서 DeepSeek-V4 서빙 시스템에 배포되었을 때, DSpark는 검증 과정에서의 자원 낭비를 성공적으로 해소하였습니다.

One-sentence Summary

DeepSeek researchers propose DSpark, a speculative decoding framework that couples a semi-autoregressive draft architecture, combining a parallel backbone with a lightweight sequential module to introduce intra-block dependencies and mitigate suffix decay, with confidence-scheduled verification that dynamically adjusts verification length per request based on estimated prefix survival probabilities and engine-specific throughput profiles, to reduce verification waste and improve throughput in live deployments on DeepSeek-V4.

Key Contributions

  • DSpark uses a semi-autoregressive drafter that couples a parallel backbone with a lightweight sequential RNN head, injecting intra-block dependencies to mitigate suffix decay while preserving exact per-token softmax probabilities for rejection sampling.
  • The framework introduces confidence-scheduled verification, which dynamically selects verification lengths per request using estimated prefix survival probabilities and engine-level throughput profiles to eliminate wasted batch capacity on high-risk tokens.
  • Across diverse offline benchmarks, DSpark substantially improves accepted length over state-of-the-art autoregressive and parallel drafters, and in a live DeepSeek-V4 serving deployment it mitigates verification waste under real user traffic.

Introduction

Autoregressive decoding forces large language models to generate one token per forward pass, causing inference latency to grow linearly with output length. Speculative decoding bypasses this bottleneck by having a fast draft model propose multiple tokens at once, which the target model then verifies in parallel to maintain exact output distributions. However, practical speedups are limited because draft models struggle to combine both high acceptance rates and low drafting cost: lightweight autoregressive drafters reintroduce sequential overhead, while parallel generation schemes (non-autoregressive transformers, CTC-based models) cannot easily provide per-token probabilities for the standard rejection-sampling acceptance rule, restricting them to greedy verification. The authors present DSpark, which introduces a semi-autoregressive drafter that first predicts a block of tokens in parallel from a shared representation, then applies a local sequential correction head to yield exact per-token distributions for full compatibility with speculative decoding’s verification step. Coupled with a confidence-based scheduler that dynamically adapts the number of draft tokens per cycle, DSpark improves the drafting speed-quality balance and overall decoding throughput.

Method

The authors introduce DSpark, a speculative decoding framework designed to unify high-throughput parallel generation with adaptive, load-aware verification. To address the limitations of existing drafters, DSpark integrates two complementary components: a semi-autoregressive generation module and a confidence-scheduled verification mechanism.

As shown in the figure below:

The semi-autoregressive generation module splits draft generation into two stages to maintain draft quality while keeping latency low. First, a parallel backbone processes the entire block in a single forward pass, producing hidden states and base logits. This keeps the drafting time nearly independent of the block size. Second, a lightweight sequential block injects dependency among draft tokens. Rather than defining a globally normalized energy model, the sequential stage induces a causal block distribution through an autoregressive factorization:

P(Xx0)=k=1γpk(xkx0,x<k),pk(vx0,x<k)=exp(Uk(v)+Bk(x0,x<k,v))uVexp(Uk(u)+Bk(x0,x<k,u)).P(X \mid x_0) = \prod_{k=1}^{\gamma} p_k(x_k \mid x_0, x_{<k}), \quad p_k(v \mid x_0, x_{<k}) = \frac{\exp(U_k(v) + B_k(x_0, x_{<k}, v))}{\sum_{u \in \mathcal{V}} \exp(U_k(u) + B_k(x_0, x_{<k}, u))}.P(Xx0)=k=1γpk(xkx0,x<k),pk(vx0,x<k)=uVexp(Uk(u)+Bk(x0,x<k,u))exp(Uk(v)+Bk(x0,x<k,v)).

Here, x0x_0x0 is the anchor token, UkU_kUk represents the base logits from the parallel backbone, and BkB_kBk is a prefix-dependent transition bias. The authors implement this sequential stage using either a Markov head, which restricts the bias to depend only on the immediately preceding token via low-rank factorization, or an RNN head, which maintains a recurrent state to accumulate the full prefix history.

To optimize system efficiency, DSpark employs confidence-scheduled verification. A confidence head outputs a scalar estimate ck(0,1)c_k \in (0,1)ck(0,1) for each draft position, modeling the conditional probability that the draft token will survive target verification given that all preceding tokens have been accepted. The architecture uses a lightweight linear projection followed by a sigmoid function:

ck=σ(w[hk;W1[xk1]]),c_k = \sigma(w^\top [h_k; W_1[x_{k-1}]]),ck=σ(w[hk;W1[xk1]]),

where hkh_khk is the backbone hidden state and W1[xk1]W_1[x_{k-1}]W1[xk1] is the embedding of the previous draft token. To ensure the absolute magnitudes of these probabilities are accurate for scheduling, the authors apply Sequential Temperature Scaling to calibrate the joint probability of a draft prefix being accepted.

The hardware-aware prefix scheduler then uses these calibrated survival probabilities to dynamically determine the optimal verification length for each request. The scheduler formulates verification length selection as a global throughput maximization problem. For a batch of RRR active requests, the total batch size sent to the target model is B=r=1R(1+r)B = \sum_{r=1}^R (1 + \ell_r)B=r=1R(1+r), and the expected number of accepted tokens is τ=r=1R(1+j=1rar,j)\tau = \sum_{r=1}^R (1 + \sum_{j=1}^{\ell_r} a_{r,j})τ=r=1R(1+j=1rar,j), where ar,j=ijcr,ia_{r,j} = \prod_{i \le j} c_{r,i}ar,j=ijcr,i is the cumulative survival probability. The scheduler aims to maximize the expected system-wide token throughput Θ=τSPS(B)\Theta = \tau \cdot \text{SPS}(B)Θ=τSPS(B), where SPS(B)\text{SPS}(B)SPS(B) is the profiled engine throughput. By greedily admitting tokens with the highest survival probabilities and employing an early-stopping mechanism to enforce causality, the scheduler prevents verification waste without compromising the lossless guarantee of speculative decoding.

During training, the target model is frozen, and the draft model updates only the backbone, sequential block, and confidence head. The training objective combines three position-weighted terms: a cross-entropy loss Lce\mathcal{L}_{\text{ce}}Lce for next-token prediction, a distribution-matching loss Ltv\mathcal{L}_{\text{tv}}Ltv that penalizes the total variation distance between draft and target distributions, and a binary cross-entropy confidence loss Lconf\mathcal{L}_{\text{conf}}Lconf. The overall objective is a weighted combination:

L=αceLce+αtvLtv+αconfLconf.\mathcal{L} = \alpha_{\text{ce}} \mathcal{L}_{\text{ce}} + \alpha_{\text{tv}} \mathcal{L}_{\text{tv}} + \alpha_{\text{conf}} \mathcal{L}_{\text{conf}}.L=αceLce+αtvLtv+αconfLconf.

This multi-task training ensures the draft model generates high-quality tokens while providing reliable confidence estimates for the scheduler.

Experiment

The evaluation uses offline benchmarks spanning mathematical reasoning, code generation, and chat to compare the semi-autoregressive DSpark drafter against fully autoregressive and parallel drafters, revealing that DSpark combines the high initial-token capacity of parallel models with reduced suffix decay via a lightweight sequential head. Controlled experiments further show that even a small amount of autoregression yields substantial coherence gains and that a confidence head adaptively prunes low-probability suffixes, reducing wasted verification. In a live production deployment under user traffic, DSpark’s hardware-aware scheduler dynamically adjusts verification length to load, shifting the throughput-interactivity Pareto frontier outward and maintaining robust capacity under strict latency constraints.

The authors evaluate the DSpark speculative decoding framework against autoregressive and parallel baselines across multiple target models and domains. Results show that DSpark consistently achieves the highest accepted length per decoding round, outperforming both baseline drafters across all tested configurations. Additionally, the experiments reveal that structured tasks like math and code naturally sustain higher acceptance rates compared to open-ended chat domains. DSpark consistently outperforms both the autoregressive Eagle3 and parallel DFlash drafters across all target model scales and benchmark domains. Structured tasks such as mathematical reasoning and code generation yield higher accepted lengths than open-ended chat tasks. The performance advantage of DSpark generalizes across different model families, including both Qwen3 and Gemma4 targets.

The evaluation benchmarks DSpark against autoregressive (Eagle3) and parallel (DFlash) drafters across multiple target model scales and domains, including Qwen3 and Gemma4, measuring accepted token length per decoding round. DSpark consistently yields the highest accepted lengths, outperforming both baselines on all configurations, and its advantage generalizes across model families. Structured tasks like math reasoning and code generation sustain higher acceptance rates than open-ended chat, indicating that the framework thrives in more predictable generation settings.


AI로 AI 구축

아이디어에서 출시까지 — 무료 AI 코코딩, 즉시 사용 가능한 환경, 최적의 GPU 가격으로 AI 개발을 가속화하세요.

AI 협업 코딩
바로 사용 가능한 GPU
최적의 가격

HyperAI Newsletters

최신 정보 구독하기
한국 시간 매주 월요일 오전 9시 에 이번 주의 최신 업데이트를 메일로 발송합니다
이메일 서비스 제공: MailChimp