Saved in:
Bibliographic Details
Main Authors: Yin, Haofei, Xiao, Mengbai, Li, Tinghong, Zhang, Xiao, Yu, Dongxiao, Zhang, Guanghui
Format: Preprint
Published: 2025
Subjects:
Online Access:https://arxiv.org/abs/2504.04104
Tags: Add Tag
No Tags, Be the first to tag this record!
_version_ 1866912558365016064
author Yin, Haofei
Xiao, Mengbai
Li, Tinghong
Zhang, Xiao
Yu, Dongxiao
Zhang, Guanghui
author_facet Yin, Haofei
Xiao, Mengbai
Li, Tinghong
Zhang, Xiao
Yu, Dongxiao
Zhang, Guanghui
contents The demand for large language model inference is rapidly increasing. Pipeline parallelism offers a cost-effective deployment strategy for distributed inference but suffers from high service latency. While incorporating speculative decoding to pipeline parallelism improves performance, it still faces challenges of low hardware utilization and narrow speculative window. Inspired by branch prediction in instruction pipelining, we introduce SpecPipe, which fills the pipeline with speculative tokens of a request step-by-step. By maximizing the hardware utilization, SpecPipe decodes one token per pipeline step ideally. Specifically, SpecPipe comprises a dynamic speculative token tree and a pipelined inference framework. The tree dynamically accepts tokens from a speculative token source and outputs the tokens to the inference pipeline. Since the speculative window relaxed in our framework, a high-accuracy draft model is integrated without fine-tuning. The pipeline inference framework follows node-wise computation, pruning propagation, and inter-node communication stages. We implement SpecPipe and a variant SpecPipe-DB with dynamic batching for single- and multi-request inference, respectively. On an 8-stage pipeline, SpecPipe improves time between tokens on diverse single-request workloads by $4.19\times$-$5.53\times$ over standard pipeline parallelism and by $2.08\times$-$2.38\times$ over prior tree-based speculative decoding methods. For multi-request workloads, SpecPipe-DB achieves $1.64\times$-$2.08\times$ higher throughput and $1.61\times$-$2.06\times$ lower time between tokens than vLLM.
format Preprint
id arxiv_https___arxiv_org_abs_2504_04104
institution arXiv
publishDate 2025
record_format arxiv
spellingShingle SpecPipe: Accelerating Pipeline Parallelism-based LLM Inference with Speculative Decoding
Yin, Haofei
Xiao, Mengbai
Li, Tinghong
Zhang, Xiao
Yu, Dongxiao
Zhang, Guanghui
Machine Learning
The demand for large language model inference is rapidly increasing. Pipeline parallelism offers a cost-effective deployment strategy for distributed inference but suffers from high service latency. While incorporating speculative decoding to pipeline parallelism improves performance, it still faces challenges of low hardware utilization and narrow speculative window. Inspired by branch prediction in instruction pipelining, we introduce SpecPipe, which fills the pipeline with speculative tokens of a request step-by-step. By maximizing the hardware utilization, SpecPipe decodes one token per pipeline step ideally. Specifically, SpecPipe comprises a dynamic speculative token tree and a pipelined inference framework. The tree dynamically accepts tokens from a speculative token source and outputs the tokens to the inference pipeline. Since the speculative window relaxed in our framework, a high-accuracy draft model is integrated without fine-tuning. The pipeline inference framework follows node-wise computation, pruning propagation, and inter-node communication stages. We implement SpecPipe and a variant SpecPipe-DB with dynamic batching for single- and multi-request inference, respectively. On an 8-stage pipeline, SpecPipe improves time between tokens on diverse single-request workloads by $4.19\times$-$5.53\times$ over standard pipeline parallelism and by $2.08\times$-$2.38\times$ over prior tree-based speculative decoding methods. For multi-request workloads, SpecPipe-DB achieves $1.64\times$-$2.08\times$ higher throughput and $1.61\times$-$2.06\times$ lower time between tokens than vLLM.
title SpecPipe: Accelerating Pipeline Parallelism-based LLM Inference with Speculative Decoding
topic Machine Learning
url https://arxiv.org/abs/2504.04104