ChainFlow speeds up large language model token generation significantly
ChainFlow: Few-Step Latent Flow Matching for Speculative Decoding
Artificial IntelligenceComputation and Language
Summary
Generating text with large language models can be slow because the model checks each word or token one by one. The authors introduce ChainFlow, a new method that guesses multiple tokens at once more efficiently by understanding how tokens relate to each other. ChainFlow uses a smart way to compress and transport hidden information inside the model to speed up this guessing process. Tests show ChainFlow is faster than previous methods, especially when adapting to different languages.
What this means in practice
- •For llm inference engineers: Accelerate token generation by implementing ChainFlow as a drafter to improve throughput of large language model inference efficiently.
- •For multilingual ai developers: Enhance language model performance across multiple languages by sequentially adapting ChainFlow drafters for faster decoding.
Authors
Selim Aktas, Yusuf Erdem Erdem, Ahmed Zeer, Himmet Toprak Kesgin, Muzaffer Kaan Yuce, Mehmet Fatih Amasyali
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.