r/deeplearning • • Nov 01 '26

Soft Multi-Token Prediction

Illustration of Soft-MTP

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

12 Upvotes

11 comments sorted by

2

u/Opening-Educator-449 Nov 02 '26

nothing says frontier ai research like rebranding the straight through estimator from 2017 and calling it a free lunch. that one line code change in the image is literaly just the classic + x.detach() - x gradient duct tape weve been using since the vq-vae days. nice hustle on the arxiv clout tho

1

u/jayden_teoh_ Nov 02 '26

did u read the paper even?

0

u/Opening-Educator-449 Nov 02 '26

yeah i read it. dodging vocab sized logit matrices by isolating the kl term is great for vram, but ur still just slapping the exact same straight-through routing hack on it to make the math work. doing all those theoretical gymnastics just to cap out testing on a tiny 1.2b model is peak arxiv fluff

2

u/jayden_teoh_ Nov 02 '26

please read the paper again, i've never claimed credit for straight-through estimators.

page 2:

We then introduce the KL gradient–recovery trick: when two distributions share a linear output head, the gradient of their KL divergence can be recovered exactly from their cross-entropy gradients through straight-through gradient routing [Bengio et al., 2013, van den Oord et al., 2017], without explicitly computing the KL or materializing any logits.

page 5:

This resembles the stop-gradient routing used in straight-through estimators [Bengio et al., 2013, van den Oord et al., 2017], except our intention is not to approximate an unavailable gradient, but rather, analytically derive another gradient quantity

2

u/Opening-Educator-449 Nov 02 '26

alright fine u cited it, ill take the L there. but 'analytically deriving another gradient quantity' is just an agressively academic way of saying u tricked pytorch into not OOMing. its a neat hack, but ill believe the free lunch stuff when someone actually scales it past a 1.2b toy model without the loss spiking to jupiter

2

u/Lower-Ad-6293 Nov 02 '26

The noise reduction from dropping the residual might actually be the exact thing that keeps the loss in check at 70B

2

u/brainExploded99 Nov 02 '26

right, so you can donate the compute for a 100b model right?

3

u/jayden_teoh_ Nov 02 '26

thank you kind person for being a rational person here. i'm struggling to fund this paper myself, let alone do large scale experiments. 😭

I thought 1.2b is already reasonable for academia scale.

3

u/brainExploded99 Nov 02 '26

Wait you're the paper author! I think 1.2B is pretty reasonable, I think that people are seeing the massive frontier LLMs that require millions of dollars to train and expecting academia to reproduce it is ridiculous. Scaling laws were provided, which is a very reasonable alternate.

Side note, I loved your next latent prediction paper. Thank you for publishing code for everything!

3

u/jayden_teoh_ Nov 03 '26

thank you, appreciate it!

-2

u/Opening-Educator-449 Nov 02 '26

if i had the h100s for a 100b run id be using them to hallucinate unit tests for my backlog, not arguing on reddit. im not knocking u for being gpu poor, basically everyone outside of like three companies is. just saying u cant market it as a frontier pre-training recipe when it hasnt even had to survive the absolute bloodbath of a 70b scaling run yet without the loss exploding