V-JEPA 2 world model & action-conditioned planner for Strands Agents
Project description
Install
pip install strands-vjepa
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
Project details
Release history Release notifications | RSS feed
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.1.tar.gz
(925.1 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.1.tar.gz.
File metadata
- Download URL: strands_vjepa-0.1.1.tar.gz
- Upload date:
- Size: 925.1 kB
- Tags: Source
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/6.2.0 CPython/3.13.5
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
381d02b171095341a6c944484f2784018210ce3b49dc7e19a6b57b163eca7522
|
|
| MD5 |
fe4a55b36ba3483db09c38de3190dd0a
|
|
| BLAKE2b-256 |
ff8ca3457022b0d01c66d2e3b8ad73d9e0a280669ef61d789a0a181cb018c609
|
File details
Details for the file strands_vjepa-0.1.1-py3-none-any.whl.
File metadata
- Download URL: strands_vjepa-0.1.1-py3-none-any.whl
- Upload date:
- Size: 65.5 kB
- Tags: Python 3
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/6.2.0 CPython/3.13.5
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
bdddf58fa5e98138e8d14f8056ebec442988dc2a11cd5bc100461f45dfc5e33e
|
|
| MD5 |
983bd798fdc73245aa1ab98ae5b3efe0
|
|
| BLAKE2b-256 |
e82c2e4c3738deefd6e44cb7c193164f16f176a7c2c8a762380fd2b4347f887f
|