K-Forcing: Joint Next-K-Token Decoding via Push-Forward Language Modeling

Zhiwei Tang, Yuanyu He, Yizheng Han, Wangbo Zhao, Jiasheng Tang, Fan Wang, Bohan ZhuangarXiv 2026

TL;DR

K-Forcing is a novel language modeling paradigm that accelerates LLM inference in high-load batch serving by generating a fixed-length block of $k$ tokens in a single forward pass. By distilling an autoregressive (AR) teacher into a conditional push-forward mapping that transforms uniform noise into joint token samples, K-Forcing achieves a 2.4–3.5× speedup with minimal quality degradation while remaining fully compatible with standard serving infrastructure.

What Problem Does This Paper Address?

Autoregressive (AR) language models generate text sequentially, token by token. Because each step requires reloading massive model weights and accessing a growing key-value (KV) cache from GPU memory, single-token decoding is heavily memory-bound and leaves modern hardware accelerators underutilized.

While acceleration methods exist, they struggle in high-load, industrial batch-serving scenarios:

  • Draft-then-verify methods (e.g., speculative decoding) produce variable-length accepted outputs. This creates a "ragged tensor" problem, desynchronizing batch states and destroying the efficiency of continuous batching systems under heavy loads.
  • Diffusion language models (MDLMs) predict multiple tokens in parallel but sample from per-position marginal distributions rather than a joint conditional distribution. This requires numerous iterative refinement steps to maintain text quality, limiting actual speedups.

K-Forcing bridges this gap by satisfying two design principles: providing fixed-length outputs per forward pass to preserve batching regularity, and performing joint multi-token sampling to maintain generation quality.

Comparison of language model inference paradigms within one NFE (number of forward evaluations).

Methods

K-Forcing introduces a Push-Forward Language Model (PFLM). Instead of explicitly calculating a massive probability table for $k$ future tokens, a PFLM uses a deterministic map to transform independent uniform noise variables ($z_1, \dots, z_k \sim \text{Uniform}(0,1)$) into a joint sample of $k$ future tokens in a single forward pass.

Progressive Self-Forcing Distillation

To train this mapping without the numerical fragility and train-inference mismatch of traditional noise inversion techniques, the authors propose a multi-stage distillation recipe:

  1. Stage 1 (Forward Distillation): Bootstrap a reliable PFLM for $k=1$ by running the AR teacher forward, mapping uniform noise to tokens via an inverse cumulative distribution function (CDF).
  2. Stage 2 (Self-Forcing Distillation): Progressively double the prediction window ($k = 1 \rightarrow 2 \rightarrow 4$). To train a student of window $2k$, the frozen $k-token$ PFLM teacher generates a block of tokens, conditions on its own predictions in a second pass to generate the next block, and uses the combined sequence as the student's target.

Fully Causal Architecture

The authors propose a Fully Causal Architecture to parameterize the push-forward mapping. Each noise variable is represented as a separate token under causal attention and decoded by a shared prediction head. This mirrors the step-by-step inverse-CDF construction, providing a natural inductive bias and allowing the model to fully reuse the AR backbone without adding extra multi-token prediction (MTP) heads.

Comparison between Standard MTP and Fully Causal Architecture designs for K-Forcing.

Datasets

The authors evaluated K-Forcing on two standard language modeling benchmarks:

  • LM1B (One Billion Word Benchmark): Preprocessed with a context length of 128 tokens.
  • OpenWebText (OWT): Preprocessed with a context length of 1,024 tokens.

Both setups utilized a standard 12-layer, ~100M-parameter Transformer backbone.

Key Insights and Ideas

  • The Marginal Sampling Bottleneck: The authors mathematically prove (Theorem 1) that parallel prediction from independent marginals (like in MDLMs) inherently distorts the target joint distribution unless tokens are unmasked one at a time. Joint sampling is non-negotiable for lossless parallel decoding.
  • Bypassing GPU Non-Determinism: Traditional noise inversion is numerically fragile because low-probability tokens have extremely narrow CDF bins; minor floating-point variations across different GPU batch sizes can completely alter the recovered noise. Self-forcing distillation circumvents this by generating targets directly from the model's own forward passes.
  • Inference-Time Flexibility: The prediction window $k$ can be dynamically adjusted at inference time (any $k \le k_{\text{train}}$) to smoothly trade off speed and quality without retraining the model.

Key Results

K-Forcing demonstrates substantial throughput improvements across low-, medium-, and high-load batch regimes on a single H100 GPU:

  • Speedups: When configured to generate $k=4$ tokens per forward pass, K-Forcing delivers a 3.02–3.33× speedup on LM1B and a 2.38–3.47× speedup on OpenWebText across batch sizes of 4, 16, and 128.
  • Quality Retention: Using an LLM-as-a-judge (Qwen3.5-27B) evaluation, K-Forcing ($k=2$) achieved win rates nearly indistinguishable from the AR teacher (50.2% on LM1B, 46.9% on OWT). At $k=4$, quality degrades gracefully but remains highly coherent compared to baseline non-autoregressive models.
  • NFE Efficiency: In a direct comparison on OWT, K-Forcing ($k=4$) required only 240 forward evaluations to generate a 960-token completion, outperforming Medusa, PTP, and MDLM in the quality-NFE trade-off.

Limitations and Future Work

  • Dense Mask Training Overhead: The current implementation passes attention masks as dense matrices, resulting in an $O(k^2)$ training overhead in practice. Developing custom block-sparse attention kernels could reduce this to the theoretical $O(k)$ cost.
  • Supervision Noise: Floating-point non-determinism in standard GPU kernels can still slightly perturb the teacher's outputs during training. Utilizing batch-invariant kernel libraries (like DeepSeek-V4) is a promising avenue to stabilize gradients.
  • Teacher Dependence: The current framework relies entirely on a pretrained AR teacher. The authors note that training a push-forward language model completely from scratch remains an open research challenge.

Summary updated

BibTeX
@misc{tang2026k,
  author = {Zhiwei Tang and Yuanyu He and Yizheng Han and Wangbo Zhao and Jiasheng Tang and Fan Wang and Bohan Zhuang},
  title = {{K-Forcing: Joint Next-K-Token Decoding via Push-Forward Language Modeling}},
  year = {2026},
  eprint = {2606.10820},
  archivePrefix = {arXiv},
  url = {https://arxiv.org/abs/2606.10820},
}
Figure