KnowML

Multimodal AI

Follow one photo-and-question example through the three decisions behind a multimodal system: a shared embedding space, where the modalities fuse, and whether to adapt a pretrained model or train natively.

⏱ 18 min readAssumes: CLIP & vision foundation models (06), attention (08), generative models (12), speech & audio (13)
Start reading

Picture a photo of a dog on a beach, and the question "What is the dog holding?" You answer it by looking at the photo, and the question tells you where to look: at the dog's mouth, not at the sky. For a model to do the same, it has to connect a few words of text to one particular patch of the picture. That's harder than it sounds, because the two don't have anything in common. An image is a grid of pixel intensities, a sentence is a sequence of token ids (a token is a word or a piece of a word), and there's no shared coordinate system between a grid of brightness values and a list of integers.

This chapter is about how to connect them, and it introduces no new modality-specific math. How pixels become tokens is chapter 06, how attention works is 08, how diffusion and autoregressive generation work is 12, and how speech gets encoded is 13. Multimodal AI is the layer on top: how you combine models that already work well inside one modality into a single system that reasons across all of them.

Three decisions do almost all of the work, and we'll make them in order while following the dog photo through each. First, how do you get an image and a sentence into one shared embedding space, where their vectors can be compared directly? The answer is contrastive learning. Second, where in the network do the modalities meet? That's the question of fusion. Third, do you bolt a pretrained image encoder onto an existing language model (the adapter approach), or train everything jointly from raw tokens (the native multimodal approach)?

By the end you'll be able to say, in one sentence, why multimodal AI is mostly a fusion and systems problem, and why it brings no new kind of math.

01Making an image and a sentence comparable

Translating both into one space

Before the question about the dog can mean anything to a model, the photo and the words have to be translated into the same kind of thing. The usual choice is a vector, a list of numbers, and the aim is a space where distance means similarity across modalities. A photo of a dog and the sentence "a photo of a dog" should land near each other, and a photo of a cat should land far from that sentence. It shouldn't matter that one started as pixels and the other as text. Vectors that live in a space like this are called embeddings.

How do you train an encoder to produce such vectors? The recipe is the self-supervised contrastive one from chapter 03, applied across modalities. You collect a large batch of matched pairs: an image and its caption, an audio clip and its transcript, a video and its description. Each half of every pair goes through its own encoder, and both outputs are projected to the same number of dimensions. Then comes the loss, which pulls the embeddings of the true pairs together and pushes every other combination in the batch apart. Pairs are the only supervision, and nobody has to label anything.

CLIP (Radford et al., 2021) did exactly this for images and text, and it's the reference implementation people usually mean by "contrastive multimodal alignment". Chapter 06 has the full derivation and the training details. What matters here is that the recipe doesn't care which modalities it's given. Swap in an audio encoder for the image encoder and you get audio-text alignment, and swap in a video encoder and you get video-text alignment. Everything stays the same except the encoder that produces each half of the pair.

What the shared space gives you

Once that space exists, a few useful things become one-liners. Retrieval turns into a nearest-neighbour search across modalities: find the image whose embedding is closest to this text query. Zero-shot classification means comparing an image embedding against a handful of candidate label embeddings and picking the closest. And the space is the raw material for the next section, because you can't usefully combine two modalities' representations until you've made them comparable.

Here's the matching step with hand-picked vectors, two numbers each, so that you can see it work. You might think of the first number as "how furry" and the second as "how many wheels". The code builds three image vectors and three caption vectors, and norm divides every row by its length. After that, a plain matrix product gives the cosine similarity between every image and every caption. That's the dot product of two vectors once their lengths are set to one, so it measures only the angle between them. argmax(axis=1) then picks, for each image, the caption with the highest score.

Try it Match images to captions with cosine similarity
import numpy as np

# Hand-picked [furry, wheels] embeddings: three images, three captions
images = np.array([[0.9, 0.1], [0.1, 0.9], [0.5, 0.5]])
texts = np.array([[1.0, 0.0], [0.0, 1.0], [0.6, 0.4]])
names = ["a photo of a dog", "a photo of a car", "a photo of a robot dog"]

