Native Draft Architectures for Speculative Decoding in the Coding Era
Abstract
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.
Create a lesson
Metadata
- Categories
- cs.LG, cs.AI
Related papers
HeadStart: Verifier-Guided Parallel Drafting for Speculative Decoding
Shared title terminologycs.LGDisha Maheshwari, Yong Liu, Yingyan Celine Lin
SpecWAM: Unlocking Real-Time World Action Models in One GPU-Hour with Draft-and-Correct Decoding
Shared title terminologycs.LGYuye Li, Liulei Li, Ruoyu Qi et al.
The Budget Decides the Drafter: Cross-Entropy Rates for Speculative Decoding
Shared title terminologycs.LGTaiheng Pan
What a Full Patch Can Tell Us About a Sparse Transcoder: Native readout responses from local slopes to donor replacement
Shared title terminologycs.LGRafał Wrona
Unimodal, Calibrated, and Order-Aware: A Deep Architecture for Reliable Ordinal Regression
Shared title terminologycs.LGGuy Ben Razon, Daniel Bazar, Jonathan Svirsky et al.
CHALICE: Hardware-Legal Code and Scale Optimization for FP4 Quantization
Shared title terminologycs.LGHongyaoxing Gu, Keke Li, Zhuoyuan Wu et al.