Go to Map Courses Lab Glossary How it works Troubleshooting Start →
ITEN
← Course 05 · Understanding language (Lesson 05.04 · 14 minutes · No sensor · For everyone)

Models that see and speak.

You take a photo of the fridge and ask what you can cook. Here you'll see how a small model brings a photo into a conversation, where it works well and where it goes wrong, and when a simpler model is the better choice.

What you learn
  1. How a photo becomes something a language model can read
  2. What CLIP does and why it also helps you search your photos
  3. The typical mistakes of small models that look at images
You need to know

If you don't remember one of these, the link takes you to the chapter that explains it.

How do you want to follow it
Preparing the scene…
  1. 01 The question

    A photo and a question, and a written answer.

    You take a photo of the fridge and ask what you can cook. The model looks at the photo, reads the question, and answers with a sentence. A model that works with several kinds of data at once, here images and text, is called multimodal. For a few years now there have been small ones that run on a phone too.

    In practice. Before you use one, ask yourself whether you really need a sentence. To know whether there's a cup, a model that finds objects is enough, and it's smaller and more reliable.

01 / 07
(Go deeper)

A few more numbers.


(01)

How a photo gets into a language model

The image model most used in these systems is a vision transformer. It cuts the photo into little squares 14 or 16 pixels wide. A photo of 224 by 224 pixels with 16-pixel squares gives 196 squares, so 196 embeddings.

A small layer acts as a bridge and brings them to the size of the language model's embeddings. Many small models then merge nearby squares into groups, to spend fewer tokens on each photo. SmolVLM, for example, uses few tokens for each piece of the image, and that's one reason it fits in so few parameters.

  • 196squares in a 224-pixel photo
  • 256 Mparameters in the smallest version of SmolVLM
(02)

CLIP and photo search

CLIP was trained on 400 million pairs of photos and captions found on the web. It has two halves, one for photos and one for text. It learns to make the embeddings of each photo and its caption similar, and those of mismatched pairs different.

The result is a way to classify without training anything. You write "a photo of a cat" and "a photo of a dog", compute the embeddings of the two sentences, and see which one the new photo looks more like. It works with any class you can put into words, even if it isn't the most accurate method.

(03)

Trying them on your phone

Google AI Edge Gallery, on Android, runs Gemma 3n on the phone and accepts photos as well as text. In the browser, with WebGPU, there are SmolVLM demos that describe what the camera sees without sending anything over the network.

Try them with the same five photos and the same questions, and write down the wrong answers. You'll see the mistakes from this lesson, especially with counting and small print, and you'll get a sense of how much to trust them.

(Try it on your phone)

Photos your phone understands on its own


Put your phone in airplane mode and try these features. The ones that still respond use image and text models that live inside the phone.

  1. (01) Search your photos for a word like sunset, dog or cake
  2. (02) Select and copy the text inside a photo of a document
  3. (03) Press and hold on a person or object in a photo to lift it off the background
  4. (04) Point the camera at a sign in another language and translate it
  5. (05) Ask your phone to describe a photo, if it has that feature

Searching your photos by word uses a shared space for photos and sentences, like CLIP. Lifting the subject off the background is segmentation. Describing a photo is the job of a multimodal model.

(Quiz)

4 questions to close the lesson.

When you have answered them all, the lesson counts as done and its stone on the map turns yellow. Answering is what counts, not the score.


  1. (01)

    How does a language model look at a photo?

  2. (02)

    You ask a small model how many people are in a group photo. What should you expect?

  3. (03)

    You just want to search your photos by typing a word. What do you need?

  4. (04)

    When is a multimodal model a better choice than a classifier?

(Next lesson · 06.01) Measuring for real