Adapting Tree-Structured Speculative Decoding to DeepSeek-V4 for Efficient Inference

📅 2026-09-21
📈 Citations: 0
Influential: 0
📄 PDF
🤖 AI Summary
本文解决了LLM推理延迟问题,通过在DeepSeek-V4中应用树状推测解码方法,提高了解码效率和吞吐量。
📝 Abstract
Repeated execution of the target model during autoregressive decoding is a major source of LLM inference latency. Unlike linear speculation, which follows a single candidate chain, tree-structured speculation retains multiple branches from shared prefixes; under the same budget, this broader coverage can improve acceptance and efficiency. Adapting it to DeepSeek-V4 is nontrivial: its CSA/HCA online compressed attention concentrates the difficulty on the target-verify side, where branches diverging from a shared prefix compress into different states, breaking cross-branch state consistency. We integrate tree-structured speculative decoding into the DeepSeek-V4-Flash pipeline via branch-aware causal verification, temporary state isolation, and accepted-path state refresh, keeping verification and compressed-state updates consistent across branches. Across budgets D=5 to D=8, batch sizes 1 to 64, and three datasets (GSM8K, MBPP, ShareGPT), tree speculation achieves a higher accepted length than the matched linear configurations in all settings (e.g., at D=8 about 2.83--3.41 versus 2.39--2.84) and improves throughput in nearly all configurations---marginal only at the smallest budget---by up to about 18.5%. More importantly, the gains follow stable, transferable regularities: the relative gain grows with the budget and is most pronounced for less predictable workloads at small-to-medium batch sizes, while beyond a certain budget throughput plateaus and decouples from the still-rising accepted length. These results show that retaining multiple candidate paths under the same budget can effectively improve DeepSeek-V4 decoding efficiency, and offer experience for adapting speculative decoding to future models with compressed, sparse, or structured context representations.
Problem

Research questions and friction points this paper is trying to address.

Tree-Structured Speculative Decoding
Inference Latency
Cross-Branch State Consistency
Innovation

Methods, ideas, or system contributions that make the work stand out.

Tree-Structured Speculative Decoding
Branch-Aware Causal Verification
Temporary State Isolation
Accepted-Path State Refresh
🔎 Similar Papers
2024-03-04Computer Vision and Pattern RecognitionCitations: 3