Distributed Speculative Inference (DSI): Speculation Parallelism for Provably Faster Lossless Language Model Inference

Nadav Timor, Jonathan Mamou, Daniel Korat, Moshe Berchansky, Oren Pereg, Moshe Wasserblat, Tomer Galanti, Michal Gordon-Kiwkowitz, David Harel

Introduction

Large Language Model (LLM) inference is notoriously slow because it is fundamentally autoregressive: the model must generate one token at a time, with each new token requiring a full pass through the massive network.

Speculative Inference (SI) was designed to alleviate this bottleneck. In standard SI, a tiny, fast "drafter" model guesses a sequence of future tokens, and the large "target" model verifies them all at once in a single batch. If the drafter is right, the system yields multiple tokens for the price of one pass. However, SI has a critical flaw: it is sequential. The system must wait for the target model to finish verifying before the drafter can start its next set of guesses. If the drafter is too slow or makes too many mistakes, the overhead of this "stop-and-wait" blocking process can actually make SI slower than just using the large model alone.

This paper introduces Distributed Speculative Inference (DSI), a novel algorithm that breaks the sequential "draft-then-verify" bottleneck by overlapping these tasks across multiple processors. By introducing a new form of task parallelism called Speculation Parallelism, DSI is provably faster than both standard inference and traditional speculative inference, even when using slow or inaccurate drafter models.

Methods: Speculation Parallelism

The core innovation of DSI is Speculation Parallelism (SP). Unlike standard speculative inference, DSI is non-blocking. It orchestrates multiple instances of the target and drafter models simultaneously.

Timeline comparison of Non-SI, SI, and DSI across multiple GPUs
  1. Overlapping Tasks: While the target model is busy verifying "Draft A," the drafter models are already working on "Draft B" and "Draft C" in parallel on other processors. This effectively "hides" the verification latency.
  2. Lossless Synchronization: DSI manages a pool of threads. It uses a synchronization mechanism to terminate "descendant" threads if a draft token is rejected, ensuring the final output remains mathematically identical to the target model's original distribution.
  3. Lookahead Hyperparameter: To prevent the target model from becoming a bottleneck, DSI uses a lookahead value. This determines how many tokens are drafted before a verification task is sent, allowing DSI to scale and utilize any number of available GPUs (from 2 up to 8 or more).
  4. Hardware Agnostic: DSI acts as an orchestration layer. It can be combined seamlessly with existing techniques like Tensor Parallelism (TP) or Pipeline Parallelism (PP) to further accelerate the underlying model passes.

Datasets and Evaluation

The researchers evaluated DSI using several off-the-shelf model families and standard benchmarks to ensure broad applicability:

  • Models: Vicuna (7B, 13B, and a 68M drafter), StarCoder (15B and a 168M drafter), and Phi-3 (14B and 4B).
  • Tasks/Datasets:
  • CNN/Daily Mail for text summarization.
  • Alpaca for instruction following.
  • MBPP & HumanEval for Python code generation.

Key Insights and Results

The most significant takeaway is that verification doesn't have to block drafting. By treating verification as just another task in a parallel pipeline, DSI establishes a new foundational tradeoff: users can throw more hardware at the problem to achieve lower wall-clock latency.

  • Empirical Speedups: In realistic single-node, multi-GPU setups, DSI demonstrated significant improvements, running 1.29x to 1.92x faster than standard SI across various tasks and model pairs.
  • Provable Superiority: The authors provide mathematical proofs that DSI is always at least as fast as standard autoregressive inference. This removes the risk associated with SI, where a bad drafter could actually hurt performance. Heatmaps generated via offline simulations show that while SI has a "pink zone" (where it is slower than standard inference due to low drafter accuracy), DSI eliminates this zone entirely.
Theoretical worst-case and best-case token generation over time for non-SI, SI, and DSI
  • Theoretical Potential: The paper frames the speedup in terms of Amdahl’s Law. If you have enough GPUs to hide all verification latency, the total inference time is limited only by the speed of the drafter. For very fast drafters (1-5% of target latency), the authors calculate a theoretical speedup of 4x to 50x compared to standard SI, provided enough parallel resources are available.

Limitations and Future Work

While highly effective, DSI comes with specific hardware and architectural considerations:

  • Hardware Requirements: DSI requires at least two GPUs to function, and its best performance comes from having a larger pool of "target" servers. This makes it less suitable for consumer-grade single-GPU setups.
  • Communication Overhead: The paper focuses on single-node setups where GPU-to-GPU communication is very fast. In multi-node environments, communication latencies could eat into the speedup.
  • KV Cache Complexity: Managing the Key-Value (KV) cache across multiple distributed instances is complex. While the authors point to existing solutions, a fully optimized distributed KV cache for DSI remains an area for engineering refinement.

As LLMs grow even larger and slower, the parallel orchestration introduced by DSI will likely become an increasingly vital tool for maintaining low-latency inference at scale.

Summary updated

BibTeX
@inproceedings{timor2025distributed,
  author = {Nadav Timor and Jonathan Mamou and Daniel Korat and Moshe Berchansky and Oren Pereg and Moshe Wasserblat and Tomer Galanti and Michal Gordon-Kiwkowitz and David Harel},
  title = {{Distributed Speculative Inference (DSI): Speculation Parallelism for Provably Faster Lossless Language Model Inference}},
  booktitle = {International Conference on Learning Representations},
  year = {2025},
  url = {https://openreview.net/forum?id=cJd1BgZ9CS},
}
Figure