Potestates commited on
Commit
cbcf6c7
Β·
verified Β·
1 Parent(s): 5b37c04

READMEs: step 5500 numbers, fwd step 1500 row

Browse files
Files changed (2) hide show
  1. README.md +38 -132
  2. piper_multi_anchored_step5500/README.md +2 -1
README.md CHANGED
@@ -1,142 +1,48 @@
1
- ---
2
- pipeline_tag: robotics
3
- tags:
4
- - openvla
5
- - vision-language-action
6
- - robotics
7
- - libero
8
- ---
9
 
10
- # TERRA β€” post-trained policies (real robot + LIBERO)
 
 
 
11
 
12
- OpenVLA-7B with TERRA latent-action phase 2 (`latp2_inv` labels), post-trained with a flow-matching action head and
13
- 4 query tokens. **One directory per policy**, each self-contained: merged weights (`model-*.safetensors`), the
14
- action/latent head (`action_decoder.pt` β€” **required**, it is not inside the merged VLA weights),
15
- `dataset_statistics.json` (action un-normalisation), `ctrl_meta.json`, processor/tokenizer, and its own `README.md`
16
- with the measured numbers and the exact deployment loop.
17
-
18
- **Code:** https://github.com/DingTianxingjian/Latent_Free β€” branch `newton`, public, no token needed.
19
 
20
  ```bash
21
  git clone -b newton https://github.com/DingTianxingjian/Latent_Free.git latent_free && cd latent_free
22
  huggingface-cli download Potestates/TERRA --include "<dir>/*" --local-dir .
23
  ```
24
 
25
- ---
26
-
27
- ## Which one do I test?
28
-
29
- | I want to… | use | why |
30
- |---|---|---|
31
- | **press a coloured button** | **`press_button_terra_delta`** | the only policy **confirmed working on hardware** β€” it presses the requested button |
32
- | **pick the can, place on plate** | **`piper_pick_can_openvla_delta`** | **3x better open loop** than the arm currently on the robot (1.05 vs 3.24 deg); simplest of the equals |
33
- | the same, with our full method | `piper_pick_can_terra_delta` | statistically **indistinguishable** from the row above (1.13 vs 1.05, CI contains 0) β€” either is fine |
34
- | **one model for both tasks** | `piper_multi_anchored_step5500` | **experimental**, and a retrain will supersede it β€” see its README |
35
- | post-train a new task | `p2fft_20k` | the **base**, not a policy |
36
-
37
- > ### ⚠ Two things that will break a deployment if you skip them
38
- > 1. **Action space differs per directory.** `piper_pick_can_10k` emits **absolute** joint targets; everything with
39
- > `delta` in the name emits **target minus measured joint angle** and must be sent as `q + a[:6]` with `q` re-read
40
- > **every tick**; the `anchored` ones use `q` read **once per chunk** and a different call. Every `ctrl_meta.json`
41
- > now records `"action_space"` explicitly and `PiperPolicy` prints it on load β€” **check the printed line.**
42
- > 2. **Execute 1 chunk entry, then re-predict** (all per-step `delta` policies). The demos were teleoperated as a
43
- > continuous 30 Hz command, so later chunk entries are mis-anchored for an arm that settles: drift is
44
- > **0.855 deg/step on pick-can** and **~2 deg/step on press_button**, and it is opposite-signed on the two joints
45
- > that carry the motion, so it **bends the direction** instead of just scaling it. This was seen on the robot:
46
- > chunk 1 presses the button, chunk 2 "the direction is a bit off". Use an `anchored` checkpoint if you need
47
- > multi-step chunks.
48
-
49
- ---
50
 
51
- ## Real-robot policies β€” AgileX Piper
52
-
53
- Open-loop error = mean |error| per joint in **degrees** on held-out episodes never trained on, chunk sampled from
54
- noise through the deployment image path. Reproduce any row with
55
- `envs/univla_vla/bin/python -m acdc_la.realrobot.piper_policy --checkpoint <dir> --replay <rlds root>` β€” it is
56
- deterministic, and reproducing it is the check that your preprocessing matches ours.
57
-
58
- ### `press_button` β€” "press the {blue, orange, pink, red} button", 100 episodes, layout reshuffled per episode
59
-
60
- | dir | base | action | `chunk[0]` | reads the instruction? | on the robot |
61
  |---|---|---|---|---|---|
