SDE & MLE Prep

Multimodal LLMs

Q: How do LLMs understand images (and audio)?

  • Late-fusion recipe (LLaVA-style): a pretrained vision encoder (CLIP/SigLIP ViT) turns the image into patch embeddings → a small projector (MLP, or a Q-Former/perceiver that compresses to fewer tokens) maps them into the LLM's embedding space → the LLM reads them like text tokens.
  • Training: (1) align — train the projector on image–caption pairs with the encoder and LLM frozen; (2) visual instruction tuning — fine-tune on image + instruction → answer data (often LLM-generated), unfreezing more of the model.
  • Early fusion / native multimodal models tokenize images (and audio) and train jointly from the start — better cross-modal reasoning, can also generate images as tokens.
  • High-resolution images: tile into crops plus a global thumbnail; token count (cost) grows with resolution.
  • Audio: speech encoders (Whisper-style) feeding the LLM, or end-to-end speech models for low-latency voice.
  • Evaluation: VQA, document/chart understanding (OCR-heavy), grounding, hallucination of objects not in the image.