Papers › Parallel Speculative Decoding with Adaptive Draft Length

Parallel Speculative Decoding with Adaptive Draft Length

13 Aug 2024arXiv:2408.11850archive 2025-07-28

Tianyu Liu, Yun Li, Qitan Lv, Kai Liu, Jianchen Zhu, Winston Hu

Speculative decoding (SD), where an extra draft model is employed to provide multiple \textit{draft} tokens first and then the original target model verifies these tokens in parallel, has shown great power for LLM inference acceleration. However, existing SD methods suffer from the mutual waiting problem, i.e., the target model gets stuck when the draft model is \textit{guessing} tokens, and vice versa. This problem is directly incurred by the asynchronous execution of the draft model and the target model, and is exacerbated due to the fixed draft length in speculative decoding. To address these challenges, we propose a conceptually simple, flexible, and general framework to boost speculative decoding, namely \textbf{P}arallel sp\textbf{E}culative decoding with \textbf{A}daptive d\textbf{R}aft \textbf{L}ength (PEARL). Specifically, PEARL proposes \textit{pre-verify} to verify the first draft token in advance during the drafting phase, and \textit{post-verify} to generate more draft tokens during the verification phase. PEARL parallels the drafting phase and the verification phase via applying the two strategies, and achieves adaptive draft length for different scenarios, which effectively alleviates the mutual waiting problem. Moreover, we theoretically demonstrate that the mean accepted tokens of PEARL is more than existing \textit{draft-then-verify} works. Experiments on various text generation benchmarks demonstrate the effectiveness of our \name, leading to a superior speedup performance up to \textbf{3.79×} and \textbf{1.52×}, compared to auto-regressive decoding and vanilla speculative decoding, respectively.

PaperPDFCodeCode Syntology ran

In Syntology Open this paper in Syntology's Atlas, the map of the papers in Syntology's graph and their citations.

For agents, Syntology's MCP tool lists every function and class Syntology harvested from this paper and whether it ran (how to connect): get_harvested_code_for_paper(arxiv_id="2408.11850")

Code

Syntology Ran 8 of 8 code samples harvested from 1 repository linked to this paper; 0 have no recorded run. Of those that ran: 1 ran · honoured contract; 4 ran · our draft was wrong; 1 ran · fixture could not drive it; 2 ran with no contract checked.

By repository: official repository: 8 samples from 1 repository, 8 ran. The run record, sample by sample. “Ran” means executed on a synthesized input, not that the code is correct or reproduces the paper.

smart-lty/parallelspeculativedecoding officialmentioned in papermentioned on GitHubpytorch report

Repository list and official/mentioned flags are the archive's, frozen 2025-07-28. Reachability, where shown, is from one Syntology probe window (2026-09-16 to 2026-09-18); repositories not probed show nothing. GitHub stars are not tracked.

Code Syntology ran Syntology

8 samples harvested; 8 ran; 1 honoured the contract we drafted; 0 have no recorded run. Read from Syntology's graph 2026-09-24; that is when this build read the record, not when the samples ran.

1ran · honoured contract
4ran · our draft was wrong
1ran · fixture could not drive it
2ran

Licence: 8 of the 8 samples are pointer only, meaning Syntology does not serve that copy's text. This page shows no code text for any sample; each one links to its file in the repository.

Harvested from smart-lty/parallelspeculativedecoding. “Ran” means the sample executed on a synthesized input. It does not mean the output is correct, and nothing here reproduces the paper's results. “Honoured” and “violated” refer to a contract Syntology drafted from the code itself; “our draft was wrong” and “fixture could not drive it” are failures of Syntology's instrument, not of the code.

Each sample ends with its code_sha256, Syntology's identity for that exact code. An agent fetches the stored sample with Syntology's MCP tool get_code(code_sha256="…") (how to connect); click an identity to copy that call.

Repository labels, per sample. official repository: The archive marks this repository official for the paper. named in the paper: The archive records that the paper mentions this repository; it is not marked official. community (archive-listed): In the archive's code links for this paper, not marked official and not recorded as mentioned in the paper. found in paper text by Syntology: Syntology found this repository in the paper's own text; whether it is the authors' implementation is not asserted. community: Not in the archive's code links for this paper; a community repository Syntology harvested. Samples from a repository marked official are listed first. Licence labels name the repository's licence as recorded at harvest. “Pointer only” means Syntology does not serve that copy's text, for one of four reasons: no licence file was found; the licence was not identified; the licence is recorded as permissive but that copy's record is not marked cleared; or the licence is outside the permissive list Syntology serves text under (MIT, Apache-2.0, BSD and similar). Some licences outside that list permit redistribution, such as WTFPL, and GPL-3.0 under its conditions; they are simply not on the list. Hover a licence label for the reason. File links open the file on GitHub at the default branch, which may have changed since the harvest.

find_list_markers smart-lty/parallelspeculativedecoding/applications.py official repository ran · honoured contract fingerprinted no licence file found · pointer only · 288b21dd530b5da3 · report
norm_logits smart-lty/ParallelSpeculativeDecoding/src/util.py official repository ran · our draft was wrong fingerprinted no licence file found · pointer only · ea7422602cf8d39a · report
read_results smart-lty/ParallelSpeculativeDecoding/benchmark/eval_mgsm.py official repository ran no licence file found · pointer only · fcb64b361ddd54aa · report
read_results smart-lty/ParallelSpeculativeDecoding/benchmark/eval_mt_bench.py official repository ran no licence file found · pointer only · 9c206ca20df50d10 · report
sample smart-lty/ParallelSpeculativeDecoding/src/util.py official repository ran · our draft was wrong fingerprinted no licence file found · pointer only · ffa10e3a85932ece · report
top_k_top_p_filter smart-lty/ParallelSpeculativeDecoding/src/util.py official repository ran · fixture could not drive it fingerprinted no licence file found · pointer only · 025c3469ca2fb4c3 · report
truncate_list smart-lty/parallelspeculativedecoding/applications.py official repository ran · our draft was wrong fingerprinted no licence file found · pointer only · 124313a451530c21 · report
user smart-lty/parallelspeculativedecoding/applications.py official repository ran · our draft was wrong no licence file found · pointer only · 79986b5722842265 · report

Tasks

Text Generation

Results from the paper archive 2025-07-28

No leaderboard rows for this paper in the archive.

Report a problem or propose a change · a person checks every report against the paper or source before anything changes; decisions are listed on /corrections