AdilZtn commited on
Commit
516a264
·
verified ·
1 Parent(s): d85546f

Migrate policy to PolicyProcessorPipeline system (#1)

Browse files

- Migrate policy to PolicyProcessorPipeline system (9c66c72de6399e665cab20dd4bff11639fdd4b52)

README.md ADDED
@@ -0,0 +1,62 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ ---
2
+ datasets: unknown
3
+ library_name: lerobot
4
+ license: apache-2.0
5
+ model_name: pi0
6
+ pipeline_tag: robotics
7
+ tags:
8
+ - robotics
9
+ - pi0
10
+ - lerobot
11
+ ---
12
+
13
+ # Model Card for pi0
14
+
15
+ <!-- Provide a quick summary of what the model is/does. -->
16
+
17
+
18
+ [Pi0](https://huggingface.co/papers/2410.24164) is a generalist vision-language-action transformer that converts multimodal observations and text instructions into robot actions for zero-shot task transfer.
19
+
20
+
21
+ This policy has been trained and pushed to the Hub using [LeRobot](https://github.com/huggingface/lerobot).
22
+ See the full documentation at [LeRobot Docs](https://huggingface.co/docs/lerobot/index).
23
+
24
+ ---
25
+
26
+ ## How to Get Started with the Model
27
+
28
+ For a complete walkthrough, see the [training guide](https://huggingface.co/docs/lerobot/il_robots#train-a-policy).
29
+ Below is the short version on how to train and run inference/eval:
30
+
31
+ ### Train from scratch
32
+
33
+ ```bash
34
+ lerobot-train \
35
+ --dataset.repo_id=${HF_USER}/<dataset> \
36
+ --policy.type=act \
37
+ --output_dir=outputs/train/<desired_policy_repo_id> \
38
+ --job_name=lerobot_training \
39
+ --policy.device=cuda \
40
+ --policy.repo_id=${HF_USER}/<desired_policy_repo_id>
41
+ --wandb.enable=true
42
+ ```
43
+
44
+ _Writes checkpoints to `outputs/train/<desired_policy_repo_id>/checkpoints/`._
45
+
46
+ ### Evaluate the policy/run inference
47
+
48
+ ```bash
49
+ lerobot-record \
50
+ --robot.type=so100_follower \
51
+ --dataset.repo_id=<hf_user>/eval_<dataset> \
52
+ --policy.path=<hf_user>/<desired_policy_repo_id> \
53
+ --episodes=10
54
+ ```
55
+
56
+ Prefix the dataset repo with **eval\_** and supply `--policy.path` pointing to a local or hub checkpoint.
57
+
58
+ ---
59
+
60
+ ## Model Details
61
+
62
+ - **License:** apache-2.0
config.json ADDED
@@ -0,0 +1,47 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ {
2
+ "type": "pi0",
3
+ "n_obs_steps": 1,
4
+ "input_features": {},
5
+ "output_features": {},
6
+ "device": "cuda",
7
+ "use_amp": false,
8
+ "push_to_hub": true,
9
+ "repo_id": null,
10
+ "private": null,
11
+ "tags": null,
12
+ "license": null,
13
+ "chunk_size": 50,
14
+ "n_action_steps": 50,
15
+ "normalization_mapping": {
16
+ "VISUAL": "IDENTITY",
17
+ "STATE": "MEAN_STD",
18
+ "ACTION": "MEAN_STD"
19
+ },
20
+ "max_state_dim": 32,
21
+ "max_action_dim": 32,
22
+ "resize_imgs_with_padding": [
23
+ 224,
24
+ 224
25
+ ],
26
+ "empty_cameras": 0,
27
+ "adapt_to_pi_aloha": false,
28
+ "use_delta_joint_actions_aloha": false,
29
+ "tokenizer_max_length": 48,
30
+ "proj_width": 1024,
31
+ "num_steps": 10,
32
+ "use_cache": true,
33
+ "attention_implementation": "eager",
34
+ "freeze_vision_encoder": true,
35
+ "train_expert_only": false,
36
+ "train_state_proj": true,
37
+ "optimizer_lr": 2.5e-05,
38
+ "optimizer_betas": [
39
+ 0.9,
40
+ 0.95
41
+ ],
42
+ "optimizer_eps": 1e-08,
43
+ "optimizer_weight_decay": 1e-10,
44
+ "scheduler_warmup_steps": 1000,
45
+ "scheduler_decay_steps": 30000,
46
+ "scheduler_decay_lr": 2.5e-06
47
+ }
model.safetensors ADDED
@@ -0,0 +1,3 @@
 
 
 
 
1
+ version https://git-lfs.github.com/spec/v1
2
+ oid sha256:57023fcfbc03d75f878294e574e090b8f117dda73507c45d50486fbfe62ccbfc
3
+ size 7536024344
policy_postprocessor.json ADDED
@@ -0,0 +1,24 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ {
2
+ "name": "policy_postprocessor",
3
+ "steps": [
4
+ {
5
+ "registry_name": "unnormalizer_processor",
6
+ "config": {
7
+ "eps": 1e-08,
8
+ "features": {},
9
+ "norm_map": {
10
+ "VISUAL": "IDENTITY",
11
+ "STATE": "MEAN_STD",
12
+ "ACTION": "MEAN_STD"
13
+ }
14
+ }
15
+ },
16
+ {
17
+ "registry_name": "device_processor",
18
+ "config": {
19
+ "device": "cpu",
20
+ "float_dtype": null
21
+ }
22
+ }
23
+ ]
24
+ }
policy_preprocessor.json ADDED
@@ -0,0 +1,49 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
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": "pi0_new_line_processor",
16
+ "config": {}
17
+ },
18
+ {
19
+ "registry_name": "tokenizer_processor",
20
+ "config": {
21
+ "max_length": 48,
22
+ "task_key": "task",
23
+ "padding_side": "right",
24
+ "padding": "max_length",
25
+ "truncation": true,
26
+ "tokenizer_name": "google/paligemma-3b-pt-224"
27
+ }
28
+ },
29
+ {
30
+ "registry_name": "device_processor",
31
+ "config": {
32
+ "device": "cuda",
33
+ "float_dtype": null
34
+ }
35
+ },
36
+ {
37
+ "registry_name": "normalizer_processor",
38
+ "config": {
39
+ "eps": 1e-08,
40
+ "features": {},
41
+ "norm_map": {
42
+ "VISUAL": "IDENTITY",
43
+ "STATE": "MEAN_STD",
44
+ "ACTION": "MEAN_STD"
45
+ }
46
+ }
47
+ }
48
+ ]
49
+ }