V-JEPA 2 l256-embed
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.
V-JEPA 2 l256-embed
Embed, 64 frames at 256 × 256. Video layout F × C × H × W, excluding batch.
LibreYOLO
V-JEPA 2 l256-embed
Embed, 64 frames at 256 × 256. Video layout F × C × H × W, excluding batch.
Video encoder
Video clip
64 × 3 × 256 × 256
Permute to C, F, H, W
3 × 64 × 256 × 256
Conv3d tubelets
Kernel/stride 2×16×16, bias=True
Flatten spatiotemporal grid
8192 × 1024; grid 32 × 16 × 16
Encoder block
8192 × 1024, repeats=24
Final LayerNorm
8192 × 1024, eps=1e-6
No CLS token or absolute position embedding.
3D rotary position applies to Q and K.
Mean over all tokens
1024
L2 normalize
1024
embed_tokens also exposes 32 × 16 × 16 × 1024.
Encoder block
Input 8192 × 1024
LayerNorm
8192 × 1024
Multi-head self-attention
16 heads
+
LayerNorm
8192 × 1024
Linear
1024 to 4096
GELU
8192 × 4096
Linear
4096 to 1024
+
Output 8192 × 1024
Encoder rotary self-attention
Query input
8192 × 1024
Key/value input
8192 × 1024
Linear Q
1024 to 1024
Reshape heads
16 × 8192 × 64
Linear K
1024 to 1024
Reshape heads
16 × 8192 × 64
Linear V
1024 to 1024
Reshape heads
16 × 8192 × 64
Rotary position
Rotate time, height, width
Rotary position
Rotate time, height, width
MatMul Q K-transpose
16 × 8192 × 8192
Scale
Divide by sqrt(64)
Softmax over keys
16 × 8192 × 8192
MatMul attention × V
16 × 8192 × 64
Merge heads
8192 × 1024
Linear output
1024 to 1024
Factorized 3D rotary
Q or K head
8192 × 64
Split channel slices
Time 20, H 20, W 20, rest 4
Time rotary slice
8192 × 20
Height rotary slice
8192 × 20
Width rotary slice
8192 × 20
Concat rotated slices and remainder
8192 × 64
Remainder channels are unchanged.
V receives no rotary transformation.
Primitive slice definition is below.
Rotary slice primitive
Input channel slice
8192 × 20
Axis position IDs
Time-major, then row, then column
Multiply position × frequency
omega[j] = 10000^(-2j/20)
Sin and duplicate half table
Concatenate half-width table twice
Cos and duplicate half table
Concatenate half-width table twice
Pair adjacent channels
[a,b] becomes [-b,a]
Multiply rotation × sin
8192 × 20
Multiply input × cos
8192 × 20
+
Preserves the upstream adjacent-pair rotation with duplicated half-width sine/cosine tables.
Variant values
Size
S
E
n
h
M
l256
256
1024
24
16
4096
h256
256
1280
32
16
5120
g256
256
1408
40
22
6144
g384
384
1408
40
22
6144
Encoder artifacts: F=64 for every size.
Released probes:
l256 ssv2: F=16, 174 classes
l256 diving48: F=32, 48 classes
g384 ssv2: F=64, 174 classes
g384 diving48: F=32, 48 classes
N=(F/2) × (S/16)². r=2 floor(floor((E/h)/3)/2).
u=(E/h)-3r. For l/g: r=20,u=4; h256: r=26,u=2.
E: width; n: depth; h: heads; M: encoder MLP width.
Pooler MLP is 4E, including g variants.
Source: libreyolo/models/vjepa2/nn.py. Revision a4d0ecc9e17f.
libreyolo.com