Native multimodal and any-to-any models

How one network comes to read and write images and speech: early against late fusion, the two kinds of image token, writing an image one token at a time and faster, unified models (Chameleon, Janus, Transfusion, Show-o, BAGEL, encoder-free Gemma 4), interleaved data and the balance between modalities, what the closed omni systems disclose, speech, and when a pipeline is the better design. A tiny autoregressive model over image tokens trained on an Apple M1 Pro against the topic's diffusion and flow models at equal compute; published results kept apart. A child of Topic: generative-and-multimodal. Data as of October 2026. Reading: 37 min, plus 12 in closed details.

The idea in one screen

A native multimodal model makes every modality positions in one token sequence of one transformer; the designs differ in what an image becomes on the way in (encoder vectors, latent patches, discrete codes or raw patches) and how an image is written out (not at all, one code per call, a few parallel rounds, or diffusion inside the same network), and each choice is paid for in quality, sequential calls and training stability.

Two choices place every design: the column decides whether and how it can draw

Image goes in asCannot write imagesWrites one code per callWrites codes in parallel roundsWrites by diffusion or flow inside the model
Vectors from a vision encoderLLaVA, SmolVLM, Llama 4, Qwen3.8late fusion, the VLM sibling's subjectJanus, Janus-Proreads SigLIP features, writes VQ codesnone namedBAGELreads SigLIP 2, writes FLUX VAE latents
Continuous VAE latent patchesTransfusionthe same patches in and out; L = LLM + 5 LDDPM
Discrete codes in the shared vocabularyChameleon, Emu3, AnyGPTearly fusion; GPT-4o images say "autoregressive"Show-o, Emu3.5masked or discrete-diffusion rounds
Raw patches through one linear layerFuyu-8B, Gemma 4 12B Unifiedencoder-free