def norm(a): return a / np.linalg.norm(a, axis=1, keepdims=True)
sim = norm(images) @ norm(texts).T          # cosine similarity
print(np.round(sim, 2))
print("best caption per image:", [names[i] for i in sim.argmax(axis=1)])
Each image's highest score is against its own caption. The diagonal of the printed matrix is 0.99, 0.99 and 0.98, and the off-diagonal entries are lower, such as 0.11 for the dog against the car. Image three, half furry and half wheeled, picks "robot dog" at 0.98, ahead of "dog" and "car" at 0.71 each. Real models learn these vectors from data, and here they were hand-picked.

What to notice is the diagonal of that matrix, where each image meets its own caption. Those scores are the highest in their rows, and the third image, half furry and half wheeled, lands closest to "a photo of a robot dog". A real model learns vectors like these from millions of pairs, and the only difference here is that we picked them by hand. So now we can ask which caption goes with which picture. Can we do more? Our dog question needs the model to use the image while it's writing an answer, and that's a question about where the two streams of information meet.

02Where the modalities meet

Once you have a representation for each modality, you have to decide where in the network they come together. This is the fusion taxonomy, and it's the most consequential architectural choice in a multimodal system, because it trades off how much cross-modal interaction the model can learn against how expensive and inflexible the system becomes. There are three places to merge, and the table lays them side by side.

Early fusionLate fusionIntermediate / cross-attention fusion
Where modalities meetAt the input, before any real per-modality processingAt the very end — only final predictions or scores are combinedPartway through — separate encoders, then cross-attention layers mid-network
Typical exampleConcatenate raw or near-raw pixel and audio features into one input sequenceAverage an image classifier's and a text classifier's output scoresA VLM where text tokens cross-attend into image patch tokens inside the transformer

The tradeoff moves in a straight line with how early you merge. Start at the early end. With early fusion, a single joint model sees the raw signal from both modalities from its first layer, so nothing about their interaction is ever forced through a bottleneck, and in principle it can learn the finest cross-modal correlations. What it costs is that you're training the whole thing jointly, so you can't reuse a pretrained unimodal encoder. And it's inflexible: add a third modality, or swap in a better vision encoder, and you're often retraining from scratch.

Late fusion sits at the other end. You plug in any pretrained image model and any pretrained text model, then train a small combination layer on top, which makes it cheap and modular. What you lose is fine-grained interaction. By the time the two outputs are combined, the low-level detail that would have made them useful together is gone.

Why can't late fusion answer a question about one word and one pixel region?

Take our dog question. Answering it depends on relating one specific word, "holding", to one specific region of the image, the patch around the dog's mouth. Late fusion structurally can't do that, because the word and the pixels never appear in the same computation. Each side has already boiled itself down to a final score before the other side gets a say. Early fusion can do it, but at the price we just saw.

Intermediate fusion, and specifically cross-attention fusion, is the compromise that won for most systems built since 2022. Each modality keeps its own pretrained encoder, which turns it into a sequence of tokens. Then, partway through the network, the tokens of one modality (usually text) look at the tokens of the others using the attention from chapter 08. In our example, the word "holding" would send out a query, and the image patches would answer with keys and values. Here's one block of it in the diagram.

Intermediate (cross-attention) fusion — one shared block, three modality streams
Image encoder tokens Text tokens (query) Audio encoder tokens Q K, V K, V Cross-Attention Fusion softmax(Q·Kᵀ/√d) · V, Q from text, K/V from image + audio + residual add LayerNorm Feed-Forward + residual add LM head → next-token prediction ↑ repeats for N blocks
Each modality has its own encoder producing its own tokens. Inside the shared transformer, the primary stream (here, text) queries into the other modalities' tokens through cross-attention: Q from text, K and V from image and audio. It rejoins the residual stream and continues through the same block pattern as any transformer (see 08). Self-attention within each modality typically happens inside its own encoder before this point, so what's shown is the fusion step itself.

Maybe the quickest way to read the diagram is to look at where the arrows go. Each encoder sends its tokens up into the cross-attention box, with the text supplying the queries and the image and audio tokens supplying the keys and values. That output then rejoins the residual stream and goes through the usual feed-forward layer, and the whole pattern repeats for N blocks before the language-model head predicts the next token.

The adapter recipe, and other modalities

A close cousin of cross-attention fusion is the recipe chapter 06 covers in depth for vision-language models. A pretrained vision encoder produces a sequence of patch embeddings. A small trainable projector maps those into the same dimensional space the LLM's token embeddings live in. Meanwhile the LLM, usually pretrained and often frozen or only lightly fine-tuned, then treats the projected image tokens exactly like any other tokens in its context, and attends over them with the self-attention machinery it already has.

