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

Zhiwei Tang, Yuanyu He, Yizheng Han, Wangbo Zhao, Jiasheng Tang +2 more
6/9/2026
cs.LGcs.AIcs.CL

No official code found. Best implementation: alibaba-damo-academy/K-Forcing (19 stars, Apache-2.0, last commit 2026-06-09).

Abstract

Autoregressive (AR) language modeling is the dominant paradigm for text generation, yet its sequential token-by-token decoding makes inference memory-bound and inefficient. Existing acceleration approaches, such as speculative decoding and diffusion language models, can yield speedups under certain conditions but do not directly address high-load batch serving--the scenario most critical for industrial-scale deployment. We introduce K-Forcing, a push-forward language modeling paradigm for joint next-k-token decoding. K-Forcing distills an existing AR model into a conditional push-forward mapping--one that transforms independent uniform noise variables into a joint sample of multiple future tokens in a single forward pass. This design preserves fixed-length outputs, reuses the AR teacher backbone, and remains compatible with standard AR serving infrastructure. We train this mapping via progressive self-forcing distillation, which gradually expands the prediction window while enabling the student to closely match the sequence distribution of the AR teacher. We evaluate K-Forcing on LM1B and OpenWebText using a standard causal Transformer backbone. When aggressively configured to generate k = 4 tokens per forward pass, K-Forcing delivers approximately 2.4-3.5x speedup across different batch sizes, while incurring modest quality degradation relative to its AR teacher. As inference increasingly dominates the lifetime compute cost of modern LLMs, K-Forcing offers a promising route toward accelerating AR generation under real-world high-load deployment.

View on arXivView PDF

Code Implementations(1)

Apache-2.0

Official implementation for "K-Forcing: Joint Next-K-Token Decoding via Push-Forward Language Modeling"

190Jun 5, 20264 months agoApache-2.0

Similar Papers

Cite this paper

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

Add a badge to your README

Shows whether official code is linked for this paper.

Code of Paper badge
[![Code of Paper](https://codeofpaper.com/badge/2606.10820.svg)](https://codeofpaper.com/paper/2606.10820)

Discussion