Skip to content

In development. Expect rough edges and changes. The source code is not public yet.

Modal 13 min read Research hardMaster

Multi-token Residual Prediction

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.

Assumes: diffusion language modelsspeculative decodingmulti-token prediction headsKL divergence distillation

Related posts

  • Supercharging transformer residual connections

    Google Research hardMaster

    DeepCrossAttention (DCA) replaces the fixed point-wise summation of transformer residual connections with learned, per-token routing over all preceding layer outputs. It does this through dynamic layer-mixing weights and depth-wise cross-attention with split Q/K/V, which prevents early-layer features from being diluted. On LM1B and C4, DCA matched standard transformers in up to 5x fewer training steps and hit sub-14 LM1B perplexity with 30 layers instead of 42, while adding under 0.2% parameters. It can also be retrofitted onto pre-trained models, and the post places it alongside related techniques such as attention residuals, hyper-connections and manifold-constrained hyper-connections.

  • Accelerate RL rollouts by up to 50% with distribution-aware speculative decoding

    Together AI hardMaster

    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. It combines a training-free suffix tree drafter built from a sliding window of recent rollouts with length-aware scheduling. The drafter adapts to the evolving policy by inserting newly verified tokens back into the tree. The scheduler interleaves long requests across GPUs and gives long requests aggressive speculation budgets from the start, medium requests moderate budgets, and short ones none. Reported results are over 50% rollout time reduction on math RL with DeepSeek-R1-Distill-Qwen-7B and ~25% on code RL with Qwen3-8B, with matching reward curves across 8k–16k sequence lengths and batch sizes of 16–32.

  • Consistency diffusion language models: Up to 14x faster inference without sacrificing quality

    Together AI hardMaster

    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. Training distills from teacher decoding trajectories using three losses: distillation on newly unmasked tokens, a consistency loss on still-masked tokens, and an auxiliary masked-denoising loss. On Dream-7B-Instruct, refinement steps drop by about 4.1x–7.7x with minor accuracy changes, and latency improves by up to 11.2x on GSM8K-CoT and 14.5x on MBPP. Naively truncating steps without this training sharply degrades accuracy. A roofline analysis shows block-wise DLMs sit between memory-bound AR decoding and compute-bound full-attention DLMs, which makes them efficient at small batch sizes.

  • Accelerating Gemini Nano models on Pixel with frozen Multi-Token Prediction

    Google Research hardMaster

    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. A lightweight transformer head attached to the final layers drafts future tokens from the backbone's hidden states and cross-attends directly to the main model's KV cache. This removes drafter prefill latency and saves about 130MB per instance compared with a standalone drafter. Because the backbone stays frozen and drafts are verified, output is bit-for-bit identical to the base model, and no per-task drafter fine-tuning is needed. Reported gains are 50%+ speedups over comparable standalone drafters, up to 55% better token acceptance on structured tasks like smart replies, and nearly two extra accepted tokens per pass in production features like Notification Summaries and Proofread.

  • Multivariate Probabilistic Time Series Forecasting with Informer

    Hugging Face hardMaster

    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). Code sketches show both mechanisms. A walkthrough then trains InformerModel for multivariate probabilistic forecasting on the 862-series traffic_hourly dataset, using GluonTS's MultivariateGrouper to build the input and independent (diagonal) emission distributions on the output side.

The quest for software engineering knowledge.

Look:
Layout: