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