Context-level Language Modeling by Learning Predictive Context Embeddings

Beiya Dai, Yuliang Liu, Daozheng Xue, Yunchong Song, Qipeng Guo +4 more
10/23/2025
cs.CLcs.AI

No confident code implementation found for this paper. 1 possible match can be shown below.

Abstract

We propose ContextLM, a framework that implicitly learns multi-token prediction by augmenting standard pretraining with an intrinsic next-context prediction objective. ContextLM builds a language model on top of context embeddings that span multiple tokens, enabling better next-token prediction by predicting the next context. Our model is fully compatible with standard autoregressive, token-by-token evaluation paradigms (e.g., perplexity). Extensive experiments with GPT-2 and Pythia backbones (up to 1.5B parameters and 300B training tokens) reveal that ContextLM shifts the Pareto frontier of scaling laws, exhibiting superior efficiency in parameters, training tokens, and FLOPs. Our results show that ContextLM could already achieve the baseline perplexity using 39\% fewer parameters and demonstrates robust generalization improvements on extensive downstream tasks under equivalent parameter counts.

View on arXivView PDF

Code Implementations

No confident code match yet

We couldn't find an author-owned or strongly-evidenced community implementation for this paper. 1 weaker match is hidden by default — verify before relying on them.

No code implementations found yet.

Know of an implementation? Let us know in the comments below!

Cite this paper

@article{dai2025contextlevel,
  title  = {Context-level Language Modeling by Learning Predictive Context Embeddings},
  author = {Beiya Dai and Yuliang Liu and Daozheng Xue and Yunchong Song and Qipeng Guo and Kai Chen and Xinbing Wang and Bowen Zhou and Zhouhan Lin},
  year   = {2025},
  eprint = {2510.20280},
  archivePrefix = {arXiv},
  url    = {http://arxiv.org/abs/2510.20280v3}
}

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/2510.20280.svg)](https://codeofpaper.com/paper/2510.20280)

Discussion