Walk me through how a modern VLM gets an image into an LLM.
Type it the way you would explain it to an interviewer. A few sentences is enough; you can't break anything.
Model answer: the part to lead with
Three components: a vision encoder, a projector, and the LLM. The image is split into fixed-size patches (e.g. 14×14 or 16×16 pixels); each patch is linearly embedded and a ViT runs over the patch sequence, producing one embedding per patch - a 224×224 image with 16×16 patches yields 196 patch embeddings. A small projector (an MLP in LLaVA-style models) maps those from the vision encoder's space into the LLM's token-embedding space. The projected vectors are then spliced into the input sequence alongside real text-token embeddings, and the LLM attends over everything uniformly - from the transformer's perspective, image patches are just tokens it never saw in its text vocabulary.
Full worked answer with diagram
Three components: a vision encoder, a projector, and the LLM. The image is split into fixed-size patches (e.g. 14×14 or 16×16 pixels); each patch is linearly embedded and a ViT runs over the patch sequence, producing one embedding per patch - a 224×224 image with 16×16 patches yields 196 patch embeddings. A small projector (an MLP in LLaVA-style models) maps those from the vision encoder's space into the LLM's token-embedding space. The projected vectors are then spliced into the input sequence alongside real text-token embeddings, and the LLM attends over everything uniformly - from the transformer's perspective, image patches are just tokens it never saw in its text vocabulary.
Two details interviewers listen for. First, the vision encoder is almost never trained from scratch: it's a CLIP- or SigLIP-pretrained ViT, so its features are already language-aligned, which is why a tiny projector is enough to bridge the two models. Second, training is staged: stage 1 freezes both towers and trains only the projector on image-caption pairs (cheap alignment), stage 2 unfreezes the LLM for visual instruction tuning on image-question-answer data, and later stages add high-resolution handling and preference tuning.
Design variations worth naming: resampler/Q-Former projectors (Flamingo, BLIP-2) compress hundreds of patch embeddings into a fixed set of ~32-64 learned query tokens to save context; Flamingo instead injects vision via gated cross-attention layers rather than inline tokens; Fuyu drops the vision encoder entirely and linearly projects raw patches straight into the decoder. Modern open models (LLaVA-NeXT, Qwen-VL, InternVL) mostly converge on an MLP projector plus either image tiling (LLaVA-NeXT, InternVL) or native dynamic resolution, where the ViT itself accepts a variable patch grid (Qwen2-VL onwards).
Worth sketching. Drawing the three boxes and the patch count between them makes clear that the projector is the only new part, which is why stage 1 is cheap.
flowchart LR
A["224x224 image"] --> B["Split into 16x16 patches"]
B --> C["CLIP or SigLIP ViT"]
C --> D["196 patch embeddings"]
D --> E["MLP projector"]
E --> F["196 vectors in the LLM<br/>token-embedding space"]
G["Text token embeddings"] --> H["LLM decoder"]
F --> H
What a good answer covers
- Three components: a vision encoder, a projector, and the LLM
- The image is split into fixed-size patches (e.g
- A small projector (an MLP in LLaVA-style models) maps those from the vision encoder's space into the…
- The projected vectors are then spliced into the input sequence alongside real text-token embeddings, and…
- First, the vision encoder is almost never trained from scratch
Key terms: vision encoder · projector · LLM · resampler/Q-Former
Interviewer follow-ups to expect
Why can you get away with training only the projector in stage 1?
What breaks if you use a randomly initialized vision encoder instead of CLIP?
How does the model handle an image whose aspect ratio doesn't match the encoder's training resolution?
Worked answer from AI-Engineer-Interview-Questions by Om (MIT), reformatted for LLM Prep · answer text last updated 6 November 2026 · scoring and review schedule by LLM Prep