Multimodal

Patch embedding

Slices the image into fixed-size patches and projects each one into a token. How pixels become a sequence.

First page of An Image is Worth 16x16 Words: Transformers for Image Recognition at ScaleIntroduced inOct 2020An Image is Worth 16x16 Words: Transformers for Image Recognition at ScaleDosovitskiy et al. · arXiv 2010.11929 ↗
Patch embedding: pixels become tokensimage → fixed-size patches→ one token per patch→ into the transformer, like any text sequence

Vision transformers do not see pixels; they see patches. The image is cut into a grid of fixed-size squares, each flattened and linearly projected into an embedding. One ‘visual token’ per patch. From that point on the vision encoder is just a transformer over a sequence, which is exactly why the same machinery works for text and images.

Adoption over time

Share of new models that have included patch embedding over time.

41%2022202320242025202641%20222023202420252026

See it in real models

Open any of these on hfviewer to find this block in the interactive architecture graph.

openai/clip-vit-base-patch32 architecture graphopenai/clip-vit-base-patch32zero-shot-image-classification · ↓ 20.8M · ♡ 1kOpen in visualizer Qwen/Qwen3.5-9B architecture graphQwen/Qwen3.5-9Bimage-text-to-text · ↓ 13.9M · ♡ 2kOpen in visualizer Comfy-Org/MiniMax-H3 architecture graphComfy-Org/MiniMax-H3↓ 11.8M · ♡ 1kOpen in visualizer nvidia/Qwen3.6-35B-A3B-NVFP4 architecture graphnvidia/Qwen3.6-35B-A3B-NVFP4text-generation · ↓ 11.7M · ♡ 553Open in visualizer Qwen/Qwen3.6-35B-A3B-FP8 architecture graphQwen/Qwen3.6-35B-A3B-FP8image-text-to-text · ↓ 11.1M · ♡ 351Open in visualizer google/gemma-4-26B-A4B-it architecture graphgoogle/gemma-4-26B-A4B-itimage-text-to-text · ↓ 10.1M · ♡ 1kOpen in visualizer google/gemma-4-31B-it architecture graphgoogle/gemma-4-31B-itimage-text-to-text · ↓ 10.0M · ♡ 4kOpen in visualizer Qwen/Qwen2.5-VL-7B-Instruct architecture graphQwen/Qwen2.5-VL-7B-Instructimage-text-to-text · ↓ 9.1M · ♡ 2kOpen in visualizer Qwen/Qwen3.6-27B-FP8 architecture graphQwen/Qwen3.6-27B-FP8image-text-to-text · ↓ 9.0M · ♡ 346Open in visualizer Qwen/Qwen3.5-4B architecture graphQwen/Qwen3.5-4Bimage-text-to-text · ↓ 7.5M · ♡ 812Open in visualizer laion/clap-htsat-fused architecture graphlaion/clap-htsat-fusedaudio-classification · ↓ 7.3M · ♡ 125Open in visualizer Qwen/Qwen2.5-VL-3B-Instruct architecture graphQwen/Qwen2.5-VL-3B-Instructimage-text-to-text · ↓ 7.1M · ♡ 684Open in visualizer

Browse all 1086 models with this in the catalog →

Related concepts

hfviewer renders the full architecture of 3,500+ Hugging Face models as interactive graphs. Hover any block to see what it does, with this model’s real numbers.

Browse all model graphs →