Image patch (visual token) Text token Selected token True concept match

Multimodal LLM Cross-Attention Simulator

Multimodal large language models understand images and text together by projecting both into a shared embedding space and letting the two token streams attend to each other. This simulator visualizes that fusion step directly: an image encoder's patch grid produces visual tokens, a text encoder produces language tokens, and cross-attention computes, for every text token, a similarity-weighted distribution over every visual token. Adjust the patch resolution, softmax temperature, embedding noise and token count to see how sharply — and how correctly — language grounds itself in the right region of the image.