Predicting several words may reshape AI language models
Terminator Language Models By What The Future Newsroom · May 2, 2024 · 5 min read

Predicting several words may reshape AI language models

Researchers from Meta AI, CERMICS (Ecole des Ponts ParisTech), and LISN (Université Paris-Saclay) argue that AI language models can benefit from predicting multiple future tokens during training. Their multi-token prediction approach improved programming-task results, coherence, reasoning capabilities, and execution speed in the reported experiments.

Large language models are usually trained to answer a narrow question again and again: what token comes next? New research suggests that this familiar training target may be too limited for the next stage of AI language models.

“The story mildly leans Terminator because it describes a training method that could make language models more capable at reasoning, coding, and speed, without direct harm or social degradation.”Why it scores Terminator

Scientists from Meta AI, CERMICS (Ecole des Ponts ParisTech), and LISN (Université Paris-Saclay) propose a different approach called multi-token prediction. Instead of learning only the next word in a sequence, a model is trained to predict several upcoming words at once.

Why next-token prediction may be limiting

Models like GPT-4 are typically built around next token prediction. During training, the system learns from text by estimating the next word in a sentence. That simple objective has helped produce powerful language systems, but the researchers suggest it may also pull the model toward short-range thinking.

The concern is not that next-token prediction fails outright. It is that a model focused only on the immediate next step may give less attention to longer-term dependencies in language. Multi-token prediction changes the training signal so the model must look further ahead while learning.

That matters because language is rarely understood one word at a time. Meaning often depends on what is coming, how a sentence develops, and how earlier context connects to later choices. A training method that asks the model to anticipate several future tokens can push it toward broader structure instead of only local completion.

How multi-token prediction works

In the proposed method, the model predicts the next words in parallel at each point in the training text. It uses a shared model component, described as a trunk, along with numerous independent output heads.

Each output head is responsible for a different future token. This design lets the model share most of its internal processing while still producing several future predictions. The result is a training objective that remains connected to token prediction, but stretches beyond the single next-token target.

The researchers also address memory use. The calculations for the output heads are performed sequentially, and intermediate results are deleted after each step. Because of that, memory requirements do not grow with the number of predicted words.

That detail is important for large language models. A method that improves training but sharply raises memory demands would be harder to apply at scale. Here, the researchers report a way to add multi-token prediction without letting memory needs rise with each additional predicted word.

The reported gains grow with scale

The experiments indicate that the benefit of multi-token prediction becomes larger as model size increases. In one reported comparison, a model with 13 billion parameters solved 12 % more programming tasks on the HumanEval dataset and 17 % more on the MBPP dataset than a comparable next-token model.

Those results are focused on programming tasks, but the researchers also connect the method to broader improvements in performance, coherence, and reasoning capabilities. The core idea is that looking further ahead during training may help a model form more useful internal expectations about language.

The approach may also improve execution speed. With speculative decoding, which uses the additional prediction heads, the models can be executed up to three times faster.

In practical terms, the research points to two possible advantages:

  • Better training signals: the model learns from several future words instead of only one immediate target.
  • Faster execution: the extra prediction heads can be used with speculative decoding.

The researchers suspect the explanation is tied to longer-term dependencies. Next-token models may concentrate heavily on immediate prediction, while multi-token models are trained to account for more of what follows.

Why the brain comparison matters

The work also fits into a larger research direction: making AI language models closer to how the human brain processes language. The source article connects the initiative to efforts by Yann LeCun, including research on the Joint Embedding Predictive Architecture, or JEPA, for autonomous artificial intelligence.

JEPA includes a central world model module that is expected to learn a hierarchical and abstract representation of the world. That representation could then be used to make predictions at different levels of abstraction, in a way the source compares to the human brain.

Studies cited in the source suggest that the brain looks beyond the next word during language understanding. Rather than predicting only one upcoming word, it appears to predict several later words at once. It also uses semantic information alongside syntactic information for broader and more abstract predictions.

Jean-Rémi King, a neuroscientist from CNRS who leads the Brain & AI team at Meta, frames this as a research task for AI. According to the source, better language algorithms need prediction of hierarchical representations of future inputs.

King's team has connected AI language models and brain activity in several steps. In late 2021, the team showed that human brain responses to language are predictable based on activations of a GPT language model. In June 2022, the team showed correlations between an AI model trained with speech recordings and fMRI recordings of more than 400 people listening to audiobooks.

The source also reports that King's team later demonstrated an AI system that can predict which words a person has heard from MEG and EEG data. A later paper by researchers at the University of Texas at Austin replicated a similar result for fMRI recordings.

Beyond words, toward future representations

Predicting long sequences of exact words is difficult because the possible combinations multiply quickly. The source notes that more abstract representations, such as the meaning of word sequences, can allow more reliable predictions.

That is why multi-token prediction may be one step rather than the final destination. The researchers want to develop methods that operate in the embedding space. The source connects this direction to an idea that Meta's AI chief Yann LeCun sees as central to the future of AI.

The broader implication is clear: future AI language models may improve not only by growing larger, but by learning from richer prediction tasks. Multi-token prediction keeps the familiar foundation of language modeling, yet asks the model to learn from more of the future at once.

Whether this approach can overcome many weaknesses of today's models remains open. But the reported results suggest that training objectives beyond simple next-token prediction are now a serious path for improving AI language models, especially as models scale.

← Back to the wire

Read next