English

Efficient Training of Language Models with Compact and Consistent Next Token Distributions

Computation and Language 2024-07-04 v1 Machine Learning

Abstract

Maximizing the likelihood of the next token is an established, statistically sound objective for pre-training language models. In this paper we show that we can train better models faster by pre-aggregating the corpus with a collapsed nn-gram distribution. Previous studies have proposed corpus-level nn-gram statistics as a regularizer; however, the construction and querying of such nn-grams, if done naively, prove to be costly and significantly impede training speed, thereby limiting their application in modern large language model pre-training. We introduce an alternative compact representation of the next token distribution that, in expectation, aligns with the complete nn-gram distribution while markedly reducing variance across mini-batches compared to the standard next-token loss. Empirically, we demonstrate that both the nn-gram regularized model and our approximation yield substantial improvements in model quality and convergence rate compared to existing methods. Furthermore, our approximation facilitates scalability of gains to larger datasets and models compared to the straightforward nn-gram regularization method.

Keywords

Cite

@article{arxiv.2407.02819,
  title  = {Efficient Training of Language Models with Compact and Consistent Next Token Distributions},
  author = {Ashutosh Sathe and Sunita Sarawagi},
  journal= {arXiv preprint arXiv:2407.02819},
  year   = {2024}
}

Comments

ACL 2024

R2 v1 2026-06-28T17:27:28.480Z