# Efficient Tree Draft for Long-Context Speculative Decoding

*Brian J Chan, Ning-Chi Huang, Kai-Chiang Wu*

[NeurIPS page](https://neurips.cc/virtual/2026/poster/152500) · [Open on the map](../papers.html#p152500)

Category: [Efficient LLM Inference & Training](../pcat/14.md) › [Speculative Decoding Optimization](../pgroup/126.md) · Type: new method · Keywords: tree-based drafting, speculative decoding, long-context inference, shared-prefix optimization, inference acceleration

Areas: [Memory](../areas/memory.md) › Model Memory Optimization › KV Cache Optimization; [Long Context](../areas/longcontext.md) › Long-context mechanisms › Long-context attention mechanisms

## Summary
FastDraft is a plug-and-play module that accelerates tree-based drafting in long-context speculative decoding by exploiting shared-prefix I/O patterns and specialized kernels, achieving up to 2.66× speedup in the draft phase.

## Explained to a 5-year-old
When a computer writes a long story, it writes one word at a time. To make it faster, it guesses what comes next. It can guess many possibilities at once using a tree. But this guessing is slow. The new idea makes the guessing faster by using a special trick that shares the work.

## Explained to a 5-year-old, longer
A computer can make up a story word by word. It needs to decide each next word, which takes time. To speed things up, it can guess what the next word might be. It can even guess many possible words at the same time. This guessing is done using a tree shape, where each branch is a possible guess. However, guessing many branches can be slow because the computer has to do a lot of work. The paper looks at a way to make this guessing faster. It notices that many branches share the same beginning part of the story. By sharing the work for these common beginnings, the computer can avoid doing the same calculations over and over. It also uses a special way to organize the tree that fits the guessing process. This special organization lets the computer run faster without changing the story model. As a result, the computer can finish long stories much more quickly.

## For a technical reader
The paper addresses the performance bottleneck of tree-based speculative decoding in long-context autoregressive models. It introduces a plug-and-play module that leverages the shared-prefix I/O pattern across draft branches and the constrained tree structure to design optimized kernels. The module integrates seamlessly with existing inference frameworks like SGLang without requiring changes to the target or draft models. Empirical evaluations show up to 2.66× speedup in the draft phase and 1.77× higher overall throughput under long-context workloads. This improvement reduces latency and resource usage for deploying large language models in production.

## Problem
Tree-based drafting in speculative decoding suffers from high performance overhead, limiting its efficiency in long-context generation. Existing systems do not fully exploit the shared-prefix I/O pattern and constrained tree structure, leading to slower draft execution.

## Method
The approach exploits the shared-prefix I/O pattern across draft branches and the constrained tree structure of speculative decoding to design specialized kernels that reduce draft-phase overhead. It is implemented as a plug-and-play module that requires no changes to the target model, draft model, or sampling logic, and integrates with existing inference frameworks such as SGLang.

## Results
The approach achieves up to 2.66× speedup in the draft phase and 1.77× higher throughput over SGLang under long-context settings.

## Contributions
It introduces a plug-and-play module that leverages shared-prefix I/O patterns and tree structure to reduce draft-phase overhead, and provides an empirical comparison showing significant speedups.

## Practical relevance
This improvement enables faster inference for long-context language models on existing hardware, reducing latency and resource consumption.

## Research questions this paper is counted under

- [How can tree-based speculative decoding be dynamically adapted to varying token difficulty, context, and serving conditions to improve efficiency and accuracy?](../q/146.md)

This page was written by language models from the title and abstract of each paper, and the answers were checked by two other models. It can be wrong: check the paper itself. [Suggest a correction](../feedback/?on=p/152500)
