文章摘要
针对现有投机解码技术草稿生成效率与候选接受率难以兼顾的痛点,研究团队推出JetSpec并行树草稿框架,通过新增轻量因果并行草稿头,在并行生成候选的同时保留因果约束,在多模型多任务测试中最高实现9.64倍推理加速,研究还指出后续投机解码优化需侧重候选间因果一致性,平衡效率与开销。

Speculative decoding is a technique that leverages a draft model to generate candidate tokens, which are then verified in parallel by a target model, reducing the time large language models take to generate tokens sequentially. However, a critical challenge arises as the number of candidates (referred to as the draft budget) increases: performance gains do not always scale accordingly. An excess of candidates adds to generation overhead, and when candidates lack consistency, the acceptance rate drops significantly.

A recent research effort has introduced a novel parallel tree draft framework aimed at resolving the conflict between draft generation efficiency and candidate acceptance rate. This approach seeks to address long-standing limitations in existing speculative decoding methods.

Current methods face a fundamental trade-off. Techniques like EAGLE use autoregressive draft generation, which produces consistent candidates aligned with preceding tokens, but requires step-by-step computation, leading to rising overhead as the depth of the candidate tree increases. On the other hand, bidirectional parallel methods such as DFlash can generate candidates at multiple positions simultaneously, but lack causal constraints between branches—individual tokens may appear logical, but their combination can lead to inconsistencies.

The core idea behind this new framework is to enable parallel draft generation while retaining essential causal relationships. It adds a lightweight causal parallel draft head to the frozen target model, integrating the target model's hidden states to produce candidate distributions for different prediction depths. Causal attention masks are applied between draft positions, allowing subsequent positions to utilize information from earlier ones without depending on future positions. This design enables computing multiple prediction positions in a single forward pass, while ensuring the candidate tree adheres to the target model's autoregressive generation patterns.

During training, the framework uses the target model's outputs as soft labels, applying Forward KL distillation to train the draft head to learn the probability distribution of multiple possible continuations, rather than only mimicking the single highest-probability token.

Testing was conducted on models Qwen3-8B and Qwen3-30B-A3B, covering tasks including mathematical reasoning, code generation, and open-ended dialogue. On H100 hardware, Qwen3-8B achieved up to 9.64x inference acceleration on the MATH-500 test, 8.78x on AIME25, and 4.58x on the open-ended MT-Bench. Notably, even when the draft budget increased from 64 to 256, the framework continued to deliver improved acceleration.

When integrated into vLLM for service testing, on H100 single-request scenarios, increasing the draft budget from 16 to 128 boosted throughput from 224 TPS to 553.3 TPS, with a speedup of 4.33x. However, under higher concurrency, larger candidate trees increase verification overhead, so the draft budget must be adjusted based on the service's load conditions.

This research indicates that future optimizations for speculative decoding should not merely focus on generating more candidate tokens, but on establishing stronger causal consistency between them. The key is to balance parallel efficiency, accepted sequence length, and verification costs to unlock further performance gains.

以上内容不代表本平台立场,仅供读者参考