Outside the grid: a pipeline, where the language model never holds the image and passes text to a separate generator (NExT-GPT, ChatGPT's pre-GPT-4o Voice Mode; section 10), and speech, which repeats the same split with audio codec tokens written one 80 ms frame per big step (Moshi, Qwen3-Omni; section 9). Every cell is explained below with its source; dates and licences of every model are in the parent page's Model map tab.

You need: how a VLM's encoder and projector work (Vision-language models), what a VQ or FSQ image tokenizer is (Autoencoders and VAEs), and the diffusion and flow losses (Diffusion from zero, Flow matching). This page does not re-teach them.

Early, late fusion
modalities share one network from the first layer and the start of training, or are processed by separately trained networks and combined later.
Native
a vendor word for "trained on several modalities from pretraining onward"; it says nothing exact about the architecture.
Unified, any-to-any
one model both reads and writes a modality; any mix of modalities in and out.
Soft token, code
a continuous vector placed in the sequence (readable only), against an integer id from a tokenizer's codebook (readable and writable with the softmax).
Attention mask
which positions may read which; unified models mix causal (text) and bidirectional (inside one image).
Mixture of transformers (MoT)
separate weights per modality or task, one shared self-attention over all tokens.
Cascade
speech recognition, then a text model, then text-to-speech, as three models in a row.
What was measured here, in one paragraph

A 3.07M-parameter transformer trained at the training FLOPs of the topic's DDPM run (root Diffusion lab recordings) on Fashion-MNIST images as 64 FSQ tokens each scores FD 54.6 without guidance and 44.2 with s = 1.5; the tokenizer alone, reconstructing real images, scores 47.7; the DDPM reaches 34.9 but needs 1,028 times the sampling FLOPs. Measured on Apple M1 Pro (MPS); sections 2 to 5.

The seven designs in one table, with calls to write one image (reference)
DesignAn image going in becomesWrites images?Network calls to write one imageExamples
Pipelinetext (a caption or prompt) passed between separate modelsyes, via a separate generatorthe generator's own (for example 28 diffusion steps)old ChatGPT Voice Mode (three models), NExT-GPT
Late fusion (a VLM)soft tokens from a pretrained vision encoder, through a projectornononeLLaVA, SmolVLM
Early fusion, discrete tokenscodes from an image tokenizer, in a vocabulary shared with textyes, next-token predictionone per token (1,024 for a 512 px Chameleon image)Chameleon, Emu3, AnyGPT
Two encodings, one transformersemantic features to read, discrete codes to writeyesone per token (576 in Janus)Janus, Janus-Pro
Two objectives, one transformercontinuous latent patches (or masked discrete codes)yes, diffusion or masked rounds inside the transformertens of denoising or unmasking stepsTransfusion, Show-o, BAGEL
Encoder-freeraw patches through one linear layernot in the open models named herenoneFuyu-8B, Gemma 4 12B Unified
Any-to-any with speechaudio codec tokens or audio-encoder featuresspeech, sometimes imagesone big step per audio frame (12.5 a second in Moshi)Moshi, Qwen3-Omni, GPT-4o (system card)

1. Early against late fusion: where the modalities meet

A modality is a kind of signal (text, images, audio, video). The question that separates multimodal designs is where and when the modalities meet, called fusion. Late fusion approaches "encode images and text separately before combining them at a later stage": a VLM such as LLaVA is late fusion, a pretrained image encoder plus a small projector into a pretrained language model. Early fusion means "all modalities are projected into a shared representational space from the start" (both from Chameleon, arXiv 2405.09818v2, sections 6 and 1). Any-to-any is the far end; GPT-4o's system card is the best-known claim: it "accepts as input any combination of text, audio, image, and video and generates any combination of text, audio, and image outputs" (arXiv 2410.21276v1) vendor. Native is a training claim, not an architecture: section 6 shows four models that use the word and mean different things.

Predict before you step: the request "here is a photo of a pullover, draw it in red" runs through both designs in Fig. 1. Which needs more sequential network calls, and which generator ever sees your photo? The pipeline's generator only ever sees one sentence; the early-fusion model pays for keeping the photo with 1,027 sequential calls against 32.

  1. A photo and an instruction. The user sends a 512 × 512 photo of a pullover (drawn here as a Fashion-MNIST test pullover) and the words "draw it in red".
  2. The VLM's vision encoder reads the photo. A separately trained encoder (SigLIP in SmolVLM) turns it into continuous vectors and a projector maps them to the language model's width: 1,088 soft tokens for one image in SmolVLM-500M (1,092 positions with the words). They are inputs only: no vocabulary entry exists that the model could ever output for them.
  3. One prefill pass over the whole prompt. Image vectors and words go through the language model in one forward pass under a causal mask, counted with the encoder as one call: it costs compute, not sequential steps.
  4. It can only write text: a prompt, one call per word piece. An illustrative "a red knit pullover", 4 sequential calls (5 so far).
  5. Only the sentence crosses to a separate model. Stable Diffusion 1.5's CLIP text encoder reads the prompt (6 calls). The photo itself does not cross: the generator receives about a dozen tokens of text.
  6. 25 denoising calls. The generator starts from noise and runs 25 guided DPM-Solver steps of an 860M U-Net over a 64 × 64 × 4 latent; guidance's conditional and unconditional passes are batched, so 25 sequential calls (31 so far).
  7. A red pullover, but not yours. The VAE decodes the latent (32 calls in all). The output is plausible, and any detail the sentence left out (the exact cut, the cuffs, the pose) is gone. Drawn here as a stand-in: a pullover the page's tiny model wrote from its class label alone, never having seen the photo.

In the pipeline every detail the sentence leaves out is gone and the generator draws a new pullover; in the early-fusion model every output code can attend to every input code. Token counts are real for the models named: SmolVLM-500M's 1,088 soft tokens are measured on Vision-language models; Chameleon turns a 512 × 512 image into 1,024 codes (its paper); the generator is the topic's Stable Diffusion 1.5 at its running-example default of 25 guided DPM-Solver steps. The chips show 4 of each image's positions; the prompt the VLM writes is illustrative. Sections 3 to 5 measure the price of 1,024 calls; section 10 turns it into a design rule.

2. Two kinds of image token: one to read, one to write

A transformer works on a sequence of vectors; text gets there by looking each token id up in an embedding table. An image has no ids, and what it becomes decides whether the model can ever write images.

Soft tokens (continuous). A vision encoder (ViT, SigLIP) outputs one vector per patch; a projector maps them to the model's width. Rich and semantic, but the model cannot output them: its output layer is a softmax over the vocabulary, and soft tokens are not in it. Every VLM and the encoder-free models read images this way: 1,088 positions for one image in SmolVLM-500M, 280 by default in Gemma 4 12B Unified.

Discrete tokens (codes). An image tokenizer (VQ-VAE, VQGAN or FSQ) maps each cell of a small latent grid to the index of its nearest codebook entry: an integer, exactly like a text token id, and a decoder maps codes back to pixels. Now the model can predict an image with the same softmax and cross-entropy it uses for words. The price: the tokenizer's reconstruction is lossy, and the model must write every code.

How the tokenizer is trained is the sibling page Autoencoders and VAEs's; here it is a fixed part. The running example uses that page's best tiny tokenizer, an FSQ autoencoder with levels [8, 5, 5, 5] (8 × 5 × 5 × 5 = 1,000 codes): each 28 × 28 Fashion-MNIST image, padded to 32 × 32, becomes an 8 × 8 grid, so 64 tokens from 1,000 codes. The topic's 128-code VQ-VAE (root Latent lab recordings; VQ training is taught on Autoencoders and VAEs) gives a second tokenizer of the same shape. An image becomes 64 integers, and the round trip already loses detail: the tokenizer is a ceiling.

  1. One test image, 8 × 8 cells. A real Fashion-MNIST test image (pick another above); each cell of the grid becomes one token either way.
  2. To read: one vector per cell. An encoder and projector turn each cell into a vector of the model's width. The model attends to them like any position, but nothing in its output layer can produce one. (Drawn as plain columns: this page runs no vision encoder, so their values are not shown.)
  3. To write: one integer per cell. The FSQ tokenizer maps each cell to the nearest of its 1,000 codes; these are this image's real 64 codes (pale: code 472, the most common, background). An integer is exactly what a softmax can output.
  4. The output layer ranks codes. The trained tiny model writing this class, at one position where a few codes compete: its real top 5 of 1,000 probabilities (green: the code it drew). Writing an image is the same softmax and cross-entropy as writing a word.
  5. Back to pixels, with a loss. The decoder turns the codes back into an image. Measured on the first 1,000 validation images (CPU): FD of the reconstructions 47.66 (FSQ-1000) and 87.05 (VQ-128), against 18.93 for the real images themselves; the classifier still recognises 90.0% and 88.4% of the reconstructions. measured These are the ceilings for any generator that writes these codes.

How many bits is an image? Writing one of 1,000 codes blindly costs log2 1,000 = 9.97 bits, so 64 codes cost 637.8 bits; the codes' frequencies over the training set give 8.11 bits per code, 519.2 per image. An autoregressive model that predicts each code from the class and the codes before it needs, on held-out validation images, 233.7 bits per image: its exact negative log-likelihood, a number diffusion models cannot give cheaply. The two maps on the right show where those bits go.

Why not one kind for both jobs? Janus tried it: with one VQ tokenizer for reading and writing, its understanding score (POPE) was 60.1; with SigLIP features to read and VQ codes to write, 87.0 (Janus Table 5, arXiv 2410.13848v1) vendor. Codes trained to reconstruct pixels keep what pixels need (exact edges, colours), not what a question needs (what the object is). That is why Janus, BAGEL and most unified models keep two encodings (section 6).

Context makes the border almost free; the bits go to the garment's outline and texture

Per position, no context: entropy of the codes seen at that position in training (bits; darker = more uncertain)

Per position, with context: the trained model's average cost on validation images (bits). Corners and borders become almost free; the bits go to the garment's outline and texture. measured

Positions per image in nine models (reference table)
ModelImagePositions per imageKindSource
This page's tiny model28 × 28 (padded to 32)64FSQ codes, 1,000measured
Chameleon512 × 5121,024VQ codes, 8,192paper, section 2.1
Emu3512 × 5124,096VQ codes, 32,768paper
Janus (writing)384 × 384576VQ codes, 16,384paper; 576 derived
LlamaGen, Show-o256 × 256256VQ or LFQ codespapers
Transfusion256 × 256256continuous latent patchespaper, section 4.1
SmolVLM-500M (reading)any square1,088soft tokensmeasured (Vision-language models page)
Gemma 4 12B Unified (reading)any280 (70 to 1,120)soft tokens, no encoderconfig and card
Gemini API (reading)up to 384 px; larger tiled at 768258 per tilenot disclosedAPI docs (vendor)

The full published table of tokenizers, with codebook sizes and reconstruction FID, is on Autoencoders and VAEs (its section 10); the arithmetic for whole requests is in Token economics.

3. Writing an image one token at a time

Put the image's codes in raster order (left to right, top to bottom) and model them like words. The chain rule turns the probability of a whole image into a product of next-token probabilities:

p(x1, …, x64 | c) = ∏i p(xi | c, x1, …, xi−1)
xi
the code at position i (one of 1,000 here)
c
the condition: a class here, a text prompt in a real model, both as tokens before the image

Training is next-token cross-entropy with teacher forcing, all 64 positions in one pass under a causal mask; generating is a loop of one call, one sampled code, append. The running example's model is a 6-layer transformer of width 192 (3,069,160 parameters, 3.07M), the class embedding as the first position (LlamaGen's layout), trained with the topic's exact DDPM recipe (the one Diffusion from zero uses) (batch 128, AdamW 5 × 10-4, EMA 0.999, 10% of labels dropped for guidance) for 4,207 steps, 490 s on the M1 Pro's GPU.

Fig. 3 writes one dress with the page's recorded sample (temperature 1, no top-k, no guidance), one step per row of 8 calls. Each column's height is the entropy of that call's distribution: the bits the model is unsure about at that moment (9.97 would be a blind guess among 1,000 codes).

  1. Row 1: calls 1 to 8. The class token (dress) is the first position; each call reads it and every code so far, draws one code and appends it. Row 1: 30.1 bits.
  2. Row 2: the edges stay cheap. The left and right columns of the whole image average 1.52 bits a call (at most 3.33): mostly background the model has seen thousands of times. Row 2: 31.5 bits.
  3. Row 3: the body opens up. The six interior columns average 5.64 bits a call: many codes are plausible, and the draw decides the detail. Row 3: 32.7 bits.
  4. Row 4: the most open call. Position 30 (row 4, column 6) has 8.87 bits of entropy, close to a blind guess. Row 4: 38.9 bits.
  5. Row 5. 31 of this image's 64 calls are above 5 bits and only 4 below 0.5. Row 5: 42.0 bits, the most of any row.
  6. Row 6. The shape so far constrains the hem: the decoded image already reads as a dress. Row 6: 40.3 bits.
  7. Row 7. Each call still processes one new token and reads the cached keys and values of all earlier ones: small calls, but strictly one after another. Row 7: 40.4 bits.
  8. Row 8: 64 calls. Row 8: 38.9 bits; 294.9 bits of entropy over the image, against 638 for blind guesses. The tokenizer's decoder turns the 64 codes into the image.

