Imagine you want one model that can read text, look at images, reason about them, and generate both text and images — all together, fluidly.
Current approaches fail in one of three ways:
| Approach | What It Does | The Problem |
|---|---|---|
| Discrete tokenization | Converts images to tokens like words | Loses visual quality/fidelity |
| Causal text + diffusion | LLM for text, diffusion model for images | Structurally asymmetric — two different mechanisms |
| Adapting VLMs for generation | Fine-tunes understanding models to also generate | Damages the pretrained understanding capability |
Key Insight: None of these approaches are truly unified — they're always patching two different systems together.
Before understanding the solution, you need to understand how LLMs work structurally.
Autoregressive generation means:
Two key mechanisms:
Token 1 → Token 2 → Token 3 → Token 4 ...
↑ cached ↑ cached ↑ cached
Normalizing flows (NFs) are a class of generative models with specific properties:
Transform a simple distribution (like Gaussian noise) into a complex distribution (like a realistic image) using a series of invertible transformations.
Simple Noise (z) → [Invertible Transformations] → Complex Data (x)
Unlike diffusion models (which require many denoising steps), normalizing flows generate data in one pass — much more efficient.
This is the central intellectual contribution of the paper.
Autoregressive normalizing flows generate data by:
LLM Structure: [Token₁] → [Token₂] → [Token₃] ...
causal mask + KV-cache
Autoregressive Flow: [Patch₁] → [Patch₂] → [Patch₃] ...
causal mask + KV-cache
The Realization: These two systems are architecturally the same thing — both are causal Transformers. This means you don't need two separate mechanisms. You can unify them.
Now that we understand the building blocks, let's understand how STARFlow2 is built.
The name comes from how two streams are interleaved (twisted together like a pretzel).
Two streams running in parallel:
Input Sequence (text + image patches)
↓
┌─────────────────────────────────┐
│ Stream 1: Frozen VLM │ ← Pretrained Vision-Language Model
│ (handles understanding) │ FROZEN — weights don't change
└────────────┬────────────────────┘
│ residual skip connections (vertical interleaving)
┌────────────▼────────────────────┐
│ Stream 2: TARFlow │ ← Transformer Autoregressive Flow
│ (handles image generation) │ TRAINABLE
└─────────────────────────────────┘
↓
Text Output + Image Output
1. Frozen VLM Stream
2. TARFlow Stream
3. Residual Skip Connections
4. Same Causal Mask
Not all parts of the image need equal computational effort.
Early layers (Deep): Complex transformations — capture structure
Later layers (Shallow): Simpler transformations — refine details
This makes the model more computationally efficient without sacrificing quality.
The problem: Images are high-dimensional (millions of pixels). Working directly on pixels is too expensive.
The solution: FAE compresses images into a latent space — a compact representation.
Why "unified"?
Text token → KV-cache ✓
Image patch → FAE latent → KV-cache ✓ (no extra re-encoding step needed)
Let's verify it solves the original three problems:
| Original Problem | STARFlow2 Solution |
|---|---|
| Discrete tokenization loses visual quality | Uses continuous latent space via FAE — no discretization |
| Structural asymmetry (LLM + diffusion) | Both text and image use same causal Transformer mechanism |
| Adapting VLMs degrades understanding | VLM stream is frozen — understanding is fully preserved |
BEFORE STARFlow2:
Text Generation: [LLM — causal, single-pass]
Image Generation: [Diffusion — iterative, separate mechanism]
↑ Two different systems, awkwardly combined
AFTER STARFlow2:
Text + Image: [Causal Transformer — single-pass, unified]
↑ One system, one mechanism, one causal mask
The paper's core argument is elegant:
"Since autoregressive normalizing flows are already Transformers with causal masks and KV-caches — the same as LLMs — why not just use one unified system for everything?"
STARFlow2 is the answer to that question.
Test your understanding:
(Answers are all contained in the material above — try to answer from memory!)