Robotics
LeRobot
Safetensors
pi0
Jingyi-Z commited on
Commit
dfd4def
·
verified ·
1 Parent(s): 5fae31c

Upload policy weights, train config and readme

Browse files
Files changed (4) hide show
  1. README.md +171 -0
  2. config.json +99 -0
  3. model.safetensors +3 -0
  4. train_config.json +237 -0
README.md ADDED
@@ -0,0 +1,171 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ ---
2
+ base_model: lerobot/pi0_base
3
+ datasets: Lnrbhaw/so101-pickplacetest_20260615_113608
4
+ library_name: lerobot
5
+ license: apache-2.0
6
+ model_name: pi0
7
+ pipeline_tag: robotics
8
+ tags:
9
+ - pi0
10
+ - robotics
11
+ - lerobot
12
+ ---
13
+
14
+ # Model Card for pi0
15
+
16
+ <!-- Provide a quick summary of what the model is/does. -->
17
+
18
+
19
+ [π₀ (Pi0)](https://www.physicalintelligence.company/blog/pi0) is a general-purpose robot foundation model from Physical Intelligence: a generalist Vision-Language-Action policy that understands visual inputs, interprets natural language instructions, and controls a variety of different robots across diverse tasks. The LeRobot implementation is adapted from their open-source OpenPI repository.
20
+
21
+
22
+
23
+ <p align="center">
24
+ <img src="https://huggingface.co/datasets/huggingface/documentation-images/resolve/main/lerobot/lerobot-pi0%20(1).png" alt="pi0 architecture" width="85%"/>
25
+ </p>
26
+
27
+
28
+ <!-- A short demo is worth more than any description! Record a GIF/video of the policy
29
+ running on your robot, upload it to this repo, and embed it here:
30
+ <p align="center">
31
+ <img src="https://huggingface.co/<hf_user>/<policy_repo_id>/resolve/main/demo.gif" width="60%"/>
32
+ </p>
33
+ -->
34
+
35
+ This policy has been trained and pushed to the Hub using [LeRobot](https://github.com/huggingface/lerobot).
36
+
37
+ Learn how to train and run it in the [LeRobot pi0 guide](https://huggingface.co/docs/lerobot/main/en/pi0), or browse the [full documentation](https://huggingface.co/docs/lerobot/index).
38
+
39
+
40
+ ---
41
+
42
+ ## Model Details
43
+
44
+ - **License:** apache-2.0
45
+ - **Fine-tuned from:** [lerobot/pi0_base](https://huggingface.co/lerobot/pi0_base)
46
+ - **Robot type:** `so_follower`
47
+ - **Cameras:** `wrist`, `top`
48
+
49
+
50
+ ## Inputs & Outputs
51
+
52
+ The policy consumes these observation features and produces these action features.
53
+
54
+ **Inputs**
55
+
56
+ | Feature | Type | Shape |
57
+ | --- | --- | --- |
58
+ | `observation.state` | STATE | `(6,)` |
59
+ | `observation.images.wrist` | VISUAL | `(3, 480, 640)` |
60
+ | `observation.images.top` | VISUAL | `(3, 480, 640)` |
61
+
62
+ **Outputs**
63
+
64
+ | Feature | Type | Shape |
65
+ | --- | --- | --- |
66
+ | `action` | ACTION | `(6,)` |
67
+
68
+
69
+ ## Training Dataset
70
+
71
+ - **Repository:** [Lnrbhaw/so101-pickplacetest_20260615_113608](https://huggingface.co/datasets/Lnrbhaw/so101-pickplacetest_20260615_113608)
72
+ - **Episodes:** 50
73
+ - **Frames:** 33687
74
+ - **Frame rate:** 30 FPS
75
+ - **Task(s):** "Pick up the red ball and place it in the plastic bowl"
76
+
77
+ <a class="flex" href="https://huggingface.co/spaces/lerobot/visualize_dataset?path=Lnrbhaw/so101-pickplacetest_20260615_113608">
78
+ <img class="block dark:hidden" src="https://huggingface.co/datasets/huggingface/badges/resolve/main/visualize-this-dataset-xl.svg"/>
79
+ <img class="hidden dark:block" src="https://huggingface.co/datasets/huggingface/badges/resolve/main/visualize-this-dataset-xl-dark.svg"/>
80
+ </a>
81
+
82
+
83
+ ## Training Configuration
84
+
85
+ | Setting | Value |
86
+ | --- | --- |
87
+ | Training steps | 3000 |
88
+ | Batch size | 4 |
89
+ | Optimizer | adamw |
90
+ | Learning rate | 2.5e-05 |
91
+ | Seed | 1000 |
92
+ | LeRobot version | 0.5.2 |
93
+
94
+ ---
95
+
96
+ ## How to Get Started with the Model
97
+
98
+ New to LeRobot? These guides cover the full workflow:
99
+
100
+ - **[Install LeRobot](https://huggingface.co/docs/lerobot/main/en/installation)** — set up the `lerobot` package.
101
+ - **[Hardware setup](https://huggingface.co/docs/lerobot/main/en/hardware_guide)** — assemble, wire, and calibrate your robot and cameras.
102
+ - **[Record data & train a policy](https://huggingface.co/docs/lerobot/en/il_robots)** — the end-to-end imitation-learning walkthrough.
103
+ - **[CLI cheat-sheet](https://huggingface.co/docs/lerobot/main/en/cheat-sheet)** — quick reference for the `lerobot-*` commands.
104
+
105
+ The short version to run and train this policy:
106
+
107
+ ### Run the policy on your robot
108
+
109
+ ```bash
110
+ lerobot-rollout \
111
+ --strategy.type=base \
112
+ --robot.type=so_follower \
113
+ --robot.port=<your_robot_port> \
114
+ --robot.cameras="{ <camera_1>: {type: opencv, index_or_path: <index_or_path>, width: 640, height: 480, fps: 30}, <camera_2>: {type: opencv, index_or_path: <index_or_path>, width: 640, height: 480, fps: 30}}" \
115
+ --policy.path=Jingyi-Z/pi0_so101 \
116
+ --task="Pick up the red ball and place it in the plastic bowl" \
117
+ --duration=60
118
+ ```
119
+
120
+ Replace the remaining `<...>` placeholders with your own values: `--robot.port` and the camera names/indices are specific to your machine, and the camera names must match the observation keys this policy was trained on.
121
+
122
+ When `--strategy.type=base` is used the script doesn't record the episodes. Skipping duration will make the policy run indefinitely. For more information look at [rollout documentation](https://huggingface.co/docs/lerobot/main/en/inference).
123
+
124
+ ### Train your own policy
125
+
126
+ This policy type is usually fine-tuned from the pretrained base model [lerobot/pi0_base](https://huggingface.co/lerobot/pi0_base):
127
+
128
+ ```bash
129
+ lerobot-train \
130
+ --dataset.repo_id=${HF_USER}/<dataset> \
131
+ --policy.path=lerobot/pi0_base \
132
+ --output_dir=outputs/train/<policy_repo_id> \
133
+ --job_name=lerobot_training \
134
+ --policy.device=cuda \
135
+ --policy.repo_id=${HF_USER}/<policy_repo_id> \
136
+ --wandb.enable=true
137
+ ```
138
+
139
+ _Writes checkpoints to `outputs/train/<policy_repo_id>/checkpoints/`._
140
+
141
+ ---
142
+
143
+ ## Evaluation
144
+
145
+ <!-- Report real-robot results here: run the policy several times per task and count the
146
+ successes. Delete the "No evaluation results" line and fill in this table instead:
147
+
148
+ | Task | Trials | Successes | Success rate |
149
+ | ---- | ------ | --------- | ------------ |
150
+ | pick the lego brick | 10 | 8 | 80% |
151
+
152
+ Also worth noting: anything that affects difficulty (new object positions, lighting,
153
+ distractors, a different robot of the same type, ...).
154
+ -->
155
+
156
+ _No evaluation results have been provided for this policy yet._
157
+
158
+ ---
159
+
160
+ ## Citation
161
+
162
+ If you use this policy, please cite the method linked in the description above, along with LeRobot:
163
+
164
+ ```bibtex
165
+ @misc{cadene2024lerobot,
166
+ author = {Cadene, Remi and Alibert, Simon and Soare, Alexander and Gallouedec, Quentin and Zouitine, Adil and Palma, Steven and Kooijmans, Pepijn and Aractingi, Michel and Shukor, Mustafa and Aubakirova, Dana and Russi, Martino and Capuano, Francesco and Pascal, Caroline and Choghari, Jade and Moss, Jess and Wolf, Thomas},
167
+ title = {LeRobot: State-of-the-art Machine Learning for Real-World Robotics in Pytorch},
168
+ howpublished = "\url{https://github.com/huggingface/lerobot}",
169
+ year = {2024}
170
+ }
171
+ ```
config.json ADDED
@@ -0,0 +1,99 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ {
2
+ "type": "pi0",
3
+ "n_obs_steps": 1,
4
+ "input_features": {
5
+ "observation.state": {
6
+ "type": "STATE",
7
+ "shape": [
8
+ 6
9
+ ]
10
+ },
11
+ "observation.images.wrist": {
12
+ "type": "VISUAL",
13
+ "shape": [
14
+ 3,
15
+ 480,
16
+ 640
17
+ ]
18
+ },
19
+ "observation.images.top": {
20
+ "type": "VISUAL",
21
+ "shape": [
22
+ 3,
23
+ 480,
24
+ 640
25
+ ]
26
+ }
27
+ },
28
+ "output_features": {
29
+ "action": {
30
+ "type": "ACTION",
31
+ "shape": [
32
+ 6
33
+ ]
34
+ }
35
+ },
36
+ "device": "cuda",
37
+ "use_amp": false,
38
+ "use_peft": false,
39
+ "push_to_hub": true,
40
+ "repo_id": "Jingyi-Z/pi0_so101",
41
+ "private": null,
42
+ "tags": null,
43
+ "license": null,
44
+ "pretrained_path": "lerobot/pi0_base",
45
+ "paligemma_variant": "gemma_2b",
46
+ "action_expert_variant": "gemma_300m",
47
+ "dtype": "bfloat16",
48
+ "chunk_size": 50,
49
+ "n_action_steps": 50,
50
+ "max_state_dim": 32,
51
+ "max_action_dim": 32,
52
+ "num_inference_steps": 10,
53
+ "time_sampling_beta_alpha": 1.5,
54
+ "time_sampling_beta_beta": 1.0,
55
+ "time_sampling_scale": 0.999,
56
+ "time_sampling_offset": 0.001,
57
+ "min_period": 0.004,
58
+ "max_period": 4.0,
59
+ "use_relative_actions": false,
60
+ "relative_exclude_joints": [
61
+ "gripper"
62
+ ],
63
+ "action_feature_names": [
64
+ "shoulder_pan.pos",
65
+ "shoulder_lift.pos",
66
+ "elbow_flex.pos",
67
+ "wrist_flex.pos",
68
+ "wrist_roll.pos",
69
+ "gripper.pos"
70
+ ],
71
+ "rtc_config": null,
72
+ "image_resolution": [
73
+ 224,
74
+ 224
75
+ ],
76
+ "empty_cameras": 0,
77
+ "normalization_mapping": {
78
+ "VISUAL": "IDENTITY",
79
+ "STATE": "MEAN_STD",
80
+ "ACTION": "MEAN_STD"
81
+ },
82
+ "gradient_checkpointing": true,
83
+ "compile_model": false,
84
+ "compile_mode": "max-autotune",
85
+ "freeze_vision_encoder": false,
86
+ "train_expert_only": true,
87
+ "optimizer_lr": 2.5e-05,
88
+ "optimizer_betas": [
89
+ 0.9,
90
+ 0.95
91
+ ],
92
+ "optimizer_eps": 1e-08,
93
+ "optimizer_weight_decay": 0.01,
94
+ "optimizer_grad_clip_norm": 1.0,
95
+ "scheduler_warmup_steps": 1000,
96
+ "scheduler_decay_steps": 30000,
97
+ "scheduler_decay_lr": 2.5e-06,
98
+ "tokenizer_max_length": 48
99
+ }
model.safetensors ADDED
@@ -0,0 +1,3 @@
 
 
 
 
1
+ version https://git-lfs.github.com/spec/v1
2
+ oid sha256:21619142a0b6978506e0c84d51ff205821bc2847a7496abd53353b2f10b3bdf0
3
+ size 8892502944
train_config.json ADDED
@@ -0,0 +1,237 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ {
2
+ "dataset": {
3
+ "repo_id": "Lnrbhaw/so101-pickplacetest_20260615_113608",
4
+ "root": null,
5
+ "episodes": null,
6
+ "image_transforms": {
7
+ "enable": false,
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.8,
17
+ 1.2
18
+ ]
19
+ }
20
+ },
21
+ "contrast": {
22
+ "weight": 1.0,
23
+ "type": "ColorJitter",
24
+ "kwargs": {
25
+ "contrast": [
26
+ 0.8,
27
+ 1.2
28
+ ]
29
+ }
30
+ },
31
+ "saturation": {
32
+ "weight": 1.0,
33
+ "type": "ColorJitter",
34
+ "kwargs": {
35
+ "saturation": [
36
+ 0.5,
37
+ 1.5
38
+ ]
39
+ }
40
+ },
41
+ "hue": {
42
+ "weight": 1.0,
43
+ "type": "ColorJitter",
44
+ "kwargs": {
45
+ "hue": [
46
+ -0.05,
47
+ 0.05
48
+ ]
49
+ }
50
+ },
51
+ "sharpness": {
52
+ "weight": 1.0,
53
+ "type": "SharpnessJitter",
54
+ "kwargs": {
55
+ "sharpness": [
56
+ 0.5,
57
+ 1.5
58
+ ]
59
+ }
60
+ },
61
+ "affine": {
62
+ "weight": 1.0,
63
+ "type": "RandomAffine",
64
+ "kwargs": {
65
+ "degrees": [
66
+ -5.0,
67
+ 5.0
68
+ ],
69
+ "translate": [
70
+ 0.05,
71
+ 0.05
72
+ ]
73
+ }
74
+ }
75
+ }
76
+ },
77
+ "revision": null,
78
+ "use_imagenet_stats": true,
79
+ "video_backend": "torchcodec",
80
+ "return_uint8": false,
81
+ "streaming": false
82
+ },
83
+ "env": null,
84
+ "policy": {
85
+ "type": "pi0",
86
+ "n_obs_steps": 1,
87
+ "input_features": {
88
+ "observation.state": {
89
+ "type": "STATE",
90
+ "shape": [
91
+ 6
92
+ ]
93
+ },
94
+ "observation.images.wrist": {
95
+ "type": "VISUAL",
96
+ "shape": [
97
+ 3,
98
+ 480,
99
+ 640
100
+ ]
101
+ },
102
+ "observation.images.top": {
103
+ "type": "VISUAL",
104
+ "shape": [
105
+ 3,
106
+ 480,
107
+ 640
108
+ ]
109
+ }
110
+ },
111
+ "output_features": {
112
+ "action": {
113
+ "type": "ACTION",
114
+ "shape": [
115
+ 6
116
+ ]
117
+ }
118
+ },
119
+ "device": "cuda",
120
+ "use_amp": false,
121
+ "use_peft": false,
122
+ "push_to_hub": true,
123
+ "repo_id": "Jingyi-Z/pi0_so101",
124
+ "private": null,
125
+ "tags": null,
126
+ "license": null,
127
+ "pretrained_path": "lerobot/pi0_base",
128
+ "paligemma_variant": "gemma_2b",
129
+ "action_expert_variant": "gemma_300m",
130
+ "dtype": "bfloat16",
131
+ "chunk_size": 50,
132
+ "n_action_steps": 50,
133
+ "max_state_dim": 32,
134
+ "max_action_dim": 32,
135
+ "num_inference_steps": 10,
136
+ "time_sampling_beta_alpha": 1.5,
137
+ "time_sampling_beta_beta": 1.0,
138
+ "time_sampling_scale": 0.999,
139
+ "time_sampling_offset": 0.001,
140
+ "min_period": 0.004,
141
+ "max_period": 4.0,
142
+ "use_relative_actions": false,
143
+ "relative_exclude_joints": [
144
+ "gripper"
145
+ ],
146
+ "action_feature_names": [
147
+ "shoulder_pan.pos",
148
+ "shoulder_lift.pos",
149
+ "elbow_flex.pos",
150
+ "wrist_flex.pos",
151
+ "wrist_roll.pos",
152
+ "gripper.pos"
153
+ ],
154
+ "rtc_config": null,
155
+ "image_resolution": [
156
+ 224,
157
+ 224
158
+ ],
159
+ "empty_cameras": 0,
160
+ "normalization_mapping": {
161
+ "VISUAL": "IDENTITY",
162
+ "STATE": "MEAN_STD",
163
+ "ACTION": "MEAN_STD"
164
+ },
165
+ "gradient_checkpointing": true,
166
+ "compile_model": false,
167
+ "compile_mode": "max-autotune",
168
+ "freeze_vision_encoder": false,
169
+ "train_expert_only": true,
170
+ "optimizer_lr": 2.5e-05,
171
+ "optimizer_betas": [
172
+ 0.9,
173
+ 0.95
174
+ ],
175
+ "optimizer_eps": 1e-08,
176
+ "optimizer_weight_decay": 0.01,
177
+ "optimizer_grad_clip_norm": 1.0,
178
+ "scheduler_warmup_steps": 1000,
179
+ "scheduler_decay_steps": 30000,
180
+ "scheduler_decay_lr": 2.5e-06,
181
+ "tokenizer_max_length": 48
182
+ },
183
+ "reward_model": null,
184
+ "output_dir": "outputs/pi0_so101",
185
+ "job_name": "pi0_so101",
186
+ "resume": false,
187
+ "seed": 1000,
188
+ "cudnn_deterministic": false,
189
+ "num_workers": 4,
190
+ "batch_size": 4,
191
+ "prefetch_factor": 4,
192
+ "persistent_workers": true,
193
+ "steps": 3000,
194
+ "eval_freq": 20000,
195
+ "log_freq": 200,
196
+ "tolerance_s": 0.0001,
197
+ "save_checkpoint": true,
198
+ "save_freq": 20000,
199
+ "use_policy_training_preset": true,
200
+ "optimizer": {
201
+ "type": "adamw",
202
+ "lr": 2.5e-05,
203
+ "weight_decay": 0.01,
204
+ "grad_clip_norm": 1.0,
205
+ "betas": [
206
+ 0.9,
207
+ 0.95
208
+ ],
209
+ "eps": 1e-08
210
+ },
211
+ "scheduler": {
212
+ "type": "cosine_decay_with_warmup",
213
+ "num_warmup_steps": 1000,
214
+ "num_decay_steps": 30000,
215
+ "peak_lr": 2.5e-05,
216
+ "decay_lr": 2.5e-06
217
+ },
218
+ "eval": {
219
+ "n_episodes": 50,
220
+ "batch_size": 8,
221
+ "use_async_envs": true
222
+ },
223
+ "wandb": {
224
+ "enable": false,
225
+ "disable_artifact": false,
226
+ "project": "lerobot",
227
+ "entity": null,
228
+ "notes": null,
229
+ "run_id": null,
230
+ "mode": null,
231
+ "add_tags": true
232
+ },
233
+ "peft": null,
234
+ "sample_weighting": null,
235
+ "rename_map": {},
236
+ "checkpoint_path": null
237
+ }