# Native Draft Architectures for Speculative Decoding in the Coding Era

> Spancast is a 98.6M plain-text drafter with recurrent state and parallel branch completion. It accepts 12.31 tokens per step on Qwen3-8B CanItEdit and transfers zero-shot across 17 targets, though target-coupled rivals can lead on low-reuse tasks.

- arXiv: https://arxiv.org/abs/2612.05048
- Authors: Haoyang Su, Weiran Huang
- Published: 2026-12-04
- Topic: Inference & systems
- Visual carousel: https://instaxiv.com/p/2612.05048
- Explanation by InstaXiv, a secondary educational summary. Cite the original paper for exact results. InstaXiv is not affiliated with or endorsed by arXiv or Cornell University.

## On Qwen3-8B, can a 98.6M drafter beat DFlash on code edits?

**12.31** accepted tokens/step vs DFlash on CanItEdit

## Why code opens an unusual speculation window

**Autoregressive generation:** An LLM emits one token per forward pass. Coding agents repeatedly write and revise long programs, so that serial decoding adds latency turn after turn.

**Speculative decoding:** A small drafter proposes a candidate token tree; the frozen target verifies it in parallel, accepting matching greedy continuations without changing target output.

Code reuses syntax and identifiers across long spans, with occasional branching points.

## The drafter reads plain text, then builds a tree

![Figure 1](https://cdn.instaxiv.com/figures/2612.05048/figure1.webp)

Panel (a) shows the prefix encoder feeding shared memory and a boundary state to the shared parallel decoder; its candidate tree goes to target verification. Panels (b,c) detail GSC and Null-Key Attention. (Figure 1)

## The draft branches without serial rollout

1. **Propose the horizon**: Stage 0 uses shared prefix memory to predict the next K draft tokens together.
2. **Score path probability**: A causal pass scores the greedy draft and multiplies token probabilities to estimate each prefix's reach probability.
3. **Complete branches in parallel**: Choose high-probability alternatives, mask each suffix after its branch, predict suffixes together, then expand one more level; decoder depth stays constant as K grows.

## GSC tracks local state; attention can skip the prefix

1. **Grouped State Channel**: GSC carries groupwise state across tokens; RMS normalization holds state near unit RMS while gated residual outputs remain free in scale.
2. **Null-Key Attention**: A learned zero-value null key can absorb attention when a token has no useful prefix match; matching copied spans instead draw heads toward their prefix positions.
3. **Position-zero sink nearly vanishes**: On Qwen3-8B Stage-0 queries for tokens with no prefix match, mean position-zero attention fell from 0.4148 without the null key to 0.0002 with it.

## Accepted length rises with context reuse

![Figure 3](https://cdn.instaxiv.com/figures/2612.05048/figure3.webp)

Panel (a) relates accepted length to context reuse; coding samples cluster toward higher reuse while general QA samples cluster at lower reuse. Panel (b) compares drafting latency over horizon K and normalized step time across targets. (Figure 3)

## On CanItEdit, Spancast accepts more tokens per step

| Method | Accepted tokens/step |
| --- | --- |
| DFlash (1.05B, target-coupled) | 9.72 |
| **Spancast (98.6M, plain text) (+2.59 tok/step)** | **12.31** |

_Qwen3-8B/CanItEdit; mean τ = accepted tokens/step. Greedy, batch 1 on one H100. Inter-token latency: DFlash 0.83, Spancast 1.01 ms/token._

## Branching improves the full speculative step

**Flat Stage-0 only:** Stage 0 alone averages 4.45 accepted tokens/step and inter-token latency (ITL) of 4.34 ms/token across 17 targets; tests are greedy, batch 1, on one H100.

**Full two-level tree:** Full Spancast (B=16) adds causal scoring and two-level branches: 7.80 tokens/step and 2.64 ms/token in the matched-parameter ablation.

## One plain-text drafter beats target-agnostic baselines on 17 models

| Method | InternLM3-8B τ | Qwen3-8B τ | Gemma-3-27B τ | GLM-4-32B τ |
| --- | --- | --- | --- | --- |
| TLI (500M) | 2.26 | 4.28 | 2.63 | 4.30 |
| SuffixTree | 3.11 | 2.96 | 3.91 | 3.27 |
| **Spancast (98.6M, plain text)** | **6.20** | **6.98** | **10.31** | **7.83** |

_Zero-shot mean τ (accepted tokens/step); four targets from 17 models/15 families. Greedy, batch 1 on one H100._

## What the study does not yet establish

- **Longer contexts**: The drafter trains on 2,048-token windows; acceptance degrades beyond that under rotary-position extrapolation.
- **Low-reuse tasks**: On low-reuse, high-entropy tasks such as QA and LiveCode, target-coupled drafters can accept more by using target hidden states.
- **Serving regime**: Tests use greedy decoding, batch size 1, on one H100; stochastic sampling and batched serving remain untested.

Best used when: A good fit to test on single-stream code editing with repeated local context and several frozen targets.

## Key takeaways

- Repeated code gives a small drafter room to propose longer spans, while target verification preserves the greedy output.
- A single plain-text drafter can serve multiple tested target families without target-specific hidden features or retraining.
- The open question is whether gains persist beyond 2,048-token windows, with stochastic sampling, and in batched serving.

## Links

- arXiv: https://arxiv.org/abs/2612.05048
- PDF: https://arxiv.org/pdf/2612.05048

## Citation

```bibtex
@article{su2026native,
  title   = {Native Draft Architectures for Speculative Decoding in the Coding Era},
  author  = {Su, Haoyang and Huang, Weiran},
  journal = {arXiv preprint arXiv:2612.05048},
  year    = {2026},
  url     = {https://arxiv.org/abs/2612.05048}
}
```
