Skip to content

Commit 752ad98

Browse files
committed
[Feature] Add OpenVLA-OFT L1 reference wrapper and SimpleVLA parity tooling
OpenVLAOFTL1Wrapper serves the official continuous L1-head OpenVLA-OFT checkpoints (released action head + proprio projector, wrist image, 8-D proprio) for deterministic reference and evaluation rollouts; token GRPO training semantics are unchanged and the PPO loss still requires token log-probabilities. compare_simplevla_rollouts.py rolls the same (task, init-state) trajectories through the TorchRL stack and the SimpleVLA-RL/VeRL reference and writes a JSON parity report of per-trajectory token/action/success agreement. The mode-selection plumbing (policy.mode=l1) ships in the commit below; on its own that mode fails with an ImportError until this commit is applied. ghstack-source-id: 204a5e0 Pull-Request: #3942
1 parent c10b1f1 commit 752ad98

4 files changed

Lines changed: 1355 additions & 3 deletions

File tree

sota-implementations/vla_grpo/README.md

Lines changed: 29 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -43,7 +43,10 @@ benchmarks.
4343

4444
## The pieces in this directory
4545

46-
The directory contains two versions of the same idea.
46+
The directory contains two versions of the same idea, plus
47+
`compare_simplevla_rollouts.py`, a standalone script that rolls the same
48+
checkpoint through both the TorchRL stack and the SimpleVLA-RL/VeRL reference
49+
rollout and writes a JSON parity report.
4750

4851
### Toy scale: learn the algorithm without a robot simulator
4952

@@ -180,6 +183,27 @@ policy = OpenVLAOFTWrapper.from_pretrained(
180183
tokenizer = policy.action_tokenizer # decode tokens -> env actions
181184
```
182185

186+
The wrapper also has an explicit `policy.mode=l1` path for the official
187+
continuous OpenVLA-OFT reference checkpoints. That mode loads the released
188+
`action_head--150000_checkpoint.pt` and
189+
`proprio_projector--150000_checkpoint.pt` components, uses two images
190+
(`agentview` plus wrist) and the 8-D OpenVLA proprio vector, and writes a
191+
continuous `("vla_action", "chunk")`. It is meant to validate the environment,
192+
image preprocessing, proprio normalization, and evaluator/collector path
193+
against the supervised reference policy:
194+
195+
```text
196+
policy.mode=l1
197+
policy.checkpoint=moojink/openvla-7b-oft-finetuned-libero-spatial
198+
policy.use_wrist_image=true
199+
policy.use_proprio=true
200+
policy.num_images_in_input=2
201+
policy.lora_rank=0
202+
```
203+
204+
The PPO update still expects token log-probabilities, so this mode is for
205+
reference/evaluation probes until a continuous-action GRPO loss is added.
206+
183207
Before spending RL compute on a checkpoint, validate the loading path by
184208
evaluating the SFT checkpoint greedily on its LIBERO suite through
185209
`torchrl.envs.LiberoEnv` (`init_state_mode="cycle"`, 50 trials/task) and compare
@@ -328,7 +352,10 @@ path before the gripper transform is applied once in the environment. Use
328352
`env.train_init_state_mode=fixed env.train_init_state_id=<id>` for a fixed
329353
LIBERO initial state. `collector.policy_micro_batch_size` only slices actual
330354
model calls inside the inference-server policy; it does not change PPO
331-
minibatching.
355+
minibatching. `compare_simplevla_rollouts.py` automates the parity check: it
356+
evaluates the same `(task_id, init-state id)` trajectories through the TorchRL
357+
stack and the SimpleVLA-RL/VeRL reference rollout side by side and reports
358+
per-trajectory token/action/success agreement.
332359

333360
## Hardware notes
334361

0 commit comments

Comments
 (0)