How Modern Generative Models Actually Train & Run on Hardware
Understand the complete generative landscape: from Autoregressive LLM single-token memory bandwidth stalls, to Diffusion Language Models (MDLM & Next-Concept Modeling), continuous Score Diffusion (DDPM/DiT), and straight-line Flow Matching. Visualized with step-by-step mathematical formulations, GPU execution profiles, and PyTorch pseudocode.
Taxonomy & Algorithm Encyclopedia
Explore generative models by their high-level mathematical formulation or data modality.
Autoregressive / Next-Token Prediction
Decomposes sequence generation into T serial forward passes via the chain rule P(x) = ∏ P(x_t | x_<t). Powers standard LLMs (GPT-4, Llama 3) but suffers from memory-bandwidth bottlenecks during single-token decoding.
Memory-bandwidth bound during single-token decode (reads all weights from HBM to SRAM for 1 token). Compute-bound during multi-token prompt prefill.
Specific Architectures & Algorithms in this Family:
Autoregressive Transformer (LLM)
Parallel teacher-forced causal training; sequential KV-cached token decoding
Speculative Decoding
Draft-then-verify parallel acceleration breaking the memory-bandwidth decode bottleneck
Mamba: Selective State Space Model
Linear-time sequence modeling with input-selective recurrent state spaces
Diffusion & Non-Autoregressive Language Models
Modern non-autoregressive language models that eliminate the sequential decode bottleneck. Includes Discrete Masked Diffusion (MDLM, Plaid, SEDD) which iteratively unmasks tokens with bidirectional context, and Next-Concept Modeling (NCM) which diffuses continuous concept representations rather than individual discrete tokens.
Compute-bound parallel GEMMs per step across the whole sequence. Eliminates single-token KV-cache thrashing and maximizes GPU Tensor Core occupancy.
Specific Architectures & Algorithms in this Family:
Next-Concept Modeling (NCM)
Multiscale Residual VQ hierarchy + level-parallel coarse-to-fine text generation
Masked Diffusion Language Model (MDLM / LLaDA)
Continuous-time discrete token masking + iterative bidirectional unmasking
Continuous Score-Based Diffusion
Forward Gaussian noise perturbation inverted step-by-step via neural score functions estimating ∇_x log p_t(x). Powers foundational visual and audio synthesis (DDPM, DiT, EDM).
Compute-bound Tensor Core execution on 2D/3D patch grids. High arithmetic intensity (>100 FLOPs/Byte) with AdaLN condition parameter modulation.
Specific Architectures & Algorithms in this Family:
Denoising Diffusion Probabilistic Models (DDPM)
Iterative Gaussian score denoising reversing a Markov corruption chain
Diffusion Transformer (DiT in Latent Space)
ViT patchified latent score-matching with AdaLN-Zero conditioning
Continuous Flow Matching & Optimal Transport
Directly regresses a velocity vector field v_θ(x_t, t) along linear interpolation paths between Gaussian noise and data. Powers state-of-the-art visual models like Stable Diffusion 3 and Flux.1.
Deterministic straight ODE trajectories require 2-4x fewer steps than curved diffusion SDEs. High Tensor Core utilization with zero RNG noise overhead at inference.
Specific Architectures & Algorithms in this Family:
Flow Matching / Rectified Flow
Straight-line ODE probability transport between Gaussian noise and data
Voicebox: Non-Autoregressive Audio Flow Matching
Continuous flow matching for controllable speech synthesis and audio infilling
Hierarchical Residual Vector Quantization (RVQ)
Compresses dense continuous sequences (24kHz audio waveforms or high-res images) into L discrete codebook levels. Models generate coarse global structure first, then refine details in parallel across residual levels.
Bounded fixed depth L ≪ T steps. High memory efficiency with parallel cross-entropy decoding within each codebook depth level.
Specific Architectures & Algorithms in this Family:
Visual Autoregressive Modeling (VAR Next-Scale)
Next-scale discrete visual prediction outperforming diffusion models in quality & speed
Neural Audio Codec (Residual Vector Quantization)
High-rate continuous waveforms factorized into multiscale residual discrete codebook frames
The Generative Paradigm Race
Why are labs moving away from pure autoregressive left-to-right generation? Compare Autoregressive LLMs, Next-Concept Modeling (NCM), Masked Discrete Diffusion, and Continuous Flow Matching side-by-side to understand trade-offs in inference passes, compute, and parallelizability.