Recorded run at temperature 1: the model's real entropy at each of the 64 steps and its real partial decodes. measured on Apple M1 Pro (MPS) Every one of the 64 calls with its top-5 codes is in the closed block below.

Every one of the 64 calls, with the top-5 codes at each (widget)

One image written by the tiny model, call by call: the borders are nearly certain, the body is open

The 8 × 8 code grid in raster order; highlighted: the code being chosen.

Decoded so far (unwritten positions filled with the most common code, background).

Recorded run at temperature 1: the model's real top-5 probabilities and the entropy at each of the 64 steps. measured on Apple M1 Pro (MPS)

Three knobs, the same as for text. Temperature T divides the logits before the softmax (0 means always take the top code, greedy); top-k keeps the k likeliest codes; classifier-free guidance on logits runs the conditional and the null-class input together and uses lu + s(lc − lu), s = 1 being the plain conditional model. LlamaGen states this form; its best ImageNet result uses s = 1.65 (arXiv 2406.06525v1). Guidance doubles the batch, not the number of sequential steps. The same knobs for text, with real logits, are on Sampling and Decoding; for images the verdicts differ.

Predict: sample 100 pullovers from the tiny model with greedy decoding (temperature 0). How many different images do you get?

What the measurements say. Without guidance the best FD is at temperature 1, the temperature the model was trained for: cooling to 0.7 makes every class look tidier (classifier accuracy rises) but samples cluster around the most typical shapes, diversity drops and FD gets worse; heating to 1.3 adds noise faster than variety. Top-k behaves like cooling: keeping the 10 likeliest codes gives FD 75.9 against 54.6 with all 1,000. Guidance helps most: the best scale, s = 1.5, brings FD to 44.2 with 92.1% of samples recognised as the asked-for class; s = 0 (the unconditional model) gives FD 218.0 and the right class only 11.7% of the time, chance level. measured Guidance on logits behaves as guidance on noise predictions does for diffusion (the topic's DDPM runs scored best at s = 2, root Diffusion lab recordings).

Temperature and top-k trade diversity for typicality and FD punishes it; guidance is the knob that buys fidelity

samples at the selected point

One knob per view, 1,000 samples per point (100 per class), the same random draws at every setting; FD in the shared classifier's feature space against the 10,000 test images (lower is better; 1,000 real validation images score 18.93). measured on Apple M1 Pro (MPS)

Every combination of temperature, top-k and guidance (45 recorded settings) (explore)
ten samples, one per class
T-shirt, trouser, pullover, dress, coat, sandal, shirt, sneaker, bag, ankle boot

Scored like the topic's diffusion and flow runs: FD, the classifier's accuracy on the asked-for class, and diversity (mean distance between same-class samples; real images 28.87). Every setting reuses the same random numbers, so moving a control shows the same draw under different settings.

The sampling loop that produced every number, guidance in library code, and two checks (code)

Copied from src/ar/tinyar.py (sample_ar, without its recording lines):

for i in range(m.n_tok):
    inp_tokens = out if (not use_cache or i == 0) else out[:, -1:]
    if cfg not in (0, 1):
        inp_tokens = torch.cat([inp_tokens, inp_tokens])
    if use_cache:
        lg = m(inp_tokens if i > 0 else inp_tokens[:, :0], yy, caches=caches, start=0 if i == 0 else i)[:, -1]
    else:
        lg = m(inp_tokens, yy)[:, -1]
    if cfg not in (0, 1):
        lc, lu = lg.chunk(2); lg = lu + cfg * (lc - lu)
    f = _filter(lg.float(), temperature, top_k)
    if f is None:
        nxt = lg.argmax(-1)
        p = lg.float().softmax(-1)
    else:
        p = f.softmax(-1)
        if u is not None:
            nxt = _draw(p, u[:, i].to(dev))
        else:
            nxt = torch.multinomial(p.cpu(), 1, generator=gen).squeeze(1).to(dev)
    out = torch.cat([out, nxt[:, None]], 1)

Guidance in library code: transformers implements the same line for Janus as scores_processed = uncond_logits + (cond_logits - uncond_logits) * self.guidance_scale (logits_process.py line 2205, v5.20.1), and Janus's generate falls back to 5 when no scale is given (modeling_janus.py line 1194).

Checks that ran: the cached and uncached loops give logits within 1.4 × 10-6 and identical samples (CPU); one image at batch 1 takes 0.18 s with the cache and 0.15 s without (MPS, median of 3): at 64 tokens recomputing the short prefix is cheaper than the cache's bookkeeping on this GPU; the cache pays off for the thousands of tokens of a real image or conversation, where recomputation grows with the square of the length. measured

4. Faster than one token per call

One call per token means 1,024 sequential calls for a Chameleon image and 4,096 for Emu3; each is cheap with a KV cache, but they cannot run in parallel. Four published ways around it, each trading sequential calls for more work per call, are compared in the table after this figure; first, what the trade looks like on the running example.

Fig. 4: the same class written three ways by this page's models: 64 small calls, 8 full passes, or 20 full-image steps.

  1. Three ways to write a dress. Left, the raster model of section 3; middle, a second transformer of the same size trained with MaskGIT's objective; right, the topic's recorded DDIM run, starting from pure Gaussian noise. Each is a different random sample of the class.
  2. Raster: 64 calls. Each call processes one new token and reads the cached keys and values of all earlier ones: 64 sequential calls, about 373.9 MFLOP for the image with the cache.
  3. Masked: 8 rounds. All 64 positions start masked; each round the model predicts every masked position at once, keeps the most confident and re-masks the rest (cosine schedule). This decode filled 2, 3, 6, 8, 10, 11, 12 and 12 positions: 8 sequential calls, each a full pass over all 65 positions (389.5 MFLOP a round).
  4. Diffusion: 20 steps. Each step the U-Net predicts the noise over every pixel and the sampler removes a slice of it: 20 sequential calls, each over the whole image (403.0 MFLOP a step).
  5. The bill: calls against compute. Fewer sequential calls cost more work per call: the masked decode does 8.3 times and the DDIM run 21.6 times the raster model's FLOPs for one image. Latency follows the calls when each call is cheap, the FLOPs when the hardware is full.

Real frames: the tiny AR model's partial decodes (unwritten codes shown as background), the masked model's state after each round, and the topic's recorded DDIM trajectory (root Diffusion lab recordings, frames reused). Each is a different random sample of the same class. FLOPs per image from the counted networks: AR 373.9 M in total with the cache; one masked round 389.5 M; one TinyUNet step 403.0 M. measured

Measured here. A second transformer of the same size, trained bidirectionally with MaskGIT's objective on the same codes at the same compute (4,139 steps, 604 s), decoded in 1 to 64 rounds (the "Masked model: rounds" view of the chart in section 3): FD 420.0 in 1 round, 157.6 in 8, 135.8 at best (32 rounds) without guidance, and 80.4 with guidance (s = 2, 8 rounds), against 54.6 and 44.2 for the raster model. With guidance, more than 8 rounds stop helping. At this size and compute the masked model is clearly weaker: predicting up to all 64 codes at once from nothing is a harder task than predicting the next one (its cross-entropy at 50% masking is 280.6 bits per image, not a likelihood, so not comparable with the raster model's 233.7). measured

