How does an image become a sequence of tokens an LLM can attend over?
Same topic, related formats. Practice these next.
Same topic, related formats. Practice these next.
Walk through what happens to an input image before a language model can reason over it. What are the stages, and why does the LLM end up treating the image as extra tokens rather than pixels?
An image is patchified, encoded by a ViT, then projected into the LLM's embedding space, so the language model attends over visual feature vectors as extra tokens and never touches raw pixels.
Imagine a translator who only understands a specific alphabet. You hand them a photo, but they cannot read pictures. So a helper chops the photo into small tiles, studies all the tiles together to figure out what is going on, and rewrites each tile as a word in the translator's exact alphabet. Now the translator gets a stack that mixes those picture-words with the real text-words, all in one alphabet, and reads straight through. The translator never sees the original photo. They only see the rewritten words. That is why the model thinks of the image as just more words in its sequence, rather than as colors and shapes it has to look at directly.
Everything you need to truly understand this topic: intuition, mechanics, step by step explanation, code, formulas, and worked example. Click to expand.
Everything you need to truly understand this topic: intuition, mechanics, step by step explanation, code, formulas, and worked example.
Everything important, quickly.
State the three transformations, explain that the LLM's single interface is a sequence of embedding vectors, and close on why tokens, not pixels, buys free cross-modal attention at the cost of a fixed visual token budget.
Real products, models, and research that use this idea.
What an interviewer would ask next. Try answering before peeking at the approach.
Red flags and common mistakes that signal junior thinking. Click to expand.
Saying the LLM looks at the image directly. It only ever sees projected feature vectors in its own embedding space, sitting in the sequence like extra word tokens.
The night-before-the-interview bullets. Scan these on the way to the call.
Primary sources. Skim if you want the original framing.