62
- | **`press_button_terra_delta`** | our phase 2 | delta | **0.918** | **yes** β€” output moves 0.42 deg on a colour swap; true word wins 4/5 episodes | βœ… **presses the button** (chunk 1; slightly off centre) |
63
- | `press_button_openvla_delta` | stock openvla-7b | delta | 1.920 | **no** β€” output moves **2.4e-7 deg**; true word wins 1/5 = chance | ❌ not for deployment |
64
- | *null: "stay where you are"* | | | *1.691* | | |
65
-
66
- The control is *worse than not moving*, and its invariance to language is **exact, not approximate**: its instruction
67
- signal is 0.28% of the query-token state, which is below bfloat16 machine epsilon (7.8e-3), so it cannot survive its
68
- own forward pass. With 4 colours and per-episode layouts a policy that cannot read the colour can only learn an
69
- average press β€” which is what its j1/j2 error looks like. Caveats: **5 held-out episodes, 3 of 4 colours, one seed
70
- per arm, offline**; and the pair changes *both* the base and the latent branch, so the effect cannot be attributed to
71
- the latent branch alone.
72
-
73
- ### `piper_pick_can` β€” "pick up the can and place it on the plate", 150 episodes, **one** instruction throughout
74
-
75
- | dir | base | action | `chunk[0]` | ensembled | note |
76
- |---|---|---|---|---|---|
77
- | **`piper_pick_can_openvla_delta`** | stock openvla-7b | delta | **1.054** | 0.914 | the matched control β€” and here a perfectly good policy |
78
- | **`piper_pick_can_terra_delta`** | our phase 2 | delta | **1.126** | 0.950 | ours; **not separated** from the row above |
79
- | `piper_pick_can_10k` | our phase 2 | **absolute** | 3.24 | 3.69 | the arm tested on the robot first; **superseded** by the two above |
80
- | *null: "stay where you are"* | | | *1.20* | | |
81
- | *null: repeat the last command* | | | *2.06* | | |
82
- | *between-demonstration floor* | | | *0.61* | | **nothing can beat this** |
83
-
84
- **Delta vs absolute is the real win here: 3.24 β†’ ~1.05 deg, 3x**, and it moves the policy from 2.7x *worse* than
85
- doing nothing to better than it. **TERRA vs control is not a win for either side**: paired cluster bootstrap over the
86
- 8 held-out episodes (the independent unit β€” 353 steps is not the sample size) gives a difference of +0.072 deg,
87
- 95% CI **[-0.038, +0.189]**, sign test p = 0.727.
88
-
89
- A null here is what the mechanism's own story predicts: **all 150 episodes carry the identical instruction**, so
90
- there is nothing for a language-grounding advantage to do. The same pair separates 2.1x on `press_button`.
91
-
92
- ### `piper_multi_anchored_step2500`, `piper_multi_anchored_step5500` β€” ⚠ experimental
93
-
94
- One model for **both** tasks (press_button x2 + pick-can mixture), using **chunk-ANCHORED** deltas
95
- (`target[s+k] - q[s]`, `q` read once per chunk) so that executing several entries open loop is valid. Better than the
96
- per-step parameterisation from k>=2, slightly worse at k=0. Trained with the old backward sample window (magnitudes
97
- under-predicted ~0.8x); **a forward-window retrain is in progress and will supersede these.** Different deployment
98
- call (`chunk_targets`, no ensembling) β€” read their README.
99
-
100
- ---
101
-
102
- ## LIBERO policies
103
-
104
- | dir | suite | demos | success, standard 500-episode eval |
105
- |---|---|---|---|
106
- | `libero_10_full` | `libero_10_no_noops` | full | **89.0** |
107
- | `libero_goal_full` | `libero_goal_no_noops` | full | **94.4** |
108
-
109
- ```bash
110
- python -m acdc_la.downstream.vla.run_libero_eval_cont --pretrained_checkpoint <dir>
111
- ```
112
-
113
- ---
114
-
115
- ## `p2fft_20k` β€” the phase-2 base (not a deployable policy)
116
-
117
- The **base** every TERRA policy above is post-trained from: OpenVLA-7B fully fine-tuned for 20,000 steps on OXE to
118
- predict our continuous latent action (`latp2_inv`). `vla_full.pt` (15,081,838,026 B) is the VLA state dict, and
119
- **`action_decoder.pt` (105,268,830 B) is required too** β€” `finetune_libero_ctrl.py:273` initialises the post-training
120
- heads from it, so a run without it starts from a random head and will not reproduce these policies.
121
-
122
- ```bash
123
- huggingface-cli download Potestates/TERRA --include "p2fft_20k/*" --local-dir .
124
- INIT=./p2fft_20k ... bash acdc_la/scripts/run_vla_post2_portable.sh
125
- ```
126
-
127
- The matched control is `INIT=none LATENT=none`, which post-trains the official `openvla/openvla-7b` with everything
128
- else identical β€” that is how "what did phase 2 buy" is measured, and it is what the two `*_openvla_delta`
129
- directories are.
130
-
131
- ---
132
-
133
- ## One metric trap, worth repeating
134
-
135
- `action_l1_1step` in every `train_log.jsonl` is **oracle-conditioned**: `FlowHeads.loss` scores a one-step
136
- correction from a point that already contains the ground truth. On the pick-can pair it ranks the two arms
137
- **backwards** (TERRA 0.0563 vs control 0.0648, i.e. TERRA "13% better", while both free-running read-outs favour the
138
- control). Use it to track a single run or pick a checkpoint within one run β€” **never to compare two arms.** Rank with
139
- `--replay`.
140
-
141
- `HANDOFF_press_button.md` at the root of this repo is the brief for training the next real-robot task on a fresh
142
- host. The full experiment ledger, including everything retracted or superseded, is `LEDGER.md` in the code repo.
 
