TL;DR
Distilled Decoding (DD) is a novel framework that enables autoregressive (AR) models to generate images in just one or two steps, overcoming the traditional "token-by-token" bottleneck. By using flow matching to create deterministic mappings from noise to data, DD achieves up to a 217x speedup with minimal quality loss and—crucially—does not require the original training data of the teacher model.
What Problem Does This Paper Address?
Autoregressive models are the powerhouses behind modern AI, from GPT-4 in text to VAR and LlamaGen in images. However, they are notoriously slow because they generate data sequentially: to produce an image with 256 tokens, the model must run 256 times.
Previous attempts to speed this up usually involve "parallel decoding," where the model tries to predict multiple tokens at once. The fundamental problem here is conditional dependency. Tokens in an image or sentence are not independent; the 10th token depends on the previous nine. If you try to predict them all simultaneously without accounting for these links, the model effectively "guesses" an average of all possible outcomes, resulting in blurry, incoherent, or low-quality results.
Methods
The authors introduce Distilled Decoding (DD), which reframes the AR generation process as a deterministic mapping problem that can be distilled.
- AR Flow Matching: For each step in the AR sequence, the authors use Flow Matching (FM). Instead of just sampling a token from a probability distribution, they sample a "noise token" from a Gaussian distribution. FM defines a deterministic path (an ODE trajectory) that transforms this noise into the specific token chosen by the AR model.
- Constructing the Trajectory: By repeating this for every token in a sequence, they create a complete "noise-to-data" trajectory. Because the mapping is now deterministic, a student network can be trained to learn the entire transformation at once.
- One-Step Distillation: The student model is trained to take the entire sequence of noise tokens as input and output the final sequence of data tokens in a single forward pass.
- Flexible Sampling: While one-step generation is the goal, the architecture allows for multi-step sampling (e.g., 2-step or 4-step) to progressively refine quality, providing a smooth trade-off between speed and fidelity.
Datasets
The researchers evaluated DD on two primary benchmarks:
- ImageNet-256: Used for class-conditional image generation, distilling the VAR and LlamaGen models.
- LAION-COCO: Used for large-scale text-to-image generation, distilling the LlamaGen text-to-image model.
A significant advantage of DD is that it is data-free regarding the original model's training set. The authors generated their own training pairs (1.2M for ImageNet, 3M for LAION-COCO) simply by prompting the pre-trained "teacher" AR models.
Key Insights and Ideas
- Noise as a Latent Anchor: The "aha moment" is using Gaussian noise to resolve the one-to-many mapping problem. By pairing a specific noise sequence with a specific output sequence, the student model has a clear, deterministic target to learn, which preserves the complex dependencies between tokens.
- Synergy between AR and FM: AR models provide the structure (the sequence), while Flow Matching provides the mechanism to make that structure "jumpable."
- Trajectory Preservation: Unlike distillation methods for diffusion models, DD allows users to jump back to any point in the trajectory. You can use the distilled model for the first half of generation and the original AR teacher for the second half to perfectly recover details.
Key Results
The quantitative results represent a massive leap in AR efficiency:
- LlamaGen (ImageNet): Reduced generation from 256 steps to 1 step, achieving a 217.8x speedup. The FID (a measure of image quality where lower is better) only increased from 4.11 to 11.35.
- VAR (ImageNet): Reduced from 10 steps to 1 step (6.3x speedup), with FID moving from 4.19 to 9.96.
- Text-to-Image: For LlamaGen on LAION-COCO, DD achieved a 92.9x speedup (256 steps to 2) with a very small FID increase (25.70 to 28.95).
- Baseline Failure: Standard parallel decoding baselines completely failed at one-step generation, yielding FID scores >100 (essentially noise).
Qualitatively, the images produced in one or two steps are remarkably close to the teacher's output, as seen in the comparisons below.
Limitations and Future Work
- Teacher Dependency: The quality of the distilled model is strictly bounded by the performance of the pre-trained teacher AR model.
- Scaling to LLMs: While theoretically applicable to Large Language Models (LLMs), text generation involves much longer sequences and larger vocabularies (codebooks), which presents new scaling challenges for the distillation process.
- Teacher-Free Training: The authors suggest exploring "teacher-free" consistency training to potentially surpass the original AR model's quality while maintaining few-step speed.
Summary updated