theconstruct-ai commited on
Commit
fe18312
·
verified ·
1 Parent(s): 0392252

Upload folder using huggingface_hub

Browse files
config.json ADDED
@@ -0,0 +1,88 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ {
2
+ "action_horizon": 40,
3
+ "add_pos_embed": true,
4
+ "apply_sincos_state_encoding": false,
5
+ "architectures": [
6
+ "Gr00tN1d7"
7
+ ],
8
+ "attn_dropout": 0.2,
9
+ "attn_implementation": null,
10
+ "backbone_embedding_dim": 2048,
11
+ "backbone_trainable_params_fp32": true,
12
+ "color_jitter_params": {
13
+ "brightness": 0.3,
14
+ "contrast": 0.4,
15
+ "hue": 0.08,
16
+ "saturation": 0.5
17
+ },
18
+ "crop_fraction": 0.95,
19
+ "diffusion_model_cfg": {
20
+ "attention_head_dim": 48,
21
+ "dropout": 0.2,
22
+ "final_dropout": true,
23
+ "interleave_self_attention": true,
24
+ "norm_type": "ada_norm",
25
+ "num_attention_heads": 32,
26
+ "num_layers": 32,
27
+ "output_dim": 1024,
28
+ "positional_embeddings": null
29
+ },
30
+ "dtype": "bfloat16",
31
+ "exclude_state": false,
32
+ "formalize_language": true,
33
+ "hidden_size": 1024,
34
+ "image_crop_size": [
35
+ 230,
36
+ 230
37
+ ],
38
+ "image_target_size": [
39
+ 256,
40
+ 256
41
+ ],
42
+ "letter_box_transform": false,
43
+ "load_bf16": false,
44
+ "max_action_dim": 132,
45
+ "max_num_embodiments": 32,
46
+ "max_seq_len": 1024,
47
+ "max_state_dim": 132,
48
+ "model_dtype": "bfloat16",
49
+ "model_name": "nvidia/Cosmos-Reason2-2B",
50
+ "model_type": "Gr00tN1d7",
51
+ "noise_beta_alpha": 1.5,
52
+ "noise_beta_beta": 1.0,
53
+ "noise_s": 0.999,
54
+ "num_inference_timesteps": 4,
55
+ "num_timestep_buckets": 1000,
56
+ "random_history_crop": true,
57
+ "random_rotation_angle": 0,
58
+ "reproject_vision": false,
59
+ "rtc_ramp_rate": 6.0,
60
+ "select_layer": 16,
61
+ "shortest_image_edge": 256,
62
+ "state_dropout_prob": 0.2,
63
+ "state_gaussian_noise_std": 0.0,
64
+ "transformers_version": "4.57.3",
65
+ "tune_diffusion_model": true,
66
+ "tune_linear": true,
67
+ "tune_llm": false,
68
+ "tune_projector": true,
69
+ "tune_top_llm_layers": 0,
70
+ "tune_visual": false,
71
+ "tune_vlln": true,
72
+ "use_albumentations": true,
73
+ "use_alternate_vl_dit": true,
74
+ "use_flash_attention": true,
75
+ "use_future_tokens": false,
76
+ "use_mean_std": false,
77
+ "use_percentiles": true,
78
+ "use_vl_self_attention": true,
79
+ "use_vlln": true,
80
+ "vl_self_attention_cfg": {
81
+ "attention_head_dim": 64,
82
+ "dropout": 0.2,
83
+ "final_dropout": true,
84
+ "num_attention_heads": 32,
85
+ "num_layers": 4,
86
+ "positional_embeddings": null
87
+ }
88
+ }
embodiment_id.json ADDED
@@ -0,0 +1,58 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ {
2
+ "robocasa_panda_omron": 13,
3
+ "oxe_droid": 17,
4
+ "oxe_fractal": 18,
5
+ "oxe_language_table": 19,
6
+ "oxe_bridge": 20,
7
+ "unknown": 22,
8
+ "gr1_unified": 20,
9
+ "agibot": 26,
10
+ "sim_behavior_r1_pro": 23,
11
+ "xdof": 24,
12
+ "xdof_oss_data": 25,
13
+ "unitree_g1_full_body_with_waist_height_nav_cmd": 25,
14
+ "real_r1_pro_sharpa": 27,
15
+ "real_r1_pro_sharpa_add_view": 27,
16
+ "real_r1_pro_sharpa_relative_arm_joint": 26,
17
+ "real_r1_pro_sharpa_delta_eef": 26,
18
+ "real_r1_pro_sharpa_absolute_eef": 26,
19
+ "real_r1_pro_sharpa_meanstd": 26,
20
+ "real_r1_pro_sharpa_relative_eef": 26,
21
+ "real_r1_pro_sharpa_relative_eef_add_view": 26,
22
+ "real_r1_pro_sharpa_relative_eef_relative_hand": 26,
23
+ "real_r1_pro_sharpa_relative_eef_human": 26,
24
+ "real_r1_pro_sharpa_relative_eef_human_add_view": 26,
25
+ "real_r1_pro_sharpa_relative_eef_human_relative_hand": 26,
26
+ "real_r1_pro_sharpa_relative_eef_egodex": 26,
27
+ "real_r1_pro_sharpa_relative_eef_egodex_relative_hand": 26,
28
+ "real_r1_pro_sharpa_relative_eef_egodex_wrist_only": 26,
29
+ "real_r1_pro_sharpa_relative_eef_maxinsights": 26,
30
+ "real_r1_pro_sharpa_relative_eef_maxinsights_relative_hand": 26,
31
+ "real_r1_pro_sharpa_relative_eef_mecka": 26,
32
+ "real_r1_pro_sharpa_relative_eef_mecka_relative_hand": 26,
33
+ "real_g1_relative_eef_absolute_joints": 25,
34
+ "real_g1_relative_eef_absolute_joints_wrist_cam": 25,
35
+ "real_g1_relative_eef_relative_joints": 25,
36
+ "real_r1_pro_sharpa_relative_eef_relative_hand_relative_joint": 26,
37
+ "real_r1_pro_sharpa_relative_joint": 29,
38
+ "oxe_droid_relative_eef_relative_joint": 24,
39
+ "oxe_droid_relative_eef_relative_joint_swapped": 24,
40
+ "oxe_droid_relative_eef_relative_joint_upweight_z": 24,
41
+ "oxe_droid_relative_eef_relative_joint_upweight_z_swapped": 24,
42
+ "oxe_droid_relative_eef_relative_joint_3view": 24,
43
+ "oxe_droid_relative_eef_relative_joint_3view_swapped": 24,
44
+ "oxe_droid_relative_eef": 24,
45
+ "oxe_droid_joint_position_relative": 24,
46
+ "xdof_relative_eef_relative_joint": 27,
47
+ "xdof_relative_eef_relative_joint_subtask": 27,
48
+ "xdof_relative_eef": 27,
49
+ "xdof_relative_joint": 28,
50
+ "simpler_env_google": 0,
51
+ "simpler_env_widowx": 1,
52
+ "libero_sim": 2,
53
+ "droid_sim": 3,
54
+ "g1_decoupled_wbc": 10,
55
+ "g1_29dof": 10,
56
+ "g1_23dof": 10,
57
+ "new_embodiment": 10
58
+ }
experiment_cfg/conf.yaml ADDED
@@ -0,0 +1,239 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ load_config_path: null
2
+ model:
3
+ model_type: Gr00tN1d7
4
+ model_dtype: bfloat16
5
+ model_name: nvidia/Cosmos-Reason2-2B
6
+ backbone_model_type: qwen
7
+ model_revision: null
8
+ tune_top_llm_layers: 0
9
+ backbone_embedding_dim: 2048
10
+ tune_llm: false
11
+ tune_visual: false
12
+ select_layer: 12
13
+ reproject_vision: false
14
+ use_flash_attention: true
15
+ load_bf16: false
16
+ backbone_trainable_params_fp32: true
17
+ image_crop_size:
18
+ - 230
19
+ - 230
20
+ image_target_size:
21
+ - 256
22
+ - 256
23
+ shortest_image_edge: null
24
+ crop_fraction: null
25
+ random_rotation_angle: null
26
+ color_jitter_params:
27
+ brightness: 0.3
28
+ contrast: 0.4
29
+ saturation: 0.5
30
+ hue: 0.08
31
+ use_albumentations_transforms: true
32
+ extra_augmentation_config: null
33
+ formalize_language: true
34
+ apply_sincos_state_encoding: false
35
+ use_percentiles: true
36
+ use_relative_action: true
37
+ max_state_dim: 132
38
+ max_action_dim: 132
39
+ action_horizon: 40
40
+ hidden_size: 1024
41
+ input_embedding_dim: 1536
42
+ state_history_length: 1
43
+ add_pos_embed: true
44
+ attn_dropout: 0.2
45
+ use_vlln: true
46
+ max_seq_len: 1024
47
+ use_alternate_vl_dit: true
48
+ attend_text_every_n_blocks: 2
49
+ diffusion_model_cfg:
50
+ positional_embeddings: null
51
+ num_layers: 16
52
+ num_attention_heads: 32
53
+ attention_head_dim: 48
54
+ norm_type: ada_norm
55
+ dropout: 0.2
56
+ final_dropout: true
57
+ output_dim: 1024
58
+ interleave_self_attention: true
59
+ num_inference_timesteps: 4
60
+ noise_beta_alpha: 1.5
61
+ noise_beta_beta: 1.0
62
+ noise_s: 0.999
63
+ num_timestep_buckets: 1000
64
+ tune_projector: true
65
+ tune_diffusion_model: true
66
+ tune_vlln: true
67
+ state_dropout_prob: 0.2
68
+ exclude_state: false
69
+ use_mean_std: false
70
+ max_num_embodiments: 32
71
+ data:
72
+ datasets:
73
+ - dataset_paths:
74
+ - datasets/merged_dataset
75
+ embodiment_tag: g1_23dof
76
+ mix_ratio: 1.0
77
+ dataset_type: physical_embodiment
78
+ val_dataset_path: null
79
+ modality_configs:
80
+ g1_23dof:
81
+ video:
82
+ delta_indices:
83
+ - 0
84
+ modality_keys:
85
+ - ego_view
86
+ sin_cos_embedding_keys: null
87
+ mean_std_embedding_keys: null
88
+ action_configs: null
89
+ state:
90
+ delta_indices:
91
+ - 0
92
+ modality_keys:
93
+ - left_leg
94
+ - right_leg
95
+ - waist
96
+ - left_arm
97
+ - right_arm
98
+ - projected_gravity
99
+ sin_cos_embedding_keys: null
100
+ mean_std_embedding_keys: null
101
+ action_configs: null
102
+ action:
103
+ delta_indices:
104
+ - 0
105
+ - 1
106
+ - 2
107
+ - 3
108
+ - 4
109
+ - 5
110
+ - 6
111
+ - 7
112
+ - 8
113
+ - 9
114
+ - 10
115
+ - 11
116
+ - 12
117
+ - 13
118
+ - 14
119
+ - 15
120
+ - 16
121
+ - 17
122
+ - 18
123
+ - 19
124
+ - 20
125
+ - 21
126
+ - 22
127
+ - 23
128
+ - 24
129
+ - 25
130
+ - 26
131
+ - 27
132
+ - 28
133
+ - 29
134
+ - 30
135
+ - 31
136
+ - 32
137
+ - 33
138
+ - 34
139
+ - 35
140
+ - 36
141
+ - 37
142
+ - 38
143
+ - 39
144
+ modality_keys:
145
+ - motion_token
146
+ sin_cos_embedding_keys: null
147
+ mean_std_embedding_keys: null
148
+ action_configs:
149
+ - rep: ABSOLUTE
150
+ type: NON_EEF
151
+ format: DEFAULT
152
+ state_key: null
153
+ language:
154
+ delta_indices:
155
+ - 0
156
+ modality_keys:
157
+ - annotation.human.task_description
158
+ sin_cos_embedding_keys: null
159
+ mean_std_embedding_keys: null
160
+ action_configs: null
161
+ download_cache: false
162
+ shard_size: 1024
163
+ episode_sampling_rate: 0.1
164
+ num_shards_per_epoch: 100000
165
+ override_pretraining_statistics: true
166
+ mode: single_turn
167
+ random_chop: 0.0
168
+ mock_dataset_mode: false
169
+ shuffle: true
170
+ seed: 42
171
+ multiprocessing_context: fork
172
+ allow_padding: false
173
+ subsample_ratio: 1.0
174
+ image_crop_size:
175
+ - 244
176
+ - 244
177
+ image_target_size:
178
+ - 224
179
+ - 224
180
+ video_backend: torchcodec
181
+ training:
182
+ output_dir: ./outputs
183
+ experiment_name: null
184
+ max_steps: 5000
185
+ global_batch_size: 1536
186
+ batch_size: null
187
+ gradient_accumulation_steps: 1
188
+ learning_rate: 0.0001
189
+ lr_scheduler_type: cosine
190
+ weight_decay: 1.0e-05
191
+ warmup_ratio: 0.05
192
+ warmup_steps: 0
193
+ max_grad_norm: 1.0
194
+ optim: adamw_torch
195
+ start_from_checkpoint: nvidia/GR00T-N1.7-3B
196
+ skip_weight_loading: false
197
+ tf32: true
198
+ fp16: false
199
+ bf16: true
200
+ eval_bf16: true
201
+ logging_steps: 10
202
+ save_steps: 1000
203
+ save_total_limit: 5
204
+ save_vl_model: false
205
+ save_only_model: false
206
+ upload_checkpoints: false
207
+ upload_every: 1000
208
+ upload_last_n_checkpoints: 5
209
+ max_concurrent_uploads: 2
210
+ eval_strategy: 'no'
211
+ eval_steps: 500
212
+ eval_set_split_ratio: 0.1
213
+ eval_batch_size: 2
214
+ save_best_eval_metric_name: ''
215
+ save_best_eval_metric_greater_is_better: true
216
+ deepspeed_stage: 2
217
+ gradient_checkpointing: false
218
+ transformers_trust_remote_code: true
219
+ transformers_local_files_only: false
220
+ transformers_cache_dir: null
221
+ transformers_access_token: null
222
+ use_ddp: false
223
+ ddp_bucket_cap_mb: 100
224
+ num_gpus: 2
225
+ dataloader_num_workers: 6
226
+ remove_unused_columns: false
227
+ use_wandb: true
228
+ wandb_project: gr00t-g1-23dof-gear-sonic
229
+ enable_profiling: false
230
+ max_retries: 3
231
+ assert_loss_less_than: null
232
+ add_rl_callback: false
233
+ enable_open_loop_eval: false
234
+ open_loop_eval_traj_ids:
235
+ - 0
236
+ open_loop_eval_steps_per_traj: 100
237
+ open_loop_eval_plot_indices: null
238
+ max_steps: 5000
239
+ save_steps: 1000
experiment_cfg/config.yaml ADDED
@@ -0,0 +1,263 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ !!python/object:gr00t.configs.base_config.Config
2
+ data: !!python/object:gr00t.configs.data.data_config.DataConfig
3
+ allow_padding: false
4
+ datasets:
5
+ - !!python/object:gr00t.configs.data.data_config.SingleDatasetConfig
6
+ dataset_paths:
7
+ - datasets/merged_dataset
8
+ dataset_type: physical_embodiment
9
+ embodiment_tag: g1_23dof
10
+ mix_ratio: 1.0
11
+ val_dataset_path: null
12
+ download_cache: false
13
+ episode_sampling_rate: 0.1
14
+ image_crop_size:
15
+ - 244
16
+ - 244
17
+ image_target_size:
18
+ - 224
19
+ - 224
20
+ mock_dataset_mode: false
21
+ modality_configs:
22
+ g1_23dof:
23
+ action: !!python/object:gr00t.data.types.ModalityConfig
24
+ action_configs:
25
+ - !!python/object:gr00t.data.types.ActionConfig
26
+ format: !!python/object/apply:gr00t.data.types.ActionFormat
27
+ - default
28
+ rep: !!python/object/apply:gr00t.data.types.ActionRepresentation
29
+ - absolute
30
+ state_key: null
31
+ type: !!python/object/apply:gr00t.data.types.ActionType
32
+ - non_eef
33
+ delta_indices:
34
+ - 0
35
+ - 1
36
+ - 2
37
+ - 3
38
+ - 4
39
+ - 5
40
+ - 6
41
+ - 7
42
+ - 8
43
+ - 9
44
+ - 10
45
+ - 11
46
+ - 12
47
+ - 13
48
+ - 14
49
+ - 15
50
+ - 16
51
+ - 17
52
+ - 18
53
+ - 19
54
+ - 20
55
+ - 21
56
+ - 22
57
+ - 23
58
+ - 24
59
+ - 25
60
+ - 26
61
+ - 27
62
+ - 28
63
+ - 29
64
+ - 30
65
+ - 31
66
+ - 32
67
+ - 33
68
+ - 34
69
+ - 35
70
+ - 36
71
+ - 37
72
+ - 38
73
+ - 39
74
+ mean_std_embedding_keys: null
75
+ modality_keys:
76
+ - motion_token
77
+ sin_cos_embedding_keys: null
78
+ language: !!python/object:gr00t.data.types.ModalityConfig
79
+ action_configs: null
80
+ delta_indices:
81
+ - 0
82
+ mean_std_embedding_keys: null
83
+ modality_keys:
84
+ - annotation.human.task_description
85
+ sin_cos_embedding_keys: null
86
+ state: !!python/object:gr00t.data.types.ModalityConfig
87
+ action_configs: null
88
+ delta_indices:
89
+ - 0
90
+ mean_std_embedding_keys: null
91
+ modality_keys:
92
+ - left_leg
93
+ - right_leg
94
+ - waist
95
+ - left_arm
96
+ - right_arm
97
+ - projected_gravity
98
+ sin_cos_embedding_keys: null
99
+ video: !!python/object:gr00t.data.types.ModalityConfig
100
+ action_configs: null
101
+ delta_indices:
102
+ - 0
103
+ mean_std_embedding_keys: null
104
+ modality_keys:
105
+ - ego_view
106
+ sin_cos_embedding_keys: null
107
+ mode: single_turn
108
+ multiprocessing_context: fork
109
+ num_shards_per_epoch: 100000
110
+ override_pretraining_statistics: true
111
+ random_chop: 0.0
112
+ seed: 42
113
+ shard_size: 1024
114
+ shuffle: true
115
+ subsample_ratio: 1.0
116
+ video_backend: torchcodec
117
+ load_config_path: null
118
+ model: !!python/object:gr00t.configs.model.gr00t_n1d7.Gr00tN1d7Config
119
+ _attn_implementation_internal: null
120
+ _commit_hash: null
121
+ _name_or_path: ''
122
+ _output_attentions: false
123
+ add_cross_attention: false
124
+ architectures: null
125
+ backbone_trainable_params_fp32: true
126
+ bad_words_ids: null
127
+ begin_suppress_tokens: null
128
+ bos_token_id: null
129
+ chunk_size_feed_forward: 0
130
+ color_jitter_params:
131
+ brightness: 0.3
132
+ contrast: 0.4
133
+ hue: 0.08
134
+ saturation: 0.5
135
+ cross_attention_hidden_size: null
136
+ decoder_start_token_id: null
137
+ diffusion_model_cfg:
138
+ attention_head_dim: 48
139
+ dropout: 0.2
140
+ final_dropout: true
141
+ interleave_self_attention: true
142
+ norm_type: ada_norm
143
+ num_attention_heads: 32
144
+ num_layers: 16
145
+ output_dim: 1024
146
+ positional_embeddings: null
147
+ diversity_penalty: 0.0
148
+ do_sample: false
149
+ dtype: null
150
+ early_stopping: false
151
+ encoder_no_repeat_ngram_size: 0
152
+ eos_token_id: null
153
+ exponential_decay_length_penalty: null
154
+ extra_augmentation_config: null
155
+ finetuning_task: null
156
+ forced_bos_token_id: null
157
+ forced_eos_token_id: null
158
+ id2label:
159
+ 0: LABEL_0
160
+ 1: LABEL_1
161
+ is_decoder: false
162
+ is_encoder_decoder: false
163
+ label2id:
164
+ LABEL_0: 0
165
+ LABEL_1: 1
166
+ length_penalty: 1.0
167
+ load_bf16: false
168
+ max_length: 20
169
+ min_length: 0
170
+ model_name: nvidia/Cosmos-Reason2-2B
171
+ no_repeat_ngram_size: 0
172
+ num_beam_groups: 1
173
+ num_beams: 1
174
+ num_return_sequences: 1
175
+ output_hidden_states: false
176
+ output_scores: false
177
+ pad_token_id: null
178
+ prefix: null
179
+ problem_type: null
180
+ pruned_heads: {}
181
+ random_rotation_angle: null
182
+ remove_invalid_values: false
183
+ repetition_penalty: 1.0
184
+ reproject_vision: false
185
+ return_dict: true
186
+ return_dict_in_generate: false
187
+ sep_token_id: null
188
+ state_dropout_prob: 0.2
189
+ suppress_tokens: null
190
+ task_specific_params: null
191
+ temperature: 1.0
192
+ tf_legacy_loss: false
193
+ tie_encoder_decoder: false
194
+ tie_word_embeddings: true
195
+ tokenizer_class: null
196
+ top_k: 50
197
+ top_p: 1.0
198
+ torchscript: false
199
+ transformers_version: null
200
+ tune_diffusion_model: true
201
+ tune_llm: false
202
+ tune_projector: true
203
+ tune_visual: false
204
+ typical_p: 1.0
205
+ use_bfloat16: false
206
+ use_relative_action: true
207
+ training: !!python/object:gr00t.configs.training.training_config.TrainingConfig
208
+ add_rl_callback: false
209
+ assert_loss_less_than: null
210
+ batch_size: null
211
+ bf16: true
212
+ dataloader_num_workers: 6
213
+ ddp_bucket_cap_mb: 100
214
+ deepspeed_stage: 2
215
+ enable_open_loop_eval: false
216
+ enable_profiling: false
217
+ eval_batch_size: 2
218
+ eval_bf16: true
219
+ eval_set_split_ratio: 0.1
220
+ eval_steps: 500
221
+ eval_strategy: 'no'
222
+ experiment_name: null
223
+ fp16: false
224
+ global_batch_size: 1536
225
+ gradient_accumulation_steps: 1
226
+ gradient_checkpointing: false
227
+ learning_rate: 0.0001
228
+ logging_steps: 10
229
+ lr_scheduler_type: cosine
230
+ max_concurrent_uploads: 2
231
+ max_grad_norm: 1.0
232
+ max_retries: 3
233
+ max_steps: 5000
234
+ num_gpus: 2
235
+ open_loop_eval_plot_indices: null
236
+ open_loop_eval_steps_per_traj: 100
237
+ open_loop_eval_traj_ids:
238
+ - 0
239
+ optim: adamw_torch
240
+ output_dir: ./outputs
241
+ remove_unused_columns: false
242
+ save_best_eval_metric_greater_is_better: true
243
+ save_best_eval_metric_name: ''
244
+ save_only_model: false
245
+ save_steps: 1000
246
+ save_total_limit: 5
247
+ save_vl_model: false
248
+ skip_weight_loading: false
249
+ start_from_checkpoint: nvidia/GR00T-N1.7-3B
250
+ tf32: true
251
+ transformers_access_token: null
252
+ transformers_cache_dir: null
253
+ transformers_local_files_only: false
254
+ transformers_trust_remote_code: true
255
+ upload_checkpoints: false
256
+ upload_every: 1000
257
+ upload_last_n_checkpoints: 5
258
+ use_ddp: false
259
+ use_wandb: true
260
+ wandb_project: gr00t-g1-23dof-gear-sonic
261
+ warmup_ratio: 0.05
262
+ warmup_steps: 0
263
+ weight_decay: 1.0e-05
experiment_cfg/dataset_statistics.json ADDED
@@ -0,0 +1,683 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ {
2
+ "g1_23dof": {
3
+ "state": {
4
+ "left_leg": {
5
+ "min": [
6
+ -0.5459340214729309,
7
+ -0.0855279490351677,
8
+ -0.30465224385261536,
9
+ 0.10220573097467422,
10
+ -0.49335137009620667,
11
+ -0.1887393444776535
12
+ ],
13
+ "max": [
14
+ 0.20501652359962463,
15
+ 0.374708890914917,
16
+ 0.8120443820953369,
17
+ 0.7095087170600891,
18
+ 0.08322057873010635,
19
+ 0.09880660474300385
20
+ ],
21
+ "mean": [
22
+ -0.08437448740005493,
23
+ 0.17070677876472473,
24
+ 0.36073240637779236,
25
+ 0.278164803981781,
26
+ -0.09991944581270218,
27
+ -0.049597159028053284
28
+ ],
29
+ "std": [
30
+ 0.12944304943084717,
31
+ 0.05815165117383003,
32
+ 0.14297232031822205,
33
+ 0.10061296075582504,
34
+ 0.05531572923064232,
35
+ 0.046535152941942215
36
+ ],
37
+ "q01": [
38
+ -0.4338631331920624,
39
+ 0.04243161156773567,
40
+ 0.09522387623786926,
41
+ 0.14033366739749908,
42
+ -0.23219197154045104,
43
+ -0.1501700061559677
44
+ ],
45
+ "q99": [
46
+ 0.10913645237684252,
47
+ 0.297782496213913,
48
+ 0.7221103048324585,
49
+ 0.5608295178413394,
50
+ 0.00743490450084211,
51
+ 0.04231569215655327
52
+ ]
53
+ },
54
+ "right_leg": {
55
+ "min": [
56
+ -0.540952205657959,
57
+ -0.6762639284133911,
58
+ -0.9704035520553589,
59
+ 0.10315168648958206,
60
+ -0.32048365473747253,
61
+ -0.07556027919054031
62
+ ],
63
+ "max": [
64
+ 0.32152602076530457,
65
+ 0.004993959795683622,
66
+ 0.13150840997695923,
67
+ 0.9727909564971924,
68
+ 0.22199997305870056,
69
+ 0.1736387312412262
70
+ ],
71
+ "mean": [
72
+ -0.0710391253232956,
73
+ -0.19460518658161163,
74
+ -0.33198511600494385,
75
+ 0.24833254516124725,
76
+ -0.08041676878929138,
77
+ 0.07421831041574478
78
+ ],
79
+ "std": [
80
+ 0.1307123750448227,
81
+ 0.08589038252830505,
82
+ 0.17520152032375336,
83
+ 0.09660503268241882,
84
+ 0.04291360452771187,
85
+ 0.038767918944358826
86
+ ],
87
+ "q01": [
88
+ -0.4038192331790924,
89
+ -0.49985581994056705,
90
+ -0.832012779712677,
91
+ 0.13158997893333435,
92
+ -0.1892094749212265,
93
+ -0.011892826445400715
94
+ ],
95
+ "q99": [
96
+ 0.13808972477912906,
97
+ -0.072272312939167,
98
+ -0.03585171103477472,
99
+ 0.5319405603408816,
100
+ 0.002595924101769925,
101
+ 0.14700255513191224
102
+ ]
103
+ },
104
+ "waist": {
105
+ "min": [
106
+ -0.5798155069351196,
107
+ 0.0,
108
+ 0.0
109
+ ],
110
+ "max": [
111
+ 0.5319662690162659,
112
+ 0.0,
113
+ 0.0
114
+ ],
115
+ "mean": [
116
+ -0.0168711356818676,
117
+ 0.0,
118
+ 0.0
119
+ ],
120
+ "std": [
121
+ 0.10316666960716248,
122
+ 0.0,
123
+ 0.0
124
+ ],
125
+ "q01": [
126
+ -0.3160589241981506,
127
+ 0.0,
128
+ 0.0
129
+ ],
130
+ "q99": [
131
+ 0.2663214111328126,
132
+ 0.0,
133
+ 0.0
134
+ ]
135
+ },
136
+ "left_arm": {
137
+ "min": [
138
+ -1.1030880212783813,
139
+ -0.1675993949174881,
140
+ -0.8923574090003967,
141
+ -0.9334273338317871,
142
+ -1.5034329891204834,
143
+ 0.0,
144
+ 0.0
145
+ ],
146
+ "max": [
147
+ 0.5508189797401428,
148
+ 1.088623046875,
149
+ 1.2692612409591675,
150
+ 1.0954540967941284,
151
+ 0.9201248288154602,
152
+ 0.0,
153
+ 0.0
154
+ ],
155
+ "mean": [
156
+ -0.22408132255077362,
157
+ 0.09474024176597595,
158
+ -0.0277138352394104,
159
+ -0.2702457308769226,
160
+ -0.1695641428232193,
161
+ 0.0,
162
+ 0.0
163
+ ],
164
+ "std": [
165
+ 0.31768205761909485,
166
+ 0.09763894230127335,
167
+ 0.286970853805542,
168
+ 0.39503735303878784,
169
+ 0.2469521313905716,
170
+ 0.0,
171
+ 0.0
172
+ ],
173
+ "q01": [
174
+ -0.8920956611633301,
175
+ -0.14072931587696075,
176
+ -0.6733691668510438,
177
+ -0.8190911078453064,
178
+ -0.7292942714691162,
179
+ 0.0,
180
+ 0.0
181
+ ],
182
+ "q99": [
183
+ 0.31802635192871115,
184
+ 0.39074518322944735,
185
+ 0.7036245393753066,
186
+ 0.7728770494461061,
187
+ 0.4697001397609712,
188
+ 0.0,
189
+ 0.0
190
+ ]
191
+ },
192
+ "right_arm": {
193
+ "min": [
194
+ -1.0336154699325562,
195
+ -1.020492672920227,
196
+ -1.0978269577026367,
197
+ -0.9112325310707092,
198
+ -0.4976569414138794,
199
+ 0.0,
200
+ 0.0
201
+ ],
202
+ "max": [
203
+ 0.6401493549346924,
204
+ 0.12750017642974854,
205
+ 0.9652814269065857,
206
+ 1.1767909526824951,
207
+ 1.327252984046936,
208
+ 0.0,
209
+ 0.0
210
+ ],
211
+ "mean": [
212
+ -0.18618111312389374,
213
+ -0.20901130139827728,
214
+ -0.029420625418424606,
215
+ -0.25375744700431824,
216
+ 0.3556964099407196,
217
+ 0.0,
218
+ 0.0
219
+ ],
220
+ "std": [
221
+ 0.2901936173439026,
222
+ 0.1231326088309288,
223
+ 0.2634110748767853,
224
+ 0.447025328874588,
225
+ 0.2286490648984909,
226
+ 0.0,
227
+ 0.0
228
+ ],
229
+ "q01": [
230
+ -0.8342430114746093,
231
+ -0.6537447834014892,
232
+ -0.6420721077919006,
233
+ -0.8482607269287109,
234
+ -0.1779341048002243,
235
+ 0.0,
236
+ 0.0
237
+ ],
238
+ "q99": [
239
+ 0.3303744161128998,
240
+ 0.10009081274271017,
241
+ 0.6764625358581545,
242
+ 0.9298013710975648,
243
+ 0.8743508410453801,
244
+ 0.0,
245
+ 0.0
246
+ ]
247
+ },
248
+ "projected_gravity": {
249
+ "min": [
250
+ -0.25943535566329956,
251
+ -0.06603632867336273,
252
+ -1.0
253
+ ],
254
+ "max": [
255
+ 0.24466784298419952,
256
+ 0.17884667217731476,
257
+ -0.9549334049224854
258
+ ],
259
+ "mean": [
260
+ -0.01964072696864605,
261
+ -0.009458553045988083,
262
+ -0.9976155757904053
263
+ ],
264
+ "std": [
265
+ 0.06826014816761017,
266
+ 0.011069866828620434,
267
+ 0.0031423356849692536
268
+ ],
269
+ "q01": [
270
+ -0.14397265672683715,
271
+ -0.036699278354644774,
272
+ -0.9999906420707703
273
+ ],
274
+ "q99": [
275
+ 0.15479391098022463,
276
+ 0.023766361698508286,
277
+ -0.9861366152763367
278
+ ]
279
+ }
280
+ },
281
+ "action": {
282
+ "motion_token": {
283
+ "min": [
284
+ -0.375,
285
+ -0.3125,
286
+ -0.5625,
287
+ -0.5625,
288
+ -0.5625,
289
+ -0.25,
290
+ -0.5625,
291
+ -0.25,
292
+ -0.375,
293
+ -0.3125,
294
+ -0.25,
295
+ -0.1875,
296
+ -0.5625,
297
+ -0.4375,
298
+ -0.5,
299
+ -0.25,
300
+ -0.4375,
301
+ -0.375,
302
+ -0.5,
303
+ -0.375,
304
+ -0.4375,
305
+ -0.5625,
306
+ -0.4375,
307
+ -0.5625,
308
+ -0.375,
309
+ -0.1875,
310
+ -0.4375,
311
+ -0.125,
312
+ -0.3125,
313
+ -0.3125,
314
+ -0.375,
315
+ -0.25,
316
+ -0.5625,
317
+ -0.25,
318
+ -0.625,
319
+ -0.3125,
320
+ -0.5,
321
+ -0.5,
322
+ -0.3125,
323
+ -0.4375,
324
+ -0.3125,
325
+ -0.3125,
326
+ -0.375,
327
+ -0.5625,
328
+ -0.375,
329
+ -0.25,
330
+ -0.375,
331
+ -0.375,
332
+ -0.375,
333
+ -0.1875,
334
+ -0.4375,
335
+ -0.25,
336
+ -0.5,
337
+ -0.4375,
338
+ -0.5,
339
+ -0.375,
340
+ -0.1875,
341
+ -0.5625,
342
+ -0.1875,
343
+ -0.125,
344
+ -0.3125,
345
+ -0.25,
346
+ -0.3125,
347
+ -0.3125
348
+ ],
349
+ "max": [
350
+ 0.375,
351
+ 0.25,
352
+ 0.3125,
353
+ 0.4375,
354
+ 0.25,
355
+ 0.375,
356
+ 0.1875,
357
+ 0.5625,
358
+ 0.5,
359
+ 0.3125,
360
+ 0.3125,
361
+ 0.4375,
362
+ 0.0625,
363
+ 0.25,
364
+ 0.3125,
365
+ 0.1875,
366
+ 0.4375,
367
+ 0.1875,
368
+ 0.3125,
369
+ 0.5,
370
+ 0.125,
371
+ 0.125,
372
+ 0.375,
373
+ 0.375,
374
+ 0.5,
375
+ 0.4375,
376
+ 0.4375,
377
+ 0.5,
378
+ 0.4375,
379
+ 0.5,
380
+ 0.5,
381
+ 0.25,
382
+ 0.125,
383
+ 0.4375,
384
+ 0.3125,
385
+ 0.5,
386
+ 0.3125,
387
+ 0.4375,
388
+ 0.4375,
389
+ 0.25,
390
+ 0.3125,
391
+ 0.5,
392
+ 0.5,
393
+ 0.625,
394
+ 0.3125,
395
+ 0.3125,
396
+ 0.625,
397
+ 0.25,
398
+ 0.5,
399
+ 0.4375,
400
+ 0.5,
401
+ 0.4375,
402
+ 0.5625,
403
+ 0.1875,
404
+ 0.25,
405
+ 0.5,
406
+ 0.25,
407
+ 0.4375,
408
+ 0.5,
409
+ 0.5625,
410
+ 0.375,
411
+ 0.375,
412
+ 0.5625,
413
+ 0.4375
414
+ ],
415
+ "mean": [
416
+ -0.006018366198986769,
417
+ 0.013594353571534157,
418
+ -0.1649162769317627,
419
+ -0.13463063538074493,
420
+ -0.17451609671115875,
421
+ 0.03928036987781525,
422
+ -0.1433587670326233,
423
+ 0.1311170607805252,
424
+ 0.05385850742459297,
425
+ -0.05971476808190346,
426
+ 0.1232137382030487,
427
+ 0.1709931492805481,
428
+ -0.29868683218955994,
429
+ -0.13213254511356354,
430
+ -0.13807320594787598,
431
+ -0.034218546003103256,
432
+ 0.09489789605140686,
433
+ -0.04396841675043106,
434
+ -0.13838759064674377,
435
+ 0.12416090071201324,
436
+ -0.1852787882089615,
437
+ -0.21993763744831085,
438
+ -0.008303890004754066,
439
+ -0.08302014321088791,
440
+ -0.030996574088931084,
441
+ 0.18358182907104492,
442
+ 0.07671284675598145,
443
+ 0.20170168578624725,
444
+ 0.1769387274980545,
445
+ 0.07827359437942505,
446
+ 0.10372427105903625,
447
+ -0.009706106036901474,
448
+ -0.24429869651794434,
449
+ 0.1715250015258789,
450
+ -0.20563101768493652,
451
+ 0.19758926331996918,
452
+ -0.09794570505619049,
453
+ -0.06592069566249847,
454
+ 0.11705291271209717,
455
+ -0.04882436990737915,
456
+ -0.004678669385612011,
457
+ 0.19802600145339966,
458
+ 0.03873243182897568,
459
+ -0.04549120366573334,
460
+ 0.03079606592655182,
461
+ -0.0029464405961334705,
462
+ 0.08051759004592896,
463
+ -0.04411935433745384,
464
+ 0.08917783945798874,
465
+ 0.14999115467071533,
466
+ 0.08030814677476883,
467
+ 0.11475801467895508,
468
+ 0.06821782886981964,
469
+ -0.09977707266807556,
470
+ -0.12864263355731964,
471
+ 0.1216355711221695,
472
+ 0.07449118047952652,
473
+ -0.06997595727443695,
474
+ 0.1354496330022812,
475
+ 0.26794078946113586,
476
+ 0.09687886387109756,
477
+ 0.054690904915332794,
478
+ 0.11810100823640823,
479
+ 0.13261841237545013
480
+ ],
481
+ "std": [
482
+ 0.12128021568059921,
483
+ 0.09334389865398407,
484
+ 0.1226305440068245,
485
+ 0.14958569407463074,
486
+ 0.09323851019144058,
487
+ 0.09209959208965302,
488
+ 0.09774304181337357,
489
+ 0.1153830736875534,
490
+ 0.1485842764377594,
491
+ 0.08518482744693756,
492
+ 0.06639702618122101,
493
+ 0.07871170341968536,
494
+ 0.09752907603979111,
495
+ 0.07858863472938538,
496
+ 0.12899789214134216,
497
+ 0.06393566727638245,
498
+ 0.10396371781826019,
499
+ 0.07689941674470901,
500
+ 0.0984242632985115,
501
+ 0.09495389461517334,
502
+ 0.08418714255094528,
503
+ 0.09025149792432785,
504
+ 0.1383424997329712,
505
+ 0.12250979989767075,
506
+ 0.1219235211610794,
507
+ 0.07934145629405975,
508
+ 0.11620095372200012,
509
+ 0.10234510898590088,
510
+ 0.0859130248427391,
511
+ 0.11101008951663971,
512
+ 0.14977356791496277,
513
+ 0.07601481676101685,
514
+ 0.11018066108226776,
515
+ 0.08811068534851074,
516
+ 0.10632409900426865,
517
+ 0.128681018948555,
518
+ 0.10332945734262466,
519
+ 0.13798265159130096,
520
+ 0.10308199375867844,
521
+ 0.0991191491484642,
522
+ 0.09508104622364044,
523
+ 0.10574118793010712,
524
+ 0.11086845397949219,
525
+ 0.1688675731420517,
526
+ 0.11680527776479721,
527
+ 0.08488518744707108,
528
+ 0.17156687378883362,
529
+ 0.07575220614671707,
530
+ 0.09505181014537811,
531
+ 0.09565583616495132,
532
+ 0.1271086484193802,
533
+ 0.07255349308252335,
534
+ 0.12638819217681885,
535
+ 0.09589223563671112,
536
+ 0.1270156353712082,
537
+ 0.11118342727422714,
538
+ 0.05915089696645737,
539
+ 0.17363956570625305,
540
+ 0.09835857897996902,
541
+ 0.11528605222702026,
542
+ 0.07641685009002686,
543
+ 0.07937388122081757,
544
+ 0.12749803066253662,
545
+ 0.1254318207502365
546
+ ],
547
+ "q01": [
548
+ -0.25,
549
+ -0.1875,
550
+ -0.4375,
551
+ -0.5,
552
+ -0.4375,
553
+ -0.1875,
554
+ -0.375,
555
+ -0.125,
556
+ -0.25,
557
+ -0.25,
558
+ -0.0625,
559
+ 0.0,
560
+ -0.5,
561
+ -0.3125,
562
+ -0.375,
563
+ -0.1875,
564
+ -0.1875,
565
+ -0.25,
566
+ -0.375,
567
+ -0.125,
568
+ -0.375,
569
+ -0.4375,
570
+ -0.375,
571
+ -0.3125,
572
+ -0.25,
573
+ 0.0,
574
+ -0.25,
575
+ 0.0,
576
+ -0.125,
577
+ -0.1875,
578
+ -0.25,
579
+ -0.1875,
580
+ -0.4375,
581
+ -0.125,
582
+ -0.4375,
583
+ -0.125,
584
+ -0.375,
585
+ -0.375,
586
+ -0.1875,
587
+ -0.3125,
588
+ -0.25,
589
+ -0.125,
590
+ -0.1875,
591
+ -0.375,
592
+ -0.25,
593
+ -0.1875,
594
+ -0.25,
595
+ -0.1875,
596
+ -0.125,
597
+ -0.0625,
598
+ -0.25,
599
+ -0.0625,
600
+ -0.1875,
601
+ -0.3125,
602
+ -0.4375,
603
+ -0.125,
604
+ -0.0625,
605
+ -0.5,
606
+ -0.0625,
607
+ 0.0,
608
+ -0.125,
609
+ -0.125,
610
+ -0.125,
611
+ -0.1875
612
+ ],
613
+ "q99": [
614
+ 0.3125,
615
+ 0.1875,
616
+ 0.1875,
617
+ 0.1875,
618
+ 0.0625,
619
+ 0.25,
620
+ 0.0625,
621
+ 0.4375,
622
+ 0.4375,
623
+ 0.1875,
624
+ 0.25,
625
+ 0.3125,
626
+ -0.0625,
627
+ 0.0625,
628
+ 0.1875,
629
+ 0.125,
630
+ 0.3125,
631
+ 0.125,
632
+ 0.125,
633
+ 0.3125,
634
+ 0.0,
635
+ -0.0625,
636
+ 0.3125,
637
+ 0.1875,
638
+ 0.3125,
639
+ 0.3125,
640
+ 0.3125,
641
+ 0.4375,
642
+ 0.3125,
643
+ 0.3125,
644
+ 0.375,
645
+ 0.1875,
646
+ 0.0,
647
+ 0.375,
648
+ 0.0625,
649
+ 0.4375,
650
+ 0.125,
651
+ 0.3125,
652
+ 0.3125,
653
+ 0.125,
654
+ 0.1875,
655
+ 0.375,
656
+ 0.3125,
657
+ 0.4375,
658
+ 0.25,
659
+ 0.25,
660
+ 0.4375,
661
+ 0.125,
662
+ 0.3125,
663
+ 0.3125,
664
+ 0.375,
665
+ 0.3125,
666
+ 0.375,
667
+ 0.125,
668
+ 0.125,
669
+ 0.375,
670
+ 0.25,
671
+ 0.25,
672
+ 0.4375,
673
+ 0.5,
674
+ 0.25,
675
+ 0.25,
676
+ 0.4375,
677
+ 0.375
678
+ ]
679
+ }
680
+ },
681
+ "relative_action": {}
682
+ }
683
+ }
experiment_cfg/final_model_config.json ADDED
@@ -0,0 +1,55 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ {
2
+ "model_type": "Gr00tN1d7",
3
+ "model_dtype": "bfloat16",
4
+ "model_name": "nvidia/Cosmos-Reason2-2B",
5
+ "backbone_model_type": "qwen",
6
+ "model_revision": null,
7
+ "tune_top_llm_layers": 0,
8
+ "backbone_embedding_dim": 2048,
9
+ "tune_llm": false,
10
+ "tune_visual": false,
11
+ "select_layer": 16,
12
+ "reproject_vision": false,
13
+ "use_flash_attention": true,
14
+ "load_bf16": false,
15
+ "backbone_trainable_params_fp32": true,
16
+ "extra_augmentation_config": null,
17
+ "apply_sincos_state_encoding": false,
18
+ "use_percentiles": true,
19
+ "use_relative_action": false,
20
+ "max_state_dim": 132,
21
+ "max_action_dim": 132,
22
+ "action_horizon": 40,
23
+ "hidden_size": 1024,
24
+ "input_embedding_dim": 1536,
25
+ "state_history_length": 1,
26
+ "add_pos_embed": true,
27
+ "attn_dropout": 0.2,
28
+ "use_vlln": true,
29
+ "max_seq_len": 1024,
30
+ "use_alternate_vl_dit": true,
31
+ "attend_text_every_n_blocks": 2,
32
+ "diffusion_model_cfg": {
33
+ "attention_head_dim": 48,
34
+ "dropout": 0.2,
35
+ "final_dropout": true,
36
+ "interleave_self_attention": true,
37
+ "norm_type": "ada_norm",
38
+ "num_attention_heads": 32,
39
+ "num_layers": 32,
40
+ "output_dim": 1024,
41
+ "positional_embeddings": null
42
+ },
43
+ "num_inference_timesteps": 4,
44
+ "noise_beta_alpha": 1.5,
45
+ "noise_beta_beta": 1.0,
46
+ "noise_s": 0.999,
47
+ "num_timestep_buckets": 1000,
48
+ "tune_projector": true,
49
+ "tune_diffusion_model": true,
50
+ "tune_vlln": true,
51
+ "state_dropout_prob": 0.2,
52
+ "exclude_state": false,
53
+ "use_mean_std": false,
54
+ "max_num_embodiments": 32
55
+ }
experiment_cfg/final_processor_config.json ADDED
The diff for this file is too large to render. See raw diff
 