1
+ # TERRA β€” model checkpoints
 
 
 
 
 
 
 
2
 
3
+ OpenVLA-7B + TERRA latent-action phase 2 (`latp2_inv` labels), post-trained with a flow-matching action head and
4
+ 4 query tokens. **One directory = one model**, each with its own README (what it is, how to deploy it, what has been
5
+ measured). Every deployable directory holds merged weights (`model-*.safetensors`), the action head
6
+ (`action_decoder.pt`, required), `dataset_statistics.json` (un-normalisation), `ctrl_meta.json` and the processor.
7
 
8
+ **Code:** https://github.com/DingTianxingjian/Latent_Free β€” branch `newton` (deployment wrapper: `acdc_la/realrobot/piper_policy.py`).
 
 
 
 
 
 
9
 
10
  ```bash
11
  git clone -b newton https://github.com/DingTianxingjian/Latent_Free.git latent_free && cd latent_free
12
  huggingface-cli download Potestates/TERRA --include "<dir>/*" --local-dir .
13
  ```
14
 
15
+ ## Which model? (εΏ«ι€Ÿι€‰ζ‹©)
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
16
 
17
+ | dir | role | task | action (dims 0-5) | how to run it on the Piper | status |
 
 
 
 
 
 
 
 
 
18
  |---|---|---|---|---|---|
