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.

39%2022202320242025202639%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 · ↓ 22.6M · ♡ 994Open in visualizer Qwen/Qwen3.5-9B architecture graphQwen/Qwen3.5-9Bimage-text-to-text · ↓ 12.4M · ♡ 2kOpen in visualizer google/gemma-4-31B-it architecture graphgoogle/gemma-4-31B-itimage-text-to-text · ↓ 11.9M · ♡ 3kOpen in visualizer google/gemma-4-26B-A4B-it architecture graphgoogle/gemma-4-26B-A4B-itimage-text-to-text · ↓ 11.7M · ♡ 1kOpen in visualizer nvidia/Qwen3.6-35B-A3B-NVFP4 architecture graphnvidia/Qwen3.6-35B-A3B-NVFP4text-generation · ↓ 11.3M · ♡ 534Open in visualizer Qwen/Qwen2.5-VL-7B-Instruct architecture graphQwen/Qwen2.5-VL-7B-Instructimage-text-to-text · ↓ 9.3M · ♡ 2kOpen in visualizer Qwen/Qwen3.6-35B-A3B-FP8 architecture graphQwen/Qwen3.6-35B-A3B-FP8image-text-to-text · ↓ 8.9M · ♡ 341Open in visualizer openai/clip-vit-large-patch14 architecture graphopenai/clip-vit-large-patch14zero-shot-image-classification · ↓ 8.5M · ♡ 2kOpen in visualizer Qwen/Qwen2.5-VL-3B-Instruct architecture graphQwen/Qwen2.5-VL-3B-Instructimage-text-to-text · ↓ 8.2M · ♡ 683Open in visualizer Qwen/Qwen3.6-27B-FP8 architecture graphQwen/Qwen3.6-27B-FP8image-text-to-text · ↓ 7.8M · ♡ 340Open in visualizer Qwen/Qwen3.6-27B architecture graphQwen/Qwen3.6-27Bimage-text-to-text · ↓ 7.0M · ♡ 2kOpen in visualizer laion/clap-htsat-fused architecture graphlaion/clap-htsat-fusedaudio-classification · ↓ 6.9M · ♡ 121Open in visualizer

Browse all 916 models with this in the catalog →

Related concepts

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

Browse all model graphs →