This story on HackerNoon has a decentralized backup on Sia.
Transaction ID: faDj90udW_ddAdsJev01jKIlK-HRwMK5uz8nOBKt7B0
Cover

Optimizing LLM Learning: Multi-Token Cross-Entropy Loss Explained

Written by @cosmological | Published on 2025/7/18

TL;DR
Explore the core of our approach: a generalized cross-entropy loss that enables LLMs to predict multiple future tokens simultaneously, fundamentally changing the learning process.

Abstract and 1. Introduction

2. Method

3. Experiments on real data

4. Ablations on synthetic data

5. Why does it work? Some speculation

6. Related work

7. Conclusion, Impact statement, Environmental impact, Acknowledgements and References

A. Additional results on self-speculative decoding

B. Alternative architectures

C. Training speeds

D. Finetuning

E. Additional results on model scaling behavior

F. Details on CodeContests finetuning

G. Additional results on natural language benchmarks

H. Additional results on abstractive text summarization

I. Additional results on mathematical reasoning in natural language

J. Additional results on induction learning

K. Additional results on algorithmic reasoning

L. Additional intuitions on multi-token prediction

M. Training hyperparameters

2. Method

Standard language modeling learns about a large text corpus x1, . . . xT by implementing a next-token prediction task. Formally, the learning objective is to minimize the cross-entropy loss

In this work, we generalize the above by implementing a multi-token prediction task, where at each position of the training corpus, the model is instructed to predict n future tokens at once. This translates into the cross-entropy loss

Figure 2: Order of the forward/backward in an n-token prediction model with n = 2 heads. By performing the forward/backward on the heads in sequential order, we avoidmaterializing all unembedding layer gradients in memory simultaneously and reduce peak GPU memory usage.

Authors:

(1) Fabian Gloeckle, FAIR at Meta, CERMICS Ecole des Ponts ParisTech and Equal contribution;

(2) Badr Youbi Idrissi, FAIR at Meta, LISN Université Paris-Saclayand and Equal contribution;

(3) Baptiste Rozière, FAIR at Meta;

(4) David Lopez-Paz, FAIR at Meta and a last author;

(5) Gabriel Synnaeve, FAIR at Meta and a last author.


This paper is available on arxiv under CC BY 4.0 DEED license.

[story continues]


Written by
@cosmological
From Big Bang's singularity to galaxies' cosmic dance the universe unfolds its majestic tapestry of space and time.

Topics and
tags
cross-entropy-loss|multi-token-prediction|llm-optimization|language-modeling|ai-method|deep-learning|transformer-models|llm-training
This story on HackerNoon has a decentralized backup on Sia.
Transaction ID: faDj90udW_ddAdsJev01jKIlK-HRwMK5uz8nOBKt7B0