19
+ | `press_button_terra_delta` | **policy** | press the {blue, orange, pink, red} button | per-step **delta** `target βˆ’ q` | `to_joint_targets(a, q)`, re-read `q` EVERY tick, **chunk = 1** | **pressed the button on the robot** (chunk=1; slightly off-centre). chunk β‰₯ 2 bends the direction β€” don't |
20
+ | `press_button_anchored_fwd_step1500` | **policy, newest fix** | press the {blue, orange, pink, red} button | **chunk-anchored delta**, fixed training window | read `q` ONCE per chunk, `chunk_targets(chunk, q)`, N = 1 / 2 / 4 | early snapshot (1500/3000) of the window-fixed run; best offline at N = 4 (2.28 deg); not yet on the robot |
21
+ | `piper_multi_anchored_step5500` | **policy, one model for both tasks** | press button (4 colours) + pick up the can and place it on the plate | **chunk-anchored delta** `target[s+k] βˆ’ q[s]` | read `q` ONCE per chunk, `chunk_targets(chunk, q)`, execute N = 1 / 2 / 4 | experimental, latest snapshot (step 5500); not yet run on the robot |
22
+ | `piper_multi_anchored_step2500` | same run, earlier snapshot | same | same | same | superseded by step 5500; kept for comparison |
23
+ | `piper_pick_can_10k` | policy | `pick up the can and place it on the plate` | **absolute** joint target | send `chunk[k]` directly | offline only (3.24 deg) |
24
+ | `press_button_openvla_delta` | **control (baseline)** | press_button | per-step delta | as `press_button_terra_delta` | official OpenVLA-7B, same recipe: 1.92 vs 0.92 deg, **ignores the colour word** β€” for the comparison, not for use |
25
+ | `libero_10_full` | policy (sim) | LIBERO-10 | LIBERO EEF delta | `run_libero_eval_cont` | 89.0 % (500 episodes) |
26
+ | `libero_goal_full` | policy (sim) | LIBERO-Goal | LIBERO EEF delta | `run_libero_eval_cont` | 94.4 % (500 episodes) |
27
+ | `p2fft_20k` | **pretrained base**, not a policy | β€” | β€” | `INIT=./p2fft_20k` for post-training | phase 2, 20k steps on OXE |
28
+
29
+ ### The three action spaces on the Piper β€” getting this wrong drives the arm somewhere else
30
+
31
+ `ctrl_meta.json β†’ action_space` says which one a directory uses, and `PiperPolicy` reads it.
32
+
33
+ * **absolute** (no `action_space` key): `chunk[k]` IS the joint target.
34
+ * **delta** (`"delta"`): `chunk[k]` = target βˆ’ measured joints *at step k*. Send `q_now + chunk[k]`, `q` re-read every
35
+ tick. Use **chunk = 1**: the demos were teleoperated at 30 Hz with a continuous command, so the demonstrated arm
36
+ runs ~0.86–2 deg/step *ahead* of where an arm that settles at each 10 Hz command would be; with chunk = N that lead
37
+ adds up linearly and with OPPOSITE signs on j1/j2 (βˆ’0.74 / +0.75 deg per step on pick-can) β€” the direction bends.
38
+ * **delta_anchored** (`"delta_anchored"`): `chunk[k]` = target[s+k] βˆ’ joints read ONCE at the chunk's start. Send
39
+ `q_s + chunk[k]`; the targets do not depend on how the arm tracks inside the chunk, so the tracking drift above
40
+ does not exist β€” what remains is the model's own error, which grows with k (see the directory's README).
41
+
42
+ The method ledger is `LEDGER.md` in the code repo. `HANDOFF_press_button.md` at the root of this repo is the brief
43
+ for training a new real-robot task.
44
+
45
+ ## `p2fft_20k` β€” the phase-2 pretrained base
46
+
47
+ See `p2fft_20k/README.md`. Post-training from it: `INIT=./p2fft_20k ... bash acdc_la/scripts/run_vla_post2_portable.sh`;
48
+ the matched control is `INIT=none` (official `openvla/openvla-7b`, everything else identical).
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
piper_multi_anchored_step5500/README.md CHANGED
@@ -38,9 +38,10 @@ Held-out press_button (5 episodes), open-loop target error by chunk position k (
38
 
39
  | k | 0 | 1 | 2 | 3 | 7 | 11 |
40
  |---|---|---|---|---|---|---|
 
41
  | step 2500 (anchored, exact) | 1.12 | 2.43 | 3.74 | 4.87 | 10.04 | 15.91 |
42
  | `press_button_terra_delta`, ideal tracking | 0.87 | 2.45 | 4.33 | 6.36 | 14.39 | 22.43 |
43
 
44
- Better from k>=2, worse at k=0. Trained with the old BACKWARD sample window (input frame misaligned with the action
45
  chunk at episode starts, magnitudes under-predicted ~0.8x); a forward-window retrain is in progress and will
46
  supersede this. Its value is a robot check: anchored targets do not depend on how the arm tracks within a chunk.
 
38
 
39
  | k | 0 | 1 | 2 | 3 | 7 | 11 |
40
  |---|---|---|---|---|---|---|
41
+ | **step 5500 (this, anchored, exact)** | 0.89 | 1.98 | 3.22 | 4.50 | 9.21 | 13.43 |
42
  | step 2500 (anchored, exact) | 1.12 | 2.43 | 3.74 | 4.87 | 10.04 | 15.91 |
43
  | `press_button_terra_delta`, ideal tracking | 0.87 | 2.45 | 4.33 | 6.36 | 14.39 | 22.43 |
44
 
45
+ Step 5500: on par at k=0 (0.89 vs 0.87), better from k=1. Executing 2 / 4 steps: 1.44 / 2.65 deg vs 1.66 / 3.50 for the per-step model. Trained with the old BACKWARD sample window (input frame misaligned with the action
46
  chunk at episode starts, magnitudes under-predicted ~0.8x); a forward-window retrain is in progress and will
47
  supersede this. Its value is a robot check: anchored targets do not depend on how the arm tracks within a chunk.