Better & Faster Large Language Models via Multi-token Prediction

LLM PTSAD MQIA
本文研究表明,像GPT和Llama这样的大型语言模型是通过下一个令牌的预测损失进行训练的。我们建议训练语言模型同时预测多个未来令牌,这样可以提高样本效率。具体而言,在训练语料库的每个位置,我们要求模型使用n个独立的输出头预测接下来的n个令牌,这些输出头在共享的模型主干上运行。将多令牌预测视为辅助训练任务,我们测量了在没有训练时间开销的情况下提高了下游能力。该方法对于更大的模型大小尤其有用,并且在训练多个时期时仍然具有吸引力。在生成基准测试中,收益尤其明显,例如编码,我们的模型始终比强基线高出几个百分点。我们的13B参数模型在HumanEval上解决的问题比可比的下一个令牌模型多12%,在MBPP上多17%。在小型算法任务的实验中,多令牌预测对于归纳头和算法推理能力的发展是有利的。作为额外的好处,使用4令牌预测训练的模型在推理时速度提高了多达3倍,即使使用大批量大小也是如此。
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.
许愿