Install
pip install strands-vjepa
Extras
Install only what you need:
# Video decoding (decord + av)
pip install strands-vjepa[video]
# HuggingFace pretrained models (transformers + hub)
pip install strands-vjepa[hf]
# Development (pytest, ruff)
pip install strands-vjepa[dev]
# Everything
pip install strands-vjepa[all]
| Extra | What it adds |
|---|---|
video |
decord/decord2 (platform-aware) + av for video I/O |
hf |
transformers + huggingface_hub for pretrained model loading |
robots |
Integration with strands-robots (currently no extra deps) |
dev |
pytest, pytest-asyncio, ruff for development |
all |
All of the above combined |
Note: PyTorch is a required dependency. Install it first following pytorch.org for your platform/CUDA version.
What you get
| Layer | What it does |
|---|---|
WorldModel / HFWorldModel |
Encode video → latents, predict next state |
CEMPlanner |
Cross-Entropy Method search over action space |
VJepaPolicy |
Drop-in strands-robots Policy (zero-shot action head) |
| 7 agent tools | vjepa_encode, vjepa_plan, vjepa_rollout, vjepa_train, vjepa_pretrain, vjepa_eval, vjepa_inspect |
| Training | AC fine-tuning + JEPA self-supervised pretraining |
| Evaluation | Frozen-backbone probes (SSv2, K400, IN1K) |
Quick start
Encode + plan (zero-shot, no training)
from strands_vjepa import WorldModel, CEMPlanner
from strands_vjepa.planner import CEMConfig
import torch
wm = WorldModel.from_pretrained("facebook/vjepa2-ac-vitl", device="cuda")
obs = wm.encode(torch.rand(1, 3, 16, 256, 256))
goal = wm.encode(torch.rand(1, 3, 16, 256, 256))
planner = CEMPlanner(wm, CEMConfig(horizon=8, n_samples=256))
result = planner.plan(obs, goal)
print(result.actions.shape) # [8, 7]
HuggingFace pretrained (real weights)
from strands_vjepa import HFWorldModel
wm = HFWorldModel.from_hf("facebook/vjepa2-vitl-fpc16-256-ssv2")
latents = wm.encode(video) # [1, 2048, 1024]
logits = wm.classify(video) # [1, 174] (SSv2 classes)
As Strands Agent tools
from strands import Agent
from strands_vjepa.tools import vjepa_encode, vjepa_plan, vjepa_rollout
agent = Agent(tools=[vjepa_encode, vjepa_plan, vjepa_rollout])
agent("Plan 8 actions from obs.jpg to goal.jpg for a 7-DoF arm")
As a robot policy
import strands_vjepa # auto-registers with strands-robots
from strands_robots.policies import create_policy
policy = create_policy("vjepa", world_model=wm, action_dim=7, horizon=8)
actions = await policy.get_actions(obs_dict, "goal.jpg")
Fine-tune on your data
from strands_vjepa.training import ACFineTuner, ACTrainingConfig
config = ACTrainingConfig(data_path="/data/trajectories", epochs=100)
ACFineTuner(config).train()
Architecture
strands_vjepa/
├── world_model.py # Encoder + AC predictor
├── planner.py # CEM planner
├── policy.py # strands-robots Policy
├── tools/ # 7 @tool-decorated agent tools
├── training/ # AC fine-tune + JEPA pretrain + DROID dataset
├── eval/ # Frozen-backbone classification probes
└── vendored/ # V-JEPA 2 model code (MIT, from Meta)
Upstream
Built on V-JEPA 2 (Meta AI, Apache 2.0).
This package depends on cagataycali/vjepa2 — a fork with 10 community patches (MPS, ST-A², bugfixes).
License
Apache 2.0
Download files
Download the file for your platform. If you're not sure which to choose, learn more about installing packages.
Source Distribution
strands_vjepa-0.1.2.tar.gz
(960.3 kB
view details)
Built Distribution
Filter files by name, interpreter, ABI, and platform.
If you're not sure about the file name format, learn more about wheel file names.
Copy a direct link to the current filters
File details
Details for the file strands_vjepa-0.1.2.tar.gz.
File metadata
- Download URL: strands_vjepa-0.1.2.tar.gz
- Upload date:
- Size: 960.3 kB
- Tags: Source
- Uploaded using Trusted Publishing? No
- Uploaded via:
twine/6.2.0 CPython/3.12.13
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
16b7b4d4572e75f743f94f42adbe1c267d721af5a5778eeb08a7478b23731fd9
|
|
| MD5 |
f326d6b966f6cce3e64aae5bceed0b58
|
|
| BLAKE2b-256 |
aebaccb8c6c3730bd622f23f2c0e666da956531e25ab8322b64619ecc21d0cbf
|
File details
Details for the file strands_vjepa-0.1.2-py3-none-any.whl.
File metadata
- Download URL: strands_vjepa-0.1.2-py3-none-any.whl
- Upload date:
- Size: 79.0 kB
- Tags: Python 3
- Uploaded using Trusted Publishing? No
- Uploaded via:
twine/6.2.0 CPython/3.12.13
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
3459a915267469564b1b2f2de42d5e3d6ae23a493b914168de0ae17218873549
|
|
| MD5 |
20ead6c2020f62a77961b804fb7420a7
|
|
| BLAKE2b-256 |
3d1503bfa307db9a123cdd24dcb8dd8a98388408261ac203851debbfb0f97e87
|