Code · architecture · study mode
Instead of predicting only the next token, MTP predicts the next n tokens simultaneously and takes a weighted sum of…
Full explanation below the code →
Instead of predicting only the next token, MTP predicts the next n tokens simultaneously and takes a weighted sum of their cross-entropy losses. The model head is shared (untied from embedding), and mtp_weights determines how much each future token's loss contributes.
Why does predicting future tokens give more learning signal per forward pass?