Traversal Verification for Speculative Tree Decoding

Fuente: arXiv
Saved in:
Bibliographic Details
Main Authors: Weng, Yepeng, Hu, Qiao, Chen, Xujie, Liu, Li, Mei, Dianwen, Qiu, Huishi, Tian, Jiang, Shi, Zhongchao
Format: Preprint
Published: 2025
Subjects:
Online Access:
Tags: Add Tag
No Tags, Be the first to tag this record!
_version_ 1866914138227212288
author Weng, Yepeng
Hu, Qiao
Chen, Xujie
Liu, Li
Mei, Dianwen
Qiu, Huishi
Tian, Jiang
Shi, Zhongchao
author_facet Weng, Yepeng
Hu, Qiao
Chen, Xujie
Liu, Li
Mei, Dianwen
Qiu, Huishi
Tian, Jiang
Shi, Zhongchao
contents Speculative decoding is a promising approach for accelerating large language models. The primary idea is to use a lightweight draft model to speculate the output of the target model for multiple subsequent timesteps, and then verify them in parallel to determine whether the drafted tokens should be accepted or rejected. To enhance acceptance rates, existing frameworks typically construct token trees containing multiple candidates in each timestep. However, their reliance on token-level verification mechanisms introduces two critical limitations: First, the probability distribution of a sequence differs from that of individual tokens, leading to suboptimal acceptance length. Second, current verification schemes begin from the root node and proceed layer by layer in a top-down manner. Once a parent node is rejected, all its child nodes should be discarded, resulting in inefficient utilization of speculative candidates. This paper introduces Traversal Verification, a novel speculative decoding algorithm that fundamentally rethinks the verification paradigm through leaf-to-root traversal. Our approach considers the acceptance of the entire token sequence from the current node to the root, and preserves potentially valid subsequences that would be prematurely discarded by existing methods. We theoretically prove that the probability distribution obtained through Traversal Verification is identical to that of the target model, guaranteeing lossless inference while achieving substantial acceleration gains. Experimental results across different large language models and multiple tasks show that our method consistently improves acceptance length and throughput over existing methods.
format Preprint
id arxiv_https___arxiv_org_abs_2505_12398
institution arXiv
publishDate 2025
record_format arxiv
spellingShingle Traversal Verification for Speculative Tree Decoding
Weng, Yepeng
Hu, Qiao
Chen, Xujie
Liu, Li
Mei, Dianwen
Qiu, Huishi
Tian, Jiang
Shi, Zhongchao
Computation and Language
Artificial Intelligence
Machine Learning
Speculative decoding is a promising approach for accelerating large language models. The primary idea is to use a lightweight draft model to speculate the output of the target model for multiple subsequent timesteps, and then verify them in parallel to determine whether the drafted tokens should be accepted or rejected. To enhance acceptance rates, existing frameworks typically construct token trees containing multiple candidates in each timestep. However, their reliance on token-level verification mechanisms introduces two critical limitations: First, the probability distribution of a sequence differs from that of individual tokens, leading to suboptimal acceptance length. Second, current verification schemes begin from the root node and proceed layer by layer in a top-down manner. Once a parent node is rejected, all its child nodes should be discarded, resulting in inefficient utilization of speculative candidates. This paper introduces Traversal Verification, a novel speculative decoding algorithm that fundamentally rethinks the verification paradigm through leaf-to-root traversal. Our approach considers the acceptance of the entire token sequence from the current node to the root, and preserves potentially valid subsequences that would be prematurely discarded by existing methods. We theoretically prove that the probability distribution obtained through Traversal Verification is identical to that of the target model, guaranteeing lossless inference while achieving substantial acceleration gains. Experimental results across different large language models and multiple tasks show that our method consistently improves acceptance length and throughput over existing methods.
title Traversal Verification for Speculative Tree Decoding
topic Computation and Language
Artificial Intelligence
Machine Learning
url https://arxiv.org/abs/2505.12398