Nothing in this recipe is specific to images. An audio encoder plus a projector feeding an LLM gives you a speech-language model, with the identical architecture and training logic, and only the pretrained encoder at the bottom changes. Training usually happens in two stages either way: an alignment stage that teaches the projector to map the new modality into the LLM's space, then instruction tuning on multimodal task data. That's a training-recipe detail, and it adds no new architecture.

Native multimodal tokenization

The adapter recipe always has a seam. A pretrained encoder is trained on its own objective, and only afterward is it adapted to work inside an LLM it never saw during its own pretraining. Can the seam be removed?

Native multimodal tokenization does that by converting every modality into tokens from the start, where the encoder-then-project design converts later. Text stays as subword tokens, images are chopped into patch tokens or discrete codes from a learned image tokenizer, and audio is chopped into frame tokens. All of it is interleaved into one shared sequence, and a single transformer is trained on that sequence jointly, with no separate modality-specific pretraining stage bolted on afterward.

The tradeoff cuts both ways. On the upside, a natively multimodal model can in principle learn richer cross-modal reasoning, because nothing about how it represents an image was ever optimised for a different, unimodal objective first. Every parameter was trained with the other modalities in the loop from day one. On the downside, you give up reusing a great pretrained unimodal encoder and improving it independently. You're training the whole stack jointly, and that's dramatically more expensive and harder to get right. A bad tokenization choice for one modality can hurt every other modality sharing the model.

Cross-modal generation and multimodal reasoning

Two more terms come up constantly, so it helps to separate them from everything above. Cross-modal generation is any system that generates in one modality conditioned on another: text-to-image, text-to-audio, text-to-video, image-to-video, speech-to-speech. None of these needs new generative machinery. They reuse the diffusion and autoregressive techniques from chapter 12 (see The Illustrated Stable Diffusion for the mechanics of the text-to-image case), conditioned on an embedding from a different modality's encoder in place of, or in addition to, a text prompt.

Multimodal chain-of-thought, or visual reasoning, is about something else: how a model reasons over an image or video it's already looking at. A naive approach captions the image once, in text, and then reasons purely over that caption. Every later step is blind to the actual image and can only be as good as that first, one-shot caption. Real multimodal reasoning re-attends to the image, or to specific regions of it, or to specific moments in a video, at each reasoning step. That's the same cross-attention pattern as in the diagram, invoked repeatedly during reasoning and not once at the input. Is cross-attention the same formula we met in chapter 08? Let's check.

03The equations

Cross-attention isn't a new mechanism. It's the identical formula from chapter 08, with one detail changed, and that's where each matrix comes from.

  • Q_text a linear projection of the querying modality's tokens, here text. Same role as Q in 08's self-attention formula.
  • K_image, V_image linear projections of the modality being attended over, here image patch tokens. Same role as K and V in 08, just sourced from a different sequence than Q.
  • everything else the dot product, the scaling, the row-wise softmax, the weighted sum over V. All identical to self-attention in every detail. The only thing that changed is that Q and K/V no longer come from the same sequence.

That makes cross-attention fusion cheap to add, because it's a new wiring pattern and needs no new operation. Any transformer block that already has self-attention can grow a second attention sub-layer, where Q still comes from the primary modality's residual stream but K and V come from a different modality's encoder output. It works for any pair of modalities (text querying image, text querying audio, video querying text) without changing the math.

The other equation in the chapter is the one behind the shared space from section 01. That contrastive alignment loss (chapters 03 and 06) is the same InfoNCE-style objective whichever two modalities you align, and it maximises the similarity of a true pair relative to every mismatched pair in the batch, symmetrically in both directions. Put an audio encoder and a text encoder where the image encoder and text encoder were, and the loss doesn't change. Chapter 06 has the full derivation, which would read the same here with different variable names. So if the math is shared, why did one fusion choice end up so dominant?

04Why cross-attention became the default

A short history explains most of it. Through the 2010s, vision, language and audio were separate fields, and multimodal systems glued independent unimodal models together with hand-written rules for combining their scores. That was brittle, and it was blind to any interaction below the final prediction. CLIP-style contrastive alignment (2021) then trained an image encoder and a text encoder into a shared space with a single loss. From 2022 to 2023, the encoder, projector and LLM recipe bolted a pretrained vision encoder onto a pretrained LLM through a small trainable projector, at a fraction of the cost of training everything together. Today adapter-based VLMs inherit improvements from better encoders and LLMs, natively multimodal models train jointly across modalities at much higher cost, and cross-modal generation and multimodal agents push toward systems that perceive, reason and act in one loop.

