InternVL3 1B
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.
InternVL3 1B
Detect. P = image patches; L = combined tokens (runtime axes). Model widths below are resolved.
LibreYOLO
InternVL3 1B
Detect. P = image patches; L = combined tokens (runtime axes). Model widths below are resolved.
Image encoder
Image processor
Nominal runner size 448; native tiling/resize
Conv2d patch embedding
patch=14; output P × 1024
Learned absolute positions + CLS
P × 1024; CLS adds one token
Vision transformer blocks
n=24; width 1024; heads=16
Drop CLS; restore spatial grid
1024 patch positions per 448-square tile
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
1024 channels become 896 channels
Visual token sequence
Patch grouping factor 2 per axis
Prompt and image placeholders
Vocabulary and detection request
Tokenizer
Runtime text length
Token embedding
Vocabulary 151674; width 896
Replace image-token placeholders
L × 896; 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=24; width 896
Final RMSNorm
896 channels
Language head Linear
896 to 151674
Greedy token generation
max_new_tokens=1024; 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
LayerScale
Learned per-channel multiplier
+
LayerNorm
1024 channels
Vision MLP
LayerScale
+
Output
S × 1024
S is the token count of this sublayer.
Text decoder layer
Input
S × 896
RMSNorm
896 channels
Causal attention
+
RMSNorm
896 channels
Gated MLP
+
Output
S × 896
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
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
Position information enters through embeddings.
Distinct projections share the same normalized input.
Text attention
Input width 896; Q heads 14; K/V heads 2.
Q Linear
896 to 896
Split heads
64 per head
K Linear
896 to 128
Split heads
64 per head
V Linear
896 to 128
Split heads
64 per head
Rotary position
cos/sin half rotation
Rotary position
cos/sin half rotation
Align K heads
2 to 14
Align V heads
2 to 14
Q × transpose(K)
Scale by 1/sqrt(64)
Softmax over keys
Causal mask; cached K/V optional
Attention weights × V
14 query heads, weighted values
Concat heads
Output Linear
896 to 896
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
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 × 896
Gate Linear
896 to 4864
Up Linear
896 to 4864
SiLU
Elementwise multiply
S × 4864
Down Linear
4864 to 896
Output
S × 896
Residual addition is in the enclosing layer diagram.
S is the token count of this sublayer.
Visual projector
Pixel shuffle / spatial grouping
2 × 2; width 4096
LayerNorm
4096 channels
Linear
4096 to 896
GELU
Linear
896 to 896
Output width equals the language-model embedding.
LibreYOLO output adapter
O
Decode generated tokens
Retain reply text
Parse JSON boxes
Flatten nested boxes
Normalize coordinates
Divide by 1000; xyxy corners
Validate / class / confidence
Synthetic per-box score1; clamp valid boxes
Same-class deduplication
Rounded boxes and IoU filter before max_det
Results.boxes
Scale xyxy to original W,H; cap max_det
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/vlm/internvl3.py; Transformers 5.16.1. Revision a4d0ecc9e17f.
libreyolo.com