Qwen3-VL grounding 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.
Qwen3-VL grounding 2B
Point. P = image patches; L = combined tokens (runtime axes). Model widths below are resolved.
LibreYOLO
Qwen3-VL grounding 2B
Point. P = image patches; L = combined tokens (runtime axes). Model widths below are resolved.
Image encoder
Image processor
Nominal runner size 1024; native tiling/resize
Conv3d patch embedding
patch=16; output P × 1024
Learned/interpolated 2D positions
P × 1024
Vision blocks 0 to 5
n=6; width 1024
V0
Vision blocks 6 to 11
n=6; width 1024
V1
Vision blocks 12 to 17
n=6; width 1024
V2
Vision blocks 18 to 23
n=6; width 1024
V
V carries final visual features to the projector.
Patch counts vary with processor output, not model size.
V0/V1/V2 are the three intermediate visual taps.
Projection and multimodal sequence
V
Visual projector
1024 channels become 2048 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 2048
Replace image-token placeholders
L × 2048; image and text in one sequence
S
V0
Intermediate patch merger
Post-shuffle LayerNorm; output width 2048
D0
V1
Intermediate patch merger
Post-shuffle LayerNorm; output width 2048
D1
V2
Intermediate patch merger
Post-shuffle LayerNorm; output width 2048
D2
D0/D1/D2 add to visual positions in text layers 0/1/2.
S denotes the multimodal token sequence.
Language model and generated output
S
Text decoder layer 0
Width 2048
+
D0
Text decoder layer 1
Width 2048
+
D1
Text decoder layer 2
Width 2048
+
D2
Remaining text decoder layers
n=25
Final RMSNorm
2048 channels
Language head Linear
2048 to 151936
Greedy token generation
max_new_tokens=128; 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 × 1024
LayerNorm
1024 channels
Vision attention
+
LayerNorm
1024 channels
Vision MLP
+
Output
S × 1024
S is the token count of this sublayer.
Text decoder layer
Input
S × 2048
RMSNorm
2048 channels
Causal attention
+
RMSNorm
2048 channels
Gated MLP
+
Output
S × 2048
S is the token count of this sublayer.
Vision attention
Input width 1024; Q heads 16; K/V heads 16.
Q Linear
1024 to 1024
Split heads
64 per head
K Linear
1024 to 1024
Split heads
64 per head
V Linear
1024 to 1024
Split heads
64 per head
Rotary position
cos/sin half rotation
Rotary position
cos/sin half rotation
Q × transpose(K)
Scale by 1/sqrt(64)
Softmax over keys
Within the image; padding mask
Attention weights × V
16 query heads, weighted values
Concat heads
Output Linear
1024 to 1024
RoPE: x*cos + rotate_half(x)*sin.
Distinct projections share the same normalized input.
Text attention
Input width 2048; Q heads 16; K/V heads 8.
Q Linear
2048 to 2048
Split heads
128 per head
K Linear
2048 to 1024
Split heads
128 per head
V Linear
2048 to 1024
Split heads
128 per head
RMSNorm
128 per head
RMSNorm
128 per head
Rotary position
cos/sin half rotation
Rotary position
cos/sin half rotation
Align K heads
8 to 16
Align V heads
8 to 16
Q × transpose(K)
Scale by 1/sqrt(128)
Softmax over keys
Causal mask; cached K/V optional
Attention weights × V
16 query heads, weighted values
Concat heads
Output Linear
2048 to 2048
RoPE: x*cos + rotate_half(x)*sin.
Cached decode appends past K/V before head alignment.
Vision MLP
Input
S × 1024
Linear
1024 to 4096
gelu_pytorch_tanh
Down Linear
4096 to 1024
Output
S × 1024
Residual addition is in the enclosing layer diagram.
S is the token count of this sublayer.
Text MLP
Input
S × 2048
Gate Linear
2048 to 6144
Up Linear
2048 to 6144
SiLU
Elementwise multiply
S × 6144
Down Linear
6144 to 2048
Output
S × 2048
Residual addition is in the enclosing layer diagram.
S is the token count of this sublayer.
Visual projector
LayerNorm
1024 channels (main merger)
Group spatial neighbors
2 × 2; packed width 4096
Linear
4096 to 4096
GELU
Linear
4096 to 2048
Deep-tap mergers normalize after grouping.
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 to1000 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/qwen3vl.py; Transformers 5.16.1. Revision a4d0ecc9e17f.
libreyolo.com