{ "model": "vjepa2-ac-vitg", "source": "/home/overseer2/workdir/jepa.cpp/models/vjepa2_ac/vjepa2-ac-vitg.pt", "dtype": "float32", "npy_dtype_note": "all tensors float32 C-order except frames_u8 (uint8) and top5_idx (int64)", "framework": { "torch": "2.13.0+cpu", "transformers": "5.16.1", "python": "3.12.13", "threads": 16, "cpu": "x86_64" }, "created": "2026-09-01T21:43:50+0300", "source_url": "https://dl.fbaipublicfiles.com/vjepa2/vjepa2-ac-vitg.pt", "code": "https://github.com/facebookresearch/vjepa2 (hubconf vjepa2_ac_vit_giant, src/models/ac_predictor.py, notebooks/utils/mpc_utils.py + world_model_wrapper.py), local clone at /home/overseer2/workdir/jepa.cpp/tmp/vjepa2-src", "checkpoint": { "top_level_keys": [ "encoder", "predictor", "opt", "scaler", "target_encoder", "epoch", "loss", "batch_size", "world_size", "lr" ], "encoder_key_used": "encoder", "key_cleanup": "strip 'module.' and 'backbone.'", "epoch": 315, "encoder_equals_target_encoder": true }, "trajectory": { "file": "notebooks/franka_example_traj.npz", "frames": 2, "frame_size_hw": [ 256, 256 ], "states": [ [ 0.5804390907287598, -0.0020212342496961355, 0.24755726754665375, -3.066615581512451, 0.030529797077178955, -1.9127511978149414, 0.9969713687896729 ], [ 0.6728084683418274, 0.028965970501303673, 0.33183684945106506, -3.0514373779296875, 0.017709508538246155, -1.9124950170516968, 0.9969713687896729 ] ] }, "hparams": { "embed_dim": 1408, "n_layer": 40, "n_head": 22, "ffn_dim": 6144, "patch_size": 16, "tubelet_size": 2, "img_size": 256, "n_frames": 64, "ln_eps": 1e-06, "act": "gelu_erf", "cls_token": false, "pos_type": "rope3d", "rope_theta": 10000.0, "tokens_per_frame": 256, "pred": { "kind": "ac", "embed_dim": 1024, "n_layer": 24, "n_head": 16, "head_dim": 64, "ffn_dim": 4096, "ln_eps": 1e-06, "action_dim": 7, "state_dim": 7, "out_dim": 1408, "grid_size": 16, "n_cond_tokens": 2, "cond_order": "action,state", "frame_causal": true, "use_extrinsics": false, "attn_mask_shape": [ 8256, 8256 ], "rope_dims_per_axis": [ 20, 20, 20 ], "rope_grid_size": 16, "rope_freq_layout": "tiled" } }, "preprocessing": { "description": "app/vjepa_droid/transforms.py::make_transforms(random_horizontal_flip=False, random_resize_scale=(1,1), random_resize_aspect_ratio=(1,1), crop_size=256): random_resized_crop degenerates to a centre crop of the largest square followed by torch F.interpolate(bilinear, align_corners=False, no antialias) to 256x256, then (x - 255*mean) / (255*std) on the CTHW float tensor. On the 256x256 Franka renders both the crop and the resize are the identity.", "resize": { "shortest_edge": 256, "resample": "bilinear", "antialias": false, "on_dtype": "float32", "reference_order": "centre-crop to the largest square, THEN resize to 256" }, "center_crop": 256, "rescale": 0.00392156862745098, "mean": [ 0.485, 0.456, 0.406 ], "std": [ 0.229, 0.224, 0.225 ] }, "world_model": { "encode": "one observation frame -> a 2-frame clip (the frame repeated along T, tubelet 2) -> 256 tokens after the encoder's final LayerNorm; then a NON-AFFINE LayerNorm over the feature dim (torch F.layer_norm default eps 1e-5). world_model_wrapper.py:42-52.", "predict": "predictor(context, actions, states) returns T*tpf rows; the world model keeps the LAST tpf (the next frame) and normalises them again before feeding them back. world_model_wrapper.py:56-64.", "state": "the pose of frame t; the pose after a step is compute_new_pose(pose, action) = (xyz + d_xyz, euler_xyz(R(d) @ R(pose)), clip(gripper + d_gripper, 0, 1)). mpc_utils.py:166-190.", "energy": "l1(a, b) = mean |a - b| over the flattened [tpf * D] final state and goal. mpc_utils.py:17-18 and the loss_fn of energy_landscape_example.ipynb.", "candidates": "4 fixed action sequences of 2 steps: the trajectory's ground-truth first action poses_to_diff(states[0], states[1]) and that action shifted by +0.05 along x, y and z, each repeated over the horizon." }, "outputs": { "frames_u8": "the uint8 observation frame, repeated to the 2-frame clip, THWC", "input": "NCTHW float32 (the 2-frame clip of one observation frame)", "last_hidden_state": "encoder(input)[0]: [256, 1408] tokens after the final LN, h-major then w", "context": "F.layer_norm(last_hidden_state) -- the predictor's input", "goal": "context of the LAST trajectory frame", "action/state": "[7] the action driving the step and the pose at the frame", "pred_next": "predictor(context, action, state)[-256:] -- the next frame's latents, un-normalised", "pred_seq": "predictor over T=2 frames, ALL T*tpf rows (row block t predicts frame t+1)", "rollout": "[K, H, 256, 1408] normalised latents per candidate per step", "rollout_energy": "[K] l1(rollout[:, -1], goal)", "actions/states_seq": "[K, H, 7] the candidate actions and the poses compute_new_pose produced", "next_state_ref": "[K, 7] compute_new_pose(state0, actions[:, 0]) -- the jepa_ac_next_state check" }, "timing_s": { "model_load": 8.863, "forward_total": 21.136, "forward_mean": 2.642, "wall_total": 21.193 }, "samples": [ { "name": "frame0", "media": "franka_example_traj.npz[0]", "timing_s": { "preprocess_s": 0.0, "forward_s": 0.7271 }, "tensors": { "frames_u8": { "file": "frame0.frames_u8.npy", "shape": [ 2, 256, 256, 3 ], "dtype": "uint8", "layout": "THWC uint8 (the observation frame, repeated to the 2-frame clip)" }, "input": { "file": "frame0.input.npy", "shape": [ 1, 3, 2, 256, 256 ], "dtype": "float32", "layout": "NCTHW (T=2, the frame repeated)" }, "last_hidden_state": { "file": "frame0.last_hidden_state.npy", "shape": [ 256, 1408 ], "dtype": "float32", "layout": "[256, D] h-major then w" }, "pooled_mean": { "file": "frame0.pooled_mean.npy", "shape": [ 1408 ], "dtype": "float32", "layout": "[D]" }, "context": { "file": "frame0.context.npy", "shape": [ 256, 1408 ], "dtype": "float32", "layout": "[256, D] after the non-affine LayerNorm" } }, "frame_index": 0, "frames": 2 }, { "name": "frame1", "media": "franka_example_traj.npz[1]", "timing_s": { "preprocess_s": 0.0, "forward_s": 0.6842 }, "tensors": { "frames_u8": { "file": "frame1.frames_u8.npy", "shape": [ 2, 256, 256, 3 ], "dtype": "uint8", "layout": "THWC uint8 (the observation frame, repeated to the 2-frame clip)" }, "input": { "file": "frame1.input.npy", "shape": [ 1, 3, 2, 256, 256 ], "dtype": "float32", "layout": "NCTHW (T=2, the frame repeated)" }, "last_hidden_state": { "file": "frame1.last_hidden_state.npy", "shape": [ 256, 1408 ], "dtype": "float32", "layout": "[256, D] h-major then w" }, "pooled_mean": { "file": "frame1.pooled_mean.npy", "shape": [ 1408 ], "dtype": "float32", "layout": "[D]" }, "context": { "file": "frame1.context.npy", "shape": [ 256, 1408 ], "dtype": "float32", "layout": "[256, D] after the non-affine LayerNorm" } }, "frame_index": 1, "frames": 2 }, { "name": "goalframe", "media": "franka_example_traj.npz[1]", "timing_s": { "preprocess_s": 0.0, "forward_s": 0.6708 }, "tensors": { "frames_u8": { "file": "goalframe.frames_u8.npy", "shape": [ 2, 256, 256, 3 ], "dtype": "uint8", "layout": "THWC uint8 (the observation frame, repeated to the 2-frame clip)" }, "input": { "file": "goalframe.input.npy", "shape": [ 1, 3, 2, 256, 256 ], "dtype": "float32", "layout": "NCTHW (T=2, the frame repeated)" }, "last_hidden_state": { "file": "goalframe.last_hidden_state.npy", "shape": [ 256, 1408 ], "dtype": "float32", "layout": "[256, D] h-major then w" }, "pooled_mean": { "file": "goalframe.pooled_mean.npy", "shape": [ 1408 ], "dtype": "float32", "layout": "[D]" }, "context": { "file": "goalframe.context.npy", "shape": [ 256, 1408 ], "dtype": "float32", "layout": "[256, D] after the non-affine LayerNorm" } }, "frame_index": 1, "frames": 2 }, { "name": "step1", "media": "franka_example_traj.npz[0]", "timing_s": { "preprocess_s": 0.0, "forward_s": 0.2757 }, "tensors": { "context": { "file": "step1.context.npy", "shape": [ 256, 1408 ], "dtype": "float32", "layout": "[256, D]" }, "action": { "file": "step1.action.npy", "shape": [ 7 ], "dtype": "float32", "layout": "[7]" }, "state": { "file": "step1.state.npy", "shape": [ 7 ], "dtype": "float32", "layout": "[7]" }, "pred_next": { "file": "step1.pred_next.npy", "shape": [ 256, 1408 ], "dtype": "float32", "layout": "[256, D] predictor output, T=1" } }, "frames": 1 }, { "name": "step2", "media": "franka_example_traj.npz[0]", "timing_s": { "preprocess_s": 0.0, "forward_s": 0.4742 }, "tensors": { "context_seq": { "file": "step2.context_seq.npy", "shape": [ 512, 1408 ], "dtype": "float32", "layout": "[2*256, D]" }, "action_seq": { "file": "step2.action_seq.npy", "shape": [ 2, 7 ], "dtype": "float32", "layout": "[2, 7]" }, "state_seq": { "file": "step2.state_seq.npy", "shape": [ 2, 7 ], "dtype": "float32", "layout": "[2, 7]" }, "pred_seq": { "file": "step2.pred_seq.npy", "shape": [ 512, 1408 ], "dtype": "float32", "layout": "[2*256, D] all rows; block t predicts frame t+1" } }, "frames": 2 }, { "name": "rollout", "media": "franka_example_traj.npz", "timing_s": { "preprocess_s": 0.0, "forward_s": 2.2028 }, "tensors": { "context": { "file": "rollout.context.npy", "shape": [ 256, 1408 ], "dtype": "float32", "layout": "[256, D] shared seed" }, "goal": { "file": "rollout.goal.npy", "shape": [ 256, 1408 ], "dtype": "float32", "layout": "[256, D]" }, "state0": { "file": "rollout.state0.npy", "shape": [ 7 ], "dtype": "float32", "layout": "[7]" }, "actions": { "file": "rollout.actions.npy", "shape": [ 4, 2, 7 ], "dtype": "float32", "layout": "[4, 2, 7]" }, "states_seq": { "file": "rollout.states_seq.npy", "shape": [ 4, 2, 7 ], "dtype": "float32", "layout": "[4, 2, 7]" }, "rollout": { "file": "rollout.rollout.npy", "shape": [ 4, 2, 256, 1408 ], "dtype": "float32", "layout": "[4, 2, 256, D]" }, "rollout_energy": { "file": "rollout.rollout_energy.npy", "shape": [ 4 ], "dtype": "float32", "layout": "[4]" }, "next_state_ref": { "file": "rollout.next_state_ref.npy", "shape": [ 4, 7 ], "dtype": "float32", "layout": "[4, 7]" } }, "candidates": 4, "horizon": 2 }, { "name": "rollout_seed2", "media": "franka_example_traj.npz", "timing_s": { "preprocess_s": 0.0, "forward_s": 3.5616 }, "tensors": { "context": { "file": "rollout_seed2.context.npy", "shape": [ 512, 1408 ], "dtype": "float32", "layout": "[2*256, D] two OBSERVED frames" }, "goal": { "file": "rollout_seed2.goal.npy", "shape": [ 256, 1408 ], "dtype": "float32", "layout": "[256, D]" }, "seed_actions": { "file": "rollout_seed2.seed_actions.npy", "shape": [ 1, 7 ], "dtype": "float32", "layout": "[n_seed-1, 7] the action between the observed frames" }, "seed_states": { "file": "rollout_seed2.seed_states.npy", "shape": [ 2, 7 ], "dtype": "float32", "layout": "[2, 7]" }, "actions": { "file": "rollout_seed2.actions.npy", "shape": [ 4, 2, 7 ], "dtype": "float32", "layout": "[4, 2, 7]" }, "states_seq": { "file": "rollout_seed2.states_seq.npy", "shape": [ 4, 2, 7 ], "dtype": "float32", "layout": "[4, 2, 7]" }, "rollout": { "file": "rollout_seed2.rollout.npy", "shape": [ 4, 2, 256, 1408 ], "dtype": "float32", "layout": "[4, 2, 256, D]" }, "rollout_energy": { "file": "rollout_seed2.rollout_energy.npy", "shape": [ 4 ], "dtype": "float32", "layout": "[4]" } }, "candidates": 4, "horizon": 2, "n_seed": 2 }, { "name": "cem", "media": "franka_example_traj.npz", "timing_s": { "preprocess_s": 0.0, "forward_s": 12.5391 }, "tensors": { "context": { "file": "cem.context.npy", "shape": [ 256, 1408 ], "dtype": "float32", "layout": "[256, D]" }, "goal": { "file": "cem.goal.npy", "shape": [ 256, 1408 ], "dtype": "float32", "layout": "[256, D]" }, "state0": { "file": "cem.state0.npy", "shape": [ 7 ], "dtype": "float32", "layout": "[7]" }, "cem_noise": { "file": "cem.cem_noise.npy", "shape": [ 3, 2, 8, 4 ], "dtype": "float32", "layout": "[3, 2, 8, 4] every torch.randn draw, in Meta's order" }, "cem_action": { "file": "cem.cem_action.npy", "shape": [ 2, 7 ], "dtype": "float32", "layout": "[2, 7] the plan cem() returned" } }, "cem": { "samples": 8, "topk": 4, "cem_steps": 3, "rollout": 2, "maxnorm": 0.05, "momentum_mean": 0.15, "momentum_std": 0.75, "momentum_mean_gripper": 0.15, "momentum_std_gripper": 0.15 } } ] }