Asked about Images and documents as input

How does an image become something a language model can read?

An answer that works

It is cut into a grid of patches, typically 14 or 16 pixels square, and each patch is projected through one linear layer into a vector the same width as a text embedding. The sequence of those vectors is what the model attends over, alongside the text. The count grows with area, so doubling resolution multiplies patches by four, and the encoder pools the grid down before the language model sees it.

Then they push further

Roughly what does a page of A4 cost?

Order of a couple of thousand tokens at the resolution most providers cap at, which is several times the prompt around it. Anything above about 1568 pixels on the long edge is downscaled before counting, so a 300 dpi scan costs exactly what a 150 dpi one does.

What gets marked up

Strong answers say patches and say that cost scales with area. Weak answers treat the image as an opaque attachment with a flat price.

Reading an answer is not being able to give one. The section that teaches this is Images and documents as input, 5 hours of Multimodal input.

Learn this properly