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.

46%2022202320242025202646%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.3M · ♡ 1kOpen in visualizer Comfy-Org/MiniMax-H3 architecture graphComfy-Org/MiniMax-H3↓ 18.3M · ♡ 2kOpen in visualizer Qwen/Qwen3.5-9B architecture graphQwen/Qwen3.5-9Bimage-text-to-text · ↓ 13.6M · ♡ 2kOpen in visualizer Qwen/Qwen3.6-35B-A3B-FP8 architecture graphQwen/Qwen3.6-35B-A3B-FP8image-text-to-text · ↓ 13.4M · ♡ 358Open in visualizer nvidia/Qwen3.6-35B-A3B-NVFP4 architecture graphnvidia/Qwen3.6-35B-A3B-NVFP4text-generation · ↓ 12.2M · ♡ 569Open in visualizer Qwen/Qwen3.6-27B-FP8 architecture graphQwen/Qwen3.6-27B-FP8image-text-to-text · ↓ 9.0M · ♡ 347Open in visualizer google/gemma-4-26B-A4B-it architecture graphgoogle/gemma-4-26B-A4B-itimage-text-to-text · ↓ 8.8M · ♡ 1kOpen in visualizer Qwen/Qwen2.5-VL-7B-Instruct architecture graphQwen/Qwen2.5-VL-7B-Instructimage-text-to-text · ↓ 8.8M · ♡ 2kOpen in visualizer google/gemma-4-31B-it architecture graphgoogle/gemma-4-31B-itimage-text-to-text · ↓ 8.8M · ♡ 4kOpen in visualizer laion/clap-htsat-fused architecture graphlaion/clap-htsat-fusedaudio-classification · ↓ 7.8M · ♡ 126Open in visualizer Qwen/Qwen3.5-4B architecture graphQwen/Qwen3.5-4Bimage-text-to-text · ↓ 7.8M · ♡ 848Open in visualizer openai/clip-vit-large-patch14 architecture graphopenai/clip-vit-large-patch14zero-shot-image-classification · ↓ 6.3M · ♡ 2kOpen in visualizer

Browse all 1274 models with this in the catalog →

Related concepts

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

Browse all model graphs →