Files changed (6) hide show
  1. README.md +32 -10
  2. config.json +68 -50
  3. config.yaml +0 -184
  4. eval_info.json +0 -0
  5. model.safetensors +2 -2
  6. train_config.json +231 -0
README.md CHANGED
@@ -1,7 +1,12 @@
1
  ---
2
  license: apache-2.0
3
  datasets:
4
- - JayLee131/vqbet_pusht
 
 
 
 
 
5
  pipeline_tag: robotics
6
  ---
7
  # Model Card for VQ-BeT/PushT
@@ -14,21 +19,27 @@ See the [LeRobot library](https://github.com/huggingface/lerobot) (particularly
14
 
15
  ## Training Details
16
 
17
- Trained with [LeRobot@342f429](https://github.com/huggingface/lerobot/tree/342f429f1c321a2b4501c3007b1dacba7244b469).
18
 
19
- The model was trained using this command:
20
 
21
  ```bash
22
  python lerobot/scripts/train.py \
23
- policy=vqbet \
24
- env=pusht dataset_repo_id=lerobot/pusht \
25
- wandb.enable=true \
26
- device=cuda
 
 
 
 
 
 
27
  ```
28
 
29
- The training curves may be found at https://wandb.ai/jaylee0301/lerobot/runs/9r0ndphr?nw=nwuserjaylee0301.
 
30
 
31
- Training VQ-BeT on PushT took about 7-8 hours to train on an Nvida A6000.
32
 
33
  ## Model Size
34
 
@@ -51,4 +62,15 @@ Metric|Value
51
  Average max. overlap ratio for 500 episodes | 0.895
52
  Success rate for 500 episodes (%) | 63.8
53
 
54
- The results of each of the individual rollouts may be found in [eval_info.json](eval_info.json).
 
 
 
 
 
 
 
 
 
 
 
 
1
  ---
2
  license: apache-2.0
3
  datasets:
4
+ - lerobot/pusht
5
+ tags:
6
+ - vqbet-policy
7
+ - model_hub_mixin
8
+ - pytorch_model_hub_mixin
9
+ - robotics
10
  pipeline_tag: robotics
11
  ---
12
  # Model Card for VQ-BeT/PushT
 
19
 
20
  ## Training Details
21
 
22
+ Trained with [LeRobot@3c0a209](https://github.com/huggingface/lerobot/tree/3c0a209f9fac4d2a57617e686a7f2a2309144ba2).
23
 
24
+ The model was trained using [LeRobot's training script](https://github.com/huggingface/lerobot/blob/main/lerobot/scripts/train.py) and with the [pusht](https://huggingface.co/datasets/lerobot/pusht) dataset, using this command:
25
 
26
  ```bash
27
  python lerobot/scripts/train.py \
28
+ --output_dir=outputs/train/vqbet_pusht \
29
+ --policy.type=vqbet \
30
+ --dataset.repo_id=lerobot/pusht \
31
+ --env.type=pusht \
32
+ --seed=100000 \
33
+ --batch_size=64 \
34
+ --offline.steps=250000 \
35
+ --eval_freq=25000 \
36
+ --save_freq=25000 \
37
+ --wandb.enable=true
38
  ```
39
 
40
+ The training curves may be found at https://wandb.ai/aliberts/lerobot/runs/3i7zs94u.
41
+ The current model corresponds to the checkpoint at 200k steps.
42
 
 
43
 
44
  ## Model Size
45
 
 
62
  Average max. overlap ratio for 500 episodes | 0.895
63
  Success rate for 500 episodes (%) | 63.8
64
 
65
+ The results of each of the individual rollouts may be found in [eval_info.json](eval_info.json). It was produced after training with this command:
66
+ ```bash
67
+ python lerobot/scripts/eval.py \
68
+ --policy.path=outputs/train/vqbet_pusht/checkpoints/200000/pretrained_model \
69
+ --output_dir=outputs/eval/vqbet_pusht/200000 \
70
+ --env.type=pusht \
71
+ --seed=100000 \
72
+ --eval.n_episodes=500 \
73
+ --eval.batch_size=50 \
74
+ --device=cuda \
75
+ --use_amp=false
76
+ ```
config.json CHANGED
@@ -1,53 +1,71 @@
1
  {
2
- "action_chunk_size": 5,
3
- "bet_softmax_temperature": 0.01,
4
- "crop_is_random": true,
5
- "crop_shape": [
6
- 84,
7
- 84
8
- ],
9
- "dropout": 0.1,
10
- "gpt_block_size": 500,
11
- "gpt_hidden_dim": 512,
12
- "gpt_input_dim": 512,
13
- "gpt_n_head": 8,
14
- "gpt_n_layer": 8,
15
- "gpt_output_dim": 512,
16
- "input_normalization_modes": {
17
- "observation.image": "mean_std",
18
- "observation.state": "min_max"
19
- },
20
- "input_shapes": {
21
- "observation.image": [
22
- 3,
23
- 96,
24
- 96
 
 
 
 
 
 
 
 
 
 
 
 
 
 
25
  ],
26
- "observation.state": [
27
- 2
28
- ]
29
- },
30
- "mlp_hidden_dim": 1024,
31
- "n_action_pred_token": 7,
32
- "n_obs_steps": 5,
33
- "n_vqvae_training_steps": 20000,
34
- "offset_loss_weight": 10000.0,
35
- "output_normalization_modes": {
36
- "action": "min_max"
37
- },
38
- "output_shapes": {
39
- "action": [
40
- 2
41
- ]
42
- },
43
- "pretrained_backbone_weights": null,
44
- "primary_code_loss_weight": 5.0,
45
- "secondary_code_loss_weight": 0.5,
46
- "sequentially_select": false,
47
- "spatial_softmax_num_keypoints": 32,
48
- "use_group_norm": true,
49
- "vision_backbone": "resnet18",
50
- "vqvae_embedding_dim": 256,
51
- "vqvae_enc_hidden_dim": 128,
52
- "vqvae_n_embed": 16
 
 
 
 
53
  }
 
1
  {
2
+ "type": "vqbet",
3
+ "n_obs_steps": 5,
4
+ "normalization_mapping": {
5
+ "VISUAL": "IDENTITY",
6
+ "STATE": "MIN_MAX",
7
+ "ACTION": "MIN_MAX"
8
+ },
9
+ "input_features": {
10
+ "observation.image": {
11
+ "type": "VISUAL",
12
+ "shape": [
13
+ 3,
14
+ 96,
15
+ 96
16
+ ]
17
+ },
18
+ "observation.state": {
19
+ "type": "STATE",
20
+ "shape": [
21
+ 2
22
+ ]
23
+ }
24
+ },
25
+ "output_features": {
26
+ "action": {
27
+ "type": "ACTION",
28
+ "shape": [
29
+ 2
30
+ ]
31
+ }
32
+ },
33
+ "n_action_pred_token": 3,
34
+ "action_chunk_size": 5,
35
+ "vision_backbone": "resnet18",
36
+ "crop_shape": [
37
+ 84,
38
+ 84
39
  ],
40
+ "crop_is_random": true,
41
+ "pretrained_backbone_weights": null,
42
+ "use_group_norm": true,
43
+ "spatial_softmax_num_keypoints": 32,
44
+ "n_vqvae_training_steps": 20000,
45
+ "vqvae_n_embed": 16,
46
+ "vqvae_embedding_dim": 256,
47
+ "vqvae_enc_hidden_dim": 128,
48
+ "gpt_block_size": 500,
49
+ "gpt_input_dim": 512,
50
+ "gpt_output_dim": 512,
51
+ "gpt_n_layer": 8,
52
+ "gpt_n_head": 8,
53
+ "gpt_hidden_dim": 512,
54
+ "dropout": 0.1,
55
+ "mlp_hidden_dim": 1024,
56
+ "offset_loss_weight": 10000.0,
57
+ "primary_code_loss_weight": 5.0,
58
+ "secondary_code_loss_weight": 0.5,
59
+ "bet_softmax_temperature": 0.1,
60
+ "sequentially_select": false,
61
+ "optimizer_lr": 0.0001,
62
+ "optimizer_betas": [
63
+ 0.95,
64
+ 0.999
65
+ ],
66
+ "optimizer_eps": 1e-08,
67
+ "optimizer_weight_decay": 1e-06,
68
+ "optimizer_vqvae_lr": 0.001,
69
+ "optimizer_vqvae_weight_decay": 0.0001,
70
+ "scheduler_warmup_steps": 500
71
  }
config.yaml DELETED
@@ -1,184 +0,0 @@
1
- resume: false
2
- device: cuda
3
- use_amp: false
4
- seed: 100000
5
- dataset_repo_id: lerobot/pusht
6
- video_backend: pyav
7
- training:
8
- offline_steps: 250000
9
- online_steps: 0
10
- online_steps_between_rollouts: 1
11
- online_sampling_ratio: 0.5
12
- online_env_seed: ???
13
- eval_freq: 20000
14
- log_freq: 250
15
- save_checkpoint: true
16
- save_freq: 20000
17
- num_workers: 4
18
- batch_size: 64
19
- image_transforms:
20
- enable: false
21
- max_num_transforms: 3
22
- random_order: false
23
- brightness:
24
- weight: 1
25
- min_max:
26
- - 0.8
27
- - 1.2
28
- contrast:
29
- weight: 1
30
- min_max:
31
- - 0.8
32
- - 1.2
33
- saturation:
34
- weight: 1
35
- min_max:
36
- - 0.5
37
- - 1.5
38
- hue:
39
- weight: 1
40
- min_max:
41
- - -0.05
42
- - 0.05
43
- sharpness:
44
- weight: 1
45
- min_max:
46
- - 0.8
47
- - 1.2
48
- grad_clip_norm: 10
49
- lr: 0.0001
50
- lr_scheduler: cosine
51
- lr_warmup_steps: 500
52
- adam_betas:
53
- - 0.95
54
- - 0.999
55
- adam_eps: 1.0e-08
56
- adam_weight_decay: 1.0e-06
57
- vqvae_lr: 0.001
58
- n_vqvae_training_steps: 20000
59
- bet_weight_decay: 0.0002
60
- bet_learning_rate: 5.5e-05
61
- bet_betas:
62
- - 0.9
63
- - 0.999
64
- delta_timestamps:
65
- observation.image:
66
- - -0.4
67
- - -0.3
68
- - -0.2
69
- - -0.1
70
- - 0.0
71
- observation.state:
72
- - -0.4
73
- - -0.3
74
- - -0.2
75
- - -0.1
76
- - 0.0
77
- action:
78
- - -0.4
79
- - -0.3
80
- - -0.2
81
- - -0.1
82
- - 0.0
83
- - 0.1
84
- - 0.2
85
- - 0.3
86
- - 0.4
87
- - 0.5
88
- - 0.6
89
- - 0.7
90
- - 0.8
91
- - 0.9
92
- - 1.0
93
- eval:
94
- n_episodes: 50
95
- batch_size: 50
96
- use_async_envs: false
97
- wandb:
98
- enable: true
99
- disable_artifact: false
100
- project: lerobot
101
- notes: ''
102
- fps: 10
103
- env:
104
- name: pusht
105
- task: PushT-v0
106
- image_size: 96
107
- state_dim: 2
108
- action_dim: 2
109
- fps: ${fps}
110
- episode_length: 300
111
- gym:
112
- obs_type: pixels_agent_pos
113
- render_mode: rgb_array
114
- visualization_width: 384
115
- visualization_height: 384
116
- override_dataset_stats:
117
- observation.image:
118
- mean:
119
- - - - 0.5
120
- - - - 0.5
121
- - - - 0.5
122
- std:
123
- - - - 0.5
124
- - - - 0.5
125
- - - - 0.5
126
- observation.state:
127
- min:
128
- - 13.456424
129
- - 32.938293
130
- max:
131
- - 496.14618
132
- - 510.9579
133
- action:
134
- min:
135
- - 12.0
136
- - 25.0
137
- max:
138
- - 511.0
139
- - 511.0
140
- policy:
141
- name: vqbet
142
- n_obs_steps: 5
143
- n_action_pred_token: 7
144
- action_chunk_size: 5
145
- input_shapes:
146
- observation.image:
147
- - 3
148
- - 96
149
- - 96
150
- observation.state:
151
- - ${env.state_dim}
152
- output_shapes:
153
- action:
154
- - ${env.action_dim}
155
- input_normalization_modes:
156
- observation.image: mean_std
157
- observation.state: min_max
158
- output_normalization_modes:
159
- action: min_max
160
- vision_backbone: resnet18
161
- crop_shape:
162
- - 84
163
- - 84
164
- crop_is_random: true
165
- pretrained_backbone_weights: null
166
- use_group_norm: true
167
- spatial_softmax_num_keypoints: 32
168
- n_vqvae_training_steps: ${training.n_vqvae_training_steps}
169
- vqvae_n_embed: 16
170
- vqvae_embedding_dim: 256
171
- vqvae_enc_hidden_dim: 128
172
- gpt_block_size: 500
173
- gpt_input_dim: 512
174
- gpt_output_dim: 512
175
- gpt_n_layer: 8
176
- gpt_n_head: 8
177
- gpt_hidden_dim: 512
178
- dropout: 0.1
179
- mlp_hidden_dim: 1024
180
- offset_loss_weight: 10000.0
181
- primary_code_loss_weight: 5.0
182
- secondary_code_loss_weight: 0.5
183
- bet_softmax_temperature: 0.01
184
- sequentially_select: false
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
eval_info.json CHANGED
The diff for this file is too large to render. See raw diff
 
model.safetensors CHANGED
@@ -1,3 +1,3 @@
1
  version https://git-lfs.github.com/spec/v1
2
- oid sha256:85995b992d83133f65e2a3d81bbeefeaa9e082f4e79d6cff5d5c5ab05cfc096b
3
- size 158152442
 
1
  version https://git-lfs.github.com/spec/v1
2
+ oid sha256:f60b22049b275c026159fd4fcc018721ffbec47119ecfab98dc84814eb4e0d30
3
+ size 158152042
train_config.json ADDED
@@ -0,0 +1,231 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ {
2
+ "dataset": {
3
+ "repo_id": "lerobot/pusht",
4
+ "episodes": null,
5
+ "image_transforms": {
6
+ "enable": false,
7
+ "max_num_transforms": 3,
8
+ "random_order": false,
9
+ "tfs": {
10
+ "brightness": {
11
+ "weight": 1.0,
12
+ "type": "ColorJitter",
13
+ "kwargs": {
14
+ "brightness": [
15
+ 0.8,
16
+ 1.2
17
+ ]
18
+ }
19
+ },
20
+ "contrast": {
21
+ "weight": 1.0,
22
+ "type": "ColorJitter",
23
+ "kwargs": {
24
+ "contrast": [
25
+ 0.8,
26
+ 1.2
27
+ ]
28
+ }
29
+ },
30
+ "saturation": {
31
+ "weight": 1.0,
32
+ "type": "ColorJitter",
33
+ "kwargs": {
34
+ "saturation": [
35
+ 0.5,
36
+ 1.5
37
+ ]
38
+ }
39
+ },
40
+ "hue": {
41
+ "weight": 1.0,
42
+ "type": "ColorJitter",
43
+ "kwargs": {
44
+ "hue": [
45
+ -0.05,
46
+ 0.05
47
+ ]
48
+ }
49
+ },
50
+ "sharpness": {
51
+ "weight": 1.0,
52
+ "type": "SharpnessJitter",
53
+ "kwargs": {
54
+ "sharpness": [
55
+ 0.5,
56
+ 1.5
57
+ ]
58
+ }
59
+ }
60
+ }
61
+ },
62
+ "local_files_only": false,
63
+ "use_imagenet_stats": true,
64
+ "video_backend": "pyav"
65
+ },
66
+ "env": {
67
+ "type": "pusht",
68
+ "task": "PushT-v0",
69
+ "fps": 10,
70
+ "features": {
71
+ "action": {
72
+ "type": "ACTION",
73
+ "shape": [
74
+ 2
75
+ ]
76
+ },
77
+ "agent_pos": {
78
+ "type": "STATE",
79
+ "shape": [
80
+ 2
81
+ ]
82
+ },
83
+ "pixels": {
84
+ "type": "VISUAL",
85
+ "shape": [
86
+ 384,
87
+ 384,
88
+ 3
89
+ ]
90
+ }
91
+ },
92
+ "features_map": {
93
+ "action": "action",
94
+ "agent_pos": "observation.state",
95
+ "environment_state": "observation.environment_state",
96
+ "pixels": "observation.image"
97
+ },
98
+ "episode_length": 300,
99
+ "obs_type": "pixels_agent_pos",
100
+ "render_mode": "rgb_array",
101
+ "visualization_width": 384,
102
+ "visualization_height": 384
103
+ },
104
+ "policy": {
105
+ "type": "vqbet",
106
+ "n_obs_steps": 5,
107
+ "normalization_mapping": {
108
+ "VISUAL": "IDENTITY",
109
+ "STATE": "MIN_MAX",
110
+ "ACTION": "MIN_MAX"
111
+ },
112
+ "input_features": {
113
+ "observation.image": {
114
+ "type": "VISUAL",
115
+ "shape": [
116
+ 3,
117
+ 96,
118
+ 96
119
+ ]
120
+ },
121
+ "observation.state": {
122
+ "type": "STATE",
123
+ "shape": [
124
+ 2
125
+ ]
126
+ }
127
+ },
128
+ "output_features": {
129
+ "action": {
130
+ "type": "ACTION",
131
+ "shape": [
132
+ 2
133
+ ]
134
+ }
135
+ },
136
+ "n_action_pred_token": 3,
137
+ "action_chunk_size": 5,
138
+ "vision_backbone": "resnet18",
139
+ "crop_shape": [
140
+ 84,
141
+ 84
142
+ ],
143
+ "crop_is_random": true,
144
+ "pretrained_backbone_weights": null,
145
+ "use_group_norm": true,
146
+ "spatial_softmax_num_keypoints": 32,
147
+ "n_vqvae_training_steps": 20000,
148
+ "vqvae_n_embed": 16,
149
+ "vqvae_embedding_dim": 256,
150
+ "vqvae_enc_hidden_dim": 128,
151
+ "gpt_block_size": 500,
152
+ "gpt_input_dim": 512,
153
+ "gpt_output_dim": 512,
154
+ "gpt_n_layer": 8,
155
+ "gpt_n_head": 8,
156
+ "gpt_hidden_dim": 512,
157
+ "dropout": 0.1,
158
+ "mlp_hidden_dim": 1024,
159
+ "offset_loss_weight": 10000.0,
160
+ "primary_code_loss_weight": 5.0,
161
+ "secondary_code_loss_weight": 0.5,
162
+ "bet_softmax_temperature": 0.1,
163
+ "sequentially_select": false,
164
+ "optimizer_lr": 0.0001,
165
+ "optimizer_betas": [
166
+ 0.95,
167
+ 0.999
168
+ ],
169
+ "optimizer_eps": 1e-08,
170
+ "optimizer_weight_decay": 1e-06,
171
+ "optimizer_vqvae_lr": 0.001,
172
+ "optimizer_vqvae_weight_decay": 0.0001,
173
+ "scheduler_warmup_steps": 500
174
+ },
175
+ "output_dir": "outputs/train/2025-01-25/20-30-40_pusht_vqbet",
176
+ "job_name": "pusht_vqbet",
177
+ "resume": false,
178
+ "device": "cuda",
179
+ "use_amp": false,
180
+ "seed": 100000,
181
+ "num_workers": 4,
182
+ "batch_size": 64,
183
+ "eval_freq": 25000,
184
+ "log_freq": 200,
185
+ "save_checkpoint": true,
186
+ "save_freq": 25000,
187
+ "offline": {
188
+ "steps": 250000
189
+ },
190
+ "online": {
191
+ "steps": 0,
192
+ "rollout_n_episodes": 1,
193
+ "rollout_batch_size": 1,
194
+ "steps_between_rollouts": null,
195
+ "sampling_ratio": 0.5,
196
+ "env_seed": null,
197
+ "buffer_capacity": null,
198
+ "buffer_seed_size": 0,
199
+ "do_rollout_async": false
200
+ },
201
+ "use_policy_training_preset": true,
202
+ "optimizer": {
203
+ "type": "adam",
204
+ "lr": 0.0001,
205
+ "betas": [
206
+ 0.95,
207
+ 0.999
208
+ ],
209
+ "eps": 1e-08,
210
+ "weight_decay": 1e-06,
211
+ "grad_clip_norm": 10.0
212
+ },
213
+ "scheduler": {
214
+ "type": "vqbet",
215
+ "num_warmup_steps": 500,
216
+ "num_vqvae_training_steps": 20000,
217
+ "num_cycles": 0.5
218
+ },
219
+ "eval": {
220
+ "n_episodes": 50,
221
+ "batch_size": 50,
222
+ "use_async_envs": false
223
+ },
224
+ "wandb": {
225
+ "enable": true,
226
+ "disable_artifact": false,
227
+ "project": "lerobot",
228
+ "entity": null,
229
+ "notes": null
230
+ }
231
+ }