s3y commited on
Commit
8dc1007
·
verified ·
1 Parent(s): 5e0d0d5

Upload folder using huggingface_hub

Browse files
.gitattributes CHANGED
@@ -33,3 +33,4 @@ saved_model/**/* filter=lfs diff=lfs merge=lfs -text
33
  *.zip filter=lfs diff=lfs merge=lfs -text
34
  *.zst filter=lfs diff=lfs merge=lfs -text
35
  *tfevents* filter=lfs diff=lfs merge=lfs -text
 
 
33
  *.zip filter=lfs diff=lfs merge=lfs -text
34
  *.zst filter=lfs diff=lfs merge=lfs -text
35
  *tfevents* filter=lfs diff=lfs merge=lfs -text
36
+ tokenizer.json filter=lfs diff=lfs merge=lfs -text
README.md ADDED
@@ -0,0 +1,30 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ ---
2
+ license: apache-2.0
3
+ library_name: lerobot
4
+ pipeline_tag: robotics
5
+ ---
6
+
7
+ ## Pi0 pretrained model
8
+
9
+ This repository contains the model described in [π_0: A Vision-Language-Action Flow Model for General Robot Control](https://huggingface.co/papers/2410.24164).
10
+
11
+ See the [Twitter thread](https://x.com/RemiCadene/status/1886823939856589296) and [blog post](https://huggingface.co/blog/pi0) for more info regarding its integration in [LeRobot](https://github.com/huggingface/lerobot).
12
+
13
+ ## Usage
14
+
15
+ You can download and use this model with:
16
+ ```python
17
+ policy = Pi0Policy.from_pretrained("lerobot/pi0")
18
+ action = policy.select_action(batch)
19
+ ```
20
+
21
+ ## Fine-tuning
22
+
23
+ You can easily finetune it on your dataset. For instance on @dana_55517 's [dataset](https://huggingface.co/spaces/lerobot/visualize_dataset?dataset=danaaubakirova%2Fkoch_test&episode=0):
24
+ ```python
25
+ python lerobot/scripts/train.py \
26
+ --policy.path=lerobot/pi0 \
27
+ --dataset.repo_id=danaaubakirova/koch_test
28
+ ```
29
+
30
+ Take a look at the [code](https://github.com/huggingface/lerobot/blob/main/lerobot/common/policies/pi0/modeling_pi0.py) regarding the implementation.
config.json ADDED
@@ -0,0 +1,85 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
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.camera0": {
12
+ "type": "VISUAL",
13
+ "shape": [
14
+ 3,
15
+ 480,
16
+ 640
17
+ ]
18
+ },
19
+ "observation.images.camera1": {
20
+ "type": "VISUAL",
21
+ "shape": [
22
+ 3,
23
+ 480,
24
+ 640
25
+ ]
26
+ },
27
+ "observation.images.camera2": {
28
+ "type": "VISUAL",
29
+ "shape": [
30
+ 3,
31
+ 480,
32
+ 640
33
+ ]
34
+ }
35
+ },
36
+ "output_features": {
37
+ "action": {
38
+ "type": "ACTION",
39
+ "shape": [
40
+ 6
41
+ ]
42
+ }
43
+ },
44
+ "device": "cpu",
45
+ "use_amp": false,
46
+ "push_to_hub": true,
47
+ "repo_id": null,
48
+ "private": null,
49
+ "tags": null,
50
+ "license": null,
51
+ "chunk_size": 50,
52
+ "n_action_steps": 50,
53
+ "normalization_mapping": {
54
+ "VISUAL": "IDENTITY",
55
+ "STATE": "MEAN_STD",
56
+ "ACTION": "MEAN_STD"
57
+ },
58
+ "max_state_dim": 32,
59
+ "max_action_dim": 32,
60
+ "resize_imgs_with_padding": [
61
+ 224,
62
+ 224
63
+ ],
64
+ "empty_cameras": 0,
65
+ "adapt_to_pi_aloha": false,
66
+ "use_delta_joint_actions_aloha": false,
67
+ "tokenizer_max_length": 48,
68
+ "proj_width": 1024,
69
+ "num_steps": 10,
70
+ "use_cache": true,
71
+ "attention_implementation": "eager",
72
+ "freeze_vision_encoder": true,
73
+ "train_expert_only": false,
74
+ "train_state_proj": true,
75
+ "optimizer_lr": 2.5e-05,
76
+ "optimizer_betas": [
77
+ 0.9,
78
+ 0.95
79
+ ],
80
+ "optimizer_eps": 1e-08,
81
+ "optimizer_weight_decay": 1e-10,
82
+ "scheduler_warmup_steps": 1000,
83
+ "scheduler_decay_steps": 30000,
84
+ "scheduler_decay_lr": 2.5e-06
85
+ }
model.safetensors ADDED
@@ -0,0 +1,3 @@
 
 
 
 
1
+ version https://git-lfs.github.com/spec/v1
2
+ oid sha256:766fa4f2a981da1e46b0be7ecb6055c4780117c6e8aef8a9f36ecdfd0b1c5da8
3
+ size 136
policy_postprocessor.json ADDED
@@ -0,0 +1,31 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
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": "MEAN_STD",
19
+ "ACTION": "MEAN_STD"
20
+ }
21
+ }
22
+ },
23
+ {
24
+ "registry_name": "device_processor",
25
+ "config": {
26
+ "device": "cpu",
27
+ "float_dtype": null
28
+ }
29
+ }
30
+ ]
31
+ }
policy_preprocessor.json ADDED
@@ -0,0 +1,86 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
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": "cpu",
33
+ "float_dtype": null
34
+ }
35
+ },
36
+ {
37
+ "registry_name": "normalizer_processor",
38
+ "config": {
39
+ "eps": 1e-08,
40
+ "features": {
41
+ "observation.state": {
42
+ "type": "STATE",
43
+ "shape": [
44
+ 6
45
+ ]
46
+ },
47
+ "observation.images.camera0": {
48
+ "type": "VISUAL",
49
+ "shape": [
50
+ 3,
51
+ 480,
52
+ 640
53
+ ]
54
+ },
55
+ "observation.images.camera1": {
56
+ "type": "VISUAL",
57
+ "shape": [
58
+ 3,
59
+ 480,
60
+ 640
61
+ ]
62
+ },
63
+ "observation.images.camera2": {
64
+ "type": "VISUAL",
65
+ "shape": [
66
+ 3,
67
+ 480,
68
+ 640
69
+ ]
70
+ },
71
+ "action": {
72
+ "type": "ACTION",
73
+ "shape": [
74
+ 6
75
+ ]
76
+ }
77
+ },
78
+ "norm_map": {
79
+ "VISUAL": "IDENTITY",
80
+ "STATE": "MEAN_STD",
81
+ "ACTION": "MEAN_STD"
82
+ }
83
+ }
84
+ }
85
+ ]
86
+ }