The reason the intermediate lane became the default comes down to cost and reuse. Cross-attention fusion lets you start from two or more already-excellent pretrained unimodal models, such as a vision encoder trained on huge amounts of image data and an LLM trained on huge amounts of text. Then you add a comparatively small number of new parameters, the cross-attention layers or the projector, to connect them. You get most of the benefit of early fusion's fine-grained interaction, since a text token can attend directly to a specific image patch mid-network, before any prediction is made. And you pay closer to late fusion's training cost, since you're mostly fine-tuning a small bridge and not training two giant encoders jointly from scratch.

If early fusion has the higher ceiling, why doesn't everyone use it?

Because almost nobody can afford it from scratch for every new modality combination. Late fusion is cheap but structurally incapable of fine-grained cross-modal reasoning, and early fusion is powerful but expensive, so cross-attention fusion is probably the point on that accuracy-versus-cost curve where most production systems land. Native multimodal tokenization is the closest thing to deliberately paying for early fusion's ceiling, so it's probably rarer, and mostly pursued by teams with the budget to train large joint models from scratch instead of adapting existing ones. Both lanes are active and shipping today. Adapter-based VLMs remain more common because they're cheaper to build and let you reuse best-in-class unimodal encoders as those keep improving independently, while natively multimodal models are the harder, more expensive bet, made by teams aiming for tighter cross-modal reasoning than an adapter can provide. Neither has definitively displaced the other, so treat any claim that one has fully replaced the other as an overclaim.

05What it costs and what breaks

We've seen that each fusion choice buys something and charges for it. Here are the three side by side, on the three things you'll end up caring about: how good the interaction is, what it costs to train, and how easily you can swap parts.

Early fusionLate fusionIntermediate / cross-attention fusion
Interaction qualityHighest possible — learned jointly from raw signalNone below the final predictionGood — direct token-to-token attention mid-network
Compute costHighest — joint training from scratchLowest — reuse frozen pretrained encodersModerate — mostly training a small bridge
Modularity / reuseLow — hard to swap either modality's modelHigh — swap either side freelyHigh — swap encoders, retrain only the bridge

Failure modes

The first failure is grounding. A model describes something plausible-sounding that isn't in the input, perhaps a dog holding a frisbee when the photo shows a stick. Language priors learned from huge amounts of text pretraining are strong, and a fluent, wrong description reads just as convincingly as a correct one. It's probably the most common real complaint about VLMs in production.

The second is temporal inconsistency. Video generation and video understanding both have to maintain consistency across time, which image models never had to deal with. An object's identity, appearance and position have to stay coherent across dozens or hundreds of frames, and both generative and discriminative video-language models still struggle with this over long clips.

The third is that evaluation is hard. On a text benchmark you can check an answer string, but checking a multimodal answer means checking several harder-to-automate things at once. There's perception (did it correctly perceive what's in the input), grounding (does a specific claim correspond to a specific part of the image or video, and not just sound plausible), and reasoning (given correct perception, is the inference valid). Cross-modal generation adds generation quality, and video adds temporal and spatial consistency. A single benchmark number rarely captures all five, so real multimodal evaluation usually needs several benchmarks plus a human or rubric-based check for grounding specifically.

Doesn't captioning the image and then reasoning about the caption count as visual reasoning?

It's a common misconception that it does, and it's probably the easiest one to fall into. Captioning once and then reasoning over that caption isn't the same thing as multimodal reasoning. Every error in that first, one-shot caption propagates uncorrected through every later step, because the model never looks back at the actual image. Real multimodal chain-of-thought re-attends to the image, or a specific region or moment in it, at each reasoning step, and doesn't do it only once, up front, before reasoning goes blind.

