Upload README.md with huggingface_hub
Browse files
README.md
CHANGED
|
@@ -6,7 +6,6 @@ tags:
|
|
| 6 |
- robotics
|
| 7 |
- droid
|
| 8 |
- action-conditioned
|
| 9 |
-
- from-scratch
|
| 10 |
---
|
| 11 |
|
| 12 |
# CAC β from-scratch V-JEPA 2-AC predictor
|
|
@@ -21,50 +20,50 @@ frozen V-JEPA 2 ViT-g encoder is not included β use Meta's `vjepa2_ac_vit_gian
|
|
| 21 |
Meta's exact `src.models.ac_predictor.vit_ac_predictor` (from
|
| 22 |
[facebookresearch/vjepa2](https://github.com/facebookresearch/vjepa2)): 24
|
| 23 |
layers, 1024 dim, 16 heads, ~305M params, RoPE, frame-causal block attention,
|
| 24 |
-
action + state token conditioning (7-dim each). Identical to the shipped
|
| 25 |
-
V-JEPA 2-AC predictor.
|
| 26 |
|
| 27 |
-
## Training
|
| 28 |
|
| 29 |
-
-
|
| 30 |
-
|
| 31 |
-
-
|
| 32 |
-
|
| 33 |
-
|
| 34 |
-
-
|
| 35 |
-
|
|
|
|
| 36 |
|
| 37 |
## Evaluation (240 held-out DROID episodes, frozen ViT-g)
|
| 38 |
|
| 39 |
-
- Mean prediction cosine: **0.
|
| 40 |
-
-
|
| 41 |
-
|
| 42 |
-
|
| 43 |
-
|
| 44 |
|
| 45 |
## File
|
| 46 |
|
| 47 |
-
`cac_fp32.
|
| 48 |
-
|
|
|
|
| 49 |
|
| 50 |
## Load
|
| 51 |
|
| 52 |
```python
|
| 53 |
import torch
|
| 54 |
from huggingface_hub import hf_hub_download
|
|
|
|
| 55 |
from src.models.ac_predictor import vit_ac_predictor
|
| 56 |
|
| 57 |
predictor = vit_ac_predictor(img_size=(256, 256), patch_size=16, num_frames=64,
|
| 58 |
tubelet_size=2, embed_dim=1408)
|
| 59 |
-
sd =
|
| 60 |
-
map_location="cpu")["predictor"]
|
| 61 |
predictor.load_state_dict(sd, strict=True)
|
| 62 |
```
|
| 63 |
|
| 64 |
## Caveats
|
| 65 |
|
| 66 |
- Train/eval split is index-based on DROID's deterministic institution ordering
|
| 67 |
-
(first 240
|
| 68 |
-
|
| 69 |
-
|
| 70 |
-
independent reproduction, not affiliated with Meta.
|
|
|
|
| 6 |
- robotics
|
| 7 |
- droid
|
| 8 |
- action-conditioned
|
|
|
|
| 9 |
---
|
| 10 |
|
| 11 |
# CAC β from-scratch V-JEPA 2-AC predictor
|
|
|
|
| 20 |
Meta's exact `src.models.ac_predictor.vit_ac_predictor` (from
|
| 21 |
[facebookresearch/vjepa2](https://github.com/facebookresearch/vjepa2)): 24
|
| 22 |
layers, 1024 dim, 16 heads, ~305M params, RoPE, frame-causal block attention,
|
| 23 |
+
action + state token conditioning (7-dim each). Identical to the shipped AC.
|
|
|
|
| 24 |
|
| 25 |
+
## Training (this snapshot)
|
| 26 |
|
| 27 |
+
- **2,750 iterations** (toward Meta's 94,500-iter recipe; stopped early to
|
| 28 |
+
benchmark once held-out val plateaued), effective batch 256, LR 7.5e-5 β
|
| 29 |
+
4.25e-4 β 0 (WSD), AdamW wd 0.04, bf16, `torch.compile`.
|
| 30 |
+
- Loss: L1 teacher-forcing + 2-step autoregressive rollout (faithful port of
|
| 31 |
+
Meta's `app/vjepa_droid/train.py`).
|
| 32 |
+
- Data: ~51,000 DROID left-cam episodes (~58 h footage β essentially the full
|
| 33 |
+
DROID 1.0.1 raw corpus), 8 frames @ 4 fps, 256 px; first 240 held out for eval.
|
| 34 |
+
- Hardware: 1Γ H100 80GB (GCP spot), ~9 h.
|
| 35 |
|
| 36 |
## Evaluation (240 held-out DROID episodes, frozen ViT-g)
|
| 37 |
|
| 38 |
+
- Mean prediction cosine: **0.782** vs Meta V-JEPA 2-AC β 0.766 on the same set.
|
| 39 |
+
- Held-out val cosine plateaued ~0.818 during training (encoder-dominated metric,
|
| 40 |
+
converges fast). Prediction cosine is a lenient metric; open-loop planning
|
| 41 |
+
quality is the real test β see the planning benchmark in the source repo's
|
| 42 |
+
`EXPERIMENT.md`.
|
| 43 |
|
| 44 |
## File
|
| 45 |
|
| 46 |
+
`cac_fp32.safetensors` β predictor state_dict, fp32, 305M params, 300 tensors.
|
| 47 |
+
Safetensors metadata: `iter`, `architecture`. Loads `strict=True` into
|
| 48 |
+
`vit_ac_predictor(...)`.
|
| 49 |
|
| 50 |
## Load
|
| 51 |
|
| 52 |
```python
|
| 53 |
import torch
|
| 54 |
from huggingface_hub import hf_hub_download
|
| 55 |
+
from safetensors.torch import load_file
|
| 56 |
from src.models.ac_predictor import vit_ac_predictor
|
| 57 |
|
| 58 |
predictor = vit_ac_predictor(img_size=(256, 256), patch_size=16, num_frames=64,
|
| 59 |
tubelet_size=2, embed_dim=1408)
|
| 60 |
+
sd = load_file(hf_hub_download("dobri420/vjepa2-cac", "cac_fp32.safetensors"))
|
|
|
|
| 61 |
predictor.load_state_dict(sd, strict=True)
|
| 62 |
```
|
| 63 |
|
| 64 |
## Caveats
|
| 65 |
|
| 66 |
- Train/eval split is index-based on DROID's deterministic institution ordering
|
| 67 |
+
(first 240 held out), so the eval set is institution-concentrated, not random.
|
| 68 |
+
- Trained on public DROID data using Meta's published recipe; independent
|
| 69 |
+
reproduction, not affiliated with Meta.
|
|
|