global_step2000/bf16_zero_pp_rank_0_mp_rank_00_optim_states.pt ADDED
@@ -0,0 +1,3 @@
 
 
 
 
1
+ version https://git-lfs.github.com/spec/v1
2
+ oid sha256:6f61540cd3064d4f6dd35b86ca74d6dc654ba7be45576e5a0ea59b158daed0dc
3
+ size 9723131425
global_step2000/bf16_zero_pp_rank_1_mp_rank_00_optim_states.pt ADDED
@@ -0,0 +1,3 @@
 
 
 
 
1
+ version https://git-lfs.github.com/spec/v1
2
+ oid sha256:a6066e14aba9c443f070e185028504229e5f609d866cc28ae4b1fbc628c31606
3
+ size 9723123937
global_step2000/mp_rank_00_model_states.pt ADDED
@@ -0,0 +1,3 @@
 
 
 
 
1
+ version https://git-lfs.github.com/spec/v1
2
+ oid sha256:f43b6aa473e79c0b042e7330129370a6cb23134266d37c7ab4359fa122261031
3
+ size 9335640879
latest ADDED
@@ -0,0 +1 @@
 
 
1
+ global_step2000
model-00001-of-00002.safetensors ADDED
@@ -0,0 +1,3 @@
 
 
 
 
1
+ version https://git-lfs.github.com/spec/v1
2
+ oid sha256:42586f93de5e0fbb706a0e6be1607f04f4930087ad4de9b90d5dac4a2bc8b55b
3
+ size 4990519232
model-00002-of-00002.safetensors ADDED
@@ -0,0 +1,3 @@
 
 
 
 
1
+ version https://git-lfs.github.com/spec/v1
2
+ oid sha256:e5e59a78a1d5c1452ec18d8c24eeeb21f8772b164a500fb8e1489db38beb0aca
3
+ size 1919980184
model.safetensors.index.json ADDED
The diff for this file is too large to render. See raw diff
 
