---
title: "Multi-token Residual Prediction"
description: "Multi-token Residual Prediction (MRP) adapts multi-token prediction to diffusion language models by training a small 3-layer transformer on a frozen backbone to predict the logit residual between adjacent denoising steps, not the full next-step distribution."
url: "https://swe.quest/articles/multi-token-residual-prediction-f7971ab59cb61cdd"
canonical: "https://modal.com/blog/multi-token-residual-prediction"
source: "Modal"
published: "2026-07-01"
difficulty: "hard"
kind: "Research"
reading_minutes: 13
tags: ["inference","llms","model-training","performance"]
---

# Multi-token Residual Prediction

A post on [Modal](https://swe.quest/sources/modal.md), published 2026-07-01, 13 min read, Research. Original: [https://modal.com/blog/multi-token-residual-prediction](https://modal.com/blog/multi-token-residual-prediction)

## Summary

Multi-token Residual Prediction (MRP) adapts multi-token prediction to diffusion language models by training a small 3-layer transformer on a frozen backbone to predict the logit residual between adjacent denoising steps, not the full next-step distribution. The residual target is low-complexity, so accuracy holds across several steps: on SDAR-4B GSM8K it scores 57.2% at four steps, while naive full-distribution distillation falls to 1.9%. In the static regime MRP serves as a speculative drafter for lossless speedups of about 1.3–1.4× in SGLang, or commits tokens directly for up to about 1.9× at a small quality cost. In the dynamic regime it remasks over-eager low-threshold reveals and recovers up to roughly +22 accuracy points. The best module depth is 2–3 layers, and shallower modules suit speculative mode.

Written by swe.quest, not by the author.

**Difficulty:** Hard: written for specialists in the field

## Topics

- [Inference & serving](https://swe.quest/tags/inference.md) (AI & ML)
- [LLMs](https://swe.quest/tags/llms.md) (AI & ML)
- [Model training](https://swe.quest/tags/model-training.md) (AI & ML)
- [Performance engineering](https://swe.quest/tags/performance.md) (Reliability & operations)

## Prerequisites

- diffusion language models
- speculative decoding
- multi-token prediction heads
- KL divergence distillation

## Keywords

Multi-token Residual Prediction, SDAR, SGLang, Medusa, EAGLE, DFlash, GSM8K

## Related posts

- [Supercharging transformer residual connections](https://swe.quest/articles/supercharging-transformer-residual-connections-cfa196a28b957618.md): Google Research · 2026-11-23 · Hard · 7 min read · LLMs, Model training, Machine learning
  DeepCrossAttention (DCA) replaces the fixed point-wise summation of transformer residual connections with learned, per-token routing over all preceding layer outputs.
- [Accelerate RL rollouts by up to 50% with distribution-aware speculative decoding](https://swe.quest/articles/accelerate-rl-rollouts-by-up-to-50-with-distribution-aware-speculative-decoding-1fa2a300c01f2135.md): Together AI · 2026-04-24 · Hard · 5 min read · Inference & serving, Model training, LLMs, Performance engineering, Data structures
  Distribution-aware speculative decoding (DAS) speeds up the rollout phase of LLM RL post-training, which can consume ~70% of training time due to long-tail straggler generations, while keeping outputs identical to standard decoding.
- [Consistency diffusion language models: Up to 14x faster inference without sacrificing quality](https://swe.quest/articles/consistency-diffusion-language-models-up-to-14x-faster-inference-without-729cf6964ed22edf.md): Together AI · 2026-02-19 · Hard · 6 min read · Inference & serving, LLMs, Model training, Performance engineering
  Consistency diffusion language models (CDLM) speed up diffusion LLM inference by post-training a block-wise causal student that can finalize multiple tokens per step and use exact block-wise KV caching.
- [Accelerating Gemini Nano models on Pixel with frozen Multi-Token Prediction](https://swe.quest/articles/accelerating-gemini-nano-models-on-pixel-with-frozen-multi-token-prediction-eebb2d7eead45aae.md): Google Research · 2026-06-26 · Hard · 6 min read · Inference & serving, LLMs, Mobile, Performance engineering
  Google retrofits a Multi-Token Prediction (MTP) head onto frozen, already-deployed Gemini Nano v3 models to speed up on-device speculative decoding on Pixel 9 and 10 phones.
- [Multivariate Probabilistic Time Series Forecasting with Informer](https://swe.quest/articles/multivariate-probabilistic-time-series-forecasting-with-informer-6e926e78b9077796.md): Hugging Face · 2023-03-10 · Hard · 21 min read · Machine learning, Model training, Python
  Informer, the AAAI'21 best paper model now in Hugging Face Transformers, extends the vanilla Transformer for long-sequence time series forecasting with two changes: ProbSparse attention, which uses a query sparsity measurement on sampled keys to keep only the top c·log T "active" queries and cut attention cost from O(T²) to O(T log T), and a distilling step (Conv1d + ELU + MaxPool) that halves sequence length between encoder layers to reduce memory to O(N·T log T).

Browse: [Latest posts](https://swe.quest/index.md) · [Topics](https://swe.quest/tags.md) · [Sources](https://swe.quest/sources.md) · [Topic map](https://swe.quest/map.md) · [Site guide (llms.txt)](https://swe.quest/llms.txt)
