Native Draft Architectures for Speculative Decoding in the Coding Era
Abstract
Spancast, a non-Transformer draft architecture with Masked Parallel Tree Decoding, accelerates code generation by drafting spans in parallel and using stateful recurrence and Null-Key Attention, improving acceptance length and latency over learned and retrieval baselines.
Modern AI increasingly relies on language model agents that solve tasks by iteratively generating and editing code. Repeatedly producing long code blocks makes token-by-token decoding a major latency bottleneck. Speculative decoding accelerates generation while preserving model outputs by combining a fast draft model with parallel target verification. Unlike natural language, executable code consists largely of predictable syntax and repeated identifiers broken by occasional branching points. However, existing speculative decoding methods fail to exploit the distinct structure of code. Learned drafters rely on stateless Transformer blocks designed for single-step text prediction, while retrieval methods stop at exact substring copies. We introduce Spancast, a native non-Transformer draft architecture with Masked Parallel Tree Decoding. Spancast replaces Transformer layers with Grouped State Channel for stateful recurrence across tokens and Null-Key Attention to skip the prefix via a zero-value key. Masked Parallel Tree Decoding drafts spans in parallel and expands likely branches in constant steps. Spancast surpasses existing learned and retrieval baselines in average acceptance length, lowers inter-token latency across target models, and transfers zero-shot to unseen target models.
Community
This is an automated message from the Librarian Bot. I found the following papers similar to this paper.
The following papers were recommended by the Semantic Scholar API
- ChainFlow: Few-Step Latent Flow Matching for Speculative Decoding (2026)
- DMTP: A Better First Token for Block Drafting via MTP (2026)
- D3D: Decoupled Diffusion Drafting for Asynchronous Speculative Decoding (2026)
- LoopAhead: Speculating Ahead for Faster Decoding in Looped Language Models (2026)
- Contextual Correction of Parallel Drafts for Speculative Decoding (2026)
- DLoop: Looped Speculative Decoding (2026)
- DForkTree: Accelerating Speculative Decoding with Fork-Aware Block Diffusion Draft Trees (2026)
Please give a thumbs up to this comment if you found it helpful!
If you want recommendations for any Paper on Hugging Face checkout this Space
You can directly ask Librarian Bot for paper recommendations by tagging it in a comment: @librarian-bot recommend
Get this paper in your agent:
hf papers read 2612.05048 Don't have the latest CLI?
curl -LsSf https://hf.co/cli/install.sh | bash Models citing this paper 1
Datasets citing this paper 0
No dataset linking this paper
Spaces citing this paper 0
No Space linking this paper
Collections including this paper 0
No Collection including this paper