PACER: Blockwise Pre-verification for Speculative Decoding with Adaptive Length
Authors:
Preprint
Abstract
Speculative decoding (SD) is a powerful technique for accelerating the inference process of large language models (LLMs) without sacrificing accuracy. Typically, SD employs a small draft model to generate a fixed number of draft tokens, which are then verified in parallel by the target model. However, our experiments reveal that the optimal draft length varies significantly across different decoding steps. This variation suggests that using a fixed draft length limits the potential for further improvements in decoding speed. To address this challenge, we propose Pacer, a novel approach that dynamically controls draft length using a lightweight, trainable pre-verification layer. This layer pre-verifies draft tokens blockwise before they are sent to the target model, allowing the draft model to stop token generation if the blockwise pre-verification fails. We implement Pacer on multiple SD model pairs and evaluate its performance across various benchmarks. Our results demonstrate that Pacer achieves up to 2.66x Speedup over autoregressive decoding and consistently outperforms standard speculative decoding. Furthermore, when integrated with Ouroboros, Pacer attains up to 3.09x Speedup.Keywords
All Related Versions
This publication has 9 references indexed in Scilit:
- Detecting Hallucinations in Large Language Model Generation: A Token Probability Approach2025
- OPT-Tree: Speculative Decoding with Adaptive Draft Tree StructureTransactions of the Association for Computational Linguistics, 2025
- Hydra: Bidirectional State Space Models Through Generalized Matrix Mixers2024
- Draft& Verify: Lossless Large Language Model Acceleration via Self-Speculative Decoding2024
- Generation Meets Verification: Accelerating Large Language Model Inference with Smart Parallel Auto-Correct Decoding2024
- Unlocking Efficiency in Large Language Model Inference: A Comprehensive Survey of Speculative Decoding2024
- Speculative Decoding: Exploiting Speculative Execution for Accelerating Seq2seq Generation2023
- Accelerating Transformer Inference for Translation via Parallel Decoding2023
- Get To The Point: Summarization with Pointer-Generator Networks2017