> This is the documentation for LibreYOLO 1.6.0. Current version: https://www.libreyolo.com/docs/models/vjepa2

# V-JEPA 2
V-JEPA 2 produces video embeddings and supports training an attentive classification probe.
Tasks: Embeddings, Classification. Install: pip install libreyolo.
Verified against LibreYOLO v1.6.0.

## Install

```bash
pip install "libreyolo"
```

## Predict

**Python**

```python
from libreyolo import LibreYOLO, SAMPLE_IMAGE

model = LibreYOLO("LibreVJEPA2l256-embed.pt", device="cpu")
result = model(SAMPLE_IMAGE)
print(result.embeddings)
tokens = model.embed_tokens(SAMPLE_IMAGE)
print(tokens.shape)
```

A still image is promoted to a clip. `embed_tokens()` returns `(B, T, H, W, D)` tokens; the public embedding normalizes their mean. Exported clip graphs require direct five-dimensional runtime input.

## Train

Only the attentive probe and linear classifier train; the encoder stays frozen. Use the classification task and a video-manifest dataset. Defaults are 10 epochs, batch 2, learning rate 0.001 and workers 0. Full encoder fine-tuning and pretraining are not supported.

[Dataset setup](/docs/v1.6.0/train/datasets) describes the required training data.

**Python**

```python
from libreyolo import LibreYOLO

model = LibreYOLO("LibreVJEPA2l256-cls-ssv2.pt", device="cpu")
# Replace with your video dataset YAML (train/val manifests of '<video-path> <class-id>' lines).
model.train(data="path/to/your/video_dataset.yaml", epochs=1, device="cpu", workers=0)
```


## Validate

**Python**

```python
from libreyolo import LibreYOLO, SAMPLE_IMAGE

model = LibreYOLO("LibreVJEPA2l256-cls-ssv2.pt", device="cpu")
# Replace with your video dataset YAML; val() reads its val manifest of '<video-path> <class-id>' lines.
metrics = model.val(data="path/to/your/video_dataset.yaml", workers=0)
print(metrics)
```

Use the dataset format for this task. [Validation](/docs/v1.6.0/train/validation) explains the dataset requirements and returned metrics.

## Export

| Task | ONNX | TorchScript | ExecuTorch | TensorRT | OpenVINO | Paddle | MNN | RKNN | ncnn | TFLite | CoreML | Core AI |
| --- | --- | --- | --- | --- | --- | --- | --- | --- | --- | --- | --- | --- |
| Embeddings | yes | yes | yes | yes | yes |  |  |  |  |  |  |  |
| Classification | yes | yes | yes | yes | yes |  |  |  |  |  |  |  |

A "yes" means the export is supported. An empty cell means the exporter refuses that combination.

**Python**

```python
from libreyolo import LibreYOLO, SAMPLE_IMAGE

model = LibreYOLO("LibreVJEPA2l256-embed.pt", device="cpu")
model.export(format="onnx")
```

[Export setup](/docs/v1.6.0/export) lists format dependencies and loading exported artifacts.

## Checkpoints

| File | Input (px) | Task | Weights license |
| --- | --- | --- | --- |
| `LibreVJEPA2h256-embed.pt` |  | Embeddings | mit |
| `LibreVJEPA2l256-cls-ssv2.pt` |  | Classification | mit |
| `LibreVJEPA2l256-embed.pt` |  | Embeddings | mit |
| `LibreVJEPA2g384-embed.pt` |  | Embeddings | apache-2.0 |
| `LibreVJEPA2l256-cls-diving48.pt` |  | Classification | mit |
| `LibreVJEPA2g256-embed.pt` |  | Embeddings | apache-2.0 |
| `LibreVJEPA2g384-cls-diving48.pt` |  | Classification | mit |
| `LibreVJEPA2g384-cls-ssv2.pt` |  | Classification | mit |

## Licensing

Check the license on the Hugging Face repository of the specific weights you download. That repository is authoritative and licenses are not always uniform across a family. This is a description of the licenses involved, not legal advice.

- Original work: V-JEPA 2, Meta AI
- Upstream license: MIT; Apache-2.0 for giant encoder artifacts
- Upstream source: https://github.com/facebookresearch/vjepa2
- LibreYOLO code: MIT
- Weights: MIT; Apache-2.0 for giant encoder artifacts, republished at https://huggingface.co/LibreYOLO
- Interpretation: Licenses differ by artifact: the two giant encoder artifacts are Apache-2.0; the other mirrored encoders and classification probes are MIT.


## V-JEPA 2 architecture

- V-JEPA 2 l256-embed: [SVG](/diagrams/models/vjepa2/l256-embed.svg), [interactive diagram](/diagrams/models/vjepa2/l256-embed.html)
- V-JEPA 2 h256-embed: [SVG](/diagrams/models/vjepa2/h256-embed.svg), [interactive diagram](/diagrams/models/vjepa2/h256-embed.html)
- V-JEPA 2 g256-embed: [SVG](/diagrams/models/vjepa2/g256-embed.svg), [interactive diagram](/diagrams/models/vjepa2/g256-embed.html)
- V-JEPA 2 g384-embed: [SVG](/diagrams/models/vjepa2/g384-embed.svg), [interactive diagram](/diagrams/models/vjepa2/g384-embed.html)
- V-JEPA 2 l256-classify-ssv2: [SVG](/diagrams/models/vjepa2/l256-classify-ssv2.svg), [interactive diagram](/diagrams/models/vjepa2/l256-classify-ssv2.html)
- V-JEPA 2 l256-classify-diving48: [SVG](/diagrams/models/vjepa2/l256-classify-diving48.svg), [interactive diagram](/diagrams/models/vjepa2/l256-classify-diving48.html)
- V-JEPA 2 g384-classify-ssv2: [SVG](/diagrams/models/vjepa2/g384-classify-ssv2.svg), [interactive diagram](/diagrams/models/vjepa2/g384-classify-ssv2.html)
- V-JEPA 2 g384-classify-diving48: [SVG](/diagrams/models/vjepa2/g384-classify-diving48.svg), [interactive diagram](/diagrams/models/vjepa2/g384-classify-diving48.html)
- V-JEPA 2 family-embed: [SVG](/diagrams/models/vjepa2/family-embed.svg), [interactive diagram](/diagrams/models/vjepa2/family-embed.html)
- V-JEPA 2 family-classify: [SVG](/diagrams/models/vjepa2/family-classify.svg), [interactive diagram](/diagrams/models/vjepa2/family-classify.html)
