drwahl commited on
Commit
a2a3766
·
verified ·
1 Parent(s): 5bd74cf

the adapter trained on sim and hardware together

Browse files
README.md ADDED
@@ -0,0 +1,33 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ ---
2
+ license: apache-2.0
3
+ base_model: lerobot/pi05_base
4
+ pipeline_tag: robotics
5
+ tags:
6
+ - LeRobot
7
+ - so101
8
+ - pi0.5
9
+ - lora
10
+ ---
11
+
12
+ # pi05_so101_block_stack
13
+
14
+ pi0.5 fine-tuned to stack one 30 mm block on another with an [SO-101](https://github.com/TheRobotStudio/SO-ARM100), in simulation and on the physical arm. Trained by `train/pi05_so101_mix_aug.yaml` in [vla-test](https://github.com/danwahl/vla-test) on [drwahl/so101_block_stack](https://huggingface.co/drwahl/so101_block_stack), with each frame jittered for brightness, contrast, saturation and hue over ranges the size of what separates a rendered frame from one off the arm.
15
+
16
+ LoRA on `lerobot/pi05_base`'s gemma_2b language backbone, with the action expert and the projection heads dense and SigLIP frozen. `adapter/` holds the adapter and the normalization processors; `train/merge.py` folds it into the base weights for a checkpoint that loads without one.
17
+
18
+ ```bash
19
+ hf download drwahl/pi05_so101_block_stack --local-dir pi05_so101_block_stack
20
+ uv run python train/merge.py pi05_so101_block_stack/adapter pi05_so101_block_stack/merged
21
+
22
+ # in simulation
23
+ uv run python sim/scripts/eval.py pi05_so101_block_stack/merged
24
+
25
+ # on the arm
26
+ uv run python -m hw.rollout pi05_so101_block_stack/merged --indices 0 1 2
27
+ ```
28
+
29
+ Chunks are stitched with [Real-Time Chunking](https://www.physicalintelligence.company/research/real_time_chunking) and read back off a shape-preserving cubic before they are executed, in both programs.
30
+
31
+ It stacks 139 of the 150 held-out sim layouts, averaged over three seeds. On the arm the blocks are placed against a console that blends the planned layout with the live camera, and whether an episode stacked is the operator's call, so there is no hardware number here.
32
+
33
+ The prompt names two of red, green and blue: `stack the red block on the green block`.
adapter/adapter_config.json ADDED
@@ -0,0 +1,51 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
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": "lerobot/pi05_base",
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": 64,
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
+ "gemma_expert.model",
30
+ "action_in_proj",
31
+ "action_out_proj",
32
+ "time_mlp_in",
33
+ "time_mlp_out"
34
+ ],
35
+ "monteclora_config": null,
36
+ "peft_type": "LORA",
37
+ "peft_version": "0.20.0",
38
+ "qalora_group_size": 16,
39
+ "r": 32,
40
+ "rank_pattern": {},
41
+ "revision": null,
42
+ "target_modules": ".*\\.paligemma\\.model\\.language_model\\.layers\\.\\d+\\.(self_attn\\.[qkvo]_proj|mlp\\.(gate|up|down)_proj)",
43
+ "target_parameters": null,
44
+ "task_type": null,
45
+ "trainable_token_indices": null,
46
+ "use_bdlora": null,
47
+ "use_dora": false,
48
+ "use_qalora": false,
49
+ "use_rslora": false,
50
+ "velora_config": null
51
+ }
adapter/adapter_model.safetensors ADDED
@@ -0,0 +1,3 @@
 
 
 
 
1
+ version https://git-lfs.github.com/spec/v1
2
+ oid sha256:e7f2866e49f476f86fe44119046243103761809b9276424b3697645824d8ee3e
3
+ size 1254516032
adapter/config.json ADDED
@@ -0,0 +1,108 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ {
2
+ "type": "pi05",
3
+ "n_obs_steps": 1,
4
+ "input_features": {
5
+ "observation.images.base_0_rgb": {
6
+ "type": "VISUAL",
7
+ "shape": [
8
+ 3,
9
+ 224,
10
+ 224
11
+ ]
12
+ },
13
+ "observation.images.left_wrist_0_rgb": {
14
+ "type": "VISUAL",
15
+ "shape": [
16
+ 3,
17
+ 224,
18
+ 224
19
+ ]
20
+ },
21
+ "observation.images.right_wrist_0_rgb": {
22
+ "type": "VISUAL",
23
+ "shape": [
24
+ 3,
25
+ 224,
26
+ 224
27
+ ]
28
+ },
29
+ "observation.state": {
30
+ "type": "STATE",
31
+ "shape": [
32
+ 32
33
+ ]
34
+ }
35
+ },
36
+ "output_features": {
37
+ "action": {
38
+ "type": "ACTION",
39
+ "shape": [
40
+ 6
41
+ ]
42
+ }
43
+ },
44
+ "device": "cuda",
45
+ "use_amp": false,
46
+ "use_peft": true,
47
+ "push_to_hub": false,
48
+ "repo_id": null,
49
+ "private": null,
50
+ "tags": null,
51
+ "license": null,
52
+ "pretrained_path": "lerobot/pi05_base",
53
+ "pretrained_revision": null,
54
+ "paligemma_variant": "gemma_2b",
55
+ "action_expert_variant": "gemma_300m",
56
+ "dtype": "bfloat16",
57
+ "chunk_size": 50,
58
+ "n_action_steps": 50,
59
+ "max_state_dim": 32,
60
+ "max_action_dim": 32,
61
+ "num_inference_steps": 10,
62
+ "time_sampling_beta_alpha": 1.5,
63
+ "time_sampling_beta_beta": 1.0,
64
+ "time_sampling_scale": 0.999,
65
+ "time_sampling_offset": 0.001,
66
+ "min_period": 0.004,
67
+ "max_period": 4.0,
68
+ "use_relative_actions": false,
69
+ "relative_exclude_joints": [
70
+ "gripper"
71
+ ],
72
+ "action_feature_names": [
73
+ "shoulder_pan",
74
+ "shoulder_lift",
75
+ "elbow_flex",
76
+ "wrist_flex",
77
+ "wrist_roll",
78
+ "gripper"
79
+ ],
80
+ "rtc_config": null,
81
+ "image_resolution": [
82
+ 224,
83
+ 224
84
+ ],
85
+ "empty_cameras": 0,
86
+ "tokenizer_max_length": 200,
87
+ "normalization_mapping": {
88
+ "VISUAL": "IDENTITY",
89
+ "STATE": "QUANTILES",
90
+ "ACTION": "QUANTILES"
91
+ },
92
+ "gradient_checkpointing": true,
93
+ "compile_model": false,
94
+ "compile_mode": "max-autotune",
95
+ "freeze_vision_encoder": false,
96
+ "train_expert_only": false,
97
+ "optimizer_lr": 2.5e-05,
98
+ "optimizer_betas": [
99
+ 0.9,
100
+ 0.95
101
+ ],
102
+ "optimizer_eps": 1e-08,
103
+ "optimizer_weight_decay": 0.01,
104
+ "optimizer_grad_clip_norm": 1.0,
105
+ "scheduler_warmup_steps": 1000,
106
+ "scheduler_decay_steps": 20000,
107
+ "scheduler_decay_lr": 2.5e-06
108
+ }
adapter/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
+ 6
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": false
28
+ }
29
+ },
30
+ {
31
+ "registry_name": "device_processor",
32
+ "config": {
33
+ "device": "cpu",
34
+ "float_dtype": null
35
+ }
36
+ }
37
+ ]
38
+ }
adapter/policy_postprocessor_step_0_unnormalizer_processor.safetensors ADDED
@@ -0,0 +1,3 @@
 
 
 
 
1
+ version https://git-lfs.github.com/spec/v1
2
+ oid sha256:d9656e2af277330c51a3d8bdcec8d48746ea6069318e4bc13757b92ad73327a7
3
+ size 7536
adapter/policy_preprocessor.json ADDED
@@ -0,0 +1,100 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ {
2
+ "name": "policy_preprocessor",
3
+ "steps": [
4
+ {
5
+ "registry_name": "rename_observations_processor",
6
+ "config": {
7
+ "rename_map": {
8
+ "observation.images.top": "observation.images.base_0_rgb",
9
+ "observation.images.wrist": "observation.images.left_wrist_0_rgb"
10
+ }
11
+ }
12
+ },
13
+ {
14
+ "registry_name": "to_batch_processor",
15
+ "config": {}
16
+ },
17
+ {
18
+ "registry_name": "relative_actions_processor",
19
+ "config": {
20
+ "enabled": false,
21
+ "exclude_joints": [
22
+ "gripper"
23
+ ],
24
+ "action_names": null
25
+ }
26
+ },
27
+ {
28
+ "registry_name": "normalizer_processor",
29
+ "config": {
30
+ "eps": 1e-08,
31
+ "features": {
32
+ "observation.images.base_0_rgb": {
33
+ "type": "VISUAL",
34
+ "shape": [
35
+ 3,
36
+ 224,
37
+ 224
38
+ ]
39
+ },
40
+ "observation.images.left_wrist_0_rgb": {
41
+ "type": "VISUAL",
42
+ "shape": [
43
+ 3,
44
+ 224,
45
+ 224
46
+ ]
47
+ },
48
+ "observation.images.right_wrist_0_rgb": {
49
+ "type": "VISUAL",
50
+ "shape": [
51
+ 3,
52
+ 224,
53
+ 224
54
+ ]
55
+ },
56
+ "observation.state": {
57
+ "type": "STATE",
58
+ "shape": [
59
+ 32
60
+ ]
61
+ },
62
+ "action": {
63
+ "type": "ACTION",
64
+ "shape": [
65
+ 6
66
+ ]
67
+ }
68
+ },
69
+ "norm_map": {
70
+ "VISUAL": "IDENTITY",
71
+ "STATE": "QUANTILES",
72
+ "ACTION": "QUANTILES"
73
+ }
74
+ },
75
+ "state_file": "policy_preprocessor_step_3_normalizer_processor.safetensors"
76
+ },
77
+ {
78
+ "registry_name": "pi05_prepare_state_tokenizer_processor_step",
79
+ "config": {}
80
+ },
81
+ {
82
+ "registry_name": "tokenizer_processor",
83
+ "config": {
84
+ "max_length": 200,
85
+ "task_key": "task",
86
+ "padding_side": "right",
87
+ "padding": "max_length",
88
+ "truncation": true,
89
+ "tokenizer_name": "google/paligemma-3b-pt-224"
90
+ }
91
+ },
92
+ {
93
+ "registry_name": "device_processor",
94
+ "config": {
95
+ "device": "cuda",
96
+ "float_dtype": null
97
+ }
98
+ }
99
+ ]
100
+ }
adapter/policy_preprocessor_step_3_normalizer_processor.safetensors ADDED
@@ -0,0 +1,3 @@
 
 
 
 
1
+ version https://git-lfs.github.com/spec/v1
2
+ oid sha256:d9656e2af277330c51a3d8bdcec8d48746ea6069318e4bc13757b92ad73327a7
3
+ size 7536
adapter/train_config.json ADDED
@@ -0,0 +1,253 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ {
2
+ "dataset": {
3
+ "repo_id": "vla-test/so101_block_stack_mix_v3",
4
+ "root": "/data/datasets/so101_block_stack_mix_v3",
5
+ "episodes": null,
6
+ "image_transforms": {
7
+ "enable": true,
8
+ "max_num_transforms": 3,
9
+ "random_order": false,
10
+ "tfs": {
11
+ "brightness": {
12
+ "weight": 1.0,
13
+ "type": "ColorJitter",
14
+ "kwargs": {
15
+ "brightness": [
16
+ 0.85,
17
+ 1.2
18
+ ]
19
+ }
20
+ },
21
+ "contrast": {
22
+ "weight": 1.0,
23
+ "type": "ColorJitter",
24
+ "kwargs": {
25
+ "contrast": [
26
+ 0.6,
27
+ 1.7
28
+ ]
29
+ }
30
+ },
31
+ "hue": {
32
+ "weight": 1.0,
33
+ "type": "ColorJitter",
34
+ "kwargs": {
35
+ "hue": [
36
+ -0.035,
37
+ 0.035
38
+ ]
39
+ }
40
+ },
41
+ "saturation": {
42
+ "weight": 1.0,
43
+ "type": "ColorJitter",
44
+ "kwargs": {
45
+ "saturation": [
46
+ 0.5,
47
+ 2.0
48
+ ]
49
+ }
50
+ }
51
+ }
52
+ },
53
+ "revision": null,
54
+ "use_imagenet_stats": true,
55
+ "video_backend": "torchcodec",
56
+ "return_uint8": false,
57
+ "depth_output_unit": "mm",
58
+ "streaming": false,
59
+ "eval_split": 0.0
60
+ },
61
+ "env": null,
62
+ "policy": {
63
+ "type": "pi05",
64
+ "n_obs_steps": 1,
65
+ "input_features": {
66
+ "observation.images.base_0_rgb": {
67
+ "type": "VISUAL",
68
+ "shape": [
69
+ 3,
70
+ 224,
71
+ 224
72
+ ]
73
+ },
74
+ "observation.images.left_wrist_0_rgb": {
75
+ "type": "VISUAL",
76
+ "shape": [
77
+ 3,
78
+ 224,
79
+ 224
80
+ ]
81
+ },
82
+ "observation.images.right_wrist_0_rgb": {
83
+ "type": "VISUAL",
84
+ "shape": [
85
+ 3,
86
+ 224,
87
+ 224
88
+ ]
89
+ },
90
+ "observation.state": {
91
+ "type": "STATE",
92
+ "shape": [
93
+ 32
94
+ ]
95
+ }
96
+ },
97
+ "output_features": {
98
+ "action": {
99
+ "type": "ACTION",
100
+ "shape": [
101
+ 6
102
+ ]
103
+ }
104
+ },
105
+ "device": "cuda",
106
+ "use_amp": false,
107
+ "use_peft": true,
108
+ "push_to_hub": false,
109
+ "repo_id": null,
110
+ "private": null,
111
+ "tags": null,
112
+ "license": null,
113
+ "pretrained_path": "lerobot/pi05_base",
114
+ "pretrained_revision": null,
115
+ "paligemma_variant": "gemma_2b",
116
+ "action_expert_variant": "gemma_300m",
117
+ "dtype": "bfloat16",
118
+ "chunk_size": 50,
119
+ "n_action_steps": 50,
120
+ "max_state_dim": 32,
121
+ "max_action_dim": 32,
122
+ "num_inference_steps": 10,
123
+ "time_sampling_beta_alpha": 1.5,
124
+ "time_sampling_beta_beta": 1.0,
125
+ "time_sampling_scale": 0.999,
126
+ "time_sampling_offset": 0.001,
127
+ "min_period": 0.004,
128
+ "max_period": 4.0,
129
+ "use_relative_actions": false,
130
+ "relative_exclude_joints": [
131
+ "gripper"
132
+ ],
133
+ "action_feature_names": [
134
+ "shoulder_pan",
135
+ "shoulder_lift",
136
+ "elbow_flex",
137
+ "wrist_flex",
138
+ "wrist_roll",
139
+ "gripper"
140
+ ],
141
+ "rtc_config": null,
142
+ "image_resolution": [
143
+ 224,
144
+ 224
145
+ ],
146
+ "empty_cameras": 0,
147
+ "tokenizer_max_length": 200,
148
+ "normalization_mapping": {
149
+ "VISUAL": "IDENTITY",
150
+ "STATE": "QUANTILES",
151
+ "ACTION": "QUANTILES"
152
+ },
153
+ "gradient_checkpointing": true,
154
+ "compile_model": false,
155
+ "compile_mode": "max-autotune",
156
+ "freeze_vision_encoder": false,
157
+ "train_expert_only": false,
158
+ "optimizer_lr": 2.5e-05,
159
+ "optimizer_betas": [
160
+ 0.9,
161
+ 0.95
162
+ ],
163
+ "optimizer_eps": 1e-08,
164
+ "optimizer_weight_decay": 0.01,
165
+ "optimizer_grad_clip_norm": 1.0,
166
+ "scheduler_warmup_steps": 1000,
167
+ "scheduler_decay_steps": 20000,
168
+ "scheduler_decay_lr": 2.5e-06
169
+ },
170
+ "reward_model": null,
171
+ "output_dir": "/data/checkpoints/pi05_so101_block_stack_mix_aug_v3",
172
+ "job_name": "pi05_so101_block_stack_mix_aug_v3",
173
+ "resume": false,
174
+ "seed": 1000,
175
+ "cudnn_deterministic": false,
176
+ "num_workers": 4,
177
+ "batch_size": 4,
178
+ "prefetch_factor": 4,
179
+ "persistent_workers": true,
180
+ "steps": 20000,
181
+ "env_eval_freq": 20000,
182
+ "log_freq": 200,
183
+ "eval_steps": 0,
184
+ "max_eval_samples": 0,
185
+ "tolerance_s": 0.0001,
186
+ "save_checkpoint": true,
187
+ "save_freq": 5000,
188
+ "use_policy_training_preset": true,
189
+ "optimizer": {
190
+ "type": "adamw",
191
+ "lr": 2.5e-05,
192
+ "weight_decay": 0.01,
193
+ "grad_clip_norm": 1.0,
194
+ "betas": [
195
+ 0.9,
196
+ 0.95
197
+ ],
198
+ "eps": 1e-08
199
+ },
200
+ "scheduler": {
201
+ "type": "cosine_decay_with_warmup",
202
+ "num_warmup_steps": 1000,
203
+ "num_decay_steps": 20000,
204
+ "peak_lr": 2.5e-05,
205
+ "decay_lr": 2.5e-06
206
+ },
207
+ "eval": {
208
+ "n_episodes": 50,
209
+ "batch_size": 8,
210
+ "use_async_envs": true,
211
+ "recording": false,
212
+ "recording_repo_id": null,
213
+ "recording_private": false
214
+ },
215
+ "wandb": {
216
+ "enable": true,
217
+ "disable_artifact": true,
218
+ "project": "vla-test",
219
+ "entity": null,
220
+ "notes": null,
221
+ "run_id": "pi05_so101_block_stack_mix_aug_v3",
222
+ "mode": null,
223
+ "add_tags": true
224
+ },
225
+ "peft": {
226
+ "target_modules": ".*\\.paligemma\\.model\\.language_model\\.layers\\.\\d+\\.(self_attn\\.[qkvo]_proj|mlp\\.(gate|up|down)_proj)",
227
+ "full_training_modules": [
228
+ "gemma_expert.model",
229
+ "action_in_proj",
230
+ "action_out_proj",
231
+ "time_mlp_in",
232
+ "time_mlp_out"
233
+ ],
234
+ "method_type": "LORA",
235
+ "init_type": null,
236
+ "r": 32,
237
+ "lora_alpha": 64
238
+ },
239
+ "job": {
240
+ "target": null,
241
+ "image": "huggingface/lerobot-gpu:latest",
242
+ "timeout": "2d",
243
+ "detach": false,
244
+ "tags": []
245
+ },
246
+ "save_checkpoint_to_hub": false,
247
+ "sample_weighting": null,
248
+ "rename_map": {
249
+ "observation.images.top": "observation.images.base_0_rgb",
250
+ "observation.images.wrist": "observation.images.left_wrist_0_rgb"
251
+ },
252
+ "checkpoint_path": null
253
+ }