V-JEPA 2 (Meta) is a self-supervised video encoder — a “world model” that learns by predicting
in representation space (JEPA), not by generating pixels. Ported as
facebook/vjepa2-vitl-fpc16-256-ssv2: ViT-L backbone (3D RoPE attention over 16-frame clips) +
attentive pooler + Something-Something-v2 action head (174 physical-interaction classes). 375M,
fp16 ~675 MB — comfortably iPhone-sized.
Unlike the diffusion ports (3 bundles + host sampler), this is a single stateless graph:
pixel_values_videos [1,16,3,256,256] → logits [1,174]. Wrap VJEPA2ForVideoClassification
(.logits), direct-export with the usual externalize-drop {sdpa, rope}, run via GraphModel.
transformers ≥4.53 has the model class built in — no custom code.
squeeze trap. The reference rotate_queries_or_keys (3D RoPE) calls
emb_sin.squeeze(-1) on a dim of size D/2 (=10). In torch, squeezing a non-1 dim is a NO-OP; the
Core AI converter maps it to ShrinkDims, which REQUIRES size 1 → Operation creation failed at
VJEPA2RopeAttention. Fix: monkeypatch the function with the squeeze removed (math unchanged) —
see conversion/vjepa2/export_fp16.py. Generic rule: a converter failure on a torch no-op is a
patch-the-reference case, not a rewrite case..half() + fp16 reference inputs, as with Stable Audio).Moving [something] up ↔ down, with the optic-flow-equivalent camera-motion labels
alongside — expected). Proves real video understanding on-engine in one script, no dataset needed
(conversion/vjepa2/gate_semantic.py).from_pretrained can hang on network metadata even with a full cache.
HF_HUB_OFFLINE=1 fixes that but has a transformers bug (checkpoint_files[0]=None) when the
snapshot is missing files — so first finish the blob download with hf_hub_download (it
resumes .incomplete blobs), then run offline.Video SSL encoders are a vacuum on Apple silicon — no MLX port, no Apple stock path, edge deployments target NVIDIA/Android. A camera-fed “what action is happening” demo is a zoo-first category (video understanding), distinct from generation.