06Summary

  1. Modalities start with nothing in common. An image is a grid of pixel intensities and a sentence is a sequence of token ids, so they have to be translated into a shared space before they can be compared.
  2. Contrastive learning builds that space. Matched pairs go through separate encoders, and a loss pulls true pairs together and pushes all other combinations in the batch apart. CLIP did this for image-text.
  3. The same loss works for any pair of modalities. Only the encoder changes, so audio-text and video-text alignment use the same recipe.
  4. The shared space powers retrieval and zero-shot classification, and it's the raw material that fusion works on.
  5. Fusion is where the modalities meet: at the input (early), at the end (late), or partway through with cross-attention (intermediate). Merging earlier gives richer interaction and a higher cost.
  6. Late fusion can't relate one word to one image region, because the two never appear in the same computation.
  7. Cross-attention is the same formula as self-attention with Q from one modality and K and V from another. It's a wiring pattern and needs no new operation.
  8. Adapters reuse pretrained parts. A pretrained encoder plus a small projector feeding an LLM works for images, audio or anything else, and only the encoder changes.
  9. Native multimodal models remove the seam by tokenizing every modality from the start and training one transformer jointly. They can reason more richly across modalities and cost far more to train.
  10. Cross-modal generation reuses diffusion and autoregressive methods from chapter 12, conditioned on another modality's embedding.
  11. Real visual reasoning re-attends to the image at each step. Captioning once and reasoning over the caption passes every captioning error on to every later step. Grounding, temporal consistency and evaluation are where multimodal systems still break.

07Build this

Cross-attention is the same formula as section 03, wired differently. What the formula cannot show you is a single word picking out the patch it belongs to.

Project Make one word attend to one patch ~3 hours · PyTorch

Train a tiny image-text matching model on shapes you draw yourself, then plot what each caption word attends to. The task is deliberately trivial: two coloured shapes per image, a template caption naming both. Because you drew the shapes, you can look at one attention map and say immediately whether the alignment is real or wishful.

  1. Draw the dataset with NumPy. Each 64×64 image gets two solid shapes of different colours in two random quadrants. The caption is a template string: "a red square and a blue circle". A few thousand images is plenty.
  2. Cut each image into a 4×4 grid of 16 patches and push each patch through one linear layer. On the text side, an embedding table plus one small transformer block. Keep both towers deliberately small.
  3. Write the cross-attention layer by hand from the equation in section 03. Q from the text tokens, K and V from the patch tokens, softmax(QKᵀ/√d_k)V. Avoid nn.MultiheadAttention.
  4. Pool the fused text tokens and score the pair with a linear head. Train it to separate true image-caption pairs from pairs made by shuffling the captions within a batch. A few minutes on CPU.
  5. Keep the attention weights from that layer for one pair. For each caption word, reshape its 16 weights into a 4×4 grid and draw it over the image.
  6. Now break it deliberately by re-initialising the text tower randomly, freezing it, retraining everything else on the same data, and plot the same words again.
You'll know it worked when the map for red brightens over the quadrant holding the red shape, and circle brightens over the circle. No patch was ever labelled. The only supervision was whether a whole caption matched a whole image, and the grounding fell out of that.
What the breakage teaches. An untrained transformer block mixes positions indiscriminately, so its per-token outputs tend to come out close to parallel. The word queries stop differing in any useful direction. Expect the per-word maps to stop separating, with every word pointing at roughly the same patches. Cross-attention is a wiring pattern, not a representation learner. It relates two spaces that already mean something. It cannot manufacture meaning inside a tower that was never trained, which is the whole reason section 05 starts from strong pretrained encoders.

Where this runs in production

Two applications are worth calling out first, since they show up constantly in real systems and in interviews.

Multimodal retrieval takes the shared embedding space from the intuition section and uses it directly. A query in any modality (text, an image, a voice clip) gets embedded and compared against a database of embeddings from any other modality.

So "find images similar to this description" and "find documents containing a chart like this one" are the same nearest-neighbor operation with different inputs, and it is the retrieval half of 11's RAG pipeline with the embedding space extended past text.

Multimodal agents extend 11's tool-use loop with a perception step. An agent that can look at a screenshot, decide in text what action to take, call a tool (click a button, run OCR on a region, zoom into part of an image), then look again at the result before deciding the next step.

The loop is identical to a text-only agent's plan-act-observe cycle. The only difference is that "observe" can now mean look as well as read a tool's text output.

A real document (an invoice, a scanned contract, a medical form) mixes three kinds of information that no single pretrained model handles well alone:

  • Text content, which OCR can pull out.
  • Spatial layout: which text belongs to which table cell, which field a value answers.
  • Purely visual content that text extraction throws away entirely: a logo, a handwritten signature, a checkbox, a chart with no underlying text at all.

