Multimodality and World Models
local graph
Chapter 40 — Multimodality and World Models
Section titled “Chapter 40 — Multimodality and World Models”The model this book built reads and writes text. The frontier increasingly does not stop there: it sees images, hears audio, watches video, and — at the far edge — learns the dynamics of the physical world well enough to predict and plan within it. This chapter traces that progression, from bolting perception onto a language model to the deeper goal of world models that bridge language and embodied action. It is a frontier with implications far beyond chat, reaching into robotics and scientific simulation.
40.1 The Bolt-On Pattern
Section titled “40.1 The Bolt-On Pattern”Chapter 31 introduced the dominant recipe for adding a modality: encode it into the same embedding space the transformer already consumes. An image is divided into patches, passed through a vision encoder, and projected into a sequence of vectors that look, to the transformer, like extra tokens. The language model — its weights largely unchanged — then attends over text and image tokens together:
# image -> patches -> vision encoder -> project to the LLM's hidden sizepatches = patchify(image) # (n_patches, patch_dim)vis_tokens = vision_encoder(patches) # (n_patches, vis_dim)vis_tokens = projector(vis_tokens) # (n_patches, hidden_size)
# splice image tokens in beside text tokens; the transformer is unchangedtokens = concat(text_embed(prefix), vis_tokens, text_embed(suffix))output = language_model(tokens) # attends over bothPython — the bolt-on pattern: project perception into the token stream
This pattern is why multimodal capability arrived so quickly: it reuses the entire language model and trains mostly the encoder and a small projector. Its limitation is that perception is grafted on rather than native — the model learns about images late and separately, through a narrow bridge, rather than growing up understanding them.
40.2 Toward Native Multimodality
Section titled “40.2 Toward Native Multimodality”The frontier is to make modalities native: train a single model jointly on text, images, audio, and video from the start, so that a shared representation forms across all of them rather than being stitched together afterward. Native training promises tighter grounding — concepts connected to how they look and sound — and smoother cross-modal reasoning. A parallel frontier is unified understanding and generation: most systems either interpret images or generate them through a separate diffusion model, but a single model that does both in one framework would let perception and generation inform each other, reasoning about an image and producing one with the same machinery. Doing this well is hard because the modalities have very different statistics — text is discrete and sequential, images are continuous and spatial — and forcing them into one model without one dominating or degrading is an open problem.
40.3 World Models
Section titled “40.3 World Models”Beyond perceiving the world lies understanding how it behaves. A world model learns the dynamics of an environment — given a state and an action, what state comes next — well enough to predict and to plan by simulation. This is the missing piece between language models, which reason fluently about descriptions of the world, and agents that must act in it. A robot that can imagine the consequences of a motion before making it, or a planner that can roll out futures internally, needs a world model. The research draws on video prediction (a model that can predict the next frame has learned something about physics), on reinforcement learning (where learned world models enable planning), and on the embodied data of robotics. The grand version of the goal is a model whose understanding of language is grounded in a learned model of physical reality — closing the gap between symbolic fluency and embodied competence.
| Level | What it means | Status |
|---|---|---|
| Bolt-on perception | encoder feeds tokens to a frozen LLM | mature |
| Native multimodal | one model trained jointly on all modalities | emerging |
| Unified gen + understanding | one model interprets and produces | active research |
| World model | learns environment dynamics for planning | frontier |
| Table 40.1 — Levels of multimodal integration |
40.4 Why It Matters
Section titled “40.4 Why It Matters”Multimodality is not a cosmetic feature. Much of human knowledge is non-textual, and a model confined to text is cut off from it; grounding language in perception is one of the more promising routes to reducing hallucination, because a model that can check a claim against an image or a simulation has a source of truth beyond its own priors. And world models are the bridge to robotics and to scientific domains where the object of study is a dynamical system, not a corpus. The same transformer you built sits at the center of all of it — the question the frontier asks is how much of reality can be folded into its token stream, and how deeply.
From tokens to reality The arc runs from text, to perception bolted onto text, to perception learned natively alongside text, to a model of how the world itself behaves. Each step grounds language more deeply in something beyond language. The bolt-on pattern that put images into the token stream was the easy 80%; native multimodality, unified generation, and world models are the hard and consequential remainder — and they are where language models stop being about words and start being about the world those words describe.
40.5 Worked Example: Interleaving Modalities in One Sequence
Section titled “40.5 Worked Example: Interleaving Modalities in One Sequence”The bolt-on vision-language model of Chapter 31 attaches an encoder to a text model. Natively multimodal models go further: they place every modality into a single token stream and let one attention mechanism span all of it, so text can attend to image regions and image tokens can attend to surrounding words on equal footing:
# a single sequence: text, then image patches, then more textseq = (text_tokens("Describe what changed between") + image_tokens(img_before) + text_tokens("and") + image_tokens(img_after) + text_tokens("."))logits = model(seq) # attention spans all modalities uniformlyPython — multimodal/interleave.py: one stream, many modalities
The shift from late fusion (encode each modality separately, then combine) to early fusion (one shared stream from the start) is what lets these models reason across modalities rather than merely about each in turn — comparing two images, grounding a phrase in a region, narrating a video as it unfolds. Pushed to its conclusion, the same idea underlies world models: if video frames, actions, and text all live in one predictable sequence, a model trained to continue that sequence has implicitly learned to simulate an environment, which is the direction much of the multimodal frontier is now heading.
One stream, learned together Native multimodality is less an architecture than a data decision: put all modalities in one sequence and train next-token prediction over the whole thing. Cross-modal reasoning then emerges from the same objective that taught the model language.
40.6 Diffusion versus Autoregressive Generation
Section titled “40.6 Diffusion versus Autoregressive Generation”This book builds an autoregressive model: it generates a sequence left to right, each token conditioned on the last (Section 10.6). It is worth knowing that this is not the only generative paradigm, and that the boundary between them is blurring at the frontier. The dominant alternative, especially for images and video, is diffusion: rather than emitting one element at a time, a diffusion model starts from noise and iteratively denoises it into a coherent output over many refinement steps.
The two paradigms trade different properties. Autoregressive generation is inherently sequential but yields exact token-by-token likelihoods and excels at discrete data like text. Diffusion refines the whole output in parallel across its dimensions but requires many iterative steps, and it has been the natural fit for continuous data like pixels. The interesting frontier development is cross-pollination: researchers are exploring diffusion-style parallel generation for text (to escape the sequential bottleneck of Section 10.6) and autoregressive generation for images (treating patches as a sequence, as the multimodal models of Section 40.5 already do). The clean split of “autoregressive for language, diffusion for vision” is giving way to a more fluid landscape where the generation strategy is a choice rather than a consequence of the modality.
Two ways to generate, converging Autoregressive models emit one element at a time with exact likelihoods; diffusion models denoise the whole output over many steps. Once cleanly split by modality, the two are now crossing over — parallel text, sequential images — making generation strategy a design choice.
40.7 Toward Any-to-Any Unified Models
Section titled “40.7 Toward Any-to-Any Unified Models”The trajectory of the multimodal work in this book — images as tokens (Section 31.6), audio as tokens (Section 31.8), all flowing through one transformer — points toward a clear endpoint: a single any-to-any model that accepts any combination of modalities as input and produces any combination as output. Text in, image out; image and audio in, text out; any mixture, through one model.
The architecture follows directly from the unifying principle already established. Each modality has an encoder or codec that turns it into tokens (Sections 31.6 and 31.8), all the tokens share one sequence and one transformer, and generation in a given modality routes through that modality’s decoder. What changes at the frontier is scope and ambition: rather than a language model with vision bolted on, the goal is a model that treats all modalities as first-class, native, and interchangeable — a universal interface that reasons across whatever inputs it is given and responds in whatever form is asked. The hard problems are in the seams: aligning representations across modalities so the model reasons over them jointly rather than separately, and balancing the training data so no modality dominates. But the direction is unmistakable, and it is the natural culmination of the book’s repeated observation that, to a transformer, every modality is simply a tokenization — once everything is tokens, one model can in principle consume and produce them all.
Everything is tokens, so one model can do everything Any-to-any models accept and generate any mix of text, image, and audio through a single transformer, each modality tokenized and decoded by its own codec. It is the endpoint of treating every modality as a tokenization — a universal interface.
40.8 Video Understanding
Section titled “40.8 Video Understanding”Video is image understanding (Section 31.6) with a fourth dimension — time — and that dimension is where its central difficulty lives. A video is a sequence of frames, and the natural approach tokenizes each frame as an image; but the token count then explodes, because many frames each contribute many patch tokens, and a few seconds of video can swamp the context budget that a few images would comfortably fit.
The frontier of video understanding is therefore largely the problem of managing the token budget over time. The strategies all trade completeness for tractability: sampling a subset of frames rather than processing every one; compressing the temporal dimension by pooling or merging similar adjacent frames; or learning representations that summarize motion without retaining every patch of every frame. The reward for solving this is understanding that images alone cannot provide — motion, events, cause and effect unfolding over time — which is essential for a model to reason about the physical, dynamic world rather than static snapshots of it. Video is thus the most acute instance of the token-budget tension that multimodality introduced (Chapter 31): every modality costs tokens, and video costs the most, so progress depends on representing time efficiently. It connects directly to the long-context techniques of Section 14.7 — a long video and a long document pose the same underlying challenge of doing more with a bounded sequence — and to the any-to-any ambition of Section 40.7, for which fluent video is one of the last and hardest modalities to fold in.
Time is a token-budget problem Video tokenizes as many frames of many patches, exploding the token count, so its central challenge is managing that budget — sampling frames, pooling time, summarizing motion. The reward is understanding events over time, the hardest modality to fold into a unified model.