Beyond Next Token Prediction: Patch-Level Training for Large Language Models

Chenze Shao, Fandong Meng, Jie Zhou
7/17/2024
cs.CLcs.AIcs.LG

Official code: shaochenze/PatchTrain (109 stars, Apache-2.0, last commit 2025-11-10).

Abstract

The prohibitive training costs of Large Language Models (LLMs) have emerged as a significant bottleneck in the development of next-generation LLMs. In this paper, we show that it is possible to significantly reduce the training costs of LLMs without sacrificing their performance. Specifically, we introduce patch-level training for LLMs, in which multiple tokens are aggregated into a unit of higher information density, referred to as a `patch', to serve as the fundamental text unit for training LLMs. During patch-level training, we feed the language model shorter sequences of patches and train it to predict the next patch, thereby processing the majority of the training data at a significantly reduced cost. Following this, the model continues token-level training on the remaining training data to align with the inference mode. Experiments on a diverse range of models (370M-2.7B parameters) demonstrate that patch-level training can reduce the overall training costs to 0.5$\times$, without compromising the model performance compared to token-level training. Source code: https://github.com/shaochenze/PatchTrain.

View on arXivView PDF

Code Implementations(1)

Apache-2.0

Code for paper "Patch-Level Training for Large Language Models"

1097Shell, PythonJul 17, 202411 months agoApache-2.0

Similar Papers

Cite this paper

@article{shao2024beyond,
  title  = {Beyond Next Token Prediction: Patch-Level Training for Large Language Models},
  author = {Chenze Shao and Fandong Meng and Jie Zhou},
  year   = {2024},
  eprint = {2407.12665},
  archivePrefix = {arXiv},
  url    = {http://arxiv.org/abs/2407.12665v3},
  journal = {ICLR 2024 2024}
}

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

Discussion