processor_config.json ADDED
@@ -0,0 +1,1143 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ {
2
+ "processor_class": "Gr00tN1d7Processor",
3
+ "processor_kwargs": {
4
+ "modality_configs": {
5
+ "real_g1_relative_eef_relative_joints": {
6
+ "video": {
7
+ "delta_indices": [
8
+ -20,
9
+ 0
10
+ ],
11
+ "modality_keys": [
12
+ "ego_view"
13
+ ],
14
+ "sin_cos_embedding_keys": null,
15
+ "mean_std_embedding_keys": null,
16
+ "action_configs": null
17
+ },
18
+ "state": {
19
+ "delta_indices": [
20
+ 0
21
+ ],
22
+ "modality_keys": [
23
+ "left_wrist_eef_9d",
24
+ "right_wrist_eef_9d",
25
+ "left_hand",
26
+ "right_hand",
27
+ "left_arm",
28
+ "right_arm",
29
+ "waist"
30
+ ],
31
+ "sin_cos_embedding_keys": null,
32
+ "mean_std_embedding_keys": null,
33
+ "action_configs": null
34
+ },
35
+ "action": {
36
+ "delta_indices": [
37
+ 0,
38
+ 1,
39
+ 2,
40
+ 3,
41
+ 4,
42
+ 5,
43
+ 6,
44
+ 7,
45
+ 8,
46
+ 9,
47
+ 10,
48
+ 11,
49
+ 12,
50
+ 13,
51
+ 14,
52
+ 15,
53
+ 16,
54
+ 17,
55
+ 18,
56
+ 19,
57
+ 20,
58
+ 21,
59
+ 22,
60
+ 23,
61
+ 24,
62
+ 25,
63
+ 26,
64
+ 27,
65
+ 28,
66
+ 29,
67
+ 30,
68
+ 31,
69
+ 32,
70
+ 33,
71
+ 34,
72
+ 35,
73
+ 36,
74
+ 37,
75
+ 38,
76
+ 39
77
+ ],
78
+ "modality_keys": [
79
+ "left_wrist_eef_9d",
80
+ "right_wrist_eef_9d",
81
+ "left_hand",
82
+ "right_hand",
83
+ "left_arm",
84
+ "right_arm",
85
+ "waist",
86
+ "base_height_command",
87
+ "navigate_command"
88
+ ],
89
+ "sin_cos_embedding_keys": null,
90
+ "mean_std_embedding_keys": null,
91
+ "action_configs": [
92
+ {
93
+ "rep": "RELATIVE",
94
+ "type": "EEF",
95
+ "format": "XYZ_ROT6D",
96
+ "state_key": "left_wrist_eef_9d"
97
+ },
98
+ {
99
+ "rep": "RELATIVE",
100
+ "type": "EEF",
101
+ "format": "XYZ_ROT6D",
102
+ "state_key": "right_wrist_eef_9d"
103
+ },
104
+ {
105
+ "rep": "ABSOLUTE",
106
+ "type": "NON_EEF",
107
+ "format": "DEFAULT",
108
+ "state_key": "left_hand"
109
+ },
110
+ {
111
+ "rep": "ABSOLUTE",
112
+ "type": "NON_EEF",
113
+ "format": "DEFAULT",
114
+ "state_key": "right_hand"
115
+ },
116
+ {
117
+ "rep": "RELATIVE",
118
+ "type": "NON_EEF",
119
+ "format": "DEFAULT",
120
+ "state_key": "left_arm"
121
+ },
122
+ {
123
+ "rep": "RELATIVE",
124
+ "type": "NON_EEF",
125
+ "format": "DEFAULT",
126
+ "state_key": "right_arm"
127
+ },
128
+ {
129
+ "rep": "ABSOLUTE",
130
+ "type": "NON_EEF",
131
+ "format": "DEFAULT",
132
+ "state_key": "waist"
133
+ },
134
+ {
135
+ "rep": "ABSOLUTE",
136
+ "type": "NON_EEF",
137
+ "format": "DEFAULT",
138
+ "state_key": "base_height_command"
139
+ },
140
+ {
141
+ "rep": "ABSOLUTE",
142
+ "type": "NON_EEF",
143
+ "format": "DEFAULT",
144
+ "state_key": "navigate_command"
145
+ }
146
+ ]
147
+ },
148
+ "language": {
149
+ "delta_indices": [
150
+ 0
151
+ ],
152
+ "modality_keys": [
153
+ "annotation.human.task_description"
154
+ ],
155
+ "sin_cos_embedding_keys": null,
156
+ "mean_std_embedding_keys": null,
157
+ "action_configs": null
158
+ }
159
+ },
160
+ "real_r1_pro_sharpa_relative_eef_mecka": {
161
+ "video": {
162
+ "delta_indices": [
163
+ -30,
164
+ 0
165
+ ],
166
+ "modality_keys": [
167
+ "ego_view_cropratio_res320x240_freq30"
168
+ ],
169
+ "sin_cos_embedding_keys": null,
170
+ "mean_std_embedding_keys": null,
171
+ "action_configs": null
172
+ },
173
+ "state": {
174
+ "delta_indices": [
175
+ 0
176
+ ],
177
+ "modality_keys": [
178
+ "left_wrist_eef",
179
+ "right_wrist_eef",
180
+ "left_hand_joints",
181
+ "right_hand_joints"
182
+ ],
183
+ "sin_cos_embedding_keys": null,
184
+ "mean_std_embedding_keys": null,
185
+ "action_configs": null
186
+ },
187
+ "action": {
188
+ "delta_indices": [
189
+ 0,
190
+ 1,
191
+ 2,
192
+ 3,
193
+ 4,
194
+ 5,
195
+ 6,
196
+ 7,
197
+ 8,
198
+ 9,
199
+ 10,
200
+ 11,
201
+ 12,
202
+ 13,
203
+ 14,
204
+ 15,
205
+ 16,
206
+ 17,
207
+ 18,
208
+ 19,
209
+ 20,
210
+ 21,
211
+ 22,
212
+ 23,
213
+ 24,
214
+ 25,
215
+ 26,
216
+ 27,
217
+ 28,
218
+ 29,
219
+ 30,
220
+ 31,
221
+ 32,
222
+ 33,
223
+ 34,
224
+ 35,
225
+ 36,
226
+ 37,
227
+ 38,
228
+ 39
229
+ ],
230
+ "modality_keys": [
231
+ "left_wrist_eef",
232
+ "right_wrist_eef",
233
+ "left_hand_joints",
234
+ "right_hand_joints"
235
+ ],
236
+ "sin_cos_embedding_keys": null,
237
+ "mean_std_embedding_keys": null,
238
+ "action_configs": [
239
+ {
240
+ "rep": "RELATIVE",
241
+ "type": "EEF",
242
+ "format": "XYZ_ROT6D",
243
+ "state_key": "left_wrist_eef"
244
+ },
245
+ {
246
+ "rep": "RELATIVE",
247
+ "type": "EEF",
248
+ "format": "XYZ_ROT6D",
249
+ "state_key": "right_wrist_eef"
250
+ },
251
+ {
252
+ "rep": "ABSOLUTE",
253
+ "type": "NON_EEF",
254
+ "format": "DEFAULT",
255
+ "state_key": "left_hand_joints"
256
+ },
257
+ {
258
+ "rep": "ABSOLUTE",
259
+ "type": "NON_EEF",
260
+ "format": "DEFAULT",
261
+ "state_key": "right_hand_joints"
262
+ }
263
+ ]
264
+ },
265
+ "language": {
266
+ "delta_indices": [
267
+ 0
268
+ ],
269
+ "modality_keys": [
270
+ "annotation.human.coarse_action"
271
+ ],
272
+ "sin_cos_embedding_keys": null,
273
+ "mean_std_embedding_keys": null,
274
+ "action_configs": null
275
+ }
276
+ },
277
+ "real_r1_pro_sharpa_relative_eef_human": {
278
+ "video": {
279
+ "delta_indices": [
280
+ -20,
281
+ 0
282
+ ],
283
+ "modality_keys": [
284
+ "ego_view_res320x240_freq20",
285
+ "left_wrist_view_res320x240_freq20",
286
+ "right_wrist_view_res320x240_freq20"
287
+ ],
288
+ "sin_cos_embedding_keys": null,
289
+ "mean_std_embedding_keys": null,
290
+ "action_configs": null
291
+ },
292
+ "state": {
293
+ "delta_indices": [
294
+ 0
295
+ ],
296
+ "modality_keys": [
297
+ "left_wrist_eef",
298
+ "right_wrist_eef",
299
+ "left_hand_joints",
300
+ "right_hand_joints"
301
+ ],
302
+ "sin_cos_embedding_keys": null,
303
+ "mean_std_embedding_keys": null,
304
+ "action_configs": null
305
+ },
306
+ "action": {
307
+ "delta_indices": [
308
+ 0,
309
+ 1,
310
+ 2,
311
+ 3,
312
+ 4,
313
+ 5,
314
+ 6,
315
+ 7,
316
+ 8,
317
+ 9,
318
+ 10,
319
+ 11,
320
+ 12,
321
+ 13,
322
+ 14,
323
+ 15,
324
+ 16,
325
+ 17,
326
+ 18,
327
+ 19,
328
+ 20,
329
+ 21,
330
+ 22,
331
+ 23,
332
+ 24,
333
+ 25,
334
+ 26,
335
+ 27,
336
+ 28,
337
+ 29,
338
+ 30,
339
+ 31,
340
+ 32,
341
+ 33,
342
+ 34,
343
+ 35,
344
+ 36,
345
+ 37,
346
+ 38,
347
+ 39
348
+ ],
349
+ "modality_keys": [
350
+ "left_wrist_eef",
351
+ "right_wrist_eef",
352
+ "left_hand_joints",
353
+ "right_hand_joints"
354
+ ],
355
+ "sin_cos_embedding_keys": null,
356
+ "mean_std_embedding_keys": null,
357
+ "action_configs": [
358
+ {
359
+ "rep": "RELATIVE",
360
+ "type": "EEF",
361
+ "format": "XYZ_ROT6D",
362
+ "state_key": "left_wrist_eef"
363
+ },
364
+ {
365
+ "rep": "RELATIVE",
366
+ "type": "EEF",
367
+ "format": "XYZ_ROT6D",
368
+ "state_key": "right_wrist_eef"
369
+ },
370
+ {
371
+ "rep": "ABSOLUTE",
372
+ "type": "NON_EEF",
373
+ "format": "DEFAULT",
374
+ "state_key": "left_hand_joints"
375
+ },
376
+ {
377
+ "rep": "ABSOLUTE",
378
+ "type": "NON_EEF",
379
+ "format": "DEFAULT",
380
+ "state_key": "right_hand_joints"
381
+ }
382
+ ]
383
+ },
384
+ "language": {
385
+ "delta_indices": [
386
+ 0
387
+ ],
388
+ "modality_keys": [
389
+ "annotation.human.coarse_action"
390
+ ],
391
+ "sin_cos_embedding_keys": null,
392
+ "mean_std_embedding_keys": null,
393
+ "action_configs": null
394
+ }
395
+ },
396
+ "real_r1_pro_sharpa_relative_eef": {
397
+ "video": {
398
+ "delta_indices": [
399
+ -20,
400
+ 0
401
+ ],
402
+ "modality_keys": [
403
+ "ego_view_res320x240_freq20",
404
+ "left_wrist_view_res320x240_freq20",
405
+ "right_wrist_view_res320x240_freq20"
406
+ ],
407
+ "sin_cos_embedding_keys": null,
408
+ "mean_std_embedding_keys": null,
409
+ "action_configs": null
410
+ },
411
+ "state": {
412
+ "delta_indices": [
413
+ 0
414
+ ],
415
+ "modality_keys": [
416
+ "left_wrist_eef",
417
+ "right_wrist_eef",
418
+ "left_hand_joints",
419
+ "right_hand_joints"
420
+ ],
421
+ "sin_cos_embedding_keys": null,
422
+ "mean_std_embedding_keys": null,
423
+ "action_configs": null
424
+ },
425
+ "action": {
426
+ "delta_indices": [
427
+ 0,
428
+ 1,
429
+ 2,
430
+ 3,
431
+ 4,
432
+ 5,
433
+ 6,
434
+ 7,
435
+ 8,
436
+ 9,
437
+ 10,
438
+ 11,
439
+ 12,
440
+ 13,
441
+ 14,
442
+ 15,
443
+ 16,
444
+ 17,
445
+ 18,
446
+ 19,
447
+ 20,
448
+ 21,
449
+ 22,
450
+ 23,
451
+ 24,
452
+ 25,
453
+ 26,
454
+ 27,
455
+ 28,
456
+ 29,
457
+ 30,
458
+ 31,
459
+ 32,
460
+ 33,
461
+ 34,
462
+ 35,
463
+ 36,
464
+ 37,
465
+ 38,
466
+ 39
467
+ ],
468
+ "modality_keys": [
469
+ "left_wrist_eef",
470
+ "right_wrist_eef",
471
+ "left_hand_joints",
472
+ "right_hand_joints"
473
+ ],
474
+ "sin_cos_embedding_keys": null,
475
+ "mean_std_embedding_keys": null,
476
+ "action_configs": [
477
+ {
478
+ "rep": "RELATIVE",
479
+ "type": "EEF",
480
+ "format": "XYZ_ROT6D",
481
+ "state_key": "left_wrist_eef"
482
+ },
483
+ {
484
+ "rep": "RELATIVE",
485
+ "type": "EEF",
486
+ "format": "XYZ_ROT6D",
487
+ "state_key": "right_wrist_eef"
488
+ },
489
+ {
490
+ "rep": "ABSOLUTE",
491
+ "type": "NON_EEF",
492
+ "format": "DEFAULT",
493
+ "state_key": "left_hand_joints"
494
+ },
495
+ {
496
+ "rep": "ABSOLUTE",
497
+ "type": "NON_EEF",
498
+ "format": "DEFAULT",
499
+ "state_key": "right_hand_joints"
500
+ }
501
+ ]
502
+ },
503
+ "language": {
504
+ "delta_indices": [
505
+ 0
506
+ ],
507
+ "modality_keys": [
508
+ "annotation.human.coarse_action"
509
+ ],
510
+ "sin_cos_embedding_keys": null,
511
+ "mean_std_embedding_keys": null,
512
+ "action_configs": null
513
+ }
514
+ },
515
+ "xdof_relative_eef_relative_joint": {
516
+ "video": {
517
+ "delta_indices": [
518
+ -30,
519
+ 0
520
+ ],
521
+ "modality_keys": [
522
+ "top_camera-images-rgb_320_240",
523
+ "left_camera-images-rgb_320_240",
524
+ "right_camera-images-rgb_320_240"
525
+ ],
526
+ "sin_cos_embedding_keys": null,
527
+ "mean_std_embedding_keys": null,
528
+ "action_configs": null
529
+ },
530
+ "state": {
531
+ "delta_indices": [
532
+ 0
533
+ ],
534
+ "modality_keys": [
535
+ "left_wrist_eef",
536
+ "right_wrist_eef",
537
+ "left_gripper_pos",
538
+ "right_gripper_pos",
539
+ "left_joint_pos",
540
+ "right_joint_pos"
541
+ ],
542
+ "sin_cos_embedding_keys": null,
543
+ "mean_std_embedding_keys": null,
544
+ "action_configs": null
545
+ },
546
+ "action": {
547
+ "delta_indices": [
548
+ 0,
549
+ 1,
550
+ 2,
551
+ 3,
552
+ 4,
553
+ 5,
554
+ 6,
555
+ 7,
556
+ 8,
557
+ 9,
558
+ 10,
559
+ 11,
560
+ 12,
561
+ 13,
562
+ 14,
563
+ 15,
564
+ 16,
565
+ 17,
566
+ 18,
567
+ 19,
568
+ 20,
569
+ 21,
570
+ 22,
571
+ 23,
572
+ 24,
573
+ 25,
574
+ 26,
575
+ 27,
576
+ 28,
577
+ 29,
578
+ 30,
579
+ 31,
580
+ 32,
581
+ 33,
582
+ 34,
583
+ 35,
584
+ 36,
585
+ 37,
586
+ 38,
587
+ 39
588
+ ],
589
+ "modality_keys": [
590
+ "left_wrist_eef",
591
+ "right_wrist_eef",
592
+ "left_gripper_pos",
593
+ "right_gripper_pos",
594
+ "left_joint_pos",
595
+ "right_joint_pos"
596
+ ],
597
+ "sin_cos_embedding_keys": null,
598
+ "mean_std_embedding_keys": null,
599
+ "action_configs": [
600
+ {
601
+ "rep": "RELATIVE",
602
+ "type": "EEF",
603
+ "format": "XYZ_ROT6D",
604
+ "state_key": "left_wrist_eef"
605
+ },
606
+ {
607
+ "rep": "RELATIVE",
608
+ "type": "EEF",
609
+ "format": "XYZ_ROT6D",
610
+ "state_key": "right_wrist_eef"
611
+ },
612
+ {
613
+ "rep": "ABSOLUTE",
614
+ "type": "NON_EEF",
615
+ "format": "DEFAULT",
616
+ "state_key": "left_gripper_pos"
617
+ },
618
+ {
619
+ "rep": "ABSOLUTE",
620
+ "type": "NON_EEF",
621
+ "format": "DEFAULT",
622
+ "state_key": "right_gripper_pos"
623
+ },
624
+ {
625
+ "rep": "RELATIVE",
626
+ "type": "NON_EEF",
627
+ "format": "DEFAULT",
628
+ "state_key": "left_joint_pos"
629
+ },
630
+ {
631
+ "rep": "RELATIVE",
632
+ "type": "NON_EEF",
633
+ "format": "DEFAULT",
634
+ "state_key": "right_joint_pos"
635
+ }
636
+ ]
637
+ },
638
+ "language": {
639
+ "delta_indices": [
640
+ 0
641
+ ],
642
+ "modality_keys": [
643
+ "annotation.task"
644
+ ],
645
+ "sin_cos_embedding_keys": null,
646
+ "mean_std_embedding_keys": null,
647
+ "action_configs": null
648
+ }
649
+ },
650
+ "real_r1_pro_sharpa_relative_eef_maxinsights": {
651
+ "video": {
652
+ "delta_indices": [
653
+ -30,
654
+ 0
655
+ ],
656
+ "modality_keys": [
657
+ "ego_view_cropratio_res320x240_freq30"
658
+ ],
659
+ "sin_cos_embedding_keys": null,
660
+ "mean_std_embedding_keys": null,
661
+ "action_configs": null
662
+ },
663
+ "state": {
664
+ "delta_indices": [
665
+ 0
666
+ ],
667
+ "modality_keys": [
668
+ "left_wrist_eef",
669
+ "right_wrist_eef",
670
+ "left_hand_joints",
671
+ "right_hand_joints"
672
+ ],
673
+ "sin_cos_embedding_keys": null,
674
+ "mean_std_embedding_keys": null,
675
+ "action_configs": null
676
+ },
677
+ "action": {
678
+ "delta_indices": [
679
+ 0,
680
+ 1,
681
+ 2,
682
+ 3,
683
+ 4,
684
+ 5,
685
+ 6,
686
+ 7,
687
+ 8,
688
+ 9,
689
+ 10,
690
+ 11,
691
+ 12,
692
+ 13,
693
+ 14,
694
+ 15,
695
+ 16,
696
+ 17,
697
+ 18,
698
+ 19,
699
+ 20,
700
+ 21,
701
+ 22,
702
+ 23,
703
+ 24,
704
+ 25,
705
+ 26,
706
+ 27,
707
+ 28,
708
+ 29,
709
+ 30,
710
+ 31,
711
+ 32,
712
+ 33,
713
+ 34,
714
+ 35,
715
+ 36,
716
+ 37,
717
+ 38,
718
+ 39
719
+ ],
720
+ "modality_keys": [
721
+ "left_wrist_eef",
722
+ "right_wrist_eef",
723
+ "left_hand_joints",
724
+ "right_hand_joints"
725
+ ],
726
+ "sin_cos_embedding_keys": null,
727
+ "mean_std_embedding_keys": null,
728
+ "action_configs": [
729
+ {
730
+ "rep": "RELATIVE",
731
+ "type": "EEF",
732
+ "format": "XYZ_ROT6D",
733
+ "state_key": "left_wrist_eef"
734
+ },
735
+ {
736
+ "rep": "RELATIVE",
737
+ "type": "EEF",
738
+ "format": "XYZ_ROT6D",
739
+ "state_key": "right_wrist_eef"
740
+ },
741
+ {
742
+ "rep": "ABSOLUTE",
743
+ "type": "NON_EEF",
744
+ "format": "DEFAULT",
745
+ "state_key": "left_hand_joints"
746
+ },
747
+ {
748
+ "rep": "ABSOLUTE",
749
+ "type": "NON_EEF",
750
+ "format": "DEFAULT",
751
+ "state_key": "right_hand_joints"
752
+ }
753
+ ]
754
+ },
755
+ "language": {
756
+ "delta_indices": [
757
+ 0
758
+ ],
759
+ "modality_keys": [
760
+ "annotation.human.coarse_action"
761
+ ],
762
+ "sin_cos_embedding_keys": null,
763
+ "mean_std_embedding_keys": null,
764
+ "action_configs": null
765
+ }
766
+ },
767
+ "xdof_relative_eef_relative_joint_subtask": {
768
+ "video": {
769
+ "delta_indices": [
770
+ -30,
771
+ 0
772
+ ],
773
+ "modality_keys": [
774
+ "top_camera-images-rgb_320_240",
775
+ "left_camera-images-rgb_320_240",
776
+ "right_camera-images-rgb_320_240"
777
+ ],
778
+ "sin_cos_embedding_keys": null,
779
+ "mean_std_embedding_keys": null,
780
+ "action_configs": null
781
+ },
782
+ "state": {
783
+ "delta_indices": [
784
+ 0
785
+ ],
786
+ "modality_keys": [
787
+ "left_wrist_eef",
788
+ "right_wrist_eef",
789
+ "left_gripper_pos",
790
+ "right_gripper_pos",
791
+ "left_joint_pos",
792
+ "right_joint_pos"
793
+ ],
794
+ "sin_cos_embedding_keys": null,
795
+ "mean_std_embedding_keys": null,
796
+ "action_configs": null
797
+ },
798
+ "action": {
799
+ "delta_indices": [
800
+ 0,
801
+ 1,
802
+ 2,
803
+ 3,
804
+ 4,
805
+ 5,
806
+ 6,
807
+ 7,
808
+ 8,
809
+ 9,
810
+ 10,
811
+ 11,
812
+ 12,
813
+ 13,
814
+ 14,
815
+ 15,
816
+ 16,
817
+ 17,
818
+ 18,
819
+ 19,
820
+ 20,
821
+ 21,
822
+ 22,
823
+ 23,
824
+ 24,
825
+ 25,
826
+ 26,
827
+ 27,
828
+ 28,
829
+ 29,
830
+ 30,
831
+ 31,
832
+ 32,
833
+ 33,
834
+ 34,
835
+ 35,
836
+ 36,
837
+ 37,
838
+ 38,
839
+ 39
840
+ ],
841
+ "modality_keys": [
842
+ "left_wrist_eef",
843
+ "right_wrist_eef",
844
+ "left_gripper_pos",
845
+ "right_gripper_pos",
846
+ "left_joint_pos",
847
+ "right_joint_pos"
848
+ ],
849
+ "sin_cos_embedding_keys": null,
850
+ "mean_std_embedding_keys": null,
851
+ "action_configs": [
852
+ {
853
+ "rep": "RELATIVE",
854
+ "type": "EEF",
855
+ "format": "XYZ_ROT6D",
856
+ "state_key": "left_wrist_eef"
857
+ },
858
+ {
859
+ "rep": "RELATIVE",
860
+ "type": "EEF",
861
+ "format": "XYZ_ROT6D",
862
+ "state_key": "right_wrist_eef"
863
+ },
864
+ {
865
+ "rep": "ABSOLUTE",
866
+ "type": "NON_EEF",
867
+ "format": "DEFAULT",
868
+ "state_key": "left_gripper_pos"
869
+ },
870
+ {
871
+ "rep": "ABSOLUTE",
872
+ "type": "NON_EEF",
873
+ "format": "DEFAULT",
874
+ "state_key": "right_gripper_pos"
875
+ },
876
+ {
877
+ "rep": "RELATIVE",
878
+ "type": "NON_EEF",
879
+ "format": "DEFAULT",
880
+ "state_key": "left_joint_pos"
881
+ },
882
+ {
883
+ "rep": "RELATIVE",
884
+ "type": "NON_EEF",
885
+ "format": "DEFAULT",
886
+ "state_key": "right_joint_pos"
887
+ }
888
+ ]
889
+ },
890
+ "language": {
891
+ "delta_indices": [
892
+ 0
893
+ ],
894
+ "modality_keys": [
895
+ "annotation.sub_task"
896
+ ],
897
+ "sin_cos_embedding_keys": null,
898
+ "mean_std_embedding_keys": null,
899
+ "action_configs": null
900
+ }
901
+ },
902
+ "oxe_droid_relative_eef_relative_joint": {
903
+ "video": {
904
+ "delta_indices": [
905
+ -15,
906
+ 0
907
+ ],
908
+ "modality_keys": [
909
+ "exterior_image_1_left",
910
+ "wrist_image_left"
911
+ ],
912
+ "sin_cos_embedding_keys": null,
913
+ "mean_std_embedding_keys": null,
914
+ "action_configs": null
915
+ },
916
+ "state": {
917
+ "delta_indices": [
918
+ 0
919
+ ],
920
+ "modality_keys": [
921
+ "eef_9d",
922
+ "gripper_position",
923
+ "joint_position"
924
+ ],
925
+ "sin_cos_embedding_keys": null,
926
+ "mean_std_embedding_keys": null,
927
+ "action_configs": null
928
+ },
929
+ "action": {
930
+ "delta_indices": [
931
+ 0,
932
+ 1,
933
+ 2,
934
+ 3,
935
+ 4,
936
+ 5,
937
+ 6,
938
+ 7,
939
+ 8,
940
+ 9,
941
+ 10,
942
+ 11,
943
+ 12,
944
+ 13,
945
+ 14,
946
+ 15,
947
+ 16,
948
+ 17,
949
+ 18,
950
+ 19,
951
+ 20,
952
+ 21,
953
+ 22,
954
+ 23,
955
+ 24,
956
+ 25,
957
+ 26,
958
+ 27,
959
+ 28,
960
+ 29,
961
+ 30,
962
+ 31,
963
+ 32,
964
+ 33,
965
+ 34,
966
+ 35,
967
+ 36,
968
+ 37,
969
+ 38,
970
+ 39
971
+ ],
972
+ "modality_keys": [
973
+ "eef_9d",
974
+ "gripper_position",
975
+ "joint_position"
976
+ ],
977
+ "sin_cos_embedding_keys": null,
978
+ "mean_std_embedding_keys": null,
979
+ "action_configs": [
980
+ {
981
+ "rep": "RELATIVE",
982
+ "type": "EEF",
983
+ "format": "XYZ_ROT6D",
984
+ "state_key": "eef_9d"
985
+ },
986
+ {
987
+ "rep": "ABSOLUTE",
988
+ "type": "NON_EEF",
989
+ "format": "DEFAULT",
990
+ "state_key": "gripper_position"
991
+ },
992
+ {
993
+ "rep": "RELATIVE",
994
+ "type": "NON_EEF",
995
+ "format": "DEFAULT",
996
+ "state_key": "joint_position"
997
+ }
998
+ ]
999
+ },
1000
+ "language": {
1001
+ "delta_indices": [
1002
+ 0
1003
+ ],
1004
+ "modality_keys": [
1005
+ "annotation.language.language_instruction"
1006
+ ],
1007
+ "sin_cos_embedding_keys": null,
1008
+ "mean_std_embedding_keys": null,
1009
+ "action_configs": null
1010
+ }
1011
+ },
1012
+ "g1_23dof": {
1013
+ "video": {
1014
+ "delta_indices": [
1015
+ 0
1016
+ ],
1017
+ "modality_keys": [
1018
+ "ego_view"
1019
+ ],
1020
+ "sin_cos_embedding_keys": null,
1021
+ "mean_std_embedding_keys": null,
1022
+ "action_configs": null
1023
+ },
1024
+ "state": {
1025
+ "delta_indices": [
1026
+ 0
1027
+ ],
1028
+ "modality_keys": [
1029
+ "left_leg",
1030
+ "right_leg",
1031
+ "waist",
1032
+ "left_arm",
1033
+ "right_arm",
1034
+ "projected_gravity"
1035
+ ],
1036
+ "sin_cos_embedding_keys": null,
1037
+ "mean_std_embedding_keys": null,
1038
+ "action_configs": null
1039
+ },
1040
+ "action": {
1041
+ "delta_indices": [
1042
+ 0,
1043
+ 1,
1044
+ 2,
1045
+ 3,
1046
+ 4,
1047
+ 5,
1048
+ 6,
1049
+ 7,
1050
+ 8,
1051
+ 9,
1052
+ 10,
1053
+ 11,
1054
+ 12,
1055
+ 13,
1056
+ 14,
1057
+ 15,
1058
+ 16,
1059
+ 17,
1060
+ 18,
1061
+ 19,
1062
+ 20,
1063
+ 21,
1064
+ 22,
1065
+ 23,
1066
+ 24,
1067
+ 25,
1068
+ 26,
1069
+ 27,
1070
+ 28,
1071
+ 29,
1072
+ 30,
1073
+ 31,
1074
+ 32,
1075
+ 33,
1076
+ 34,
1077
+ 35,
1078
+ 36,
1079
+ 37,
1080
+ 38,
1081
+ 39
1082
+ ],
1083
+ "modality_keys": [
1084
+ "motion_token"
1085
+ ],
1086
+ "sin_cos_embedding_keys": null,
1087
+ "mean_std_embedding_keys": null,
1088
+ "action_configs": [
1089
+ {
1090
+ "rep": "ABSOLUTE",
1091
+ "type": "NON_EEF",
1092
+ "format": "DEFAULT",
1093
+ "state_key": null
1094
+ }
1095
+ ]
1096
+ },
1097
+ "language": {
1098
+ "delta_indices": [
1099
+ 0
1100
+ ],
1101
+ "modality_keys": [
1102
+ "annotation.human.task_description"
1103
+ ],
1104
+ "sin_cos_embedding_keys": null,
1105
+ "mean_std_embedding_keys": null,
1106
+ "action_configs": null
1107
+ }
1108
+ }
1109
+ },
1110
+ "image_crop_size": [
1111
+ 230,
1112
+ 230
1113
+ ],
1114
+ "image_target_size": [
1115
+ 256,
1116
+ 256
1117
+ ],
1118
+ "use_albumentations": true,
1119
+ "random_rotation_angle": 0,
1120
+ "color_jitter_params": {
1121
+ "brightness": 0.3,
1122
+ "contrast": 0.4,
1123
+ "saturation": 0.5,
1124
+ "hue": 0.08
1125
+ },
1126
+ "shortest_image_edge": 256,
1127
+ "crop_fraction": 0.95,
1128
+ "letter_box_transform": false,
1129
+ "model_name": "nvidia/Cosmos-Reason2-2B",
1130
+ "model_type": "qwen",
1131
+ "formalize_language": true,
1132
+ "max_state_dim": 132,
1133
+ "max_action_dim": 132,
1134
+ "max_action_horizon": 40,
1135
+ "use_percentiles": true,
1136
+ "use_mean_std": false,
1137
+ "clip_outliers": true,
1138
+ "apply_sincos_state_encoding": false,
1139
+ "use_relative_action": true,
1140
+ "exclude_state": false,
1141
+ "state_dropout_prob": 0.2
1142
+ }
1143
+ }
rng_state_0.pth ADDED
@@ -0,0 +1,3 @@
 
 
 
 
1
+ version https://git-lfs.github.com/spec/v1
2
+ oid sha256:15b44942714a3996ffc43833a460457cf1073f8b7749cd17d5f6708236b29b37
3
+ size 14917
rng_state_1.pth ADDED
@@ -0,0 +1,3 @@
 
 
 
 
1
+ version https://git-lfs.github.com/spec/v1
2
+ oid sha256:aab70e504f8d1c00b61c138a7f4a2da6de87ea9148f4fe20a775139bc4888b43
3
+ size 14917
scheduler.pt ADDED
@@ -0,0 +1,3 @@
 
 
 
 
1
+ version https://git-lfs.github.com/spec/v1
2
+ oid sha256:c4691914aee4c32e4f8aab72151088c2579d2e5f36d40120e3845612c8dae1f0
3
+ size 1465
statistics.json ADDED
The diff for this file is too large to render. See raw diff
 
