shantanu-tr commited on
Commit
e6325a3
·
verified ·
1 Parent(s): 9012d49

Add pi05 block-transfer (lerobot, LoRA, relative actions) step-40000 + Run Record README

Browse files
README.md ADDED
@@ -0,0 +1,167 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ ---
2
+ library_name: lerobot
3
+ pipeline_tag: robotics
4
+ license: apache-2.0
5
+ base_model: lerobot/pi05_base
6
+ tags:
7
+ - lerobot
8
+ - pi05
9
+ - robotics
10
+ - lora
11
+ - relative-actions
12
+ - bimanual
13
+ - widowxai
14
+ - model:pi05
15
+ - task:block-transfer
16
+ - framework:lerobot-latest
17
+ - robot:stationary
18
+ # - env:local-5090 # TODO: set local-5090 | cloud-runpod
19
+ # - study:RLE-NN # TODO: set the RLE Study Epic number
20
+ ---
21
+
22
+ # pi05-block-transfer-lerobot
23
+
24
+ π₀.₅ fine-tune for bimanual red-cube handover / block transfer on the Trossen AI
25
+ **stationary** (WidowX AI) platform. Trained with **lerobot** (LoRA, **relative actions**).
26
+ This Run Record documents the **step-40000** checkpoint.
27
+
28
+ > **Framework: lerobot-latest.** This is the **lerobot**-trained variant — distinct from the
29
+ > openpi `pi05_trossen_transfer_block` fine-tune. RLE tracks framework as a first-class axis
30
+ > (`framework:lerobot-latest` tag), so this is intentionally not conflated with the openpi model.
31
+ > Method (LoRA + relative actions) lives in the tags and the sections below, not the repo name.
32
+
33
+ > RLE Run Record. The Jira Run ticket is the project-management view; **this README is the
34
+ > artifact-of-record**. Naming follows the RLE convention `<model>-<task>-<run-tag>`
35
+ > (`pi05` · `block-transfer` · `lerobot`).
36
+
37
+ ## TL;DR
38
+
39
+ - **Policy:** π₀.₅ — PaliGemma `gemma_2b` VLM + `gemma_300m` action expert (flow matching).
40
+ - **Framework:** lerobot-latest (`--policy.type=pi05`).
41
+ - **Method:** LoRA (r=32, α=32) on attention + MLP projections of both the VLM language
42
+ model and the action expert; base = [`lerobot/pi05_base`](https://huggingface.co/lerobot/pi05_base).
43
+ - **Action space:** **relative/delta** on the 12 arm joints, **absolute** on the 2 grippers.
44
+ - **Robot:** Trossen AI stationary bimanual, 14-DoF, 4 cameras, 30 fps.
45
+ - **Checkpoint:** step 40000.
46
+
47
+ ## How it differs from the openpi fine-tune
48
+
49
+ | Repo | Framework | Action space | Method |
50
+ |---|---|---|---|
51
+ | **pi05-block-transfer-lerobot** (this) | lerobot-latest | **relative** (arms) | **LoRA** |
52
+ | openpi `pi05_trossen_transfer_block` | openpi | absolute | LoRA |
53
+
54
+ ## How it was trained (relative actions)
55
+
56
+ Relative actions are implemented as processor steps baked into the saved pipeline (not a
57
+ model flag), so evaluation handles them automatically:
58
+
59
+ - **Preprocessing** — `delta_actions_processor` (`enabled: true`): `action -= state`.
60
+ - **Postprocessing** — `absolute_actions_processor` (`enabled: true`): `action += state`.
61
+ - `exclude_joints: [left_carriage_joint, right_carriage_joint]` → the two **grippers stay
62
+ absolute**; the 12 arm joints are relative.
63
+
64
+ The server/loader re-wires the paired steps on load (`_reconnect_relative_absolute_steps`),
65
+ so no special flag is needed at inference.
66
+
67
+ ## Model configuration (`config.json`)
68
+
69
+ | Field | Value |
70
+ |---|---|
71
+ | type | `pi05` |
72
+ | paligemma_variant / action_expert_variant | `gemma_2b` / `gemma_300m` |
73
+ | dtype | `bfloat16` |
74
+ | input_features | `observation.state` (14); images `cam_high`, `cam_low`, `cam_left_wrist`, `cam_right_wrist` (3×480×640) |
75
+ | output_features | `action` (14) |
76
+ | chunk_size / n_action_steps | 50 / 50 |
77
+ | num_inference_steps | 10 |
78
+ | n_obs_steps | 1 |
79
+ | max_state_dim / max_action_dim | 32 / 32 |
80
+ | image_resolution | 224 × 224 |
81
+ | tokenizer_max_length | 200 |
82
+ | normalization | STATE=QUANTILES, ACTION=QUANTILES, VISUAL=IDENTITY |
83
+ | flow time-sampling | beta(α=1.5, β=1.0), scale=0.999, offset=0.001 |
84
+ | period (min/max) | 0.004 / 4.0 |
85
+
86
+ ## Training hyperparameters
87
+
88
+ | Field | Value |
89
+ |---|---|
90
+ | optimizer | AdamW |
91
+ | learning rate | 2.5e-5 |
92
+ | betas | (0.9, 0.95) |
93
+ | eps | 1e-8 |
94
+ | weight_decay | 0.01 |
95
+ | grad_clip_norm | 1.0 |
96
+ | scheduler | cosine — warmup 1000, decay_steps 30000, decay_lr 2.5e-6 |
97
+ | gradient_checkpointing | false |
98
+
99
+ ### LoRA (`adapter_config.json`)
100
+
101
+ | Field | Value |
102
+ |---|---|
103
+ | peft_type / version | LORA / 0.19.1 |
104
+ | r / lora_alpha / lora_dropout | 32 / 32 / 0.0 |
105
+ | bias | none |
106
+ | target_modules | `q_proj, k_proj, v_proj, o_proj, gate_proj, up_proj, down_proj` on PaliGemma `language_model` + `gemma_expert` |
107
+ | modules_to_save | `state_proj, action_in_proj, action_out_proj, time_mlp_in, time_mlp_out` |
108
+ | base_model | `lerobot/pi05_base` |
109
+
110
+ > `model.safetensors` in this repo is the **full merged model** (base + adapter, 7.9 GB);
111
+ > the `adapter_*` files are also included for reference. `from_pretrained` loads the merged
112
+ > weights directly — no separate base download needed.
113
+
114
+ ## Inputs (reproducibility manifest)
115
+
116
+ - **Dataset:** `TrossenRoboticsCommunity/<TODO>` @ `<revision>` — TODO (candidate:
117
+ stationary block-transfer / handover-cube lerobot v3).
118
+ - **Base model:** `lerobot/pi05_base`.
119
+ - **Framework:** lerobot-latest (`--policy.type=pi05`).
120
+ - **Batch size:** TODO.
121
+ - **Total steps:** TODO (checkpoints exist at 40k/60k/80k; this record is **40k**).
122
+ - **Training env / hardware:** TODO (local-5090 | cloud-runpod).
123
+
124
+ ## Outputs
125
+
126
+ - Weights: `model.safetensors` (merged), `adapter_model.safetensors` (LoRA).
127
+ - Config: `config.json`, `adapter_config.json`.
128
+ - Processors: `policy_preprocessor.json` (+ normalizer state), `policy_postprocessor.json` (+ unnormalizer state).
129
+ - TensorBoard logs: **not available** with this checkpoint (RLE DoD item — add if recoverable).
130
+
131
+ ## Evaluation (async inference)
132
+
133
+ Verified to load and run via the async policy server + Trossen async client. Relative→absolute
134
+ conversion confirmed active. Run from the `lerobot_trossen` workspace:
135
+
136
+ ```bash
137
+ # Terminal A — policy server
138
+ uv run python -m lerobot.async_inference.policy_server \
139
+ --host=127.0.0.1 --port=8080 --fps=30 --inference_latency=0.033 --obs_queue_timeout=2
140
+
141
+ # Terminal B — robot client
142
+ uv run lerobot-trossen-async-client \
143
+ --server_address=127.0.0.1:8080 \
144
+ --robot.type=bi_widowxai_follower_robot \
145
+ --robot.left_arm_ip_address=192.168.1.5 --robot.right_arm_ip_address=192.168.1.4 \
146
+ --robot.id=bimanual_follower \
147
+ --robot.cameras='{ cam_high: {...}, cam_low: {...}, cam_left_wrist: {...}, cam_right_wrist: {...} }' \
148
+ --task="Grab and handover the red cube to the other arm" \
149
+ --policy_type=pi05 \
150
+ --pretrained_name_or_path=TrossenRoboticsCommunity/pi05-block-transfer-lerobot \
151
+ --policy_device=cuda \
152
+ --actions_per_chunk=50 --chunk_size_threshold=0.5 --aggregate_fn_name=weighted_average
153
+ ```
154
+
155
+ The task prompt must match training (π₀.₅ is language-conditioned).
156
+
157
+ ### Eval Results
158
+
159
+ | Eval Task | Reps | Success | Notes |
160
+ |---|---|---|---|
161
+ | block-transfer | TODO | TODO | policy confirmed working on hardware; formal rep count TODO |
162
+
163
+ ## Links
164
+
165
+ - **RLE Study (Epic):** TODO — `RLE-NN`
166
+ - **RLE Run (Task):** TODO — `RLE-NN`
167
+ - **Base model:** https://huggingface.co/lerobot/pi05_base
adapter_config.json ADDED
@@ -0,0 +1,49 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ {
2
+ "alora_invocation_tokens": null,
3
+ "alpha_pattern": {},
4
+ "arrow_config": null,
5
+ "auto_mapping": {
6
+ "base_model_class": "PI05Policy",
7
+ "parent_library": "lerobot.policies.pi05.modeling_pi05"
8
+ },
9
+ "base_model_name_or_path": "/home/trossen/.cache/huggingface/hub/models--lerobot--pi05_base/snapshots/9e55186ad36e66b95cda57bc47818d9e6237ae30",
10
+ "bias": "none",
11
+ "corda_config": null,
12
+ "ensure_weight_tying": false,
13
+ "eva_config": null,
14
+ "exclude_modules": null,
15
+ "fan_in_fan_out": false,
16
+ "inference_mode": true,
17
+ "init_lora_weights": true,
18
+ "layer_replication": null,
19
+ "layers_pattern": null,
20
+ "layers_to_transform": null,
21
+ "loftq_config": {},
22
+ "lora_alpha": 32,
23
+ "lora_bias": false,
24
+ "lora_dropout": 0.0,
25
+ "lora_ga_config": null,
26
+ "megatron_config": null,
27
+ "megatron_core": "megatron.core",
28
+ "modules_to_save": [
29
+ "state_proj",
30
+ "action_in_proj",
31
+ "action_out_proj",
32
+ "time_mlp_in",
33
+ "time_mlp_out"
34
+ ],
35
+ "peft_type": "LORA",
36
+ "peft_version": "0.19.1",
37
+ "qalora_group_size": 16,
38
+ "r": 32,
39
+ "rank_pattern": {},
40
+ "revision": null,
41
+ "target_modules": "model\\.paligemma_with_expert\\.(paligemma\\.model\\.language_model|gemma_expert\\.model)\\..*\\.(q_proj|k_proj|v_proj|o_proj|gate_proj|up_proj|down_proj)$",
42
+ "target_parameters": null,
43
+ "task_type": null,
44
+ "trainable_token_indices": null,
45
+ "use_bdlora": null,
46
+ "use_dora": false,
47
+ "use_qalora": false,
48
+ "use_rslora": false
49
+ }
adapter_model.safetensors ADDED
@@ -0,0 +1,3 @@
 
 
 
 
1
+ version https://git-lfs.github.com/spec/v1
2
+ oid sha256:3b20e355e3899370c142c9557801b3cb64b79b30781c172026b4ef4184344f3e
3
+ size 221091648
config.json ADDED
@@ -0,0 +1,99 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ {
2
+ "type": "pi05",
3
+ "n_obs_steps": 1,
4
+ "input_features": {
5
+ "observation.state": {
6
+ "type": "STATE",
7
+ "shape": [
8
+ 14
9
+ ]
10
+ },
11
+ "observation.images.cam_high": {
12
+ "type": "VISUAL",
13
+ "shape": [
14
+ 3,
15
+ 480,
16
+ 640
17
+ ]
18
+ },
19
+ "observation.images.cam_low": {
20
+ "type": "VISUAL",
21
+ "shape": [
22
+ 3,
23
+ 480,
24
+ 640
25
+ ]
26
+ },
27
+ "observation.images.cam_left_wrist": {
28
+ "type": "VISUAL",
29
+ "shape": [
30
+ 3,
31
+ 480,
32
+ 640
33
+ ]
34
+ },
35
+ "observation.images.cam_right_wrist": {
36
+ "type": "VISUAL",
37
+ "shape": [
38
+ 3,
39
+ 480,
40
+ 640
41
+ ]
42
+ }
43
+ },
44
+ "output_features": {
45
+ "action": {
46
+ "type": "ACTION",
47
+ "shape": [
48
+ 14
49
+ ]
50
+ }
51
+ },
52
+ "device": "cuda",
53
+ "use_amp": false,
54
+ "push_to_hub": true,
55
+ "repo_id": null,
56
+ "private": null,
57
+ "tags": null,
58
+ "license": null,
59
+ "pretrained_path": null,
60
+ "paligemma_variant": "gemma_2b",
61
+ "action_expert_variant": "gemma_300m",
62
+ "dtype": "bfloat16",
63
+ "chunk_size": 50,
64
+ "n_action_steps": 50,
65
+ "max_state_dim": 32,
66
+ "max_action_dim": 32,
67
+ "num_inference_steps": 10,
68
+ "time_sampling_beta_alpha": 1.5,
69
+ "time_sampling_beta_beta": 1.0,
70
+ "time_sampling_scale": 0.999,
71
+ "time_sampling_offset": 0.001,
72
+ "min_period": 0.004,
73
+ "max_period": 4.0,
74
+ "image_resolution": [
75
+ 224,
76
+ 224
77
+ ],
78
+ "empty_cameras": 0,
79
+ "tokenizer_max_length": 200,
80
+ "normalization_mapping": {
81
+ "VISUAL": "IDENTITY",
82
+ "STATE": "QUANTILES",
83
+ "ACTION": "QUANTILES"
84
+ },
85
+ "gradient_checkpointing": false,
86
+ "compile_model": false,
87
+ "compile_mode": "max-autotune",
88
+ "optimizer_lr": 2.5e-05,
89
+ "optimizer_betas": [
90
+ 0.9,
91
+ 0.95
92
+ ],
93
+ "optimizer_eps": 1e-08,
94
+ "optimizer_weight_decay": 0.01,
95
+ "optimizer_grad_clip_norm": 1.0,
96
+ "scheduler_warmup_steps": 1000,
97
+ "scheduler_decay_steps": 30000,
98
+ "scheduler_decay_lr": 2.5e-06
99
+ }
model.safetensors ADDED
@@ -0,0 +1,3 @@
 
 
 
 
1
+ version https://git-lfs.github.com/spec/v1
2
+ oid sha256:6b8aef81cb02ebf3e88a67c4375d353af6d4fa62f5968bd9e1794ce59f0196a9
3
+ size 8286949888
policy_postprocessor.json ADDED
@@ -0,0 +1,38 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ {
2
+ "name": "policy_postprocessor",
3
+ "steps": [
4
+ {
5
+ "registry_name": "unnormalizer_processor",
6
+ "config": {
7
+ "eps": 1e-08,
8
+ "features": {
9
+ "action": {
10
+ "type": "ACTION",
11
+ "shape": [
12
+ 14
13
+ ]
14
+ }
15
+ },
16
+ "norm_map": {
17
+ "VISUAL": "IDENTITY",
18
+ "STATE": "QUANTILES",
19
+ "ACTION": "QUANTILES"
20
+ }
21
+ },
22
+ "state_file": "policy_postprocessor_step_0_unnormalizer_processor.safetensors"
23
+ },
24
+ {
25
+ "registry_name": "absolute_actions_processor",
26
+ "config": {
27
+ "enabled": true
28
+ }
29
+ },
30
+ {
31
+ "registry_name": "device_processor",
32
+ "config": {
33
+ "device": "cpu",
34
+ "float_dtype": null
35
+ }
36
+ }
37
+ ]
38
+ }
policy_postprocessor_step_0_unnormalizer_processor.safetensors ADDED
@@ -0,0 +1,3 @@
 
 
 
 
1
+ version https://git-lfs.github.com/spec/v1
2
+ oid sha256:e6106123fd38231752b33178f74f8fe3440aa533d35ffc2b495a0fb7924313f8
3
+ size 10448
policy_preprocessor.json ADDED
@@ -0,0 +1,121 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ {
2
+ "name": "policy_preprocessor",
3
+ "steps": [
4
+ {
5
+ "registry_name": "rename_observations_processor",
6
+ "config": {
7
+ "rename_map": {}
8
+ }
9
+ },
10
+ {
11
+ "registry_name": "to_batch_processor",
12
+ "config": {}
13
+ },
14
+ {
15
+ "registry_name": "delta_actions_processor",
16
+ "config": {
17
+ "enabled": true,
18
+ "exclude_joints": [
19
+ "left_carriage_joint",
20
+ "right_carriage_joint"
21
+ ],
22
+ "action_names": [
23
+ "left_joint_0.pos",
24
+ "left_joint_1.pos",
25
+ "left_joint_2.pos",
26
+ "left_joint_3.pos",
27
+ "left_joint_4.pos",
28
+ "left_joint_5.pos",
29
+ "left_left_carriage_joint.pos",
30
+ "right_joint_0.pos",
31
+ "right_joint_1.pos",
32
+ "right_joint_2.pos",
33
+ "right_joint_3.pos",
34
+ "right_joint_4.pos",
35
+ "right_joint_5.pos",
36
+ "right_left_carriage_joint.pos"
37
+ ]
38
+ }
39
+ },
40
+ {
41
+ "registry_name": "normalizer_processor",
42
+ "config": {
43
+ "eps": 1e-08,
44
+ "features": {
45
+ "observation.state": {
46
+ "type": "STATE",
47
+ "shape": [
48
+ 14
49
+ ]
50
+ },
51
+ "observation.images.cam_high": {
52
+ "type": "VISUAL",
53
+ "shape": [
54
+ 3,
55
+ 480,
56
+ 640
57
+ ]
58
+ },
59
+ "observation.images.cam_low": {
60
+ "type": "VISUAL",
61
+ "shape": [
62
+ 3,
63
+ 480,
64
+ 640
65
+ ]
66
+ },
67
+ "observation.images.cam_left_wrist": {
68
+ "type": "VISUAL",
69
+ "shape": [
70
+ 3,
71
+ 480,
72
+ 640
73
+ ]
74
+ },
75
+ "observation.images.cam_right_wrist": {
76
+ "type": "VISUAL",
77
+ "shape": [
78
+ 3,
79
+ 480,
80
+ 640
81
+ ]
82
+ },
83
+ "action": {
84
+ "type": "ACTION",
85
+ "shape": [
86
+ 14
87
+ ]
88
+ }
89
+ },
90
+ "norm_map": {
91
+ "VISUAL": "IDENTITY",
92
+ "STATE": "QUANTILES",
93
+ "ACTION": "QUANTILES"
94
+ }
95
+ },
96
+ "state_file": "policy_preprocessor_step_3_normalizer_processor.safetensors"
97
+ },
98
+ {
99
+ "registry_name": "pi05_prepare_state_tokenizer_processor_step",
100
+ "config": {}
101
+ },
102
+ {
103
+ "registry_name": "tokenizer_processor",
104
+ "config": {
105
+ "max_length": 200,
106
+ "task_key": "task",
107
+ "padding_side": "right",
108
+ "padding": "max_length",
109
+ "truncation": true,
110
+ "tokenizer_name": "google/paligemma-3b-pt-224"
111
+ }
112
+ },
113
+ {
114
+ "registry_name": "device_processor",
115
+ "config": {
116
+ "device": "cuda",
117
+ "float_dtype": null
118
+ }
119
+ }
120
+ ]
121
+ }
policy_preprocessor_step_3_normalizer_processor.safetensors ADDED
@@ -0,0 +1,3 @@
 
 
 
 
1
+ version https://git-lfs.github.com/spec/v1
2
+ oid sha256:e6106123fd38231752b33178f74f8fe3440aa533d35ffc2b495a0fb7924313f8
3
+ size 10448