MethodWhat one step doesSteps for 256 codesHeadline (ImageNet 256, own authors)
Masked (MaskGIT, 2022)predicts every masked code, keeps the most confident, re-masks the rest8 roundsFID 6.18 against 15.78 for the AR VQGAN
Next scale (VAR, 2024)writes the next resolution's whole token map, 1 × 1 up to 16 × 1610 scalesFID 1.92 against DiT-XL/2's 2.27
Diffusion head (MAR, 2024)continuous tokens, no codebook; a small diffusion model writes each oneconfigurableFID 1.55 with guidance
Serving (LlamaGen on vLLM)keeps raster order, serves it faster2563.3 to 4.1 times faster
The four methods in detail, with their sources (published numbers)
  • Masked parallel decoding (MaskGIT, 2022). A bidirectional transformer learns to predict randomly masked codes from the visible ones (mask ratio from a cosine schedule). To generate, start fully masked; each round predict every masked code, keep the most confident, re-mask the rest: 8 rounds instead of 256 calls. ImageNet 256 FID 6.18 against 15.78 for the autoregressive VQGAN and "up to 64x" faster decoding (arXiv 2202.04200v1) vendor; Muse scaled it to text-to-image at 0.5 s per 256 px image on TPUv4 against 6.4 s for Parti-3B (arXiv 2301.00704v1). Show-o writes its images this way (section 6).
  • Next-scale prediction (VAR, 2024). Predict a 1 × 1 token map, then 2 × 2, up to 16 × 16, each scale in one parallel step: 10 steps. FID 1.92 on ImageNet 256 (1.73 with rejection sampling) against DiT-XL/2's 2.27, claimed 45 times faster (arXiv 2404.02905v2) vendor.
  • Continuous tokens with a diffusion head (MAR, 2024). Drop the codebook: a small diffusion model, conditioned on the transformer's output, writes each continuous latent token. FID 1.55 with guidance (2.35 without), under 0.3 s per image on one A100 at batch 256 (arXiv 2406.11838v3) vendor. This removes the tokenizer ceiling of section 5.
  • Serving tricks. LlamaGen keeps raster order and serves it with vLLM: 3.3 to 4.1 times faster in its Table 7 (26.38 s to 6.36 s for a batch of 16 with its XXL model) vendor. Emu3.5 adapts the model to fill codes in parallel ("Discrete Diffusion Adaptation") for "about 20x" faster images.

5. Autoregressive against diffusion and flow, at equal training compute

The setup. The topic's diffusion run trained a 1.04M-parameter TinyUNet as a DDPM for 4,000 steps at batch 128, and its flow run trained the same network with flow matching (root Diffusion and Flow lab recordings). One TinyUNet forward pass on one image costs 403.0 MFLOP (counted with PyTorch's FlopCounterMode); one pass of the token transformer over 64 tokens costs 383.2 MFLOP (linear layers counted, attention added by formula because the counter skips the fused attention kernel). So the transformer trains for 4,000 × 403.0 / 383.2 = 4,207 steps: the same training FLOPs, the same images in the same minibatch order.

The tokenizer is a ceiling, and guidance can look through it. Without guidance the token model's FD (54.6) sits above the tokenizer's own reconstruction FD (47.7), as it must. Guidance (s = 1.5) brings it to 44.2, below that ceiling, because guidance does not model the data distribution: it pushes samples toward what is typical of each class in the classifier's feature space, which is exactly what FD measures here. Quality: DDPM 34.9 without guidance, flow 23.8 with it; their pixel-space denoiser loses nothing to a tokenizer. Cost: 64 small calls and about 373.9 MFLOP per image against 1,000 full-image calls and about 403 GFLOP for the DDPM (1,028 times fewer FLOPs; 51 times fewer than 50 flow steps). A worse tokenizer makes everything worse: over the topic's 128-code VQ the same transformer reaches FD 108.5 (81.2 with guidance), although its likelihood looks better (179.0 bits per image against 233.7): fewer bits to predict because the tokenizer kept less. Bits per image are comparable only for the same tokenizer. measured

At scale. On ImageNet 256 the families have traded places for years: LlamaGen-3B FID 2.18 with guidance s = 1.65 (9.38 without), VAR 1.92, MAR 1.55, DiT-XL/2 2.27, each reported by its own authors with its own tokenizer or VAE (LlamaGen, VAR, MAR) vendor. For text-to-image inside a unified model, Transfusion's controlled comparison (section 6) found continuous latents with a diffusion loss far more compute-efficient than discrete tokens, for the reason seen here: a discrete tokenizer throws information away before the generator starts.

At equal training FLOPs diffusion and flow win on quality; the token model wins on sampling cost by three orders of magnitude

FD in the shared classifier's feature space, N = 1,000 (100 per class), lower is better; the real-image floor is the same score for 1,000 real validation images; the tokenizer ceiling is the FSQ autoencoder's reconstructions of those images. Training FLOPs = 3 × forward FLOPs × 128 × steps (the usual forward plus backward estimate). Sampling FLOPs per image include guidance's second pass and, for the token models, the tokenizer's decoder. The FSQ tokenizer's own training (5,000 steps at batch 128) adds about 48 TFLOP, outside the matched budget of 619 TFLOP. DDPM and flow rows are the root's recorded numbers (src/diff/out, src/flow/out), not re-run. measured on Apple M1 Pro (MPS)

Every row of the comparison, with parameters, training FLOPs and time, calls and sampling FLOPs per image:

6. One transformer that reads and writes: the unified models

A unified model puts the generator of sections 3 to 5 inside a language model. Beyond the hero's two choices, the designs differ in which positions may attend to which (the attention mask) and which loss each position carries. Predict: in a model that writes an image by diffusion, should an output image's patches see each other?

Chameleon: everything is a token, and the training fights back

Chameleon (Meta, May 2024) is the reference early-fusion model: the shared space "allows for seamless reasoning and generation across modalities. However, it also presents significant technical challenges, particularly in terms of optimization stability and scaling" (arXiv 2405.09818v2, section 1). A VQ tokenizer turns "a 512 x 512 image into 1024 discrete tokens from a codebook of size 8192", and those 8,192 codes sit inside one BPE vocabulary of 65,536; the 7B and 34B transformers predict text and image tokens with the same softmax.

Why it was hard: the modalities compete. With all weights shared, "each modality will try to "compete" with the other by increasing its norms slightly", harmless early but divergent "once we get outside the effective representation range of bf16"; with image generation disabled training showed no instability (Figure 10). The fixes: QK-Norm (layer norm on queries and keys before the attention softmax) for both sizes, "essential in both cases"; dropout 0.1 for the 7B, a Swin-style reordering of the norms for the 34B; and z-loss, 10-5 log2 Z on the output softmax's normaliser Z, because QK-Norm "does not solve the problem of logit shift in the final softmax". The operational lesson: "monitoring uncontrolled growth of output norms is strongly correlated with predicting future loss divergence", even when divergence arrives "after as much as even 20-30% of training progress" (all section 2.3) vendor. How QK-norm and z-loss work in any transformer is on Normalisation, residuals and stability.

