AngelSpec is a unified speculative decoding training and deployment framework for real-world large model inference scenarios, publicly released in 2026. Addressing the problem that existing single drafting structures cannot cover all types of workloads, it performs coordinated optimization at three levels—training, architecture, and scheduling—and open-sources the complete implementation.
Speculative decoding accelerates the autoregressive generation of large language models through a draft-then-verify paradigm; the entire process does not alter the final output's target distribution, making it a lossless class of inference acceleration.
A large body of existing work optimizes the draft generator's capabilities from different directions. Some methods improve draft quality by reusing the target model's intermediate hidden states, token embeddings, additional multi-token prediction features, and other information; other research explores token-tree-based extensions, and some even extend the granularity of speculation upward from the single-token level, directly generating complete reasoning steps for the target model to verify. However, a common limitation of existing solutions is that no single draft generation structure can achieve optimal performance across all real-world workloads.
The characteristic differences between two typical draft generation approaches further highlight the practical impact of this problem: autoregressive multi-token prediction (MTP) provides a lightweight and stable proposal mechanism, while block-parallel diffusion can amortize draft generation latency over longer candidate sequences. The performance advantages of both depend heavily on the output distribution characteristics of the corresponding task.
Given the workload heterogeneity described above, in the production serving stage of speculative decoding, a fixed prediction depth or verification depth configuration cannot achieve optimal performance, because the acceptance rate of candidate tokens varies with domain, request, and decoding step, while the computational cost of verification also fluctuates dynamically with batch size and online load.
Most existing adaptive speculative decoding solutions focus on online adjustment of draft length or speculation tree structure to avoid wasting verification computation on low-confidence candidates. Such solutions typically use token confidence, recent acceptance rates, or learned policies as adjustment signals. However, this per-request decision logic cannot fully capture the competition for shared target model compute in batched serving scenarios, leaving an inherent adaptation gap in high-concurrency batched production deployments.
As a unified training and deployment framework, AngelSpec applies tailored optimizations to two distinct draft generation paths: it optimizes the autoregressive multi-token prediction (MTP) draft generator for high-entropy open-ended dialogue scenarios, and the block-parallel diffusion draft generator for code and math scenarios with long, predictable continuations. The core architectural sub-module corresponding to the latter is DFly. DFly is a block diffusion framework proposed within the AngelSpec framework, consisting of three mutually synergistic design improvements: the first is a hybrid target-conditioned backbone, which combines the advantageous properties of two existing speculative decoding approaches while retaining both the expressive power of the shared projection and the tailored adaptation capability of hierarchical target views. The second is a lightweight autoregressive conditioning head placed in front, which introduces prior generation information after the parallel backbone's output to restore the sequential dependency relationships missing from parallel generation. The third is an acceptance-aware optimization objective, which directly ties the distribution alignment process to each block position's contribution to the expected accepted length, optimizing the overall runtime efficiency of speculative decoding. The figure below helps you intuitively understand the module division across the inference side, the scheduling/storage side, and the training side, and distinguish the original base components from AngelSpec's newly added extension components.
After TTT training on rolling hybrid datasets oriented toward the target model's outputs, the original MTP checkpoint's speculative decoding average acceptance rate and average accepted sequence length both improve markedly across different sampling temperatures, with the performance gains concentrated in the suffix portion of the speculation: the token acceptance rate at the first position is nearly unchanged, while acceptance rates at the second and third positions improve substantially. The schematic diagram immediately following helps you fully understand the hierarchical connections between the draft model and the target model, the action path of the hidden-state correction module, and the complete flow of tokens and hidden states.
The D-cut adaptive scheduling mechanism is designed specifically for the serving-side performance trade-offs in long-block draft generation scenarios. At each decoding step, it jointly solves two coupled core problems: how to allocate the limited verification compute budget across concurrent requests, and, given the current real-time operating conditions, what the appropriate global verification budget should be.
On the Qwen3-8B model, DFly achieves the best average accepted length on all 5 math and code benchmarks, with an overall average accepted length of 5.41, higher than DSpark's 5.32, DFlash's 4.57, and MTP's 3.24. Its advantage is most pronounced in structured generation scenarios, reaching 6.06 on Math500 and 6.42 on GSM8K, outperforming DSpark on all three code benchmarks and only slightly trailing DSpark on MT-Bench—consistent with the design positioning of this approach toward code and math workloads. On the larger Hy3-A21B model, the performance gains widen further, with DFly outperforming both MTP and DFlash on all publicly reported benchmarks.
Ablation experiments on thinking mode show that the best average accepted length is achieved only when the draft model's training and inference stages use matching thinking-mode configurations. A draft model trained without thinking mode achieves an overall average accepted length of 4.79 across 6 benchmarks when evaluated with non-thinking prompts, but if that model is directly transferred to high-thinking settings for evaluation, the average accepted length drops sharply to 3.29; correspondingly, the draft model trained in high-thinking mode achieves its best performance only when evaluated in high-thinking settings.
All of AngelSpec's draft model training is completed on an open-source training framework built on top of TorchSpec. Leveraging its natively decoupled architecture, when the inference engine runs the target model, hidden states can be streamed directly via RDMA storage based on Mooncake to distributed training workers, allowing the data generation and optimization processes to scale independently without either side stalling while waiting for the other's results.
The paper's measured results show that the baseline scheme DFly enters a verification-bound serving state once concurrency exceeds 48, at which point further increasing concurrency yields no growth in total throughput and instead continuously reduces per-user decoding speed. In contrast, the D-cut scheduling strategy keeps total throughput under the same load on a continuously rising trajectory across the concurrency range of 48, 56, and 64, achieving corresponding performance gains over DFly at each point.