trainer_state.json ADDED
@@ -0,0 +1,1234 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ {
2
+ "best_global_step": null,
3
+ "best_metric": null,
4
+ "best_model_checkpoint": null,
5
+ "epoch": 0.4,
6
+ "eval_steps": 500,
7
+ "global_step": 2000,
8
+ "is_hyper_param_search": false,
9
+ "is_local_process_zero": true,
10
+ "is_world_process_zero": true,
11
+ "log_history": [
12
+ {
13
+ "grad_norm": 0.12300469726324081,
14
+ "learning_rate": 3.6e-06,
15
+ "loss": 1.2066,
16
+ "step": 10
17
+ },
18
+ {
19
+ "grad_norm": 0.20615512132644653,
20
+ "learning_rate": 7.6e-06,
21
+ "loss": 1.1953,
22
+ "step": 20
23
+ },
24
+ {
25
+ "grad_norm": 0.24445489048957825,
26
+ "learning_rate": 1.16e-05,
27
+ "loss": 1.1773,
28
+ "step": 30
29
+ },
30
+ {
31
+ "grad_norm": 0.24841956794261932,
32
+ "learning_rate": 1.56e-05,
33
+ "loss": 1.1434,
34
+ "step": 40
35
+ },
36
+ {
37
+ "grad_norm": 0.2578396201133728,
38
+ "learning_rate": 1.9600000000000002e-05,
39
+ "loss": 1.1215,
40
+ "step": 50
41
+ },
42
+ {
43
+ "grad_norm": 0.28691330552101135,
44
+ "learning_rate": 2.36e-05,
45
+ "loss": 1.0992,
46
+ "step": 60
47
+ },
48
+ {
49
+ "grad_norm": 0.6026519536972046,
50
+ "learning_rate": 2.7600000000000003e-05,
51
+ "loss": 1.0707,
52
+ "step": 70
53
+ },
54
+ {
55
+ "grad_norm": 0.619059681892395,
56
+ "learning_rate": 3.16e-05,
57
+ "loss": 1.0225,
58
+ "step": 80
59
+ },
60
+ {
61
+ "grad_norm": 0.7169893980026245,
62
+ "learning_rate": 3.56e-05,
63
+ "loss": 0.9496,
64
+ "step": 90
65
+ },
66
+ {
67
+ "grad_norm": 0.9595510363578796,
68
+ "learning_rate": 3.960000000000001e-05,
69
+ "loss": 0.875,
70
+ "step": 100
71
+ },
72
+ {
73
+ "grad_norm": 0.714730441570282,
74
+ "learning_rate": 4.36e-05,
75
+ "loss": 0.8074,
76
+ "step": 110
77
+ },
78
+ {
79
+ "grad_norm": 1.307801604270935,
80
+ "learning_rate": 4.76e-05,
81
+ "loss": 0.7482,
82
+ "step": 120
83
+ },
84
+ {
85
+ "grad_norm": 0.758097231388092,
86
+ "learning_rate": 5.16e-05,
87
+ "loss": 0.7033,
88
+ "step": 130
89
+ },
90
+ {
91
+ "grad_norm": 0.9892353415489197,
92
+ "learning_rate": 5.560000000000001e-05,
93
+ "loss": 0.6645,
94
+ "step": 140
95
+ },
96
+ {
97
+ "grad_norm": 1.0839225053787231,
98
+ "learning_rate": 5.96e-05,
99
+ "loss": 0.6289,
100
+ "step": 150
101
+ },
102
+ {
103
+ "grad_norm": 0.9151790738105774,
104
+ "learning_rate": 6.36e-05,
105
+ "loss": 0.5994,
106
+ "step": 160
107
+ },
108
+ {
109
+ "grad_norm": 1.3767805099487305,
110
+ "learning_rate": 6.76e-05,
111
+ "loss": 0.5695,
112
+ "step": 170
113
+ },
114
+ {
115
+ "grad_norm": 0.9691261649131775,
116
+ "learning_rate": 7.16e-05,
117
+ "loss": 0.5461,
118
+ "step": 180
119
+ },
120
+ {
121
+ "grad_norm": 1.0183709859848022,
122
+ "learning_rate": 7.560000000000001e-05,
123
+ "loss": 0.5236,
124
+ "step": 190
125
+ },
126
+ {
127
+ "grad_norm": 1.047989845275879,
128
+ "learning_rate": 7.960000000000001e-05,
129
+ "loss": 0.4981,
130
+ "step": 200
131
+ },
132
+ {
133
+ "grad_norm": 1.0725739002227783,
134
+ "learning_rate": 8.36e-05,
135
+ "loss": 0.4811,
136
+ "step": 210
137
+ },
138
+ {
139
+ "grad_norm": 1.053604006767273,
140
+ "learning_rate": 8.76e-05,
141
+ "loss": 0.4553,
142
+ "step": 220
143
+ },
144
+ {
145
+ "grad_norm": 0.9293249845504761,
146
+ "learning_rate": 9.16e-05,
147
+ "loss": 0.4272,
148
+ "step": 230
149
+ },
150
+ {
151
+ "grad_norm": 1.0626137256622314,
152
+ "learning_rate": 9.56e-05,
153
+ "loss": 0.4054,
154
+ "step": 240
155
+ },
156
+ {
157
+ "grad_norm": 1.172255516052246,
158
+ "learning_rate": 9.960000000000001e-05,
159
+ "loss": 0.3808,
160
+ "step": 250
161
+ },
162
+ {
163
+ "grad_norm": 1.686732530593872,
164
+ "learning_rate": 9.999911419878559e-05,
165
+ "loss": 0.3688,
166
+ "step": 260
167
+ },
168
+ {
169
+ "grad_norm": 1.1888483762741089,
170
+ "learning_rate": 9.999605221019081e-05,
171
+ "loss": 0.3491,
172
+ "step": 270
173
+ },
174
+ {
175
+ "grad_norm": 1.1649774312973022,
176
+ "learning_rate": 9.999080323230761e-05,
177
+ "loss": 0.3301,
178
+ "step": 280
179
+ },
180
+ {
181
+ "grad_norm": 1.5636910200119019,
182
+ "learning_rate": 9.998336749474329e-05,
183
+ "loss": 0.3004,
184
+ "step": 290
185
+ },
186
+ {
187
+ "grad_norm": 1.4759575128555298,
188
+ "learning_rate": 9.997374532276107e-05,
189
+ "loss": 0.2752,
190
+ "step": 300
191
+ },
192
+ {
193
+ "grad_norm": 1.1000620126724243,
194
+ "learning_rate": 9.996193713726596e-05,
195
+ "loss": 0.2598,
196
+ "step": 310
197
+ },
198
+ {
199
+ "grad_norm": 1.4623210430145264,
200
+ "learning_rate": 9.994794345478624e-05,
201
+ "loss": 0.2414,
202
+ "step": 320
203
+ },
204
+ {
205
+ "grad_norm": 1.2531474828720093,
206
+ "learning_rate": 9.99317648874509e-05,
207
+ "loss": 0.2222,
208
+ "step": 330
209
+ },
210
+ {
211
+ "grad_norm": 1.1606990098953247,
212
+ "learning_rate": 9.991340214296292e-05,
213
+ "loss": 0.2101,
214
+ "step": 340
215
+ },
216
+ {
217
+ "grad_norm": 1.2082663774490356,
218
+ "learning_rate": 9.989285602456819e-05,
219
+ "loss": 0.1897,
220
+ "step": 350
221
+ },
222
+ {
223
+ "grad_norm": 1.4517086744308472,
224
+ "learning_rate": 9.98701274310205e-05,
225
+ "loss": 0.1691,
226
+ "step": 360
227
+ },
228
+ {
229
+ "grad_norm": 1.0659329891204834,
230
+ "learning_rate": 9.984521735654218e-05,
231
+ "loss": 0.1531,
232
+ "step": 370
233
+ },
234
+ {
235
+ "grad_norm": 0.8953323364257812,
236
+ "learning_rate": 9.981812689078057e-05,
237
+ "loss": 0.1365,
238
+ "step": 380
239
+ },
240
+ {
241
+ "grad_norm": 1.0274494886398315,
242
+ "learning_rate": 9.978885721876041e-05,
243
+ "loss": 0.1241,
244
+ "step": 390
245
+ },
246
+ {
247
+ "grad_norm": 0.8849335312843323,
248
+ "learning_rate": 9.975740962083198e-05,
249
+ "loss": 0.1209,
250
+ "step": 400
251
+ },
252
+ {
253
+ "grad_norm": 1.0760594606399536,
254
+ "learning_rate": 9.972378547261504e-05,
255
+ "loss": 0.1161,
256
+ "step": 410
257
+ },
258
+ {
259
+ "grad_norm": 0.8786264061927795,
260
+ "learning_rate": 9.968798624493885e-05,
261
+ "loss": 0.1155,
262
+ "step": 420
263
+ },
264
+ {
265
+ "grad_norm": 1.0370278358459473,
266
+ "learning_rate": 9.965001350377753e-05,
267
+ "loss": 0.1101,
268
+ "step": 430
269
+ },
270
+ {
271
+ "grad_norm": 1.137700080871582,
272
+ "learning_rate": 9.960986891018183e-05,
273
+ "loss": 0.1103,
274
+ "step": 440
275
+ },
276
+ {
277
+ "grad_norm": 0.9132903218269348,
278
+ "learning_rate": 9.95675542202063e-05,
279
+ "loss": 0.1065,
280
+ "step": 450
281
+ },
282
+ {
283
+ "grad_norm": 0.808414101600647,
284
+ "learning_rate": 9.952307128483256e-05,
285
+ "loss": 0.1072,
286
+ "step": 460
287
+ },
288
+ {
289
+ "grad_norm": 0.97467440366745,
290
+ "learning_rate": 9.947642204988835e-05,
291
+ "loss": 0.1074,
292
+ "step": 470
293
+ },
294
+ {
295
+ "grad_norm": 0.8700035214424133,
296
+ "learning_rate": 9.942760855596226e-05,
297
+ "loss": 0.0994,
298
+ "step": 480
299
+ },
300
+ {
301
+ "grad_norm": 0.8744845390319824,
302
+ "learning_rate": 9.937663293831471e-05,
303
+ "loss": 0.0997,
304
+ "step": 490
305
+ },
306
+ {
307
+ "grad_norm": 1.037927269935608,
308
+ "learning_rate": 9.932349742678433e-05,
309
+ "loss": 0.097,
310
+ "step": 500
311
+ },
312
+ {
313
+ "grad_norm": 0.8048285841941833,
314
+ "learning_rate": 9.926820434569051e-05,
315
+ "loss": 0.0984,
316
+ "step": 510
317
+ },
318
+ {
319
+ "grad_norm": 1.0640664100646973,
320
+ "learning_rate": 9.921075611373179e-05,
321
+ "loss": 0.0972,
322
+ "step": 520
323
+ },
324
+ {
325
+ "grad_norm": 1.000688076019287,
326
+ "learning_rate": 9.915115524387988e-05,
327
+ "loss": 0.0979,
328
+ "step": 530
329
+ },
330
+ {
331
+ "grad_norm": 0.9766833186149597,
332
+ "learning_rate": 9.908940434326997e-05,
333
+ "loss": 0.0958,
334
+ "step": 540
335
+ },
336
+ {
337
+ "grad_norm": 0.9274604916572571,
338
+ "learning_rate": 9.902550611308645e-05,
339
+ "loss": 0.0944,
340
+ "step": 550
341
+ },
342
+ {
343
+ "grad_norm": 0.8789206743240356,
344
+ "learning_rate": 9.895946334844494e-05,
345
+ "loss": 0.0952,
346
+ "step": 560
347
+ },
348
+ {
349
+ "grad_norm": 0.7993840575218201,
350
+ "learning_rate": 9.889127893826989e-05,
351
+ "loss": 0.0957,
352
+ "step": 570
353
+ },
354
+ {
355
+ "grad_norm": 0.7722614407539368,
356
+ "learning_rate": 9.882095586516831e-05,
357
+ "loss": 0.092,
358
+ "step": 580
359
+ },
360
+ {
361
+ "grad_norm": 0.8246521949768066,
362
+ "learning_rate": 9.874849720529921e-05,
363
+ "loss": 0.0875,
364
+ "step": 590
365
+ },
366
+ {
367
+ "grad_norm": 1.0832622051239014,
368
+ "learning_rate": 9.867390612823914e-05,
369
+ "loss": 0.0909,
370
+ "step": 600
371
+ },
372
+ {
373
+ "grad_norm": 0.8134964108467102,
374
+ "learning_rate": 9.859718589684344e-05,
375
+ "loss": 0.089,
376
+ "step": 610
377
+ },
378
+ {
379
+ "grad_norm": 0.790573000907898,
380
+ "learning_rate": 9.851833986710353e-05,
381
+ "loss": 0.0885,
382
+ "step": 620
383
+ },
384
+ {
385
+ "grad_norm": 0.8022108674049377,
386
+ "learning_rate": 9.843737148800023e-05,
387
+ "loss": 0.0845,
388
+ "step": 630
389
+ },
390
+ {
391
+ "grad_norm": 0.8686724305152893,
392
+ "learning_rate": 9.835428430135271e-05,
393
+ "loss": 0.0872,
394
+ "step": 640
395
+ },
396
+ {
397
+ "grad_norm": 0.8175386190414429,
398
+ "learning_rate": 9.82690819416637e-05,
399
+ "loss": 0.086,
400
+ "step": 650
401
+ },
402
+ {
403
+ "grad_norm": 0.8706546425819397,
404
+ "learning_rate": 9.818176813596041e-05,
405
+ "loss": 0.084,
406
+ "step": 660
407
+ },
408
+ {
409
+ "grad_norm": 1.11116361618042,
410
+ "learning_rate": 9.809234670363159e-05,
411
+ "loss": 0.0858,
412
+ "step": 670
413
+ },
414
+ {
415
+ "grad_norm": 0.8358515501022339,
416
+ "learning_rate": 9.800082155626034e-05,
417
+ "loss": 0.0858,
418
+ "step": 680
419
+ },
420
+ {
421
+ "grad_norm": 0.6499238014221191,
422
+ "learning_rate": 9.790719669745312e-05,
423
+ "loss": 0.0808,
424
+ "step": 690
425
+ },
426
+ {
427
+ "grad_norm": 1.0084407329559326,
428
+ "learning_rate": 9.781147622266455e-05,
429
+ "loss": 0.0833,
430
+ "step": 700
431
+ },
432
+ {
433
+ "grad_norm": 0.9155850410461426,
434
+ "learning_rate": 9.771366431901831e-05,
435
+ "loss": 0.0827,
436
+ "step": 710
437
+ },
438
+ {
439
+ "grad_norm": 0.7277970910072327,
440
+ "learning_rate": 9.761376526512394e-05,
441
+ "loss": 0.0838,
442
+ "step": 720
443
+ },
444
+ {
445
+ "grad_norm": 0.6772290468215942,
446
+ "learning_rate": 9.751178343088963e-05,
447
+ "loss": 0.079,
448
+ "step": 730
449
+ },
450
+ {
451
+ "grad_norm": 0.7814210057258606,
452
+ "learning_rate": 9.740772327733123e-05,
453
+ "loss": 0.0804,
454
+ "step": 740
455
+ },
456
+ {
457
+ "grad_norm": 0.8175185322761536,
458
+ "learning_rate": 9.730158935637697e-05,
459
+ "loss": 0.0815,
460
+ "step": 750
461
+ },
462
+ {
463
+ "grad_norm": 0.9498364329338074,
464
+ "learning_rate": 9.719338631066834e-05,
465
+ "loss": 0.0795,
466
+ "step": 760
467
+ },
468
+ {
469
+ "grad_norm": 0.7391613721847534,
470
+ "learning_rate": 9.708311887335713e-05,
471
+ "loss": 0.0779,
472
+ "step": 770
473
+ },
474
+ {
475
+ "grad_norm": 0.8254786729812622,
476
+ "learning_rate": 9.697079186789823e-05,
477
+ "loss": 0.0781,
478
+ "step": 780
479
+ },
480
+ {
481
+ "grad_norm": 0.8246118426322937,
482
+ "learning_rate": 9.685641020783876e-05,
483
+ "loss": 0.0768,
484
+ "step": 790
485
+ },
486
+ {
487
+ "grad_norm": 0.7269762754440308,
488
+ "learning_rate": 9.67399788966031e-05,
489
+ "loss": 0.0742,
490
+ "step": 800
491
+ },
492
+ {
493
+ "grad_norm": 0.8255800008773804,
494
+ "learning_rate": 9.662150302727395e-05,
495
+ "loss": 0.0747,
496
+ "step": 810
497
+ },
498
+ {
499
+ "grad_norm": 0.735792338848114,
500
+ "learning_rate": 9.650098778236968e-05,
501
+ "loss": 0.0748,
502
+ "step": 820
503
+ },
504
+ {
505
+ "grad_norm": 0.797886073589325,
506
+ "learning_rate": 9.637843843361749e-05,
507
+ "loss": 0.0756,
508
+ "step": 830
509
+ },
510
+ {
511
+ "grad_norm": 0.7862080335617065,
512
+ "learning_rate": 9.62538603417229e-05,
513
+ "loss": 0.0718,
514
+ "step": 840
515
+ },
516
+ {
517
+ "grad_norm": 0.7751632928848267,
518
+ "learning_rate": 9.612725895613526e-05,
519
+ "loss": 0.0724,
520
+ "step": 850
521
+ },
522
+ {
523
+ "grad_norm": 0.5764861106872559,
524
+ "learning_rate": 9.599863981480926e-05,
525
+ "loss": 0.0709,
526
+ "step": 860
527
+ },
528
+ {
529
+ "grad_norm": 1.0197579860687256,
530
+ "learning_rate": 9.586800854396283e-05,
531
+ "loss": 0.0716,
532
+ "step": 870
533
+ },
534
+ {
535
+ "grad_norm": 0.6790231466293335,
536
+ "learning_rate": 9.573537085783095e-05,
537
+ "loss": 0.0733,
538
+ "step": 880
539
+ },
540
+ {
541
+ "grad_norm": 0.6820247173309326,
542
+ "learning_rate": 9.560073255841571e-05,
543
+ "loss": 0.072,
544
+ "step": 890
545
+ },
546
+ {
547
+ "grad_norm": 0.7621466517448425,
548
+ "learning_rate": 9.546409953523247e-05,
549
+ "loss": 0.0693,
550
+ "step": 900
551
+ },
552
+ {
553
+ "grad_norm": 0.6752817034721375,
554
+ "learning_rate": 9.532547776505229e-05,
555
+ "loss": 0.068,
556
+ "step": 910
557
+ },
558
+ {
559
+ "grad_norm": 0.6253169775009155,
560
+ "learning_rate": 9.518487331164048e-05,
561
+ "loss": 0.07,
562
+ "step": 920
563
+ },
564
+ {
565
+ "grad_norm": 0.7627456188201904,
566
+ "learning_rate": 9.504229232549134e-05,
567
+ "loss": 0.0701,
568
+ "step": 930
569
+ },
570
+ {
571
+ "grad_norm": 0.8221601247787476,
572
+ "learning_rate": 9.489774104355909e-05,
573
+ "loss": 0.0701,
574
+ "step": 940
575
+ },
576
+ {
577
+ "grad_norm": 0.7028807997703552,
578
+ "learning_rate": 9.475122578898507e-05,
579
+ "loss": 0.068,
580
+ "step": 950
581
+ },
582
+ {
583
+ "grad_norm": 0.6954342722892761,
584
+ "learning_rate": 9.460275297082119e-05,
585
+ "loss": 0.0674,
586
+ "step": 960
587
+ },
588
+ {
589
+ "grad_norm": 0.7859126925468445,
590
+ "learning_rate": 9.445232908374948e-05,
591
+ "loss": 0.0684,
592
+ "step": 970
593
+ },
594
+ {
595
+ "grad_norm": 0.6159705519676208,
596
+ "learning_rate": 9.429996070779808e-05,
597
+ "loss": 0.0664,
598
+ "step": 980
599
+ },
600
+ {
601
+ "grad_norm": 0.8486711978912354,
602
+ "learning_rate": 9.414565450805333e-05,
603
+ "loss": 0.0681,
604
+ "step": 990
605
+ },
606
+ {
607
+ "grad_norm": 0.6213532090187073,
608
+ "learning_rate": 9.398941723436831e-05,
609
+ "loss": 0.0702,
610
+ "step": 1000
611
+ },
612
+ {
613
+ "grad_norm": 0.6173280477523804,
614
+ "learning_rate": 9.383125572106752e-05,
615
+ "loss": 0.0656,
616
+ "step": 1010
617
+ },
618
+ {
619
+ "grad_norm": 0.6719293594360352,
620
+ "learning_rate": 9.367117688664791e-05,
621
+ "loss": 0.0659,
622
+ "step": 1020
623
+ },
624
+ {
625
+ "grad_norm": 0.7403724789619446,
626
+ "learning_rate": 9.35091877334763e-05,
627
+ "loss": 0.0646,
628
+ "step": 1030
629
+ },
630
+ {
631
+ "grad_norm": 0.6634454131126404,
632
+ "learning_rate": 9.334529534748297e-05,
633
+ "loss": 0.0615,
634
+ "step": 1040
635
+ },
636
+ {
637
+ "grad_norm": 0.8321985602378845,
638
+ "learning_rate": 9.317950689785188e-05,
639
+ "loss": 0.0637,
640
+ "step": 1050
641
+ },
642
+ {
643
+ "grad_norm": 0.6796867251396179,
644
+ "learning_rate": 9.301182963670688e-05,
645
+ "loss": 0.0651,
646
+ "step": 1060
647
+ },
648
+ {
649
+ "grad_norm": 0.6848990321159363,
650
+ "learning_rate": 9.284227089879456e-05,
651
+ "loss": 0.0649,
652
+ "step": 1070
653
+ },
654
+ {
655
+ "grad_norm": 0.6623673439025879,
656
+ "learning_rate": 9.26708381011634e-05,
657
+ "loss": 0.0651,
658
+ "step": 1080
659
+ },
660
+ {
661
+ "grad_norm": 0.6835569143295288,
662
+ "learning_rate": 9.249753874283937e-05,
663
+ "loss": 0.0639,
664
+ "step": 1090
665
+ },
666
+ {
667
+ "grad_norm": 0.6271190643310547,
668
+ "learning_rate": 9.232238040449779e-05,
669
+ "loss": 0.0629,
670
+ "step": 1100
671
+ },
672
+ {
673
+ "grad_norm": 0.5486209988594055,
674
+ "learning_rate": 9.214537074813181e-05,
675
+ "loss": 0.0623,
676
+ "step": 1110
677
+ },
678
+ {
679
+ "grad_norm": 0.7808855175971985,
680
+ "learning_rate": 9.196651751671724e-05,
681
+ "loss": 0.063,
682
+ "step": 1120
683
+ },
684
+ {
685
+ "grad_norm": 0.696826696395874,
686
+ "learning_rate": 9.178582853387384e-05,
687
+ "loss": 0.0631,
688
+ "step": 1130
689
+ },
690
+ {
691
+ "grad_norm": 0.6328281760215759,
692
+ "learning_rate": 9.160331170352304e-05,
693
+ "loss": 0.0626,
694
+ "step": 1140
695
+ },
696
+ {
697
+ "grad_norm": 0.5834800601005554,
698
+ "learning_rate": 9.141897500954229e-05,
699
+ "loss": 0.062,
700
+ "step": 1150
701
+ },
702
+ {
703
+ "grad_norm": 0.7108986973762512,
704
+ "learning_rate": 9.123282651541576e-05,
705
+ "loss": 0.0616,
706
+ "step": 1160
707
+ },
708
+ {
709
+ "grad_norm": 0.672788679599762,
710
+ "learning_rate": 9.104487436388161e-05,
711
+ "loss": 0.0616,
712
+ "step": 1170
713
+ },
714
+ {
715
+ "grad_norm": 0.5632368326187134,
716
+ "learning_rate": 9.085512677657582e-05,
717
+ "loss": 0.0602,
718
+ "step": 1180
719
+ },
720
+ {
721
+ "grad_norm": 0.6385359764099121,
722
+ "learning_rate": 9.066359205367258e-05,
723
+ "loss": 0.0616,
724
+ "step": 1190
725
+ },
726
+ {
727
+ "grad_norm": 0.47169235348701477,
728
+ "learning_rate": 9.047027857352112e-05,
729
+ "loss": 0.0611,
730
+ "step": 1200
731
+ },
732
+ {
733
+ "grad_norm": 0.734768271446228,
734
+ "learning_rate": 9.027519479227935e-05,
735
+ "loss": 0.0591,
736
+ "step": 1210
737
+ },
738
+ {
739
+ "grad_norm": 0.6372445225715637,
740
+ "learning_rate": 9.007834924354383e-05,
741
+ "loss": 0.0595,
742
+ "step": 1220
743
+ },
744
+ {
745
+ "grad_norm": 0.6545802354812622,
746
+ "learning_rate": 8.987975053797655e-05,
747
+ "loss": 0.0592,
748
+ "step": 1230
749
+ },
750
+ {
751
+ "grad_norm": 0.8614038228988647,
752
+ "learning_rate": 8.967940736292825e-05,
753
+ "loss": 0.0586,
754
+ "step": 1240
755
+ },
756
+ {
757
+ "grad_norm": 0.5980435609817505,
758
+ "learning_rate": 8.947732848205846e-05,
759
+ "loss": 0.0607,
760
+ "step": 1250
761
+ },
762
+ {
763
+ "grad_norm": 0.6975569128990173,
764
+ "learning_rate": 8.927352273495204e-05,
765
+ "loss": 0.0613,
766
+ "step": 1260
767
+ },
768
+ {
769
+ "grad_norm": 0.9467343688011169,
770
+ "learning_rate": 8.906799903673265e-05,
771
+ "loss": 0.0605,
772
+ "step": 1270
773
+ },
774
+ {
775
+ "grad_norm": 0.5997800827026367,
776
+ "learning_rate": 8.88607663776726e-05,
777
+ "loss": 0.0612,
778
+ "step": 1280
779
+ },
780
+ {
781
+ "grad_norm": 0.5805615782737732,
782
+ "learning_rate": 8.865183382279978e-05,
783
+ "loss": 0.0608,
784
+ "step": 1290
785
+ },
786
+ {
787
+ "grad_norm": 0.6418155431747437,
788
+ "learning_rate": 8.844121051150096e-05,
789
+ "loss": 0.0615,
790
+ "step": 1300
791
+ },
792
+ {
793
+ "grad_norm": 0.6070120930671692,
794
+ "learning_rate": 8.822890565712211e-05,
795
+ "loss": 0.0567,
796
+ "step": 1310
797
+ },
798
+ {
799
+ "grad_norm": 0.5617713332176208,
800
+ "learning_rate": 8.801492854656536e-05,
801
+ "loss": 0.0599,
802
+ "step": 1320
803
+ },
804
+ {
805
+ "grad_norm": 0.8008117079734802,
806
+ "learning_rate": 8.779928853988268e-05,
807
+ "loss": 0.0599,
808
+ "step": 1330
809
+ },
810
+ {
811
+ "grad_norm": 0.6805431842803955,
812
+ "learning_rate": 8.758199506986655e-05,
813
+ "loss": 0.0594,
814
+ "step": 1340
815
+ },
816
+ {
817
+ "grad_norm": 0.5303754210472107,
818
+ "learning_rate": 8.73630576416373e-05,
819
+ "loss": 0.058,
820
+ "step": 1350
821
+ },
822
+ {
823
+ "grad_norm": 0.5935811996459961,
824
+ "learning_rate": 8.714248583222726e-05,
825
+ "loss": 0.0598,
826
+ "step": 1360
827
+ },
828
+ {
829
+ "grad_norm": 0.5267741084098816,
830
+ "learning_rate": 8.692028929016196e-05,
831
+ "loss": 0.0566,
832
+ "step": 1370
833
+ },
834
+ {
835
+ "grad_norm": 0.5947473049163818,
836
+ "learning_rate": 8.669647773503797e-05,
837
+ "loss": 0.0552,
838
+ "step": 1380
839
+ },
840
+ {
841
+ "grad_norm": 0.5299447178840637,
842
+ "learning_rate": 8.647106095709773e-05,
843
+ "loss": 0.0575,
844
+ "step": 1390
845
+ },
846
+ {
847
+ "grad_norm": 0.7655220627784729,
848
+ "learning_rate": 8.624404881680139e-05,
849
+ "loss": 0.0569,
850
+ "step": 1400
851
+ },
852
+ {
853
+ "grad_norm": 0.6151356101036072,
854
+ "learning_rate": 8.601545124439535e-05,
855
+ "loss": 0.0571,
856
+ "step": 1410
857
+ },
858
+ {
859
+ "grad_norm": 0.4703126549720764,
860
+ "learning_rate": 8.5785278239478e-05,
861
+ "loss": 0.0557,
862
+ "step": 1420
863
+ },
864
+ {
865
+ "grad_norm": 0.756523072719574,
866
+ "learning_rate": 8.555353987056224e-05,
867
+ "loss": 0.0572,
868
+ "step": 1430
869
+ },
870
+ {
871
+ "grad_norm": 0.5066272616386414,
872
+ "learning_rate": 8.532024627463505e-05,
873
+ "loss": 0.0585,
874
+ "step": 1440
875
+ },
876
+ {
877
+ "grad_norm": 0.48693063855171204,
878
+ "learning_rate": 8.508540765671407e-05,
879
+ "loss": 0.0562,
880
+ "step": 1450
881
+ },
882
+ {
883
+ "grad_norm": 0.712315022945404,
884
+ "learning_rate": 8.484903428940121e-05,
885
+ "loss": 0.0539,
886
+ "step": 1460
887
+ },
888
+ {
889
+ "grad_norm": 0.5369735956192017,
890
+ "learning_rate": 8.461113651243334e-05,
891
+ "loss": 0.0569,
892
+ "step": 1470
893
+ },
894
+ {
895
+ "grad_norm": 0.5061690807342529,
896
+ "learning_rate": 8.437172473222987e-05,
897
+ "loss": 0.0531,
898
+ "step": 1480
899
+ },
900
+ {
901
+ "grad_norm": 0.7904002666473389,
902
+ "learning_rate": 8.413080942143767e-05,
903
+ "loss": 0.0555,
904
+ "step": 1490
905
+ },
906
+ {
907
+ "grad_norm": 0.670651912689209,
908
+ "learning_rate": 8.388840111847288e-05,
909
+ "loss": 0.0544,
910
+ "step": 1500
911
+ },
912
+ {
913
+ "grad_norm": 0.6037341952323914,
914
+ "learning_rate": 8.364451042705998e-05,
915
+ "loss": 0.0547,
916
+ "step": 1510
917
+ },
918
+ {
919
+ "grad_norm": 0.6787996292114258,
920
+ "learning_rate": 8.33991480157679e-05,
921
+ "loss": 0.0561,
922
+ "step": 1520
923
+ },
924
+ {
925
+ "grad_norm": 0.6017433404922485,
926
+ "learning_rate": 8.315232461754338e-05,
927
+ "loss": 0.0573,
928
+ "step": 1530
929
+ },
930
+ {
931
+ "grad_norm": 0.4915255904197693,
932
+ "learning_rate": 8.290405102924144e-05,
933
+ "loss": 0.0558,
934
+ "step": 1540
935
+ },
936
+ {
937
+ "grad_norm": 0.5378565788269043,
938
+ "learning_rate": 8.265433811115316e-05,
939
+ "loss": 0.0544,
940
+ "step": 1550
941
+ },
942
+ {
943
+ "grad_norm": 0.5385977625846863,
944
+ "learning_rate": 8.240319678653049e-05,
945
+ "loss": 0.0518,
946
+ "step": 1560
947
+ },
948
+ {
949
+ "grad_norm": 0.5652082562446594,
950
+ "learning_rate": 8.215063804110857e-05,
951
+ "loss": 0.0529,
952
+ "step": 1570
953
+ },
954
+ {
955
+ "grad_norm": 0.4891897737979889,
956
+ "learning_rate": 8.189667292262512e-05,
957
+ "loss": 0.0519,
958
+ "step": 1580
959
+ },
960
+ {
961
+ "grad_norm": 0.7646594643592834,
962
+ "learning_rate": 8.164131254033716e-05,
963
+ "loss": 0.0552,
964
+ "step": 1590
965
+ },
966
+ {
967
+ "grad_norm": 0.74470454454422,
968
+ "learning_rate": 8.138456806453503e-05,
969
+ "loss": 0.0567,
970
+ "step": 1600
971
+ },
972
+ {
973
+ "grad_norm": 0.5772689580917358,
974
+ "learning_rate": 8.112645072605386e-05,
975
+ "loss": 0.0566,
976
+ "step": 1610
977
+ },
978
+ {
979
+ "grad_norm": 0.545242190361023,
980
+ "learning_rate": 8.086697181578222e-05,
981
+ "loss": 0.0536,
982
+ "step": 1620
983
+ },
984
+ {
985
+ "grad_norm": 0.491587370634079,
986
+ "learning_rate": 8.060614268416823e-05,
987
+ "loss": 0.0513,
988
+ "step": 1630
989
+ },
990
+ {
991
+ "grad_norm": 0.4751424193382263,
992
+ "learning_rate": 8.034397474072309e-05,
993
+ "loss": 0.0525,
994
+ "step": 1640
995
+ },
996
+ {
997
+ "grad_norm": 0.4386977553367615,
998
+ "learning_rate": 8.008047945352193e-05,
999
+ "loss": 0.0514,
1000
+ "step": 1650
1001
+ },
1002
+ {
1003
+ "grad_norm": 0.6388326287269592,
1004
+ "learning_rate": 7.981566834870225e-05,
1005
+ "loss": 0.0534,
1006
+ "step": 1660
1007
+ },
1008
+ {
1009
+ "grad_norm": 0.44420260190963745,
1010
+ "learning_rate": 7.954955300995961e-05,
1011
+ "loss": 0.0516,
1012
+ "step": 1670
1013
+ },
1014
+ {
1015
+ "grad_norm": 0.4639018774032593,
1016
+ "learning_rate": 7.928214507804104e-05,
1017
+ "loss": 0.0504,
1018
+ "step": 1680
1019
+ },
1020
+ {
1021
+ "grad_norm": 0.6702834963798523,
1022
+ "learning_rate": 7.901345625023576e-05,
1023
+ "loss": 0.0534,
1024
+ "step": 1690
1025
+ },
1026
+ {
1027
+ "grad_norm": 0.5253898501396179,
1028
+ "learning_rate": 7.874349827986354e-05,
1029
+ "loss": 0.0522,
1030
+ "step": 1700
1031
+ },
1032
+ {
1033
+ "grad_norm": 0.5169168710708618,
1034
+ "learning_rate": 7.847228297576053e-05,
1035
+ "loss": 0.0501,
1036
+ "step": 1710
1037
+ },
1038
+ {
1039
+ "grad_norm": 0.5272868275642395,
1040
+ "learning_rate": 7.819982220176276e-05,
1041
+ "loss": 0.0518,
1042
+ "step": 1720
1043
+ },
1044
+ {
1045
+ "grad_norm": 0.7662843465805054,
1046
+ "learning_rate": 7.792612787618714e-05,
1047
+ "loss": 0.0519,
1048
+ "step": 1730
1049
+ },
1050
+ {
1051
+ "grad_norm": 0.46854788064956665,
1052
+ "learning_rate": 7.765121197131009e-05,
1053
+ "loss": 0.0508,
1054
+ "step": 1740
1055
+ },
1056
+ {
1057
+ "grad_norm": 0.6922064423561096,
1058
+ "learning_rate": 7.737508651284391e-05,
1059
+ "loss": 0.0526,
1060
+ "step": 1750
1061
+ },
1062
+ {
1063
+ "grad_norm": 0.5540815591812134,
1064
+ "learning_rate": 7.709776357941069e-05,
1065
+ "loss": 0.051,
1066
+ "step": 1760
1067
+ },
1068
+ {
1069
+ "grad_norm": 0.49730926752090454,
1070
+ "learning_rate": 7.681925530201392e-05,
1071
+ "loss": 0.0518,
1072
+ "step": 1770
1073
+ },
1074
+ {
1075
+ "grad_norm": 0.409542977809906,
1076
+ "learning_rate": 7.65395738635079e-05,
1077
+ "loss": 0.0499,
1078
+ "step": 1780
1079
+ },
1080
+ {
1081
+ "grad_norm": 0.3568744659423828,
1082
+ "learning_rate": 7.62587314980648e-05,
1083
+ "loss": 0.0489,
1084
+ "step": 1790
1085
+ },
1086
+ {
1087
+ "grad_norm": 0.544342577457428,
1088
+ "learning_rate": 7.597674049063947e-05,
1089
+ "loss": 0.049,
1090
+ "step": 1800
1091
+ },
1092
+ {
1093
+ "grad_norm": 0.49204885959625244,
1094
+ "learning_rate": 7.569361317643211e-05,
1095
+ "loss": 0.0497,
1096
+ "step": 1810
1097
+ },
1098
+ {
1099
+ "grad_norm": 0.5453569889068604,
1100
+ "learning_rate": 7.540936194034865e-05,
1101
+ "loss": 0.05,
1102
+ "step": 1820
1103
+ },
1104
+ {
1105
+ "grad_norm": 0.5441051721572876,
1106
+ "learning_rate": 7.512399921645901e-05,
1107
+ "loss": 0.0504,
1108
+ "step": 1830
1109
+ },
1110
+ {
1111
+ "grad_norm": 0.6869552135467529,
1112
+ "learning_rate": 7.483753748745317e-05,
1113
+ "loss": 0.05,
1114
+ "step": 1840
1115
+ },
1116
+ {
1117
+ "grad_norm": 0.6476168036460876,
1118
+ "learning_rate": 7.454998928409516e-05,
1119
+ "loss": 0.0516,
1120
+ "step": 1850
1121
+ },
1122
+ {
1123
+ "grad_norm": 0.5475095510482788,
1124
+ "learning_rate": 7.426136718467493e-05,
1125
+ "loss": 0.0489,
1126
+ "step": 1860
1127
+ },
1128
+ {
1129
+ "grad_norm": 0.6119644045829773,
1130
+ "learning_rate": 7.397168381445812e-05,
1131
+ "loss": 0.0515,
1132
+ "step": 1870
1133
+ },
1134
+ {
1135
+ "grad_norm": 0.5069228410720825,
1136
+ "learning_rate": 7.368095184513377e-05,
1137
+ "loss": 0.0492,
1138
+ "step": 1880
1139
+ },
1140
+ {
1141
+ "grad_norm": 0.585512101650238,
1142
+ "learning_rate": 7.338918399426005e-05,
1143
+ "loss": 0.0508,
1144
+ "step": 1890
1145
+ },
1146
+ {
1147
+ "grad_norm": 0.36048993468284607,
1148
+ "learning_rate": 7.309639302470801e-05,
1149
+ "loss": 0.05,
1150
+ "step": 1900
1151
+ },
1152
+ {
1153
+ "grad_norm": 0.5538028478622437,
1154
+ "learning_rate": 7.280259174410312e-05,
1155
+ "loss": 0.0474,
1156
+ "step": 1910
1157
+ },
1158
+ {
1159
+ "grad_norm": 0.4286315143108368,
1160
+ "learning_rate": 7.250779300426517e-05,
1161
+ "loss": 0.0482,
1162
+ "step": 1920
1163
+ },
1164
+ {
1165
+ "grad_norm": 0.4801275432109833,
1166
+ "learning_rate": 7.22120097006461e-05,
1167
+ "loss": 0.0494,
1168
+ "step": 1930
1169
+ },
1170
+ {
1171
+ "grad_norm": 0.5670292377471924,
1172
+ "learning_rate": 7.191525477176577e-05,
1173
+ "loss": 0.0483,
1174
+ "step": 1940
1175
+ },
1176
+ {
1177
+ "grad_norm": 0.48637834191322327,
1178
+ "learning_rate": 7.161754119864616e-05,
1179
+ "loss": 0.0484,
1180
+ "step": 1950
1181
+ },
1182
+ {
1183
+ "grad_norm": 0.5343783497810364,
1184
+ "learning_rate": 7.131888200424339e-05,
1185
+ "loss": 0.0494,
1186
+ "step": 1960
1187
+ },
1188
+ {
1189
+ "grad_norm": 0.49846580624580383,
1190
+ "learning_rate": 7.101929025287816e-05,
1191
+ "loss": 0.0492,
1192
+ "step": 1970
1193
+ },
1194
+ {
1195
+ "grad_norm": 0.3981685936450958,
1196
+ "learning_rate": 7.071877904966423e-05,
1197
+ "loss": 0.0486,
1198
+ "step": 1980
1199
+ },
1200
+ {
1201
+ "grad_norm": 0.7127212285995483,
1202
+ "learning_rate": 7.04173615399351e-05,
1203
+ "loss": 0.049,
1204
+ "step": 1990
1205
+ },
1206
+ {
1207
+ "grad_norm": 0.6645919680595398,
1208
+ "learning_rate": 7.011505090866913e-05,
1209
+ "loss": 0.0502,
1210
+ "step": 2000
1211
+ }
1212
+ ],
1213
+ "logging_steps": 10,
1214
+ "max_steps": 5000,
1215
+ "num_input_tokens_seen": 0,
1216
+ "num_train_epochs": 9223372036854775807,
1217
+ "save_steps": 1000,
1218
+ "stateful_callbacks": {
1219
+ "TrainerControl": {
1220
+ "args": {
1221
+ "should_epoch_stop": false,
1222
+ "should_evaluate": false,
1223
+ "should_log": false,
1224
+ "should_save": true,
1225
+ "should_training_stop": false
1226
+ },
1227
+ "attributes": {}
1228
+ }
1229
+ },
1230
+ "total_flos": 0.0,
1231
+ "train_batch_size": 768,
1232
+ "trial_name": null,
1233
+ "trial_params": null
1234
+ }
training_args.bin ADDED
@@ -0,0 +1,3 @@
 
 
 
 
1
+ version https://git-lfs.github.com/spec/v1
2
+ oid sha256:e95cae1a1d9a55506a58c222e7c771c68ba287d5a5f64c82115f57954a2fac26
3
+ size 7761
wandb_config.json ADDED
@@ -0,0 +1 @@
 
 
1
+ {"project": "gr00t-g1-23dof-gear-sonic", "run_id": "outputs"}
zero_to_fp32.py ADDED
@@ -0,0 +1,760 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ #!/usr/bin/env python
2
+
3
+ # Copyright (c) Microsoft Corporation.
4
+ # SPDX-License-Identifier: Apache-2.0
5
+
6
+ # DeepSpeed Team
7
+
8
+ # This script extracts fp32 consolidated weights from a zero 1, 2 and 3 DeepSpeed checkpoints. It gets
9
+ # copied into the top level checkpoint dir, so the user can easily do the conversion at any point in
10
+ # the future. Once extracted, the weights don't require DeepSpeed and can be used in any
11
+ # application.
12
+ #
13
+ # example:
14
+ # python zero_to_fp32.py . output_dir/
15
+ # or
16
+ # python zero_to_fp32.py . output_dir/ --safe_serialization
17
+
18
+ import argparse
19
+ import torch
20
+ import glob
21
+ import math
22
+ import os
23
+ import re
24
+ import gc
25
+ import json
26
+ import numpy as np
27
+ from tqdm import tqdm
28
+ from collections import OrderedDict
29
+ from dataclasses import dataclass
30
+
31
+ # while this script doesn't use deepspeed to recover data, since the checkpoints are pickled with
32
+ # DeepSpeed data structures it has to be available in the current python environment.
33
+ from deepspeed.utils import logger
34
+ from deepspeed.checkpoint.constants import (DS_VERSION, OPTIMIZER_STATE_DICT, SINGLE_PARTITION_OF_FP32_GROUPS,
35
+ FP32_FLAT_GROUPS, ZERO_STAGE, PARTITION_COUNT, PARAM_SHAPES, BUFFER_NAMES,
36
+ FROZEN_PARAM_SHAPES, FROZEN_PARAM_FRAGMENTS)
37
+
38
+
39
+ @dataclass
40
+ class zero_model_state:
41
+ buffers: dict()
42
+ param_shapes: dict()
43
+ shared_params: list
44
+ ds_version: int
45
+ frozen_param_shapes: dict()
46
+ frozen_param_fragments: dict()
47
+
48
+
49
+ debug = 0
50
+
51
+ # load to cpu
52
+ device = torch.device('cpu')
53
+
54
+
55
+ def atoi(text):
56
+ return int(text) if text.isdigit() else text
57
+
58
+
59
+ def natural_keys(text):
60
+ '''
61
+ alist.sort(key=natural_keys) sorts in human order
62
+ http://nedbatchelder.com/blog/200712/human_sorting.html
63
+ (See Toothy's implementation in the comments)
64
+ '''
65
+ return [atoi(c) for c in re.split(r'(\d+)', text)]
66
+
67
+
68
+ def get_model_state_file(checkpoint_dir, zero_stage):
69
+ if not os.path.isdir(checkpoint_dir):
70
+ raise FileNotFoundError(f"Directory '{checkpoint_dir}' doesn't exist")
71
+
72
+ # there should be only one file
73
+ if zero_stage <= 2:
74
+ file = os.path.join(checkpoint_dir, "mp_rank_00_model_states.pt")
75
+ elif zero_stage == 3:
76
+ file = os.path.join(checkpoint_dir, "zero_pp_rank_0_mp_rank_00_model_states.pt")
77
+
78
+ if not os.path.exists(file):
79
+ raise FileNotFoundError(f"can't find model states file at '{file}'")
80
+
81
+ return file
82
+
83
+
84
+ def get_checkpoint_files(checkpoint_dir, glob_pattern):
85
+ # XXX: need to test that this simple glob rule works for multi-node setup too
86
+ ckpt_files = sorted(glob.glob(os.path.join(checkpoint_dir, glob_pattern)), key=natural_keys)
87
+
88
+ if len(ckpt_files) == 0:
89
+ raise FileNotFoundError(f"can't find {glob_pattern} files in directory '{checkpoint_dir}'")
90
+
91
+ return ckpt_files
92
+
93
+
94
+ def get_optim_files(checkpoint_dir):
95
+ return get_checkpoint_files(checkpoint_dir, "*_optim_states.pt")
96
+
97
+
98
+ def get_model_state_files(checkpoint_dir):
99
+ return get_checkpoint_files(checkpoint_dir, "*_model_states.pt")
100
+
101
+
102
+ def parse_model_states(files):
103
+ zero_model_states = []
104
+ for file in files:
105
+ state_dict = torch.load(file, map_location=device, weights_only=False)
106
+
107
+ if BUFFER_NAMES not in state_dict:
108
+ raise ValueError(f"{file} is not a model state checkpoint")
109
+ buffer_names = state_dict[BUFFER_NAMES]
110
+ if debug:
111
+ print("Found buffers:", buffer_names)
112
+
113
+ # recover just the buffers while restoring them to fp32 if they were saved in fp16
114
+ buffers = {k: v.float() for k, v in state_dict["module"].items() if k in buffer_names}
115
+ param_shapes = state_dict[PARAM_SHAPES]
116
+
117
+ # collect parameters that are included in param_shapes
118
+ param_names = []
119
+ for s in param_shapes:
120
+ for name in s.keys():
121
+ param_names.append(name)
122
+
123
+ # update with frozen parameters
124
+ frozen_param_shapes = state_dict.get(FROZEN_PARAM_SHAPES, None)
125
+ if frozen_param_shapes is not None:
126
+ if debug:
127
+ print(f"Found frozen_param_shapes: {frozen_param_shapes}")
128
+ param_names += list(frozen_param_shapes.keys())
129
+
130
+ # handle shared params
131
+ shared_params = [[k, v] for k, v in state_dict["shared_params"].items()]
132
+
133
+ ds_version = state_dict.get(DS_VERSION, None)
134
+
135
+ frozen_param_fragments = state_dict.get(FROZEN_PARAM_FRAGMENTS, None)
136
+
137
+ z_model_state = zero_model_state(buffers=buffers,
138
+ param_shapes=param_shapes,
139
+ shared_params=shared_params,
140
+ ds_version=ds_version,
141
+ frozen_param_shapes=frozen_param_shapes,
142
+ frozen_param_fragments=frozen_param_fragments)
143
+ zero_model_states.append(z_model_state)
144
+
145
+ return zero_model_states
146
+
147
+
148
+ def parse_optim_states(files, ds_checkpoint_dir):
149
+ total_files = len(files)
150
+ state_dicts = []
151
+ for f in tqdm(files, desc='Loading checkpoint shards'):
152
+ state_dict = torch.load(f, map_location=device, mmap=True, weights_only=False)
153
+ # immediately discard the potentially huge 2 optimizer states as we only care for fp32 master weights
154
+ # and also handle the case where it was already removed by another helper script
155
+ state_dict["optimizer_state_dict"].pop("optimizer_state_dict", None)
156
+ state_dicts.append(state_dict)
157
+
158
+ if ZERO_STAGE not in state_dicts[0][OPTIMIZER_STATE_DICT]:
159
+ raise ValueError(f"{files[0]} is not a zero checkpoint")
160
+ zero_stage = state_dicts[0][OPTIMIZER_STATE_DICT][ZERO_STAGE]
161
+ world_size = state_dicts[0][OPTIMIZER_STATE_DICT][PARTITION_COUNT]
162
+
163
+ # For ZeRO-2 each param group can have different partition_count as data parallelism for expert
164
+ # parameters can be different from data parallelism for non-expert parameters. So we can just
165
+ # use the max of the partition_count to get the dp world_size.
166
+
167
+ if type(world_size) is list:
168
+ world_size = max(world_size)
169
+
170
+ if world_size != total_files:
171
+ raise ValueError(
172
+ f"Expected {world_size} of '*_optim_states.pt' under '{ds_checkpoint_dir}' but found {total_files} files. "
173
+ "Possibly due to an overwrite of an old checkpoint, or a checkpoint didn't get saved by one or more processes."
174
+ )
175
+
176
+ # the groups are named differently in each stage
177
+ if zero_stage <= 2:
178
+ fp32_groups_key = SINGLE_PARTITION_OF_FP32_GROUPS
179
+ elif zero_stage == 3:
180
+ fp32_groups_key = FP32_FLAT_GROUPS
181
+ else:
182
+ raise ValueError(f"unknown zero stage {zero_stage}")
183
+
184
+ fp32_flat_groups = [state_dicts[i][OPTIMIZER_STATE_DICT][fp32_groups_key] for i in range(len(state_dicts))]
185
+ return zero_stage, world_size, fp32_flat_groups
186
+
187
+
188
+ def _get_fp32_state_dict_from_zero_checkpoint(ds_checkpoint_dir, exclude_frozen_parameters):
189
+ """
190
+ Returns fp32 state_dict reconstructed from ds checkpoint
191
+
192
+ Args:
193
+ - ``ds_checkpoint_dir``: path to the deepspeed checkpoint folder (where the optimizer files are)
194
+
195
+ """
196
+ print(f"Processing zero checkpoint '{ds_checkpoint_dir}'")
197
+
198
+ optim_files = get_optim_files(ds_checkpoint_dir)
199
+ zero_stage, world_size, fp32_flat_groups = parse_optim_states(optim_files, ds_checkpoint_dir)
200
+ print(f"Detected checkpoint of type zero stage {zero_stage}, world_size: {world_size}")
201
+
202
+ model_files = get_model_state_files(ds_checkpoint_dir)
203
+
204
+ zero_model_states = parse_model_states(model_files)
205
+ print(f'Parsing checkpoint created by deepspeed=={zero_model_states[0].ds_version}')
206
+
207
+ if zero_stage <= 2:
208
+ return _get_fp32_state_dict_from_zero2_checkpoint(world_size, fp32_flat_groups, zero_model_states,
209
+ exclude_frozen_parameters)
210
+ elif zero_stage == 3:
211
+ return _get_fp32_state_dict_from_zero3_checkpoint(world_size, fp32_flat_groups, zero_model_states,
212
+ exclude_frozen_parameters)
213
+
214
+
215
+ def _zero2_merge_frozen_params(state_dict, zero_model_states):
216
+ if zero_model_states[0].frozen_param_shapes is None or len(zero_model_states[0].frozen_param_shapes) == 0:
217
+ return
218
+
219
+ frozen_param_shapes = zero_model_states[0].frozen_param_shapes
220
+ frozen_param_fragments = zero_model_states[0].frozen_param_fragments
221
+
222
+ if debug:
223
+ num_elem = sum(s.numel() for s in frozen_param_shapes.values())
224
+ print(f'rank 0: {FROZEN_PARAM_SHAPES}.numel = {num_elem}')
225
+
226
+ wanted_params = len(frozen_param_shapes)
227
+ wanted_numel = sum(s.numel() for s in frozen_param_shapes.values())
228
+ avail_numel = sum([p.numel() for p in frozen_param_fragments.values()])
229
+ print(f'Frozen params: Have {avail_numel} numels to process.')
230
+ print(f'Frozen params: Need {wanted_numel} numels in {wanted_params} params')
231
+
232
+ total_params = 0
233
+ total_numel = 0
234
+ for name, shape in frozen_param_shapes.items():
235
+ total_params += 1
236
+ unpartitioned_numel = shape.numel()
237
+ total_numel += unpartitioned_numel
238
+
239
+ state_dict[name] = frozen_param_fragments[name]
240
+
241
+ if debug:
242
+ print(f"{name} full shape: {shape} unpartitioned numel {unpartitioned_numel} ")
243
+
244
+ print(f"Reconstructed Frozen fp32 state dict with {total_params} params {total_numel} elements")
245
+
246
+
247
+ def _has_callable(obj, fn):
248
+ attr = getattr(obj, fn, None)
249
+ return callable(attr)
250
+
251
+
252
+ def _zero2_merge_trainable_params(state_dict, world_size, fp32_flat_groups, zero_model_states):
253
+ param_shapes = zero_model_states[0].param_shapes
254
+
255
+ # Reconstruction protocol:
256
+ #
257
+ # XXX: document this
258
+
259
+ if debug:
260
+ for i in range(world_size):
261
+ for j in range(len(fp32_flat_groups[0])):
262
+ print(f"{FP32_FLAT_GROUPS}[{i}][{j}].shape={fp32_flat_groups[i][j].shape}")
263
+
264
+ # XXX: memory usage doubles here (zero2)
265
+ num_param_groups = len(fp32_flat_groups[0])
266
+ merged_single_partition_of_fp32_groups = []
267
+ for i in range(num_param_groups):
268
+ merged_partitions = [sd[i] for sd in fp32_flat_groups]
269
+ full_single_fp32_vector = torch.cat(merged_partitions, 0)
270
+ merged_single_partition_of_fp32_groups.append(full_single_fp32_vector)
271
+ avail_numel = sum(
272
+ [full_single_fp32_vector.numel() for full_single_fp32_vector in merged_single_partition_of_fp32_groups])
273
+
274
+ if debug:
275
+ wanted_params = sum([len(shapes) for shapes in param_shapes])
276
+ wanted_numel = sum([sum(shape.numel() for shape in shapes.values()) for shapes in param_shapes])
277
+ # not asserting if there is a mismatch due to possible padding
278
+ print(f"Have {avail_numel} numels to process.")
279
+ print(f"Need {wanted_numel} numels in {wanted_params} params.")
280
+
281
+ # params
282
+ # XXX: for huge models that can't fit into the host's RAM we will have to recode this to support
283
+ # out-of-core computing solution
284
+ total_numel = 0
285
+ total_params = 0
286
+ for shapes, full_single_fp32_vector in zip(param_shapes, merged_single_partition_of_fp32_groups):
287
+ offset = 0
288
+ avail_numel = full_single_fp32_vector.numel()
289
+ for name, shape in shapes.items():
290
+
291
+ unpartitioned_numel = shape.numel() if _has_callable(shape, 'numel') else math.prod(shape)
292
+ total_numel += unpartitioned_numel
293
+ total_params += 1
294
+
295
+ if debug:
296
+ print(f"{name} full shape: {shape} unpartitioned numel {unpartitioned_numel} ")
297
+ state_dict[name] = full_single_fp32_vector.narrow(0, offset, unpartitioned_numel).view(shape)
298
+ offset += unpartitioned_numel
299
+
300
+ # Z2 started to align to 2*world_size to improve nccl performance. Therefore both offset and
301
+ # avail_numel can differ by anywhere between 0..2*world_size. Due to two unrelated complex
302
+ # paddings performed in the code it's almost impossible to predict the exact numbers w/o the
303
+ # live optimizer object, so we are checking that the numbers are within the right range
304
+ align_to = 2 * world_size
305
+
306
+ def zero2_align(x):
307
+ return align_to * math.ceil(x / align_to)
308
+
309
+ if debug:
310
+ print(f"original offset={offset}, avail_numel={avail_numel}")
311
+
312
+ offset = zero2_align(offset)
313
+ avail_numel = zero2_align(avail_numel)
314
+
315
+ if debug:
316
+ print(f"aligned offset={offset}, avail_numel={avail_numel}")
317
+
318
+ # Sanity check
319
+ if offset != avail_numel:
320
+ raise ValueError(f"consumed {offset} numels out of {avail_numel} - something is wrong")
321
+
322
+ print(f"Reconstructed fp32 state dict with {total_params} params {total_numel} elements")
323
+
324
+
325
+ def _get_fp32_state_dict_from_zero2_checkpoint(world_size, fp32_flat_groups, zero_model_states,
326
+ exclude_frozen_parameters):
327
+ state_dict = OrderedDict()
328
+
329
+ # buffers
330
+ buffers = zero_model_states[0].buffers
331
+ state_dict.update(buffers)
332
+ if debug:
333
+ print(f"added {len(buffers)} buffers")
334
+
335
+ if not exclude_frozen_parameters:
336
+ _zero2_merge_frozen_params(state_dict, zero_model_states)
337
+
338
+ _zero2_merge_trainable_params(state_dict, world_size, fp32_flat_groups, zero_model_states)
339
+
340
+ # recover shared parameters
341
+ for pair in zero_model_states[0].shared_params:
342
+ if pair[1] in state_dict:
343
+ state_dict[pair[0]] = state_dict[pair[1]]
344
+
345
+ return state_dict
346
+
347
+
348
+ def zero3_partitioned_param_info(unpartitioned_numel, world_size):
349
+ remainder = unpartitioned_numel % world_size
350
+ padding_numel = (world_size - remainder) if remainder else 0
351
+ partitioned_numel = math.ceil(unpartitioned_numel / world_size)
352
+ return partitioned_numel, padding_numel
353
+
354
+
355
+ def _zero3_merge_frozen_params(state_dict, world_size, zero_model_states):
356
+ if zero_model_states[0].frozen_param_shapes is None or len(zero_model_states[0].frozen_param_shapes) == 0:
357
+ return
358
+
359
+ if debug:
360
+ for i in range(world_size):
361
+ num_elem = sum(s.numel() for s in zero_model_states[i].frozen_param_fragments.values())
362
+ print(f'rank {i}: {FROZEN_PARAM_SHAPES}.numel = {num_elem}')
363
+
364
+ frozen_param_shapes = zero_model_states[0].frozen_param_shapes
365
+ wanted_params = len(frozen_param_shapes)
366
+ wanted_numel = sum(s.numel() for s in frozen_param_shapes.values())
367
+ avail_numel = sum([p.numel() for p in zero_model_states[0].frozen_param_fragments.values()]) * world_size
368
+ print(f'Frozen params: Have {avail_numel} numels to process.')
369
+ print(f'Frozen params: Need {wanted_numel} numels in {wanted_params} params')
370
+
371
+ total_params = 0
372
+ total_numel = 0
373
+ for name, shape in zero_model_states[0].frozen_param_shapes.items():
374
+ total_params += 1
375
+ unpartitioned_numel = shape.numel()
376
+ total_numel += unpartitioned_numel
377
+
378
+ param_frags = tuple(model_state.frozen_param_fragments[name] for model_state in zero_model_states)
379
+ state_dict[name] = torch.cat(param_frags, 0).narrow(0, 0, unpartitioned_numel).view(shape)
380
+
381
+ partitioned_numel, partitioned_padding_numel = zero3_partitioned_param_info(unpartitioned_numel, world_size)
382
+
383
+ if debug:
384
+ print(
385
+ f"Frozen params: {total_params} {name} full shape: {shape} partition0 numel={partitioned_numel} partitioned_padding_numel={partitioned_padding_numel}"
386
+ )
387
+
388
+ print(f"Reconstructed Frozen fp32 state dict with {total_params} params {total_numel} elements")
389
+
390
+
391
+ class GatheredTensor:
392
+ """
393
+ A pseudo tensor that collects partitioned weights.
394
+ It is more memory efficient when there are multiple groups.
395
+ """
396
+
397
+ def __init__(self, flat_groups, flat_groups_offset, offset, partitioned_numel, shape):
398
+ self.flat_groups = flat_groups
399
+ self.flat_groups_offset = flat_groups_offset
400
+ self.offset = offset
401
+ self.partitioned_numel = partitioned_numel
402
+ self.shape = shape
403
+ self.dtype = self.flat_groups[0][0].dtype
404
+
405
+ def contiguous(self):
406
+ """
407
+ Merge partitioned weights from flat_groups into a single tensor.
408
+ """
409
+ end_idx = self.offset + self.partitioned_numel
410
+ world_size = len(self.flat_groups)
411
+ pad_flat_param_chunks = []
412
+
413
+ for rank_i in range(world_size):
414
+ # for each rank, we need to collect weights from related group/groups
415
+ flat_groups_at_rank_i = self.flat_groups[rank_i]
416
+ start_group_id = None
417
+ end_group_id = None
418
+ for group_id in range(len(self.flat_groups_offset)):
419
+ if self.flat_groups_offset[group_id] <= self.offset < self.flat_groups_offset[group_id + 1]:
420
+ start_group_id = group_id
421
+ if self.flat_groups_offset[group_id] < end_idx <= self.flat_groups_offset[group_id + 1]:
422
+ end_group_id = group_id
423
+ break
424
+ # collect weights from related group/groups
425
+ for group_id in range(start_group_id, end_group_id + 1):
426
+ flat_tensor = flat_groups_at_rank_i[group_id]
427
+ start_offset = self.offset - self.flat_groups_offset[group_id]
428
+ end_offset = min(end_idx, self.flat_groups_offset[group_id + 1]) - self.flat_groups_offset[group_id]
429
+ pad_flat_param_chunks.append(flat_tensor[start_offset:end_offset])
430
+
431
+ # collect weights from all ranks
432
+ pad_flat_param = torch.cat(pad_flat_param_chunks, dim=0)
433
+ param = pad_flat_param[:self.shape.numel()].view(self.shape).contiguous()
434
+ return param
435
+
436
+
437
+ def _zero3_merge_trainable_params(state_dict, world_size, fp32_flat_groups, zero_model_states):
438
+ param_shapes = zero_model_states[0].param_shapes
439
+ avail_numel = sum([flat_group.numel() for flat_group in fp32_flat_groups[0]]) * world_size
440
+
441
+ # Reconstruction protocol: For zero3 we need to zip the partitions together at boundary of each
442
+ # param, re-consolidating each param, while dealing with padding if any
443
+
444
+ # merge list of dicts, preserving order
445
+ param_shapes = {k: v for d in param_shapes for k, v in d.items()}
446
+
447
+ if debug:
448
+ for i in range(world_size):
449
+ print(f"{FP32_FLAT_GROUPS}[{i}].shape={fp32_flat_groups[i].shape}")
450
+
451
+ wanted_params = len(param_shapes)
452
+ wanted_numel = sum(shape.numel() for shape in param_shapes.values())
453
+ # not asserting if there is a mismatch due to possible padding
454
+ avail_numel = fp32_flat_groups[0].numel() * world_size
455
+ print(f"Trainable params: Have {avail_numel} numels to process.")
456
+ print(f"Trainable params: Need {wanted_numel} numels in {wanted_params} params.")
457
+
458
+ # params
459
+ # XXX: for huge models that can't fit into the host's RAM we will have to recode this to support
460
+ # out-of-core computing solution
461
+ offset = 0
462
+ total_numel = 0
463
+ total_params = 0
464
+ flat_groups_offset = [0] + list(np.cumsum([flat_tensor.numel() for flat_tensor in fp32_flat_groups[0]]))
465
+ for name, shape in tqdm(param_shapes.items(), desc='Gathering sharded weights'):
466
+ unpartitioned_numel = shape.numel()
467
+ total_numel += unpartitioned_numel
468
+ total_params += 1
469
+ partitioned_numel, partitioned_padding_numel = zero3_partitioned_param_info(unpartitioned_numel, world_size)
470
+
471
+ if debug:
472
+ print(
473
+ f"Trainable params: {total_params} {name} full shape: {shape} partition0 numel={partitioned_numel} partitioned_padding_numel={partitioned_padding_numel}"
474
+ )
475
+
476
+ # memory efficient tensor
477
+ tensor = GatheredTensor(fp32_flat_groups, flat_groups_offset, offset, partitioned_numel, shape)
478
+ state_dict[name] = tensor
479
+ offset += partitioned_numel
480
+
481
+ offset *= world_size
482
+
483
+ # Sanity check
484
+ if offset != avail_numel:
485
+ raise ValueError(f"consumed {offset} numels out of {avail_numel} - something is wrong")
486
+
487
+ print(f"Reconstructed Trainable fp32 state dict with {total_params} params {total_numel} elements")
488
+
489
+
490
+ def _get_fp32_state_dict_from_zero3_checkpoint(world_size, fp32_flat_groups, zero_model_states,
491
+ exclude_frozen_parameters):
492
+ state_dict = OrderedDict()
493
+
494
+ # buffers
495
+ buffers = zero_model_states[0].buffers
496
+ state_dict.update(buffers)
497
+ if debug:
498
+ print(f"added {len(buffers)} buffers")
499
+
500
+ if not exclude_frozen_parameters:
501
+ _zero3_merge_frozen_params(state_dict, world_size, zero_model_states)
502
+
503
+ _zero3_merge_trainable_params(state_dict, world_size, fp32_flat_groups, zero_model_states)
504
+
505
+ # recover shared parameters
506
+ for pair in zero_model_states[0].shared_params:
507
+ if pair[1] in state_dict:
508
+ state_dict[pair[0]] = state_dict[pair[1]]
509
+
510
+ return state_dict
511
+
512
+
513
+ def to_torch_tensor(state_dict, return_empty_tensor=False):
514
+ """
515
+ Convert state_dict of GatheredTensor to torch tensor
516
+ """
517
+ torch_state_dict = {}
518
+ converted_tensors = {}
519
+ for name, tensor in state_dict.items():
520
+ tensor_id = id(tensor)
521
+ if tensor_id in converted_tensors: # shared tensors
522
+ shared_tensor = torch_state_dict[converted_tensors[tensor_id]]
523
+ torch_state_dict[name] = shared_tensor
524
+ else:
525
+ converted_tensors[tensor_id] = name
526
+ if return_empty_tensor:
527
+ torch_state_dict[name] = torch.empty(tensor.shape, dtype=tensor.dtype)
528
+ else:
529
+ torch_state_dict[name] = tensor.contiguous()
530
+ return torch_state_dict
531
+
532
+
533
+ def get_fp32_state_dict_from_zero_checkpoint(checkpoint_dir,
534
+ tag=None,
535
+ exclude_frozen_parameters=False,
536
+ lazy_mode=False):
537
+ """
538
+ Convert ZeRO 2 or 3 checkpoint into a single fp32 consolidated state_dict that can be loaded with
539
+ ``load_state_dict()`` and used for training without DeepSpeed or shared with others, for example
540
+ via a model hub.
541
+
542
+ Args:
543
+ - ``checkpoint_dir``: path to the desired checkpoint folder
544
+ - ``tag``: checkpoint tag used as a unique identifier for checkpoint. If not provided will attempt to load tag in 'latest' file. e.g., ``global_step14``
545
+ - ``exclude_frozen_parameters``: exclude frozen parameters
546
+ - ``lazy_mode``: get state_dict in lazy mode. It returns a dict of pesduo tensor instead of torch tensor, which is more memory efficient.
547
+ Convert the pesduo tensor to torch tensor by ``.contiguous()``
548
+
549
+ Returns:
550
+ - pytorch ``state_dict``
551
+
552
+ A typical usage might be ::
553
+
554
+ from deepspeed.utils.zero_to_fp32 import get_fp32_state_dict_from_zero_checkpoint
555
+ # do the training and checkpoint saving
556
+ state_dict = get_fp32_state_dict_from_zero_checkpoint(checkpoint_dir) # already on cpu
557
+ model = model.cpu() # move to cpu
558
+ model.load_state_dict(state_dict)
559
+ # submit to model hub or save the model to share with others
560
+
561
+ In this example the ``model`` will no longer be usable in the deepspeed context of the same
562
+ application. i.e. you will need to re-initialize the deepspeed engine, since
563
+ ``model.load_state_dict(state_dict)`` will remove all the deepspeed magic from it.
564
+
565
+ If you want it all done for you, use ``load_state_dict_from_zero_checkpoint`` instead.
566
+
567
+ Note: the above usage may not work if your application doesn't have sufficient free CPU memory.
568
+ You may need to use the offline approach using the ``zero_to_fp32.py`` script that is saved with
569
+ the checkpoint. Or you can load state_dict in lazy mode ::
570
+
571
+ from deepspeed.utils.zero_to_fp32 import get_fp32_state_dict_from_zero_checkpoint
572
+ state_dict = get_fp32_state_dict_from_zero_checkpoint(checkpoint_dir, lazy_mode=True) # not on cpu
573
+ for name, lazy_tensor in state_dict.item():
574
+ tensor = lazy_tensor.contiguous() # to cpu
575
+ print(name, tensor)
576
+ # del tensor to release memory if it no longer in use
577
+ """
578
+ if tag is None:
579
+ latest_path = os.path.join(checkpoint_dir, 'latest')
580
+ if os.path.isfile(latest_path):
581
+ with open(latest_path, 'r') as fd:
582
+ tag = fd.read().strip()
583
+ else:
584
+ raise ValueError(f"Unable to find 'latest' file at {latest_path}")
585
+
586
+ ds_checkpoint_dir = os.path.join(checkpoint_dir, tag)
587
+
588
+ if not os.path.isdir(ds_checkpoint_dir):
589
+ raise FileNotFoundError(f"Directory '{ds_checkpoint_dir}' doesn't exist")
590
+
591
+ state_dict = _get_fp32_state_dict_from_zero_checkpoint(ds_checkpoint_dir, exclude_frozen_parameters)
592
+ if lazy_mode:
593
+ return state_dict
594
+ else:
595
+ return to_torch_tensor(state_dict)
596
+
597
+
598
+ def convert_zero_checkpoint_to_fp32_state_dict(checkpoint_dir,
599
+ output_dir,
600
+ max_shard_size="5GB",
601
+ safe_serialization=False,
602
+ tag=None,
603
+ exclude_frozen_parameters=False):
604
+ """
605
+ Convert ZeRO 2 or 3 checkpoint into a single fp32 consolidated ``state_dict`` file that can be
606
+ loaded with ``torch.load(file)`` + ``load_state_dict()`` and used for training without DeepSpeed.
607
+
608
+ Args:
609
+ - ``checkpoint_dir``: path to the desired checkpoint folder. (one that contains the tag-folder, like ``global_step14``)
610
+ - ``output_dir``: directory to the pytorch fp32 state_dict output files
611
+ - ``max_shard_size``: the maximum size for a checkpoint before being sharded, default value is 5GB
612
+ - ``safe_serialization``: whether to save the model using `safetensors` or the traditional PyTorch way (that uses `pickle`).
613
+ - ``tag``: checkpoint tag used as a unique identifier for checkpoint. If not provided will attempt to load tag in the file named ``latest`` in the checkpoint folder, e.g., ``global_step14``
614
+ - ``exclude_frozen_parameters``: exclude frozen parameters
615
+ """
616
+
617
+ # Dependency pre-check
618
+ if safe_serialization:
619
+ try:
620
+ from safetensors.torch import save_file
621
+ except ImportError:
622
+ print('If you want to use `safe_serialization`, please `pip install safetensors`')
623
+ raise
624
+ if max_shard_size is not None:
625
+ try:
626
+ from huggingface_hub import split_torch_state_dict_into_shards
627
+ except ImportError:
628
+ print('If you want to use `max_shard_size`, please `pip install huggingface_hub`')
629
+ raise
630
+
631
+ # Convert zero checkpoint to state_dict
632
+ state_dict = get_fp32_state_dict_from_zero_checkpoint(checkpoint_dir,
633
+ tag,
634
+ exclude_frozen_parameters,
635
+ lazy_mode=True)
636
+
637
+ # Shard the model if it is too big.
638
+ weights_name = "model.safetensors" if safe_serialization else "pytorch_model.bin"
639
+ if max_shard_size is not None:
640
+ filename_pattern = weights_name.replace(".bin", "{suffix}.bin").replace(".safetensors", "{suffix}.safetensors")
641
+ # an memory-efficient approach for sharding
642
+ empty_state_dict = to_torch_tensor(state_dict, return_empty_tensor=True)
643
+ state_dict_split = split_torch_state_dict_into_shards(empty_state_dict,
644
+ filename_pattern=filename_pattern,
645
+ max_shard_size=max_shard_size)
646
+ else:
647
+ from collections import namedtuple
648
+ StateDictSplit = namedtuple("StateDictSplit", ["is_sharded", "filename_to_tensors"])
649
+ state_dict_split = StateDictSplit(is_sharded=False,
650
+ filename_to_tensors={weights_name: list(state_dict.keys())})
651
+
652
+ # Save the model by shard
653
+ os.makedirs(output_dir, exist_ok=True)
654
+ filename_to_tensors = state_dict_split.filename_to_tensors.items()
655
+ for shard_file, tensors in tqdm(filename_to_tensors, desc="Saving checkpoint shards"):
656
+ shard_state_dict = {tensor_name: state_dict[tensor_name] for tensor_name in tensors}
657
+ shard_state_dict = to_torch_tensor(shard_state_dict)
658
+ output_path = os.path.join(output_dir, shard_file)
659
+ if safe_serialization:
660
+ save_file(shard_state_dict, output_path, metadata={"format": "pt"})
661
+ else:
662
+ torch.save(shard_state_dict, output_path)
663
+ # release the memory of current shard
664
+ for tensor_name in list(shard_state_dict.keys()):
665
+ del state_dict[tensor_name]
666
+ del shard_state_dict[tensor_name]
667
+ del shard_state_dict
668
+ gc.collect()
669
+
670
+ # Save index if sharded
671
+ if state_dict_split.is_sharded:
672
+ index = {
673
+ "metadata": state_dict_split.metadata,
674
+ "weight_map": state_dict_split.tensor_to_filename,
675
+ }
676
+ save_index_file = "model.safetensors.index.json" if safe_serialization else "pytorch_model.bin.index.json"
677
+ save_index_file = os.path.join(output_dir, save_index_file)
678
+ with open(save_index_file, "w", encoding="utf-8") as f:
679
+ content = json.dumps(index, indent=2, sort_keys=True) + "\n"
680
+ f.write(content)
681
+
682
+
683
+ def load_state_dict_from_zero_checkpoint(model, checkpoint_dir, tag=None):
684
+ """
685
+ 1. Put the provided model to cpu
686
+ 2. Convert ZeRO 2 or 3 checkpoint into a single fp32 consolidated ``state_dict``
687
+ 3. Load it into the provided model
688
+
689
+ Args:
690
+ - ``model``: the model object to update
691
+ - ``checkpoint_dir``: path to the desired checkpoint folder. (one that contains the tag-folder, like ``global_step14``)
692
+ - ``tag``: checkpoint tag used as a unique identifier for checkpoint. If not provided will attempt to load tag in the file named ``latest`` in the checkpoint folder, e.g., ``global_step14``
693
+
694
+ Returns:
695
+ - ``model`: modified model
696
+
697
+ Make sure you have plenty of CPU memory available before you call this function. If you don't
698
+ have enough use the ``zero_to_fp32.py`` utility to do the conversion. You will find it
699
+ conveniently placed for you in the checkpoint folder.
700
+
701
+ A typical usage might be ::
702
+
703
+ from deepspeed.utils.zero_to_fp32 import load_state_dict_from_zero_checkpoint
704
+ model = load_state_dict_from_zero_checkpoint(trainer.model, checkpoint_dir)
705
+ # submit to model hub or save the model to share with others
706
+
707
+ Note, that once this was run, the ``model`` will no longer be usable in the deepspeed context
708
+ of the same application. i.e. you will need to re-initialize the deepspeed engine, since
709
+ ``model.load_state_dict(state_dict)`` will remove all the deepspeed magic from it.
710
+
711
+ """
712
+ logger.info("Extracting fp32 weights")
713
+ state_dict = get_fp32_state_dict_from_zero_checkpoint(checkpoint_dir, tag)
714
+
715
+ logger.info("Overwriting model with fp32 weights")
716
+ model = model.cpu()
717
+ model.load_state_dict(state_dict, strict=False)
718
+
719
+ return model
720
+
721
+
722
+ if __name__ == "__main__":
723
+ parser = argparse.ArgumentParser()
724
+ parser.add_argument("checkpoint_dir",
725
+ type=str,
726
+ help="path to the desired checkpoint folder, e.g., path/checkpoint-12")
727
+ parser.add_argument("output_dir",
728
+ type=str,
729
+ help="directory to the pytorch fp32 state_dict output files"
730
+ "(e.g. path/checkpoint-12-output/)")
731
+ parser.add_argument(
732
+ "--max_shard_size",
733
+ type=str,
734
+ default="5GB",
735
+ help="The maximum size for a checkpoint before being sharded. Checkpoints shard will then be each of size"
736
+ "lower than this size. If expressed as a string, needs to be digits followed by a unit (like `5MB`"
737
+ "We default it to 5GB in order for models to be able to run easily on free-tier google colab instances"
738
+ "without CPU OOM issues.")
739
+ parser.add_argument(
740
+ "--safe_serialization",
741
+ default=False,
742
+ action='store_true',
743
+ help="Whether to save the model using `safetensors` or the traditional PyTorch way (that uses `pickle`).")
744
+ parser.add_argument("-t",
745
+ "--tag",
746
+ type=str,
747
+ default=None,
748
+ help="checkpoint tag used as a unique identifier for checkpoint. e.g., global_step1")
749
+ parser.add_argument("--exclude_frozen_parameters", action='store_true', help="exclude frozen parameters")
750
+ parser.add_argument("-d", "--debug", action='store_true', help="enable debug")
751
+ args = parser.parse_args()
752
+
753
+ debug = args.debug
754
+
755
+ convert_zero_checkpoint_to_fp32_state_dict(args.checkpoint_dir,
756
+ args.output_dir,
757
+ max_shard_size=args.max_shard_size,
758
+ safe_serialization=args.safe_serialization,
759
+ tag=args.tag,
760
+ exclude_frozen_parameters=args.exclude_frozen_parameters)