V-JEPA 2 Video & Masking

Orchestrate V-JEPA 2 video tokenization and spatiotemporal masking for pretraining.

Updated Feb 28, 2026
One-click install
npx skills add https://github.com/sovr610/refffiy --skill v-jepa-2-video-masking
Or copy as Structured Prompt for Agent
Please help me install this Agent Skill.
Skill: V-JEPA 2 Video & Masking
Source: https://github.com/sovr610/refffiy/tree/main/brain-ai-dev/skills/vjepa2-video-masking
Command: npx skills add https://github.com/sovr610/refffiy --skill v-jepa-2-video-masking

SYSTEM DOCUMENTATION & REQUIREMENTS

💡 This Skill requires torch, and includes scripts (resource) and references (resource) and assets (resource) components.

What problem does it solve?

Enables end-to-end setup for V-JEPA 2 style video pretraining by providing tubelet tokenization, multi-block 3D masking, video patch embeddings, and a collator that efficiently handles multi-FPC batching. This Skill abstracts the orchestration of tokenization, masking, and sequence-wrangling so practitioners can focus on model design and experiments rather than the plumbing.

Core Features & Use Cases

  • Tubelet tokenization via PatchEmbed3D for efficient spatiotemporal embedding.
  • Multi-block 3D masking algorithm to create structured enc/pred targets.
  • MaskGenerator and MaskCollator support for deterministic, memory-efficient training on variable-length video clips.
  • MultiSequenceEncoder / MultiSequencePredictor wrappers to handle heterogeneous clip lengths in a single step.
  • Reference templates and assets to reproduce experiments and benchmarks for V-JEPA 2 pretraining.

Quick Start

Configure and deploy the V-JEPA 2 video masking workflow on a sample video dataset.

Frequently Asked Questions about V-JEPA 2 Video & Masking

High-intent search queries and answers about installing and using this skill.

FAQPage Schema
How do I implement spatiotemporal masking for video pretraining?

Spatiotemporal masking for video pretraining is implemented using a multi-block 3D algorithm that partitions the token grid into encoder and prediction masks. This guarantees no overlaps or gaps, enabling structured target creation for V-JEPA 2 training.

What is tubelet tokenization and how does it work for video embedding?

Tubelet tokenization via PatchEmbed3D converts video clips into efficient spatiotemporal embeddings. It processes temporal and spatial dimensions together to generate structured token grids required for V-JEPA 2 pretraining.

How do I batch variable-length video clips for V-JEPA pretraining?

Variable-length video clips are batched using a MaskCollator that groups sequences by frames per clip (FPC). This enables memory-conscious training by wrapping heterogeneous clip lengths with MultiSequenceEncoder and MultiSequencePredictor.

Does PyTorch support deterministic seed handling for video masking across workers?

PyTorch supports deterministic seed handling across workers for video masking by enforcing invariants during mask generation. This ensures encoder and prediction masks partition the token grid consistently across distributed training processes.

Why does my encoder mask overlap with the prediction mask in video tokenization?

Encoder and prediction masks overlap when partition invariants are not enforced during multi-block 3D mask generation. Proper spatiotemporal masking algorithms ensure the token grid is partitioned without overlaps or gaps to prevent this.

Can I use multi-block 3D masking for variable-length video clips?

Multi-block 3D masking supports variable-length video clips through a MaskCollator that groups batches by frames per clip. MultiSequenceEncoder and MultiSequencePredictor wrappers handle heterogeneous clip lengths in a single training step.