Manuscript Offprint

arXiv:2611.08669

ChainFlow: Few-Step Latent Flow Matching for Speculative Decoding

Selim Aktas, Yusuf Erdem Erdem, Ahmed Zeer, Himmet Toprak Kesgin, Muzaffer Kaan Yuce, Mehmet Fatih Amasyali

Open access. PaperVantage converted this article to text, so layout and figures may differ from the original.

Selim Aktas QK^{QK} Yusuf Erdem Erdem QV^{QV} Ahmed Zeer ∗QV^{*QV} Himmet Toprak Kesgin V^{V} Muzaffer Kaan Yuce V^{V} Mehmet Fatih Amasyali V^{V}

Figure

Figure 1. ChainFlow against EAGLE-3 and DFlash. Hatched: gain from 8×48 \times 4 tree verification. (a) Served speedup over autoregressive decoding at batch one on English domains, ran on one NVIDIA B300 with vLLM 0.31.0 and greedy decoding. The tree beats both in every domain. (b) Acceptance length τ\tau (offline) after Turkish adaptation; on average even the chain beats both, showing adaptability.

ABSTRACT

Speculative decoding has become a standard way to accelerate LLM inference: a lightweight drafter proposes tokens that the target verifies in one parallel pass. Existing drafters face trade-offs that limits their speedups: autoregressive drafters generate tokens one at a time, so drafting cost grows with draft length, while diffusion drafters generate tokens in parallel but predict each position independently, ignoring inter-token dependencies. We introduce ChainFlow, a new speculative decoding paradigm and the first flow-matching drafter conditioned on the target's hidden states. ChainFlow treats drafting as a short transport over hidden states, needing one or two flow steps instead of the many denoising steps of generation from noise. A variational autoencoder compresses these states so drafting cost barely grows with target size, lightweight feedback heads restore inter-token dependencies, and tree drafting raises acceptance. On Qwen3.5 models, at matched drafter size and training data, ChainFlow outperforms EAGLE-3 and DFlash in vLLM by 39% and 11%, respectively. These gains further widen as drafters are adapted to new languages sequentially. Our ablations cover drafter design and concurrent serving, and we open-source our code and drafter models.

1 INTRODUCTION

Large language models now sit behind a broad range of deployed systems, and the cost of running them is dominated by generation. Decoding is sequential: each token requires a full pass over the model's parameters, so inference is bound by memory bandwidth rather than compute (Shazeer, 2019). Long reasoning traces and agentic workloads sharpen the problem, because output length now sets latency.

K^{K}Department of Electronics Engineering, Koç University, Istanbul, Türkiye V^{V}Department of Computer Engineering, Yildiz Technical University, Istanbul, Türkiye. Correspondence to: Ahmed Zeer ahmed.zeer@std.yildiz.edu.tr.

Q^{Q}Equal contribution. *Corresponding author.

Preprint.

Speculative decoding breaks part of this serialisation (Leviathan et al., 2023; Chen et al., 2023). A cheap drafter proposes future tokens; the target verifies them in one parallel pass and accepts the longest prefix consistent with its own distribution, leaving the output distribution unchanged. Per-token latency is then L=(Tdraft+Tverify)/τL = (T_{\text{draft}} + T_{\text{verify}})/\tau for τ\tau accepted tokens per cycle, and drafters sit at two poles of that trade-off. Autoregressive drafters such as EAGLE-3 (Li et al., 2025b) condition each token on the last and reach high τ\tau, but pay Tdraft∝γT_{\text{draft}} \propto \gamma and must stay shallow; drafting is reported to consume 20–40% of inference time (Liu et al., 2026). Parallel drafters (Chen et al., 2026a; Cheng et al., 2026) emit a whole block in one pass and can afford depth, but predict every position from the verified prefix alone. Their positions are marginal, so dependence between drafted tokens has to be restored after the fact.

Autoregressive drafters buy coherence with sequential cost; parallel drafters buy speed, but at a price we question. Each round begins from an uninformative seed, mask embeddings or noise, so the drafter rebuilds the block from scratch, and coherence is patched back afterwards by nn-gram scores (Liu et al., 2026), recurrent correction heads (Cheng et al., 2026), or parent-conditioned trees (Ringel & Romano, 2026). Yet the target has already indicated where its next states lie, in its own recent hidden trajectory. A drafter seeded from that trajectory need not generate the block; it only has to transport an estimate onto the target's future states. Flow matching fits this view, since it constrains neither the source distribution nor the number of integration steps, and short transports need few (Lipman et al., 2023; 2024).

We introduce ChainFlow, a drafter that treats drafting as short-horizon transport on the target's hidden-state manifold. A variational autoencoder compresses the target's final hidden states to a latent space, and a conditional flow network transports an estimate of the next 8 latents, taken from the recent context, onto the target's future latents in one Euler step at serving time. Context states enter as cross-attention memory, so the drafter reads the target's internal representation without being embedded in it (Samragh et al., 2025). Decoded latents are projected by the target's frozen language modeling head (lm_head), so the drafter emits exact per-position categoricals and standard verification applies. A low-rank Markov bias and a path-conditioned residual then restore dependence on the sampled prefix without a second flow pass, and a beam search emits the drafts as a chain or a draft tree. One forward pass yields all 8 positions, and the flow never touches the backbone, so the drafter runs on an unmodified engine.

We train drafters for the 4B, 9B and 27B models of Qwen3.5 family. At batch one, ChainFlow reaches 3.23×3.23\times on English mathematics and 2.69×2.69\times on Turkish function calling at 27B (English per-domain results in Table 4). Drafters are trained

first on English, then adapted on Turkish with data covering math, code, chat and open-ended sources. The English-only drafter is a net loss on Turkish; after adaptation Turkish improves sharply while English retains a speedup, so a drafter can be carried to a new language without retraining from scratch. German and French are then added in sequence, and replaying a small share of Turkish limits forgetting. Figure 1 summarises the comparison: served speedup on English domains (a), and acceptance length after Turkish adaptation (b). A context-derived source also makes the transport short: it trains faster than noise and stays accurate with a single integration step, where noise collapses, and one step is the fastest served configuration (§4.4). We also ladder concurrency: as with any speculative decoder, the gain narrows as the decode batch grows, and on one NVIDIA B300 the tree gains up to a batch of 4.

Our contributions are as follows.

  • Faster and more adaptable. ChainFlow is 1.39×1.39\times faster than EAGLE-3 and 1.11×1.11\times faster than DFlash on English at matched drafter size, with the highest pooled speedup at 27B and the largest adaptation gains in Turkish, German and French.
  • Latent transport drafter. Flow matching over a VAE latent of the target's hidden states, started from the extrapolated trajectory, drafts all positions in one or two steps.
  • Tree drafting at chain cost. One pass yields every position's marginals, and token feedback turns them into chains or trees without re-running the drafter.

References (51)