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.
| Image goes in as | Cannot write images | Writes one code per call | Writes codes in parallel rounds | Writes by diffusion or flow inside the model |
|---|---|---|---|---|
| Vectors from a vision encoder | LLaVA, SmolVLM, Llama 4, Qwen3.8late fusion, the VLM sibling's subject | Janus, Janus-Proreads SigLIP features, writes VQ codes | none named | BAGELreads SigLIP 2, writes FLUX VAE latents |
| Continuous VAE latent patches | Transfusionthe same patches in and out; L = LLM + 5 LDDPM | |||
| Discrete codes in the shared vocabulary | Chameleon, Emu3, AnyGPTearly fusion; GPT-4o images say "autoregressive" | Show-o, Emu3.5masked or discrete-diffusion rounds | ||
| Raw patches through one linear layer | Fuyu-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.
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.
| Design | An image going in becomes | Writes images? | Network calls to write one image | Examples |
|---|---|---|---|---|
| Pipeline | text (a caption or prompt) passed between separate models | yes, via a separate generator | the 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 projector | no | none | LLaVA, SmolVLM |
| Early fusion, discrete tokens | codes from an image tokenizer, in a vocabulary shared with text | yes, next-token prediction | one per token (1,024 for a 512 px Chameleon image) | Chameleon, Emu3, AnyGPT |
| Two encodings, one transformer | semantic features to read, discrete codes to write | yes | one per token (576 in Janus) | Janus, Janus-Pro |
| Two objectives, one transformer | continuous latent patches (or masked discrete codes) | yes, diffusion or masked rounds inside the transformer | tens of denoising or unmasking steps | Transfusion, Show-o, BAGEL |
| Encoder-free | raw patches through one linear layer | not in the open models named here | none | Fuyu-8B, Gemma 4 12B Unified |
| Any-to-any with speech | audio codec tokens or audio-encoder features | speech, sometimes images | one big step per audio frame (12.5 a second in Moshi) | Moshi, Qwen3-Omni, GPT-4o (system card) |
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.
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.
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.
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).
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
| Model | Image | Positions per image | Kind | Source |
|---|---|---|---|---|
| This page's tiny model | 28 × 28 (padded to 32) | 64 | FSQ codes, 1,000 | measured |
| Chameleon | 512 × 512 | 1,024 | VQ codes, 8,192 | paper, section 2.1 |
| Emu3 | 512 × 512 | 4,096 | VQ codes, 32,768 | paper |
| Janus (writing) | 384 × 384 | 576 | VQ codes, 16,384 | paper; 576 derived |
| LlamaGen, Show-o | 256 × 256 | 256 | VQ or LFQ codes | papers |
| Transfusion | 256 × 256 | 256 | continuous latent patches | paper, section 4.1 |
| SmolVLM-500M (reading) | any square | 1,088 | soft tokens | measured (Vision-language models page) |
| Gemma 4 12B Unified (reading) | any | 280 (70 to 1,120) | soft tokens, no encoder | config and card |
| Gemini API (reading) | up to 384 px; larger tiled at 768 | 258 per tile | not disclosed | API 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.
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:
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).
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.
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.
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).
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)
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.
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
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.
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
| Method | What one step does | Steps for 256 codes | Headline (ImageNet 256, own authors) |
|---|---|---|---|
| Masked (MaskGIT, 2022) | predicts every masked code, keeps the most confident, re-masks the rest | 8 rounds | FID 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 × 16 | 10 scales | FID 1.92 against DiT-XL/2's 2.27 |
| Diffusion head (MAR, 2024) | continuous tokens, no codebook; a small diffusion model writes each one | configurable | FID 1.55 with guidance |
| Serving (LlamaGen on vLLM) | keeps raster order, serves it faster | 256 | 3.3 to 4.1 times faster |
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.
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:
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 (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.
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).
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.
Click once to show a design on the left; with "compare" on, the next click fills the right.
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 (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).
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
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.
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.
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.
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
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.
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
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.
| System | What the document says | What 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 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.
"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.
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.
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:
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.
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.
| Question | Pipeline (separate models) | Native (one network) |
|---|---|---|
| What crosses between parts | Text 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 today | The 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 |
| Latency | Stages 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 build | Reuse trained parts; train a few projections | Pretrain on interleaved data from the start; stability work (Chameleon's QK-norm, section 6) |
| Upgrading one part | Swap the generator or the speech model | Retrain or fine-tune the whole model |
| Control and audit | Text between stages can be logged, filtered, edited | Filters must work on images and audio directly (GPT-4o's streaming voice classifier) |
| Editing an input image | Hard: 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 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.
Optional. Each block is closed; none is needed to follow the sections above.
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. measuredIndexError: 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. measuredF.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.) measuredround(), 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. measuredEverything a native multimodal model reads or writes becomes positions in one sequence, so the bill is counted in tokens. This tab does the arithmetic for a whole request (images, audio, video and text in) and for one output (an image or a stretch of speech out). The reading-side rules for single VLMs, with tiles and cache, are on the sibling page Vision-language models (its Token and cache budget tab); this tab adds audio and video, the native and closed models, and the writing side, which a VLM does not have.
Derived: autoregressive tokens = (resolution / f)2, one call each; a masked model fills the same tokens in the chosen number of rounds, each round a full pass over all of them; the diffusion transformer works on (resolution / 16)2 latent tokens (an 8 times VAE and 2 × 2 patches, the SD3 and FLUX layout). Compute = 2 FLOPs per parameter per token processed (attention and the tokenizer or VAE ignored), times 2 with guidance. Defaults: 7B, f = 16 at 512 px is Chameleon-7B's 1,024 tokens per image; the diffusion row defaults to SD3 Medium's 2.03B transformer (2,028,328,000 parameters counted on the sibling page Latent diffusion and diffusion transformers) and its pipeline default of 28 steps with guidance. The time per call is yours to set (20 ms is an illustrative value, not a measurement); a call of the diffusion model processes far more tokens than an autoregressive decode step, so equal milliseconds per call is optimistic for it. derived
Frame rates and codebooks: Mimi 12.5 Hz with 8 codebooks of 2,048 (1.1 kbps) and EnCodec 75 Hz with 8 codebooks at 6 kbps, as measured and quoted on the sibling page Video and audio generation; Moshi models 17 streams per 80 ms step (1 text + 8 + 8) and states "a theoretical latency of 160ms, 200ms in practice" (Défossez et al. 2024) vendor. Budget per big-model step = 1 / frame rate. derived
This page's tabs, the parent topic, the sibling pages, the knowledge base pages this one leans on, the papers and documents behind it, and the best outside resources, each with an approximate time. Outside sources are marked maker (by the people who built the model) or third-party. Links checked on 2026-10-17.
The design grid, fusion with a step-through of one request, the two kinds of image token, autoregressive and masked image generation measured on the running example (the sweeps and one image written token by token are inline), the unified models with their attention masks, interleaved data and modality balance, the closed systems' documents, speech, and native against pipeline. about 38 min, plus 12 in closed details
Tokens, cache and sequential calls for a mixed request (images, audio, video, text) and for writing one image or a stretch of speech. 3 min, plus time with the controls
The whole topic as a map, with native and unified models as one stop on it. Its Model map tab lists every native and unified model with date and licence. The DDPM and flow models this page's autoregressive model is compared with are the topic's recorded runs; their mechanisms are taught on Diffusion from zero and Flow matching, and SmolVLM's 1,088 image tokens on Vision-language models.
How the FSQ tokenizer used here was trained, VQ tricks, FSQ and LFQ, VQGAN, and the published table of tokens per image and codebook sizes. 40 min, plus 17 in closed details
Late fusion in depth: projectors, Q-Former, cross-attention, tiling, the cost of image tokens in the cache, hallucination. 33 min, plus 11 in closed details
Neural audio codecs (EnCodec, DAC, Mimi) run there, residual quantisation, Moshi's streams (its section 8), codec language models, video tokens. 31 min, plus 17 in closed details
The DDPM this page compares against, its samplers and guidance in depth. 43 min, plus 20 in closed details
The flow model in the equal-compute table, and why its paths are straight. 43 min, plus 17 in closed details
DiT, MMDiT and token counts by resolution: the diffusion side of the Token economics tab. 33 min, plus 15 in closed details
The encoders that unified models use to read (SigLIP in Janus and BAGEL). 34 min, plus 12 in closed details
FID and its pitfalls (why N = 1,000 matters here), GenEval and preference evaluations used by the unified models. 27 min, plus 8 in closed details
The traffic the other way: diffusion used to generate text. about 24 min
Temperature, top-k, top-p and min-p for text, with real logits: the same knobs this page turns on image codes. 22 min, plus 4 in closed details
Text tokenizers and vocabularies: the other half of a shared vocabulary. 46 min, plus 15 in closed details
The KV cache that makes one-token-per-call generation affordable, and what it costs in memory. 37 min, plus 21 in closed details
How multimodal understanding is measured (MMMU, video and audio benchmarks). about 27 min
Llama 4's early fusion in the context of the family. about 31 min
Gemini and Gemma 4 in the context of the family. about 32 min
GPT-4o and its successors. about 29 min
Early fusion, and section 2.3 on why training diverged and how QK-Norm and z-loss fixed it. 40 min (sections 1 to 2.3: 15)
Next-token plus diffusion in one transformer; Table 3 is the controlled comparison with Chameleon. 35 min
Plain autoregressive image generation at ImageNet scale, tokenizer ablations, CFG on logits, vLLM serving. 30 min
Parallel decoding of image tokens in 8 rounds; the schedule. 25 min
Why reading and writing want different image encodings (Table 5). 30 min
The mixture-of-transformer-experts design and its training data; GenEval with and without a prompt rewriter. 40 min
Next-scale prediction, and autoregression over continuous tokens with a diffusion head. 25 min each
What OpenAI says about the omni model, and the voice safety stack. 30 min
Full-duplex speech at 12.5 frames a second; the latency budget. 45 min
An open Thinker-Talker any-to-any model with latency under load. 35 min
Section 2.3: the encoder-free 12B Unified model. 15 min for that section
The pipeline design made explicit: frozen encoders and generators, 1.25% of parameters trained. 20 min
A clean autoregressive image generator: tokenizer training, GPT, CFG sampling. 30 min
Inference code for Janus and Janus-Pro, including image generation with guidance over VQ codes. 20 min
Streaming inference for speech in and out. 30 min