Emu3 (BAAI, September 2024) pushed the same bet to an 8B model writing 4,096 codes per 512 × 512 image, and Emu3.5 (October 2025) fills those codes in parallel rounds for "about 20x" faster images.

Chameleon's evidence, what Meta released, and Emu3's numbers (provenance)

What it showed, and what it released. No FID or GenEval of its own: its evidence is human preference on mixed text-and-image answers, 60.4% and 51.6% win rates (a tie counts half) against Gemini and GPT-4V answers augmented with DALL·E 3 images ("Gemini+" and "GPT-4V+" in the body; the introduction calls them "Gemini-Pro and GPT-4V") vendor. The released weights take images in but write only text: "At this time, we are not releasing the Chameleon image generation model" (Meta blog, 18 June 2024); licence Chameleon Research License (research only, gated). The transformers port enforces it in code: after the output layer, logits[:, :, image_tokens] = torch.finfo(logits.dtype).min under the comment "Disallow image tokens" (modeling_chameleon.py lines 1066 to 1068, v5.20.1); its QK-Norm is self.q_norm = ChameleonLayerNorm(...) at line 280. Its own named weakness is the tokenizer: "reconstructing images with a large amount of text" (section 2.1).

Emu3 (BAAI, September 2024) keeps the bet and pushes it: an 8B model with a 131,072-token context, 4,096 tokens from 32,768 SBER-MoVQGAN codes for a 512 × 512 image, sampled with top-k 16,384 and guidance 5.0 to 5.5 (arXiv 2409.18869v1) vendor. Its GenEval win over SDXL (0.66 against 0.55) uses a GPT-4V prompt rewriter; without it Emu3 scores 0.54 (its Table 7). Emu3.5 (October 2025) fills tokens in parallel for "about 20x" faster images; its Table 16 (512 s to 22 s, or 120 s to 10 s with FlagScale, for a 4,096-token 1024 × 1024 image) gives ratios of about 23 and 12 derived (arXiv 2510.26583v1).

Janus: one transformer, two image encodings

DeepSeek's Janus starts from the section 2 measurement: "due to the differing levels of information granularity required by multimodal understanding and generation, this approach can lead to suboptimal performance ... we decouple visual encoding into separate pathways" (arXiv 2410.13848v1): SigLIP-Large-Patch16-384 features to read, LlamaGen's VQ tokenizer (16,384 codes, downsampling 16, 384 × 384 images, so 576 tokens: derived) to write.

Text stays causal everywhere; what changes is whether an image's own positions see each other, and which loss each position carries

Click once to show a design on the left; with "compare" on, the next click fills the right.

textinput imageoutput imagecross-attention to image features (outside the sequence)not allowed

