Robotics
LeRobot
Safetensors
pi0
AndreGaio commited on
Commit
f964cbb
·
verified ·
1 Parent(s): 0f2cdaa

Upload model card and train config

Browse files
Files changed (2) hide show
  1. README.md +171 -0
  2. train_config.json +303 -0
README.md ADDED
@@ -0,0 +1,171 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ ---
2
+ base_model: lerobot/pi0_base
3
+ datasets: AndreGaio/test-packing_20260816_160939
4
+ library_name: lerobot
5
+ license: apache-2.0
6
+ model_name: pi0
7
+ pipeline_tag: robotics
8
+ tags:
9
+ - lerobot
10
+ - robotics
11
+ - pi0
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:** `front`, `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.front` | VISUAL | `(3, 640, 480)` |
60
+ | `observation.images.top` | VISUAL | `(3, 640, 480)` |
61
+
62
+ **Outputs**
63
+
64
+ | Feature | Type | Shape |
65
+ | --- | --- | --- |
66
+ | `action` | ACTION | `(6,)` |
67
+
68
+
69
+ ## Training Dataset
70
+
71
+ - **Repository:** [AndreGaio/test-packing_20260816_160939](https://huggingface.co/datasets/AndreGaio/test-packing_20260816_160939)
72
+ - **Episodes:** 5
73
+ - **Frames:** 14234
74
+ - **Frame rate:** 30 FPS
75
+ - **Task(s):** "Load erasers into container"
76
+
77
+ <a class="flex" href="https://huggingface.co/spaces/lerobot/visualize_dataset?path=AndreGaio/test-packing_20260816_160939">
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 | 5000 |
88
+ | Batch size | 1 |
89
+ | Optimizer | adamw |
90
+ | Learning rate | 2.5e-05 |
91
+ | Seed | 1000 |
92
+ | LeRobot version | 0.6.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=AndreGaio/pi0_packing \
116
+ --task="Load erasers into container" \
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
+ ```
train_config.json ADDED
@@ -0,0 +1,303 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ {
2
+ "dataset": {
3
+ "repo_id": "AndreGaio/test-packing_20260816_160939",
4
+ "repo_type": "dataset",
5
+ "root": null,
6
+ "episodes": null,
7
+ "exclude_episodes": null,
8
+ "image_transforms": {
9
+ "enable": false,
10
+ "max_num_transforms": 3,
11
+ "random_order": false,
12
+ "tfs": {
13
+ "brightness": {
14
+ "weight": 1.0,
15
+ "type": "ColorJitter",
16
+ "kwargs": {
17
+ "brightness": [
18
+ 0.8,
19
+ 1.2
20
+ ]
21
+ }
22
+ },
23
+ "contrast": {
24
+ "weight": 1.0,
25
+ "type": "ColorJitter",
26
+ "kwargs": {
27
+ "contrast": [
28
+ 0.8,
29
+ 1.2
30
+ ]
31
+ }
32
+ },
33
+ "saturation": {
34
+ "weight": 1.0,
35
+ "type": "ColorJitter",
36
+ "kwargs": {
37
+ "saturation": [
38
+ 0.5,
39
+ 1.5
40
+ ]
41
+ }
42
+ },
43
+ "hue": {
44
+ "weight": 1.0,
45
+ "type": "ColorJitter",
46
+ "kwargs": {
47
+ "hue": [
48
+ -0.05,
49
+ 0.05
50
+ ]
51
+ }
52
+ },
53
+ "sharpness": {
54
+ "weight": 1.0,
55
+ "type": "SharpnessJitter",
56
+ "kwargs": {
57
+ "sharpness": [
58
+ 0.5,
59
+ 1.5
60
+ ]
61
+ }
62
+ },
63
+ "affine": {
64
+ "weight": 1.0,
65
+ "type": "RandomAffine",
66
+ "kwargs": {
67
+ "degrees": [
68
+ -5.0,
69
+ 5.0
70
+ ],
71
+ "translate": [
72
+ 0.05,
73
+ 0.05
74
+ ]
75
+ }
76
+ }
77
+ }
78
+ },
79
+ "revision": null,
80
+ "use_imagenet_stats": true,
81
+ "video_backend": "torchcodec",
82
+ "return_uint8": false,
83
+ "depth_output_unit": "mm",
84
+ "streaming": false,
85
+ "eval_split": 0.0
86
+ },
87
+ "env": null,
88
+ "policy": {
89
+ "type": "pi0",
90
+ "n_obs_steps": 1,
91
+ "input_features": {
92
+ "observation.state": {
93
+ "type": "STATE",
94
+ "shape": [
95
+ 6
96
+ ]
97
+ },
98
+ "observation.images.front": {
99
+ "type": "VISUAL",
100
+ "shape": [
101
+ 3,
102
+ 640,
103
+ 480
104
+ ]
105
+ },
106
+ "observation.images.top": {
107
+ "type": "VISUAL",
108
+ "shape": [
109
+ 3,
110
+ 640,
111
+ 480
112
+ ]
113
+ }
114
+ },
115
+ "output_features": {
116
+ "action": {
117
+ "type": "ACTION",
118
+ "shape": [
119
+ 6
120
+ ]
121
+ }
122
+ },
123
+ "device": "cuda",
124
+ "use_amp": false,
125
+ "use_peft": false,
126
+ "push_to_hub": true,
127
+ "repo_id": "AndreGaio/pi0_packing",
128
+ "private": null,
129
+ "tags": null,
130
+ "license": null,
131
+ "pretrained_path": null,
132
+ "pretrained_revision": null,
133
+ "paligemma_variant": "gemma_2b",
134
+ "action_expert_variant": "gemma_300m",
135
+ "dtype": "bfloat16",
136
+ "chunk_size": 50,
137
+ "n_action_steps": 50,
138
+ "max_state_dim": 32,
139
+ "max_action_dim": 32,
140
+ "num_inference_steps": 10,
141
+ "time_sampling_beta_alpha": 1.5,
142
+ "time_sampling_beta_beta": 1.0,
143
+ "time_sampling_scale": 0.999,
144
+ "time_sampling_offset": 0.001,
145
+ "min_period": 0.004,
146
+ "max_period": 4.0,
147
+ "use_relative_actions": false,
148
+ "relative_exclude_joints": [
149
+ "gripper"
150
+ ],
151
+ "action_feature_names": [
152
+ "shoulder_pan.pos",
153
+ "shoulder_lift.pos",
154
+ "elbow_flex.pos",
155
+ "wrist_flex.pos",
156
+ "wrist_roll.pos",
157
+ "gripper.pos"
158
+ ],
159
+ "rtc_config": null,
160
+ "image_resolution": [
161
+ 224,
162
+ 224
163
+ ],
164
+ "empty_cameras": 0,
165
+ "normalization_mapping": {
166
+ "VISUAL": "IDENTITY",
167
+ "STATE": "MEAN_STD",
168
+ "ACTION": "MEAN_STD"
169
+ },
170
+ "gradient_checkpointing": true,
171
+ "compile_model": false,
172
+ "compile_mode": "max-autotune",
173
+ "freeze_vision_encoder": false,
174
+ "train_expert_only": true,
175
+ "optimizer_lr": 2.5e-05,
176
+ "optimizer_betas": [
177
+ 0.9,
178
+ 0.95
179
+ ],
180
+ "optimizer_eps": 1e-08,
181
+ "optimizer_weight_decay": 0.01,
182
+ "optimizer_grad_clip_norm": 1.0,
183
+ "scheduler_warmup_steps": 1000,
184
+ "scheduler_decay_steps": 30000,
185
+ "scheduler_decay_lr": 2.5e-06,
186
+ "tokenizer_max_length": 48
187
+ },
188
+ "reward_model": null,
189
+ "output_dir": "outputs/train/pi0_packing",
190
+ "job_name": "pi0_packing",
191
+ "resume": false,
192
+ "seed": 1000,
193
+ "cudnn_deterministic": false,
194
+ "num_workers": 4,
195
+ "batch_size": 1,
196
+ "prefetch_factor": 4,
197
+ "persistent_workers": true,
198
+ "dataloader_multiprocessing_context": "spawn",
199
+ "steps": 5000,
200
+ "env_eval_freq": 20000,
201
+ "log_freq": 200,
202
+ "eval_steps": 0,
203
+ "max_eval_samples": 0,
204
+ "tolerance_s": 0.0001,
205
+ "save_checkpoint": true,
206
+ "save_freq": 1000,
207
+ "checkpoint_format": "safetensors",
208
+ "use_policy_training_preset": true,
209
+ "optimizer": {
210
+ "type": "adamw",
211
+ "lr": 2.5e-05,
212
+ "weight_decay": 0.01,
213
+ "grad_clip_norm": 1.0,
214
+ "betas": [
215
+ 0.9,
216
+ 0.95
217
+ ],
218
+ "eps": 1e-08
219
+ },
220
+ "scheduler": {
221
+ "type": "cosine_decay_with_warmup",
222
+ "num_warmup_steps": 1000,
223
+ "num_decay_steps": 30000,
224
+ "peak_lr": 2.5e-05,
225
+ "decay_lr": 2.5e-06
226
+ },
227
+ "parallelism": {
228
+ "dp_replicate": 1,
229
+ "dp_shard": 1,
230
+ "context_parallel": {
231
+ "ring_degree": 1,
232
+ "ulysses_degree": 1
233
+ },
234
+ "cfg_parallel": 1
235
+ },
236
+ "accelerator": {
237
+ "mixed_precision": "no",
238
+ "gradient_accumulation": {
239
+ "steps": 1
240
+ },
241
+ "fsdp": {
242
+ "reshard_after_forward": true,
243
+ "wrap_modules": null,
244
+ "min_num_params": null,
245
+ "cpu_offload": false,
246
+ "ignored_modules": null
247
+ },
248
+ "ddp": {
249
+ "find_unused_parameters": true,
250
+ "gradient_as_bucket_view": false,
251
+ "static_graph": false
252
+ },
253
+ "compile": {
254
+ "enabled": false,
255
+ "backend": "inductor",
256
+ "mode": null,
257
+ "regional": true
258
+ },
259
+ "activation_checkpointing": {
260
+ "mode": "none"
261
+ }
262
+ },
263
+ "eval": {
264
+ "n_episodes": 50,
265
+ "batch_size": 14,
266
+ "use_async_envs": true,
267
+ "recording": false,
268
+ "recording_repo_id": null,
269
+ "recording_private": false
270
+ },
271
+ "ema": {
272
+ "enable": false,
273
+ "decay": null,
274
+ "update_after_step": 0,
275
+ "inv_gamma": 1.0,
276
+ "power": 0.75,
277
+ "min_decay": 0.0,
278
+ "max_decay": 0.9999,
279
+ "use_for_eval": true
280
+ },
281
+ "wandb": {
282
+ "enable": true,
283
+ "disable_artifact": false,
284
+ "project": "lerobot",
285
+ "entity": null,
286
+ "notes": null,
287
+ "run_id": "jeggxlsa",
288
+ "mode": null,
289
+ "add_tags": true
290
+ },
291
+ "peft": null,
292
+ "job": {
293
+ "target": null,
294
+ "image": "huggingface/lerobot-gpu:latest",
295
+ "timeout": "2d",
296
+ "detach": false,
297
+ "tags": []
298
+ },
299
+ "save_checkpoint_to_hub": false,
300
+ "sample_weighting": null,
301
+ "rename_map": {},
302
+ "checkpoint_path": null
303
+ }