LingBot-Vision S
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.
LingBot-Vision S
Semantic segmentation, 150 classes, native eval, input 3 × 512 × 512. Shapes exclude batch.
LibreYOLO
LingBot-Vision S
Semantic segmentation, 150 classes, native eval, input 3 × 512 × 512. Shapes exclude batch.
Backbone and semantic probe
RGB + ImageNet normalization
3 × 512 × 512
Conv2d patch embedding 16×16
3 to 384; stride16; 32 × 32 patch grid
Flatten 1024 patches
1024 × 384
Prepend CLS + 4 storage tokens
1029 × 384; learnable prefix
Self-attention block, n=12
6 heads; head dimension64
Final LayerNorm
384 channels; epsilon1e-5
Select patch tokens
Discard CLS and 4 storage tokens; 1024 × 384
Restore patch grid
384 × 32 × 32
Conv2d 1×1 linear probe
384 to 150; bias=True
semantic_logits
150 × 32 × 32
Network forward returns patch-grid logits in a dictionary.
Caller-level resizing is outside this network graph.
Mask token is stored for checkpoint compatibility.
Masked-token pretraining is not executed by this port.
g is implemented but unpublished in the public family.
Self-attention block
Input tokens
1029 × 384
LayerNorm
384 channels; epsilon1e-5
Rotary self-attention
6 heads, width64
LayerScale
384 learned scalars; init1e-5
+
LayerNorm
384 channels; epsilon1e-5
Linear
384 to 1536
GELU
Linear
1536 to 384
LayerScale
384 learned scalars; init1e-5
+
Output tokens
1029 × 384
No stochastic depth or dropout in this inference port.
s/b/l use GELU MLP; g uses the separately drawn SwiGLU.
Rotary self-attention
Fused QKV linear
384 to 1152; K bias masked to zero
Split Q, K, V and heads
6 × 1029 × 64 for each tensor
Apply RoPE to Q and K
Only 1024 patch tokens; keep prefix
V unchanged
1029 tokens
Q × transpose(K) / 8
Each head: 1029 × 1029
Softmax over keys
All prefix and patch tokens attend
Attention weights × V
64 channels per head
Concat heads
1029 × 384
Output linear
384 to 384; bias=True
Q/K rotation uses fp32 sine/cosine tables.
Q/K convert back to input dtype before attention.
Head dimension is64 for every registered size.
Q,V biases exist for s/b/l; K bias is masked to zero.
The giant g configuration disables fused QKV bias.
Axial RoPE on patch tokens
32×32 patch-center coordinates
Normalize each axis independently to [-1,1]
Periods and angles
16 frequencies per axis; base100; 2π × coordinate / period
Sine and cosine tables
1024 × 64; duplicate axial angle vector
Rotate half of Q or K
Split [x1,x2], concatenate [-x2,x1]
Multiply original x by cosine
Elementwise
Multiply rotated x by sine
Elementwise
+
x_rotated = x*cos + rotate_half(x)*sin. Prefix tokens bypass this rotation.
Coordinates and periods construct positions; there is no learned absolute position table.
MLP family configuration
Size D (width) N (blocks) A (heads)
s 384 12 6
b 768 12 12
l 1024 24 16
Every MLP expands width by4 with GELU.
s:384/1536; b:768/3072; l:1024/4096.
g:1536 width,40 blocks,24 heads, SwiGLU4096.
g has a separate concrete view because its FFN differs.
Source: libreyolo/models/lingbotvision/nn.py and model.py. Revision a4d0ecc9e17f.
libreyolo.com