Better & Faster Large Language Models via Multi-token Prediction

Fabian Gloeckle, Badr Youbi Idrissi, Baptiste Rozière, David Lopez-Paz, Gabriel Synnaeve

arXiv:2404.19737 · 2026-07-27 공개 · arXiv · PDF

large-language-models code-generation sample-efficiency llama human-eval inference-speed mbpp multi-token-prediction

Abstract

Large language models such as GPT and Llama are trained with a next-token prediction loss. In this work, we suggest that training language models to predict multiple future tokens at once results in higher sample efficiency. More specifically, at each position in the training corpus, we ask the model to predict the following n tokens using n independent output heads, operating on top of a shared model trunk. Considering multi-token prediction as an auxiliary training task, we measure improved downstream capabilities with no overhead in training time for both code and natural language models. The method is increasingly useful for larger model sizes, and keeps its appeal when training for multiple epochs. Gains are especially pronounced on generative benchmarks like coding, where our models consistently outperform strong baselines by several percentage points. Our 13B parameter models solves 12 % more problems on HumanEval and 17 % more on MBPP than comparable next-token models. Experiments on small algorithmic tasks demonstrate that multi-token prediction is favorable for the development of induction heads and algorithmic reasoning capabilities. As an additional benefit, models trained with 4-token prediction are up to 3 times faster at inference, even with large batch sizes.

한국어 요약

한 줄 요약

다중 토큰 예측을 통해 13B 모델이 HumanEval에서 12%, MBPP에서 17% 더 많은 문제를 해결하는 LLM 훈련 방법을 제안한다.

핵심 기여도

핵심 아이디어

기존 LLM은 단일 토큰 예측(Next-token prediction)을 통해 훈련되지만, 이는 지역적 패턴에만 의존하고 "복잡한 결정"을 무시할 수 있다. 본 연구는 각 토큰 위치에서 **n개의 토큰을 동시에 예측**하도록 모델을 훈련시키는 **다중 토큰 예측**(Multi-token prediction)을 제안한다. 이는 **공유 트렁크**(shared model trunk) 위에 **n개의 독립 출력 헤드**(independent output heads)를 배치하여 병렬 예측을 수행하는 방식이다. 이 접근법은 훈련 시간 증가 없이 샘플 효율성을 높이고, 특히 **코드 생성**과 같은 생성적 작업에서 강력한 성능 향상을 보인다.

기술적 접근법

주요 결과

의의 및 한계

실용적 활용