dobri420 commited on
Commit
47e3a8d
Β·
verified Β·
1 Parent(s): b57e977

Upload README.md with huggingface_hub

Browse files
Files changed (1) hide show
  1. README.md +23 -24
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
- - 250 iterations, effective batch 256 (micro-batch 64 Γ— 4 grad-accum)
30
- - LR 7.5e-5 β†’ 4.25e-4 β†’ 0 (WSD; 5% warmup, 25% anneal), AdamW wd 0.04, bf16
31
- - Loss: L1 teacher-forcing + 2-step autoregressive rollout (a faithful
32
- reproduction of Meta's `app/vjepa_droid/train.py` loss)
33
- - Data: ~2,080 DROID left-cam episodes (~2.6 h footage), 8 frames @ 4 fps, 256 px
34
- - Hardware: 1Γ— H100 80GB, ~56 minutes
35
- - Final loss: 1.022 β†’ 0.361 (teacher-forced L1)
 
36
 
37
  ## Evaluation (240 held-out DROID episodes, frozen ViT-g)
38
 
39
- - Mean prediction cosine: **0.740** (vs Meta V-JEPA 2-AC β‰ˆ 0.766 on the same set)
40
- - Open-loop L1 does not yet beat the frozen-scene baseline β€” expected for a run
41
- on ~4% of Meta's data for ~0.3% of its iterations. The frozen encoder carries
42
- most of the prediction quality; this predictor is deliberately undertrained
43
- (a pipeline-prover / reproducibility artifact, not a competitive model).
44
 
45
  ## File
46
 
47
- `cac_fp32.pt` β€” `{"predictor": state_dict (fp32, 305M params), "iter": 250,
48
- "train_args": {...}}`. Loads `strict=True` into `vit_ac_predictor(...)`.
 
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 = torch.load(hf_hub_download("dobri420/vjepa2-cac", "cac_fp32.pt"),
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 episodes held out), so the eval set is institution-concentrated
68
- rather than a random sample.
69
- - Trained on public DROID data using Meta's published recipe; this is an
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.