Ten designs: a pipeline; two late-fusion layouts (cross-attention to image features as in Flamingo (its gates start at zero), IDEFICS and Llama 3.2 Vision, or encoder plus projector as in LLaVA); early fusion with discrete tokens; two encodings; text plus diffusion (Transfusion); text plus masked codes (Show-o); mixture of transformer experts (BAGEL); encoder-free; and any-to-any speech, which has no single mask. The toy request: two text tokens, an input image (4 positions), two more text tokens and, where the design can draw, an output image (4 positions). Row = the position computing its output, column = a position it may read. Loss letters: T = next-token cross-entropy on text; C = next-token cross-entropy on image codes; M = cross-entropy on masked image codes; D = diffusion (denoising) loss; blank = no loss at that position. Masks follow the papers and configs quoted below (Gemma 4 12B Unified's config: "use_bidirectional_attention": "vision"); the input image's loss differs by recipe (Chameleon trains on all tokens, LLaVA-style VLMs on the answer only), so the letters show the common case.

Transfusion: next token for text, diffusion for images, one set of weights

Transfusion (Meta, August 2024) keeps images continuous: it "combines the language modeling loss function (next token prediction) with diffusion to train a single transformer over mixed-modality sequences" (arXiv 2408.11039v1). An 86M-parameter VAE turns a 256 × 256 image into a 32 × 32 × 8 latent; U-Net down blocks make 2 × 2 latent patches, 256 positions per image. The loss is L = LLM + λ LDDPM with λ = 5 (section 7). The mask is "causal attention to every element in the sequence, and bidirectional attention within the elements of each individual image"; turning on the bidirectional part alone moved FID from 61.3 to 20.3 in their ablation (Table 5, 0.76B models).

Predict: the authors retrained a Chameleon-style discrete-token model and Transfusion at 7B on the same 0.5T tokens. How much of Chameleon's compute did Transfusion need to match its image FID?

Continuous latents with a diffusion loss beat discrete codes on every metric, most of all on image FID

C4 perplexity (text)0.489
Wikipedia perplexity0.526
Text benchmark accuracy0.600
COCO CIDEr (captions)0.218
COCO FID (images)0.029
CLIP score (images)0.319

Parity FLOP ratio: the share of Transfusion-7B's training FLOPs needed to match Chameleon-7B's final result on each metric, both trained by the Transfusion authors on 0.5T tokens (Table 3; a bar of 1.0 would mean no saving). At the end of training: FID 16.8 against 29.6, CLIP score 25.5 against 24.3, C4 perplexity 7.72 against 8.41. Even text got cheaper, which the authors tentatively put down to "the competition between text and image tokens in the output distribution". vendor

Show-o and BAGEL: the other hybrids

Encoder-free: patches straight into the language model

Every design above still has an image encoder or tokenizer trained separately. Fuyu-8B (Adept, October 2023) removed it: "there is no image encoder. Image patches are instead linearly projected into the first layer of the transformer, bypassing the embedding lookup" (model card; 30-pixel patches, CC-BY-NC). Gemma 4 12B Unified (Google; Hugging Face repository created 23 May 2026; Apache 2.0) does the same at scale for images and audio: it "takes in 48 x 48 x 3 RGB patches, but replaces the 550M vision encoder by a single large matmul (35M parameters)", with 2-D coordinate position embeddings, and is "trained from scratch" (Gemma 4 report, arXiv 2607.02770v2, section 2.3). It reads images and audio; it does not write them.

Scores and configs of the unified models (published numbers, all self-reported)
  • Janus-Pro-7B: GenEval 0.80 and DPG-Bench 84.19, in a table whose DALL·E 3 (0.67) and SD3-Medium (0.74) rows are copied from other papers, not re-run (arXiv 2501.17811v1).
  • Transfusion: the scaled 7B model trained on 2T tokens reaches COCO FID 6.78 and GenEval 0.63, sampling with 250 diffusion steps.
  • Show-o: GenEval 0.53 in v1 and 0.68 in v7 of the same paper (more training); later papers copy one or the other.
  • BAGEL: GenEval 0.82, or 0.88 with an LLM prompt rewriter vendor; like for like with Janus-Pro-7B that is 0.82 against 0.80.
  • Gemma 4 12B Unified: its config sets 280 soft tokens per image by default (budgets 70 to 1,120), 640 audio samples per token (40 ms at 16 kHz), and bidirectional attention among vision tokens (config.json at 707f0a3) vendor.
"Native" and "early fusion" mean different things in different documents

Chameleon: discrete image tokens, no encoder, trained together from scratch. Llama 4: "incorporating early fusion to seamlessly integrate text and vision tokens into a unified model backbone", yet with a vision encoder "based on MetaCLIP but trained separately in conjunction with a frozen Llama model" (Meta, 5 April 2025): early means the vision tokens join from pretraining onward. Qwen3.8-27B calls itself "a native vision-language model", and its card also says "Causal Language Model with Vision Encoder" (a 27-layer ViT in its config): native is a training claim. Gemma 4 12B Unified and Fuyu: no encoder at all. When a model card says native, read the config.

Diffusion used the other way round, to generate text, is on DiffusionGemma Technical Report.

7. Interleaved data and the balance between modalities

A model that shares weights across modalities has to be told, three ways, how much each modality matters: by the data mix (what share of tokens is text, image-caption pairs, or interleaved documents, where images sit at their place in running text), by the loss weights, and by which weights each modality may use. Only interleaved documents show the model several images with the text between them, the shape of the mixed answers these models are asked to write; a caption pair is one image and one sentence.

Llama 4, BAGEL and Gemini describe their mixes without numbers per modality (quotes)

The other large mixes are described, not tabulated: Llama 4's "more than 30 trillion tokens" include "diverse text, image, and video datasets", pretrained "on up to 48 images" per sample (Meta, 5 April 2025); BAGEL's corpus "comprises 2.5T tokens" of "large-scale interleaved multimodal data"; Gemini "support[s] interleaved sequences of text, image, audio, and video as inputs" (Gemini 1.0 report, Figure 2). vendor

Text still dominates the early-fusion mix; Transfusion went half and half, and Janus-Pro cut text further in fine-tuning

Chameleon, first pretraining stage trillions of tokens
text 2.9Tpairs 1.5T0.4T
Transfusion 7B, 2T tokens trillions of tokens
text 1Timage patches 1T
Janus, fine-tuning stage ratio of samples
multimodal 7text 3text-to-image 10
Janus-Pro, fine-tuning stage ratio of samples
multimodal 51text-to-image 4
text onlyimages with captions (or image tokens)interleaved text and imagesmultimodal understanding data

Each bar is 100% of its own mix; the units differ by row and are named on it. Chameleon: "2.9 trillion text-only tokens", "1.4 billion text-image pairs, which produces 1.5 trillion text-image tokens", "400 billion tokens of interleaved text and image data" (section 2.2.1; the 4.8T sum does not equal Table 1's 4.4T, which the paper does not reconcile; 2.1 epochs gave 9.2T tokens seen, Figure 1 rounds to "~10T"). Transfusion: "1T text tokens, and approximately 5 epochs of 692M images and their captions, amounting to another 1T patches/tokens" (section 1). Janus-Pro changed the fine-tuning ratio of multimodal, pure text and text-to-image data "from 7:3:10 to 5:1:4" (section 2.2), and made its generation data "1:1" real to synthetic with "approximately 72 million samples of synthetic aesthetic data" (section 2.3). vendor

Loss weights. Transfusion trains on "50% text and 50% image data" with L = LLM + λ LDDPM, λ = 5 "following preliminary experiments". The weight is needed because the two losses count differently: the "LM loss is computed per token, while diffusion loss is computed per image", one term spread over 256 patches. In a Chameleon-style model there is one cross-entropy over one vocabulary, so the balance is set by the data mix alone, and the modalities fight inside the shared softmax and norms (section 6).

Modality-specific weights. The cure for competition that does not touch the data is to stop sharing everything: Mixture-of-Transformers "decouples non-embedding parameters of the model by modality" (the feed-forward networks, attention projection matrices and layer norms), keeping "global self-attention over the full input sequence" (arXiv 2411.04996v2). BAGEL is this design with two experts, one for understanding (text and ViT tokens) and one for generation (VAE tokens): about twice the parameters, "identical FLOPs during both training and inference" as its dense baseline.

Separate weights per modality, one shared attention: same FLOPs per token, fewer steps to the same loss

Text tokensown Q, K, V projections, FFN and norms
→
Shared self-attentionevery token attends to every allowed token of both modalities
←
Image tokensown Q, K, V projections, FFN and norms
Chameleon 7B setting, training FLOPs55.8%
Image modality, training steps34.8%
With speech added, speech FLOPs37.2%
Image quality, wall-clock time47.2%
Text quality, wall-clock time75.6%

Share of the dense baseline's cost that MoT needs to match it (100% = no saving), as reported in the MoT abstract and section 6.1; in the Transfusion setting a 7B MoT matched the dense image results "with one third of the FLOPs". All runs have equal FLOPs per token by construction, so the saving is in steps to reach a loss, not cheaper tokens. Wall-clock on AWS p4de.24xlarge (A100). vendor

8. The closed systems: what their own documents say, and what they do not

For GPT-4o and Gemini there are no architecture papers, only system cards and reports: everything here is the vendor writing about its own system vendor, nothing was measured independently, and where a document is silent the table says so.

What each closed system says about how it is built, and the architecture questions its document leaves open

SystemWhat the document saysWhat it does not say
GPT-4o (system card, dated 8 August 2024)"an autoregressive omni model, which accepts as input any combination of text, audio, image, and video and generates any combination of text, audio, and image outputs. It's trained end-to-end across text, vision, and audio, meaning that all inputs and outputs are processed by the same neural network"; responds to audio "in as little as 232 milliseconds, with an average of 320 milliseconds" (arXiv 2410.21276v1, section 1)Parameters, how audio is tokenized (no codec, frame rate or token rate), whether there are per-modality encoders or decoders, context length. Searched in the full card text.
GPT-4o image generation (addendum, 25 March 2025)"Unlike DALL·E, which operates as a diffusion model, 4o image generation is an autoregressive model natively embedded within ChatGPT"; it is "embedded natively, deep in the architecture of our omnimodal GPT-4o model" (system card addendum, archived)The image tokenizer, whether a separate decoder (diffusion or not) turns the predicted tokens into pixels, token counts, resolution. The same document calls it a "tool" the chat model can decline to trigger: native in the model, a tool in the product.
Gemini 1.0 (report v4, June 2024)"the models are multimodal from the beginning and can natively output images using discrete image tokens"; audio ingested "at 16kHz from Universal Speech Model (USM) features"; video "as a sequence of frames in the large context window" (arXiv 2312.11805v4, section 2)The image tokenizer, tokens per image or per second of audio, parameter counts of the large models.
Gemini 1.5 (report v5)"up to at least 10M tokens"; needle recall in "9.7M tokens in the audio modality (up to 107 hours); 9.9M tokens in the video modality (up to 10.5 hours)"; "a sparse mixture-of-expert (MoE) Transformer-based model" (arXiv 2403.05530v5)Per-second token rates (the figures imply about 25 audio tokens a second and about 260 per video frame: derived, not stated).
Gemini 2.5 (report v4, July 2025)"native multimodal support for text, vision, and audio inputs"; trained "to perform audio generation tasks such as text-to-speech or native audio-visual to audio out dialog", with "causal audio representations"; competitive "with 66 instead of 258 visual tokens per frame" (arXiv 2507.06261v4)Whether audio output and image generation come from the same weights: the architecture section lists only inputs, while audio dialog, TTS and "Gemini 2.0 Flash Native Image Generation" are described as separate offerings.
What the Gemini API meters per modality (vendor units, used by Token economics)

What the API meters. Google's API documentation states the per-modality prices in tokens: an image up to 384 px is 258 tokens, larger images are cut into 768 × 768 tiles of 258 tokens each, audio is 32 tokens a second and video 263 tokens a second at one frame a second (Gemini API token docs, updated 2026-10-13) vendor. These are the units the Token economics tab uses for its Gemini row. Note that 258 tokens per frame is the same number the 2.5 report's "66 instead of 258" refers to.

How to read these claims

"Autoregressive" for GPT-4o images says the image is produced token by token; it does not say there is no diffusion decoder after the tokens, and the document gives no way to tell. "Natively multimodal" for Gemini says the model was trained on all modalities from the start; it does not say images go in as discrete tokens (the report credits Flamingo, CoCa and PaLI for its visual encoding, all continuous encoders). Latency figures (GPT-4o 232 and 320 ms, Moshi 160 and 200 ms, Qwen3-Omni 234 ms) are each self-reported under different conditions, and cannot be ranked against one another.

9. Speech in and out: from a three-model cascade to one model per audio frame

A voice assistant built as a cascade runs speech recognition, a language model and text-to-speech in a row. OpenAI's description of its own pre-GPT-4o Voice Mode is exactly this: "a pipeline of three separate models", with average latencies "of 2.8 seconds (GPT-3.5) and 5.4 seconds (GPT-4)", and the language model "loses a lot of information": "it can't directly observe tone, multiple speakers, or background noises, and it can't output laughter, singing, or express emotion" (Hello GPT-4o, 13 May 2024, archived) vendor.

Fig. 5 puts the two side by side.

  1. The cascade: three models in a row. Speech recognition turns your audio into text, a language model answers in text, text-to-speech reads the answer out. Every hand-off is text.
  2. What the hand-off drops, and what it costs. Tone, other speakers and background noise never reach the language model, and laughter, singing or emotion never leave it (OpenAI's words, quoted above); the three stages add up to seconds on average.
  3. One model, one frame of 17 tokens. A native model runs once per 80 ms audio frame: it reads the user's 8 codebook tokens and writes its own text token and 8 codebook tokens in the same step (codebooks 2 to 8 start one frame late, hence the empty slots in the first frame). Nothing passes through a text hand-off, so tone survives in both directions.
  4. Frame by frame, 12.5 a second. Six frames are 480 ms; the big model takes one step per frame, so speaking and listening happen at once (full duplex).
  5. The latency claims. Moshi: "a theoretical latency of 160ms, 200ms in practice". GPT-4o answers audio "in as little as 232 milliseconds, with an average of 320 milliseconds", Qwen3-Omni claims 234 ms to the first packet. Each is self-reported under its own conditions (section 8), so they show the order of magnitude against the cascade's seconds, not a ranking.

Moshi's layout, drawn for 6 frames (480 ms): one model takes the user's audio tokens in and writes its own text and audio tokens in the same 80 ms step, so nothing passes through a text hand-off and tone survives in both directions. How the 17 streams are laid out (inner-monologue text, the temporal and depth transformers, the one-frame acoustic delay) is taught on Video and audio generation, section 8, which owns the codec and the streams. lab

How native speech works. A neural audio codec cuts the waveform into frames and quantizes each frame with several codebooks in a chain (residual vector quantization); the codecs themselves are Video and audio generation's, and here only the rates matter. Two open designs:

  • Moshi (Kyutai, 2024): one full-duplex model on the Mimi codec at 12.5 frames a second (8 codebooks, 1.1 kbps), one big-model step per 80 ms frame; "a theoretical latency of 160ms, 200ms in practice" (arXiv 2410.00037v2) lab. Its streams, inner monologue and latency budget: Video and audio generation, section 8.
  • Qwen2.5-Omni and Qwen3-Omni (Alibaba, open weights): a Thinker (the language model) and a Talker that turns the Thinker's output into speech codes, "end-to-end jointly trained" (Qwen2.5-Omni, arXiv 2503.20215v1). In Qwen3-Omni both are mixtures of experts (Thinker 30B with 3B active, Talker 3B with 0.3B active), input and output audio run at 12.5 Hz, the Talker predicts the first codebook and a small multi-token module the residual ones, a causal ConvNet replaces diffusion for code-to-waveform, and the "theoretical end-to-end first-packet latency" is 234 ms for audio, 547 ms for video, 1,172 ms at 6 concurrent requests (arXiv 2509.17765v1, Tables 1 and 2) vendor.
AnyGPT, cascade latency sources, and the Qwen omni licences (depth)
  • AnyGPT (Fudan, 2024): the purest "everything is a token" design. Speech through SpeechTokenizer (8 codebooks of 1,024 at 50 Hz; the language model predicts only the first, semantic one), images through SEED (32 tokens from 8,192 codes, decoded by an unCLIP Stable Diffusion), music through Encodec (4 codebooks of 2,048 at 50 Hz, 200 tokens a second), all on an unchanged LLaMA-2 7B: "without any alterations to the current large language model (LLM) architecture" (arXiv 2402.12226v3). Its Table 1 gives the music vocabulary as 4,096 while its text says 8,192: the paper disagrees with itself.
  • Cascade latency, other sources: Kyutai's Moshi paper puts it at "several seconds", against "a few hundred milliseconds" in human conversation (Défossez et al. 2024, section 1) lab; no primary source checked here gives a component-by-component breakdown of a cascade (unconfirmed).
  • Qwen licences: Apache 2.0 for the Qwen3-Omni 30B-A3B models; Qwen2.5-Omni-3B is under a research licence while the 7B is Apache 2.0 (model cards, 2026-10-17).
Predict: a native speech model must produce 10 seconds of audio with Mimi tokens. If every codebook token were generated by the big model one at a time, how many big-model steps is that, and what time budget does each step get for real time?

When it matters. Native speech wins when the turn-taking delay or the voice itself is the product (tone, interruptions, laughter). A cascade wins when you must swap parts (a better recogniser, a new voice), audit the text that was said, or reuse a strong text model without retraining it on audio. Safety has to be rebuilt for the audio channel: OpenAI allows "only the preset voices we created in collaboration with voice actors" and runs "a standalone output classifier" in streaming fashion that blocks output whose speaker does not match the preset, after observing "rare instances where the model would unintentionally generate an output emulating the user's voice" (GPT-4o system card, section 3.3.1) vendor.

Codecs, residual quantization and a measured EnCodec, DAC and Mimi round trip: Video and audio generation.

10. Native or pipeline: the design decision

A product that chats, looks at images, draws and talks can be one network or specialised models wired together. Both exist in production; the choice is an engineering trade.

The pipeline loses whatever is not written down; the native model pays in pretraining and stability

QuestionPipeline (separate models)Native (one network)
What crosses between partsText or a small vector: anything not written down is lost (tone, layout, the exact look of an input image)Everything stays in one sequence; the model can copy, edit and refer to any earlier pixel or sound
Image quality todayThe best open image generators are diffusion and flow models (parent page, Model map)Discrete-token generators are capped by their tokenizer (section 5); hybrids (Transfusion, BAGEL) close the gap by keeping a diffusion objective
LatencyStages add up (2.8 to 5.4 s for OpenAI's old voice cascade)One model, one stream (232 to 320 ms claimed for GPT-4o, 160 to 200 ms for Moshi); vendor numbers, not comparable setups
Cost to buildReuse trained parts; train a few projectionsPretrain on interleaved data from the start; stability work (Chameleon's QK-norm, section 6)
Upgrading one partSwap the generator or the speech modelRetrain or fine-tune the whole model
Control and auditText between stages can be logged, filtered, editedFilters must work on images and audio directly (GPT-4o's streaming voice classifier)
Editing an input imageHard: the generator sees only a prompt (unless it takes the image too)Natural: the input image is in context (the GPT-4o addendum's "Image-to-Image Transformation")

A rule that survives the details. If the output must depend on fine detail of an input in another modality (edit this photo, answer in the same voice, keep this character consistent across images), information must not pass through a narrow text channel, so native or at least deeply coupled designs win. If each modality is a separate job with a clean text interface (caption, then illustrate), a pipeline of the best specialists is cheaper, faster to improve and easier to control.

The pipeline at its most explicit: NExT-GPT (example)

The pipeline at its most explicit. NExT-GPT uses ImageBind (1.2B) to read, a Vicuna 7B to think, and Stable Diffusion 1.5, AudioLDM and Zeroscope to write images, sound and video; the language model emits special "modality signal" tokens that tell a projection which decoder to drive, and only the projections and a LoRA are trained: "155M(=28+33+31+31+32) / [155M + 12.275B ...], or only 1% of parameters" (Wu et al., arXiv 2309.05519v3, section 3) authors. By its own arithmetic that is 1.25%, not 1% derived.

How to check which you have. Ask the model to edit a detail of an input image that a caption would not mention (the pattern on a sleeve, a number in the corner), or to answer a question about a speaker's tone. A pipeline fails in characteristic ways: it redraws the image from scratch, or answers about the words only.

Depth: mistakes, design questions, and what transfers

Optional. Each block is closed; none is needed to follow the sections above.

Six mistakes, with what they look like (real errors from the runs)
Image codes put into a text vocabulary without an offset
In a shared vocabulary, image code c must become id Vtext + c. Forget the offset and nothing fails: code 472 silently looks up text token 472. Add the offset but leave the embedding sized for text only and PyTorch stops you: IndexError: index out of range in self (run here with a 32,000-entry text table and ids 32,472 to 32,999). Check: assert that every image id is at least Vtext and below the embedding's row count, and that the output softmax is restricted to image ids inside an image span. measured
Decoding tokens with a different tokenizer than the one that made them
Codes are only meaningful to the tokenizer that produced them. FSQ-1000 codes fed to the 128-code VQ decoder raise IndexError: index 472 is out of bounds for dimension 0 with size 128; the reverse is worse because it runs: VQ-128 codes decoded by the FSQ decoder give images the classifier recognises 7.6% of the time (chance is 10%), FD 1656.12 against 87.05 with the right decoder. Ship the tokenizer's hash with the generator. measuredten images decoded with the wrong tokenizer, above the same codes decoded correctly
Judging an autoregressive image model below its tokenizer's ceiling
If the tokenizer's own reconstructions score FD 47.66 on real images, no generator over its codes will score much better without guidance, whatever its size. Measure the tokenizer's reconstruction FD (or rFID) first, at the same N, and report it beside the generator's number. measured
Counting sequential calls and calling it compute (or the reverse)
An autoregressive image costs one call per token but each call processes one new token; a diffusion step processes every latent token at once. The tiny models here differ by 1,028 times in sampling FLOPs and the other way round in sequential calls (section 5). State both, and the batch size, whenever comparing speed.
A masked-token loss written with boolean indexing, on Apple's GPU
The natural MaskGIT loss, F.cross_entropy(logits[masked], t[masked]), gives a tensor whose length changes every step (the number of masked codes is random). On MPS under this topic's memory cap, memory use grew until, about 200 steps in, training stopped with RuntimeError: MPS backend out of memory (MPS allocated: 1.09 GiB, other allocations: 4.21 GiB, max allowed: 5.33 GiB). Tried to allocate 31.50 MiB on shared pool., for a 3M-parameter model whose autoregressive twin peaked at 2.5 GiB. The fix keeps shapes fixed: cross-entropy at every position, multiplied by the mask, divided by its sum (src/ar/tinyar.py, mask_loss). Same mathematics; the rerun peaked at 2,498 MiB. (Why varying shapes cost so much memory on MPS was not investigated further.) measured
Porting a resize rule with the wrong rounding
The Qwen image processor rounds with Python's round(), which sends halves to the even neighbour. A JavaScript port using Math.round for this page's Token economics tab first got 5 of 24 recorded sizes wrong (336 × 336 gave 121 tokens instead of 100, because 336 / 32 = 10.5 rounds to 10, not 11); with half-to-even it matches all 24. measured
Two design questions (interview rehearsal)
Design: add image generation to an existing 8B chat model. What do you build?
Cheapest first: a pipeline, where the LLM writes a prompt for a strong diffusion model, gives the best image quality today and needs no pretraining; it fails at edits of input images. If edits and consistency matter, add a generation pathway the LLM conditions directly: either discrete codes from a good tokenizer (f = 16, 16k-ish codes, LlamaGen-style) predicted by the LLM with CFG, or, better per FLOP, a diffusion or flow head over VAE latents with a separate set of expert weights (BAGEL-style) so text quality is not damaged. Keep the understanding encoder separate from the generation tokenizer (Janus's lesson). Measure: tokenizer reconstruction FD first, then GenEval or a preference eval, text benchmarks before and after, latency per image (sequential calls times per-call time).
Design: a voice assistant with a 300 ms response target.
A cascade's three stages add up to seconds (OpenAI's own 2.8 to 5.4 s). Use a low-frame-rate causal codec (12.5 Hz, about 8 codebooks) so the big model runs once per 80 ms frame, a small depth model for the codebooks within a frame, text predicted alongside audio, and streaming decode; full duplex if interruptions matter. Budget: frame time plus acoustic delay (Moshi: 80 + 80 = 160 ms theoretical). Add a voice-identity classifier on the output stream.
What transfers from this laptop, and what does not (provenance)
  • Transfers: the shape of the trade-offs. A discrete tokenizer sets a ceiling the generator cannot pass without guidance; autoregressive sampling costs one call per token and little compute per call; masked decoding trades calls for passes over all tokens; guidance on logits behaves like guidance on noise predictions (better fidelity, less diversity); greedy decoding collapses an image distribution.
  • Does not transfer: the ranking. At 64 tokens and 3M parameters, trained for minutes on 28 × 28 grey clothing, small differences in FD are noise from one training run and one tokenizer; published results at scale (LlamaGen 2.18 with guidance against DiT 2.27 on ImageNet 256, VAR 1.92, MAR 1.55; sections 4 and 5) differ from each other more because of tokenizers, sizes and recipes than because of the family. Timings were measured on an Apple M1 Pro (MPS) at batch 1 and batch 1,000 and say nothing about an H100 serving stack (vLLM made LlamaGen 3.3 to 4.1 times faster in its own Table 7).
  • Not run here: any real native multimodal model (Chameleon is gated and image generation was not released; Janus-Pro-7B, BAGEL and Emu3 exceed the memory budget in fp16 for little extra lesson beyond published numbers); any speech model (the sibling page Video and audio generation ran the codecs).