A production document AI pipeline typically runs OCR to extract raw text, a layout model to recover structure (reading order, table boundaries, key-value regions), and a vision-language model that reasons over the raw document image directly.

Combining all three is what makes it work, so it can answer "what's the total on this invoice" correctly even when the total sits inside a visually formatted table that OCR text alone would jumble into the wrong reading order. Or answer "is this contract signed", a question pure text extraction can't answer at all, because a signature isn't text.

08Interview questions

BeginnerWhat's the difference between early, late, and intermediate fusion?

Early fusion merges raw or near-raw modality inputs before any real per-modality processing — expensive and inflexible but can learn the finest-grained interactions. Late fusion processes each modality fully separately and combines only the final predictions or scores — cheap and modular but misses fine-grained interaction entirely. Intermediate fusion combines partway through, typically with cross-attention layers letting one modality's tokens attend to another's mid-network — most of the interaction benefit of early fusion without forcing everything through one early merge.

BeginnerWhat is a shared embedding space, and why do you need contrastive learning to build one?

An image (a pixel grid) and a sentence (a token sequence) live in completely different, incomparable representations by default — there's no meaningful way to compute a similarity between them directly. A shared embedding space is a learned space where representations from different modalities are directly comparable by something as simple as a dot product. Contrastive learning builds it by encoding matched pairs (image and caption, audio and transcript) separately, projecting both into the same space, and training with a loss that pulls true pairs together and pushes mismatched pairs apart — that's CLIP's recipe, generalized to any two modalities.

IntermediateEarly vs. late vs. intermediate fusion — when would you actually choose each?

Late fusion for a quick system combining two off-the-shelf models where you don't need fine-grained cross-modal interaction — e.g. separately scoring image quality and text relevance and combining the scores. Intermediate/cross-attention fusion for most production VLM and audio-language work, since it reuses strong pretrained unimodal encoders cheaply while still allowing real token-level interaction. Early fusion, or its modern form — native multimodal tokenization — only when you have the budget to train jointly from scratch and specifically need the highest possible ceiling on cross-modal reasoning, and you're willing to give up easy reuse and independent upgrades of each modality's encoder.

IntermediateWalk me through the encoder + projector + LLM recipe, and how does it generalize past vision?

A pretrained modality encoder (vision, audio, whatever) produces a sequence of embeddings. A small trainable projector maps those embeddings into the same dimensional space the LLM's token embeddings already live in. The LLM then treats the projected tokens exactly like any other tokens in its context, attending over them with its existing self-attention machinery — no architectural change to the LLM itself. This generalizes directly: swap the vision encoder for an audio encoder and a projector, and you have a speech-language model using the same recipe. Only the encoder at the bottom changes.

DeepHow would you evaluate whether a VLM's answer is actually grounded in the image, rather than just plausible-sounding?

You can't trust a fluent answer at face value, because language priors alone can produce a convincing-sounding wrong answer. Concretely: construct probes where swapping the actual image content should change the correct answer, and check whether the model's answer actually changes accordingly — if it doesn't, the model is answering from a language prior, not from the image. Use benchmarks specifically built so that guessing from text priors alone gives close to random accuracy, forcing real visual evidence to matter. And separate the evaluation into distinct axes — perception (did it see the right thing), grounding (does the specific claim map to a specific part of the image), and reasoning (is the inference from correct perception valid) — since a model can fail at any one of these while looking fine on an aggregate score.

DeepWhy does context length become a bigger systems problem for multimodal models than for pure text models?

One image contributes dozens to hundreds of patch tokens; one video contributes many frames, each contributing its own patch tokens, so a few seconds of video can dwarf the token count of a long text document. Because attention cost is quadratic in sequence length (08), that token count exploding compounds the cost far faster than the equivalent scene described in a paragraph of text would. This is why the token count an image or video gets compressed into is a real, load-bearing systems decision in multimodal models — how many tokens a vision encoder emits per image, or how aggressively a video encoder subsamples frames — in a way it simply isn't for text-only models, and it's directly downstream of everything 23 covers on serving cost.

09Go deeper

●Now write it yourself

Reading the derivation and being able to produce it are different skills. These are Deep-ML problems that exercise what this page covers — each one is checked against real test cases, not multiple choice.

Matched to this page from Deep-ML's catalogue of 1,380 problems. More at deep-ml.com, and Where to practise covers the other platforms and what each one trains.