Distributed Speculative Inference of Large Language Models is Provably Faster
<|reference_start|>Distributed Speculative Inference of Large Language Models is Provably Faster: Accelerating the inference of large language models (LLMs) is an important challenge in artificial intelligence. This paper introduces Distributed Speculative Inference (DSI), a novel distributed inference algorithm that is provably faster than speculative inference (SI) [leviathan2023fast,chen2023accelerating,miao2023specinfer] and traditional autoregressive inference (non-SI). Like other SI algorithms, DSI works on frozen LLMs, requiring no training or architectural modifications, and it preserves the target distribution. Prior studies on SI have demonstrated empirical speedups (compared to non-SI) but require fast and accurate drafters, which are often unavailable in practice. We identify a gap where SI can be slower than non-SI given slower or less accurate drafters. We close this gap by proving that DSI is faster than both SI and non-SI--given any drafters. DSI introduces a novel type of task parallelism called Speculation Parallelism (SP), which orchestrates target and drafter instances to overlap in time, creating a new foundational tradeoff between computational resources and latency. DSI is not only faster than SI but also supports LLMs that cannot be accelerated with SI. Our simulations show speedups of off-the-shelf LLMs in realistic single-node settings where DSI is 1.29-1.92x faster than SI.<|reference_end|>
@article{timor2024distributed,
    title={Distributed Speculative Inference of Large Language Models is Provably
  Faster},
    author={Nadav Timor, Jonathan Mamou, Daniel Korat, Moshe Berchansky, Oren
  Pereg, Moshe Wasserblat, Tomer Galanti, Michal Gordon, David Harel},
    journal={arXiv preprint arXiv:2405.14105},
    year={2024},
    archivePrefix={arXiv},
    eprint={2405.14105},
    primaryClass={cs.DC cs.AI cs.CL cs.LG}
}