- CLIP, the classic image-text alignment model that uses contrastive learning to embed images and captions into a shared space.
- LLaVA, which combines a vision encoder (CLIP ViT) with a large language model (Llama 2, Vicuna) for instruction following, dialogue, and vision-language reasoning.
In this chapter
The chapter has four parts. Vision transformers turn an image into a sequence of tokens, which is the input every later model in the chapter starts from. Representation learning covers how a network learns an embedding that exposes the factors of a scene, ending with CLIP, which learns one embedding for images and text together. Vision-language models then feed such visual embeddings into a large language model, and a fine-tuning lab adapts a small one to a task.Vision transformers
Vision Transformers
Patches as tokens, position embeddings, and a small ViT trained on CIFAR-10 with and without augmentation.
Representation learning
Learning Representations from Pixels
Autoencoders, k-means, and contrastive learning, where the chosen augmentation decides what the embedding keeps.
CLIP
Contrastive Language-Image Pretraining, the foundation of modern vision-language models.
CLIP Zero-Shot Classification
Hands-on section: zero-shot classification as a linear classifier whose weights come from text prompts.
Vision-language models
LLaVA deep dive
A closer look at the LLaVA family: architecture, training stages, and data.
Visual tokens and hallucination
How many tokens an image costs, how answers are scored, and how often a model reports objects that are not there.
Fine-tuning lab
SmolVLM SFT for food extraction
Supervised fine-tuning of a small vision-language model to extract structured data from food images.
References
- Dosovitskiy, A., Beyer, L., Kolesnikov, A., Weissenborn, D., Zhai, X., et al. (2020). An Image is Worth 16x16 Words: Transformers for Image Recognition at Scale. arXiv [cs.CV]. Link
- Liu, H., Li, C., Wu, Q., Lee, Y. (2023). Visual Instruction Tuning. arXiv [cs.CV]. Link
- Radford, A., Kim, J., Hallacy, C., Ramesh, A., Goh, G., et al. (2021). Learning transferable visual models from natural language supervision. arXiv [cs.CV]. Link
Found an error on this page? Report an issue.

