ShowUI 2B
Fit diagram
Read at 100%
Clear selection
Download SVG
Download PNG
Click a block to read its description, or select it with Tab and Enter.
ShowUI 2B
Point. P = image patches; L = combined tokens (runtime axes). Model widths below are resolved.
LibreYOLO
ShowUI 2B
Point. P = image patches; L = combined tokens (runtime axes). Model widths below are resolved.
Image encoder
Image processor
Nominal runner size 1344; native tiling/resize
Conv3d patch embedding
patch=14; output P × 1280
2D rotary position information
P × 1280
Vision transformer blocks
n=32; width 1280; heads=16
V
V carries final visual features to the projector.
Patch counts vary with processor output, not model size.
Projection and multimodal sequence
V
Visual projector
1280 channels become 1536 channels
Visual token sequence
Patch grouping factor 2 per axis
Prompt and image placeholders
Click instruction
Tokenizer
Runtime text length
Token embedding
Vocabulary 151936; width 1536
Replace image-token placeholders
L × 1536; image and text in one sequence
S
Visual features replace placeholders before language layers.
Text and image masks preserve their positions.
S denotes the multimodal token sequence.
Language model and generated output
S
Text decoder layers
n=28; width 1536
Final RMSNorm
1536 channels
Language head Linear
1536 to 151936
Greedy token generation
max_new_tokens=64; do_sample=False
O
O is the generated reply; prompt tokens are removed.
The adapter decodes O into task geometry below.
Vision transformer layer
Input
S × 1280
LayerNorm
1280 channels
Vision attention
+
LayerNorm
1280 channels
Vision MLP
+
Output
S × 1280
S is the token count of this sublayer.
Text decoder layer
Input
S × 1536
RMSNorm
1536 channels
Causal attention
+
RMSNorm
1536 channels
Gated MLP
+
Output
S × 1536
S is the token count of this sublayer.
Vision attention
Input width 1280; Q heads 16; K/V heads 16.
Q Linear
1280 to 1280
Split heads
80 per head
K Linear
1280 to 1280
Split heads
80 per head
V Linear
1280 to 1280
Split heads
80 per head
Rotary position
cos/sin half rotation
Rotary position
cos/sin half rotation
Q × transpose(K)
Scale by 1/sqrt(80)
Softmax over keys
Within the image; padding mask
Attention weights × V
16 query heads, weighted values
Concat heads
Output Linear
1280 to 1280
RoPE: x*cos + rotate_half(x)*sin.
Distinct projections share the same normalized input.
Text attention
Input width 1536; Q heads 12; K/V heads 2.
Q Linear
1536 to 1536
Split heads
128 per head
K Linear
1536 to 256
Split heads
128 per head
V Linear
1536 to 256
Split heads
128 per head
Rotary position
cos/sin half rotation
Rotary position
cos/sin half rotation
Align K heads
2 to 12
Align V heads
2 to 12
Q × transpose(K)
Scale by 1/sqrt(128)
Softmax over keys
Causal mask; cached K/V optional
Attention weights × V
12 query heads, weighted values
Concat heads
Output Linear
1536 to 1536
RoPE: x*cos + rotate_half(x)*sin.
Cached decode appends past K/V before head alignment.
Vision MLP
Input
S × 1280
Linear
1280 to 5120
quick_gelu
Down Linear
5120 to 1280
Output
S × 1280
Residual addition is in the enclosing layer diagram.
S is the token count of this sublayer.
Text MLP
Input
S × 1536
Gate Linear
1536 to 8960
Up Linear
1536 to 8960
SiLU
Elementwise multiply
S × 8960
Down Linear
8960 to 1536
Output
S × 1536
Residual addition is in the enclosing layer diagram.
S is the token count of this sublayer.
Visual projector
LayerNorm
1280 channels (main merger)
Group spatial neighbors
2 × 2; packed width 5120
Linear
5120 to 5120
GELU
Linear
5120 to 1536
Rotary vision positions are applied before merging.
Output width equals the language-model embedding.
LibreYOLO output adapter
O
Decode generated tokens
Retain reply text
Extract click coordinates
Bare [x,y] or parsed point
Attach active query label
One requested click target
Scale to original image
0 to1 coordinates
Validate and filter
Confidence / classes; at most one point
Results.points
Pixel coordinates + synthetic score1
Scores are adapter placeholders, not calibrated confidence.
Scope: native backend architecture from pinned config metadata; no pretrained execution. The image path is shown.
Source: libreyolo/models/ground/showui.py; Transformers 5.16.1. Revision a4d0ecc9e17f.
libreyolo.com