r/MachineLearning • • 25d ago

Research Multi-Token Prediction Done Right [R]

Post image

Sharing one of our latest papers on Multi-Token Prediction (MTP). MTP is now a standard recipe for frontier pre-training but turns out, it can be done much better.

We show the standard MTP gradient hides a KL self-distillation signal (which we want for improving speculative decoding) behind a noisy residual (that harms next-token prediction).

I think the coolest part was the KL gradient–recovery trick to extract the KL gradient. You just need a one-line code change:

h_ntp += h_mtp.detach() - h_mtp

Soft Multi-Token Prediction (Soft-MTP) is essentially a free lunch that improves MTP across a range of tasks.

I'm super excited about this work. Please do check it out below:

💻 Code: https://github.com/JaydenTeoh/Soft-MTP
📝 Paper: https://arxiv.org/abs/2610.38331
🤗 HuggingFace: https://huggingface.co/collections/JaydenTeoh/soft-multi-token-prediction

158 Upvotes

11 comments sorted by

2

u/sod0 25d ago

The one-line code change is vLLM? Is there a fork or patch available so I csn try this out?

4

u/jayden_teoh_ 25d ago

not on vllm yet as this tackles more of training rather than inference

8

u/AppleShark 25d ago

Mate can’t believe you’re delivering banger after banger. Enjoyed your work with next latent prediction before as well

5

u/jayden_teoh_ 25d ago

thank you, it means a lot to me!

2

u/henfiber 22d ago

What does an "one-line code change" mean in a research paper? Does you research improve on an open-source training implementation or are you proposing an algorithm? We don't measure algorithmic/research improvements by LoC.

imo, "the coolest part is <insert this simple thing>" is an unnecessary punchline for research papers.

1

u/jayden_teoh_ 21d ago

hey henfiber, thanks for your comment! the LoC is just to show how easy it is to tack upon the existing implementation of the MTP algorithm. Imo, accessibility in implementation and friendliness to infra is an important consideration for practical research today.

regarding "the coolest part is <insert this simple thing>", it is just what made me excited about doing this paper, I believe this KL gradient recovery exploiting linearity of the softmax cross entropy gradient and straight-through estimators is unprecedented. I just wanted to provide a more personal excitement about our paper, and also, to fulfil the guidelines of posting on this subreddit.

i hope you enjoyed the work! thanks for your comment once again

3

u/OkCampaign8400 24d ago

what does multi token prediction mean ?

Do you have outputs in bigrams , trigrams and you are predicting that or entire sentences are predicted at once ?

4

u/jayden_teoh_ 23d ago

yea the model learns to predict future n-grams, or next K tokens to be more general. it is quite common in frontier model pre-training lately. would recommend these papers, they are fire:
https://arxiv.org/abs/2404.19737
https://arxiv.org/abs/2001.04063
https://arxiv.org/abs/2412.19437v1

6

u/bespectacledapectl 25d ago

Ayee saw this on linkedin!! Nice!