dreamzero
Browse files- checkpoint-3400/config.json +110 -0
- checkpoint-3400/experiment_cfg/conf.yaml +1722 -0
- checkpoint-3400/experiment_cfg/metadata.json +191 -0
- checkpoint-3400/global_step3400/bf16_zero_pp_rank_0_mp_rank_00_optim_states.pt +3 -0
- checkpoint-3400/global_step3400/bf16_zero_pp_rank_1_mp_rank_00_optim_states.pt +3 -0
- checkpoint-3400/global_step3400/bf16_zero_pp_rank_2_mp_rank_00_optim_states.pt +3 -0
- checkpoint-3400/global_step3400/bf16_zero_pp_rank_3_mp_rank_00_optim_states.pt +3 -0
- checkpoint-3400/global_step3400/zero_pp_rank_0_mp_rank_00_model_states.pt +3 -0
- checkpoint-3400/global_step3400/zero_pp_rank_1_mp_rank_00_model_states.pt +3 -0
- checkpoint-3400/global_step3400/zero_pp_rank_2_mp_rank_00_model_states.pt +3 -0
- checkpoint-3400/global_step3400/zero_pp_rank_3_mp_rank_00_model_states.pt +3 -0
- checkpoint-3400/latest +1 -0
- checkpoint-3400/model.safetensors +3 -0
- checkpoint-3400/rng_state_0.pth +3 -0
- checkpoint-3400/rng_state_1.pth +3 -0
- checkpoint-3400/rng_state_2.pth +3 -0
- checkpoint-3400/rng_state_3.pth +3 -0
- checkpoint-3400/scheduler.pt +3 -0
- checkpoint-3400/trainer_state.json +0 -0
- checkpoint-3400/wandb_config.json +1 -0
- checkpoint-3400/zero_to_fp32.py +760 -0
checkpoint-3400/config.json
ADDED
|
@@ -0,0 +1,110 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 1 |
+
{
|
| 2 |
+
"action_dim": 32,
|
| 3 |
+
"action_head_cfg": {
|
| 4 |
+
"_convert_": "object",
|
| 5 |
+
"_target_": "groot.vla.model.dreamzero.action_head.wan_flow_matching_action_tf.WANPolicyHead",
|
| 6 |
+
"config": {
|
| 7 |
+
"_recursive_": false,
|
| 8 |
+
"_target_": "groot.vla.model.dreamzero.action_head.wan_flow_matching_action_tf.WANPolicyHeadConfig",
|
| 9 |
+
"action_dim": 32,
|
| 10 |
+
"action_horizon": 24,
|
| 11 |
+
"action_loss_embodiment_ids": [
|
| 12 |
+
26,
|
| 13 |
+
17
|
| 14 |
+
],
|
| 15 |
+
"add_pos_embed": true,
|
| 16 |
+
"backbone_embedding_dim": 0,
|
| 17 |
+
"backbone_features_projector_cfg": null,
|
| 18 |
+
"decouple_video_action_noise": false,
|
| 19 |
+
"diffusion_model_cfg": {
|
| 20 |
+
"_convert_": "object",
|
| 21 |
+
"_target_": "groot.vla.model.dreamzero.modules.wan_video_dit_action_casual_chunk.CausalWanModel",
|
| 22 |
+
"diffusion_model_pretrained_path": "/n/netscratch/sham_lab/Lab/chloe00/Wan2.1-I2V-14B-480P",
|
| 23 |
+
"dim": 5120,
|
| 24 |
+
"eps": 1e-06,
|
| 25 |
+
"ffn_dim": 13824,
|
| 26 |
+
"frame_seqlen": 880,
|
| 27 |
+
"freq_dim": 256,
|
| 28 |
+
"in_dim": 36,
|
| 29 |
+
"max_chunk_size": 4,
|
| 30 |
+
"model_type": "i2v",
|
| 31 |
+
"num_action_per_block": 24,
|
| 32 |
+
"num_frame_per_block": 2,
|
| 33 |
+
"num_heads": 40,
|
| 34 |
+
"num_layers": 40,
|
| 35 |
+
"num_state_per_block": 1,
|
| 36 |
+
"out_dim": 16
|
| 37 |
+
},
|
| 38 |
+
"expand_batch": null,
|
| 39 |
+
"freeze_decode_layer": false,
|
| 40 |
+
"hidden_size": 64,
|
| 41 |
+
"image_encoder_cfg": {
|
| 42 |
+
"_convert_": "object",
|
| 43 |
+
"_target_": "groot.vla.model.dreamzero.modules.wan_video_image_encoder.WanImageEncoder",
|
| 44 |
+
"image_encoder_pretrained_path": "/n/netscratch/sham_lab/Lab/chloe00/Wan2.1-I2V-14B-480P/models_clip_open-clip-xlm-roberta-large-vit-huge-14.pth"
|
| 45 |
+
},
|
| 46 |
+
"init_lora_weights": "kaiming",
|
| 47 |
+
"input_embedding_dim": 1536,
|
| 48 |
+
"load_pretrained_det_decode_layer_path": null,
|
| 49 |
+
"lora_alpha": 4,
|
| 50 |
+
"lora_rank": 4,
|
| 51 |
+
"lora_target_modules": "q,k,v,o,ffn.0,ffn.2",
|
| 52 |
+
"max_action_dim": 32,
|
| 53 |
+
"max_state_dim": 64,
|
| 54 |
+
"model_dtype": "float32",
|
| 55 |
+
"noise_beta_alpha": 1.5,
|
| 56 |
+
"noise_beta_beta": 1.0,
|
| 57 |
+
"noise_s": 0.999,
|
| 58 |
+
"num_frame_per_block": 2,
|
| 59 |
+
"num_frames": 33,
|
| 60 |
+
"num_inference_timesteps": 4,
|
| 61 |
+
"num_timestep_buckets": 1000,
|
| 62 |
+
"repa_coeff": 1.0,
|
| 63 |
+
"repa_layer": 8,
|
| 64 |
+
"text_encoder_cfg": {
|
| 65 |
+
"_convert_": "object",
|
| 66 |
+
"_target_": "groot.vla.model.dreamzero.modules.wan_video_text_encoder.WanTextEncoder",
|
| 67 |
+
"text_encoder_pretrained_path": "/n/netscratch/sham_lab/Lab/chloe00/Wan2.1-I2V-14B-480P/models_t5_umt5-xxl-enc-bf16.pth"
|
| 68 |
+
},
|
| 69 |
+
"tile_size_height": 34,
|
| 70 |
+
"tile_size_width": 34,
|
| 71 |
+
"tile_stride_height": 18,
|
| 72 |
+
"tile_stride_width": 16,
|
| 73 |
+
"tiled": false,
|
| 74 |
+
"train_architecture": "lora",
|
| 75 |
+
"tune_diffusion_model": true,
|
| 76 |
+
"tune_projector": true,
|
| 77 |
+
"use_gradient_checkpointing": true,
|
| 78 |
+
"use_vlln": true,
|
| 79 |
+
"vae_cfg": {
|
| 80 |
+
"_convert_": "object",
|
| 81 |
+
"_target_": "groot.vla.model.dreamzero.modules.wan_video_vae.WanVideoVAE",
|
| 82 |
+
"vae_pretrained_path": "/n/netscratch/sham_lab/Lab/chloe00/Wan2.1-I2V-14B-480P/Wan2.1_VAE.pth"
|
| 83 |
+
},
|
| 84 |
+
"video_noise_beta_alpha": 3.0,
|
| 85 |
+
"video_noise_beta_beta": 1.0,
|
| 86 |
+
"vl_self_attention_cfg": {
|
| 87 |
+
"_target_": "groot.vla.model.n1_5.modules.cross_attention_dit.SelfAttentionTransformer",
|
| 88 |
+
"attention_head_dim": 64,
|
| 89 |
+
"dropout": 0.2,
|
| 90 |
+
"final_dropout": true,
|
| 91 |
+
"num_attention_heads": 24,
|
| 92 |
+
"num_layers": 4,
|
| 93 |
+
"positional_embeddings": null
|
| 94 |
+
}
|
| 95 |
+
}
|
| 96 |
+
},
|
| 97 |
+
"action_horizon": 24,
|
| 98 |
+
"architectures": [
|
| 99 |
+
"VLA"
|
| 100 |
+
],
|
| 101 |
+
"backbone_cfg": {
|
| 102 |
+
"_target_": "groot.vla.model.dreamzero.backbone.identity.IdentityBackbone"
|
| 103 |
+
},
|
| 104 |
+
"hidden_size": 0,
|
| 105 |
+
"model_dtype": "float32",
|
| 106 |
+
"model_type": "vla",
|
| 107 |
+
"resume_path": "/n/netscratch/sham_lab/Lab/chloe00/libero/dreamzero_libero_all_lora",
|
| 108 |
+
"torch_dtype": "bfloat16",
|
| 109 |
+
"transformers_version": "4.53.2"
|
| 110 |
+
}
|
checkpoint-3400/experiment_cfg/conf.yaml
ADDED
|
@@ -0,0 +1,1722 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
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|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 1 |
+
model:
|
| 2 |
+
_target_: groot.vla.model.dreamzero.base_vla.VLA
|
| 3 |
+
_convert_: object
|
| 4 |
+
config:
|
| 5 |
+
_target_: groot.vla.model.dreamzero.base_vla.VLAConfig
|
| 6 |
+
_recursive_: false
|
| 7 |
+
model_dtype: float32
|
| 8 |
+
hidden_size: 0
|
| 9 |
+
action_horizon: 24
|
| 10 |
+
action_dim: 32
|
| 11 |
+
backbone_cfg:
|
| 12 |
+
_target_: groot.vla.model.dreamzero.backbone.identity.IdentityBackbone
|
| 13 |
+
action_head_cfg:
|
| 14 |
+
config:
|
| 15 |
+
backbone_features_projector_cfg: null
|
| 16 |
+
_target_: groot.vla.model.dreamzero.action_head.wan_flow_matching_action_tf.WANPolicyHeadConfig
|
| 17 |
+
_recursive_: false
|
| 18 |
+
tiled: false
|
| 19 |
+
tile_size_height: 34
|
| 20 |
+
tile_size_width: 34
|
| 21 |
+
tile_stride_height: 18
|
| 22 |
+
tile_stride_width: 16
|
| 23 |
+
lora_rank: 4
|
| 24 |
+
lora_alpha: 4
|
| 25 |
+
num_frames: 33
|
| 26 |
+
num_frame_per_block: 2
|
| 27 |
+
lora_target_modules: q,k,v,o,ffn.0,ffn.2
|
| 28 |
+
init_lora_weights: kaiming
|
| 29 |
+
train_architecture: lora
|
| 30 |
+
use_gradient_checkpointing: true
|
| 31 |
+
add_pos_embed: true
|
| 32 |
+
model_dtype: float32
|
| 33 |
+
max_state_dim: 64
|
| 34 |
+
max_action_dim: 32
|
| 35 |
+
action_loss_embodiment_ids:
|
| 36 |
+
- 26
|
| 37 |
+
- 17
|
| 38 |
+
hidden_size: 64
|
| 39 |
+
input_embedding_dim: 1536
|
| 40 |
+
backbone_embedding_dim: 0
|
| 41 |
+
repa_layer: 8
|
| 42 |
+
repa_coeff: 1.0
|
| 43 |
+
load_pretrained_det_decode_layer_path: null
|
| 44 |
+
freeze_decode_layer: false
|
| 45 |
+
expand_batch: null
|
| 46 |
+
use_vlln: true
|
| 47 |
+
vl_self_attention_cfg:
|
| 48 |
+
_target_: groot.vla.model.n1_5.modules.cross_attention_dit.SelfAttentionTransformer
|
| 49 |
+
positional_embeddings: null
|
| 50 |
+
num_layers: 4
|
| 51 |
+
num_attention_heads: 24
|
| 52 |
+
attention_head_dim: 64
|
| 53 |
+
dropout: 0.2
|
| 54 |
+
final_dropout: true
|
| 55 |
+
diffusion_model_cfg:
|
| 56 |
+
_target_: groot.vla.model.dreamzero.modules.wan_video_dit_action_casual_chunk.CausalWanModel
|
| 57 |
+
_convert_: object
|
| 58 |
+
diffusion_model_pretrained_path: /n/netscratch/sham_lab/Lab/chloe00/Wan2.1-I2V-14B-480P
|
| 59 |
+
model_type: i2v
|
| 60 |
+
frame_seqlen: 880
|
| 61 |
+
dim: 5120
|
| 62 |
+
in_dim: 36
|
| 63 |
+
ffn_dim: 13824
|
| 64 |
+
out_dim: 16
|
| 65 |
+
freq_dim: 256
|
| 66 |
+
eps: 1.0e-06
|
| 67 |
+
num_heads: 40
|
| 68 |
+
num_layers: 40
|
| 69 |
+
max_chunk_size: 4
|
| 70 |
+
num_frame_per_block: 2
|
| 71 |
+
num_action_per_block: 24
|
| 72 |
+
num_state_per_block: 1
|
| 73 |
+
text_encoder_cfg:
|
| 74 |
+
_target_: groot.vla.model.dreamzero.modules.wan_video_text_encoder.WanTextEncoder
|
| 75 |
+
_convert_: object
|
| 76 |
+
text_encoder_pretrained_path: /n/netscratch/sham_lab/Lab/chloe00/Wan2.1-I2V-14B-480P/models_t5_umt5-xxl-enc-bf16.pth
|
| 77 |
+
image_encoder_cfg:
|
| 78 |
+
_target_: groot.vla.model.dreamzero.modules.wan_video_image_encoder.WanImageEncoder
|
| 79 |
+
_convert_: object
|
| 80 |
+
image_encoder_pretrained_path: /n/netscratch/sham_lab/Lab/chloe00/Wan2.1-I2V-14B-480P/models_clip_open-clip-xlm-roberta-large-vit-huge-14.pth
|
| 81 |
+
vae_cfg:
|
| 82 |
+
_target_: groot.vla.model.dreamzero.modules.wan_video_vae.WanVideoVAE
|
| 83 |
+
_convert_: object
|
| 84 |
+
vae_pretrained_path: /n/netscratch/sham_lab/Lab/chloe00/Wan2.1-I2V-14B-480P/Wan2.1_VAE.pth
|
| 85 |
+
action_dim: 32
|
| 86 |
+
action_horizon: 24
|
| 87 |
+
num_inference_timesteps: 4
|
| 88 |
+
noise_beta_alpha: 1.5
|
| 89 |
+
noise_beta_beta: 1.0
|
| 90 |
+
noise_s: 0.999
|
| 91 |
+
num_timestep_buckets: 1000
|
| 92 |
+
decouple_video_action_noise: false
|
| 93 |
+
video_noise_beta_alpha: 3.0
|
| 94 |
+
video_noise_beta_beta: 1.0
|
| 95 |
+
tune_projector: true
|
| 96 |
+
tune_diffusion_model: true
|
| 97 |
+
_target_: groot.vla.model.dreamzero.action_head.wan_flow_matching_action_tf.WANPolicyHead
|
| 98 |
+
_convert_: object
|
| 99 |
+
train_dataset:
|
| 100 |
+
_target_: groot.vla.data.dataset.lerobot_sharded.ShardedLeRobotMixtureDataset.from_mixture_spec
|
| 101 |
+
_convert_: object
|
| 102 |
+
mixture_spec:
|
| 103 |
+
- dataset_path:
|
| 104 |
+
libero_sim:
|
| 105 |
+
- /n/holylfs06/LABS/sham_lab/Users/chloe00/vla-interp/dreamzero/data/libero_spatial_lerobot
|
| 106 |
+
- /n/holylfs06/LABS/sham_lab/Users/chloe00/vla-interp/dreamzero/data/libero_goal_lerobot
|
| 107 |
+
- /n/holylfs06/LABS/sham_lab/Users/chloe00/vla-interp/dreamzero/data/libero_object_lerobot
|
| 108 |
+
- /n/holylfs06/LABS/sham_lab/Users/chloe00/vla-interp/dreamzero/data/libero_10_lerobot
|
| 109 |
+
dataset_weight: 1.0
|
| 110 |
+
distribute_weights: true
|
| 111 |
+
dataset_class: groot.vla.data.dataset.lerobot_sharded.ShardedLeRobotSubLangSingleActionChunkDatasetDROID
|
| 112 |
+
all_modality_configs:
|
| 113 |
+
oxe_droid:
|
| 114 |
+
video:
|
| 115 |
+
_target_: groot.vla.data.dataset.ModalityConfig
|
| 116 |
+
delta_indices:
|
| 117 |
+
- 0
|
| 118 |
+
- 1
|
| 119 |
+
- 2
|
| 120 |
+
- 3
|
| 121 |
+
- 4
|
| 122 |
+
- 5
|
| 123 |
+
- 6
|
| 124 |
+
- 7
|
| 125 |
+
- 8
|
| 126 |
+
- 9
|
| 127 |
+
- 10
|
| 128 |
+
- 11
|
| 129 |
+
- 12
|
| 130 |
+
- 13
|
| 131 |
+
- 14
|
| 132 |
+
- 15
|
| 133 |
+
- 16
|
| 134 |
+
- 17
|
| 135 |
+
- 18
|
| 136 |
+
- 19
|
| 137 |
+
- 20
|
| 138 |
+
- 21
|
| 139 |
+
- 22
|
| 140 |
+
- 23
|
| 141 |
+
- 24
|
| 142 |
+
eval_delta_indices:
|
| 143 |
+
- 0
|
| 144 |
+
modality_keys:
|
| 145 |
+
- video.exterior_image_1_left
|
| 146 |
+
- video.exterior_image_2_left
|
| 147 |
+
- video.wrist_image_left
|
| 148 |
+
state:
|
| 149 |
+
_target_: groot.vla.data.dataset.ModalityConfig
|
| 150 |
+
delta_indices:
|
| 151 |
+
- 0
|
| 152 |
+
modality_keys:
|
| 153 |
+
- state.joint_position
|
| 154 |
+
- state.gripper_position
|
| 155 |
+
action:
|
| 156 |
+
_target_: groot.vla.data.dataset.ModalityConfig
|
| 157 |
+
delta_indices:
|
| 158 |
+
- 0
|
| 159 |
+
- 1
|
| 160 |
+
- 2
|
| 161 |
+
- 3
|
| 162 |
+
- 4
|
| 163 |
+
- 5
|
| 164 |
+
- 6
|
| 165 |
+
- 7
|
| 166 |
+
- 8
|
| 167 |
+
- 9
|
| 168 |
+
- 10
|
| 169 |
+
- 11
|
| 170 |
+
- 12
|
| 171 |
+
- 13
|
| 172 |
+
- 14
|
| 173 |
+
- 15
|
| 174 |
+
- 16
|
| 175 |
+
- 17
|
| 176 |
+
- 18
|
| 177 |
+
- 19
|
| 178 |
+
- 20
|
| 179 |
+
- 21
|
| 180 |
+
- 22
|
| 181 |
+
- 23
|
| 182 |
+
modality_keys:
|
| 183 |
+
- action.joint_position
|
| 184 |
+
- action.gripper_position
|
| 185 |
+
language:
|
| 186 |
+
_target_: groot.vla.data.dataset.ModalityConfig
|
| 187 |
+
delta_indices:
|
| 188 |
+
- 0
|
| 189 |
+
modality_keys:
|
| 190 |
+
- annotation.language.language_instruction
|
| 191 |
+
- annotation.language.language_instruction_2
|
| 192 |
+
- annotation.language.language_instruction_3
|
| 193 |
+
lapa_action:
|
| 194 |
+
_target_: groot.vla.data.dataset.ModalityConfig
|
| 195 |
+
delta_indices:
|
| 196 |
+
- 0
|
| 197 |
+
modality_keys:
|
| 198 |
+
- lapa_action
|
| 199 |
+
libero_sim:
|
| 200 |
+
video:
|
| 201 |
+
_target_: groot.vla.data.dataset.ModalityConfig
|
| 202 |
+
delta_indices:
|
| 203 |
+
- 0
|
| 204 |
+
- 1
|
| 205 |
+
- 2
|
| 206 |
+
- 3
|
| 207 |
+
- 4
|
| 208 |
+
- 5
|
| 209 |
+
- 6
|
| 210 |
+
- 7
|
| 211 |
+
- 8
|
| 212 |
+
- 9
|
| 213 |
+
- 10
|
| 214 |
+
- 11
|
| 215 |
+
- 12
|
| 216 |
+
- 13
|
| 217 |
+
- 14
|
| 218 |
+
- 15
|
| 219 |
+
- 16
|
| 220 |
+
- 17
|
| 221 |
+
- 18
|
| 222 |
+
- 19
|
| 223 |
+
- 20
|
| 224 |
+
- 21
|
| 225 |
+
- 22
|
| 226 |
+
- 23
|
| 227 |
+
- 24
|
| 228 |
+
eval_delta_indices:
|
| 229 |
+
- 0
|
| 230 |
+
modality_keys:
|
| 231 |
+
- video.agentview_rgb
|
| 232 |
+
- video.eye_in_hand_rgb
|
| 233 |
+
state:
|
| 234 |
+
_target_: groot.vla.data.dataset.ModalityConfig
|
| 235 |
+
delta_indices:
|
| 236 |
+
- 0
|
| 237 |
+
modality_keys:
|
| 238 |
+
- state.joint_position
|
| 239 |
+
- state.gripper_position
|
| 240 |
+
action:
|
| 241 |
+
_target_: groot.vla.data.dataset.ModalityConfig
|
| 242 |
+
delta_indices:
|
| 243 |
+
- 0
|
| 244 |
+
- 1
|
| 245 |
+
- 2
|
| 246 |
+
- 3
|
| 247 |
+
- 4
|
| 248 |
+
- 5
|
| 249 |
+
- 6
|
| 250 |
+
- 7
|
| 251 |
+
- 8
|
| 252 |
+
- 9
|
| 253 |
+
- 10
|
| 254 |
+
- 11
|
| 255 |
+
- 12
|
| 256 |
+
- 13
|
| 257 |
+
- 14
|
| 258 |
+
- 15
|
| 259 |
+
- 16
|
| 260 |
+
- 17
|
| 261 |
+
- 18
|
| 262 |
+
- 19
|
| 263 |
+
- 20
|
| 264 |
+
- 21
|
| 265 |
+
- 22
|
| 266 |
+
- 23
|
| 267 |
+
modality_keys:
|
| 268 |
+
- action.joint_position
|
| 269 |
+
language:
|
| 270 |
+
_target_: groot.vla.data.dataset.ModalityConfig
|
| 271 |
+
delta_indices:
|
| 272 |
+
- 0
|
| 273 |
+
modality_keys:
|
| 274 |
+
- annotation.language.language_instruction
|
| 275 |
+
all_transforms:
|
| 276 |
+
oxe_droid:
|
| 277 |
+
_target_: groot.vla.data.transform.ComposedModalityTransform
|
| 278 |
+
transforms:
|
| 279 |
+
- _target_: groot.vla.data.transform.VideoToTensor
|
| 280 |
+
apply_to:
|
| 281 |
+
- video.exterior_image_1_left
|
| 282 |
+
- video.exterior_image_2_left
|
| 283 |
+
- video.wrist_image_left
|
| 284 |
+
- _target_: groot.vla.data.transform.VideoCrop
|
| 285 |
+
apply_to:
|
| 286 |
+
- video.exterior_image_1_left
|
| 287 |
+
- video.exterior_image_2_left
|
| 288 |
+
- video.wrist_image_left
|
| 289 |
+
scale: 0.95
|
| 290 |
+
mode: random
|
| 291 |
+
- _target_: groot.vla.data.transform.VideoResize
|
| 292 |
+
apply_to:
|
| 293 |
+
- video.exterior_image_1_left
|
| 294 |
+
- video.exterior_image_2_left
|
| 295 |
+
- video.wrist_image_left
|
| 296 |
+
height: 176
|
| 297 |
+
width: 320
|
| 298 |
+
interpolation: linear
|
| 299 |
+
- _target_: groot.vla.data.transform.VideoColorJitter
|
| 300 |
+
apply_to:
|
| 301 |
+
- video.exterior_image_1_left
|
| 302 |
+
- video.exterior_image_2_left
|
| 303 |
+
- video.wrist_image_left
|
| 304 |
+
brightness: 0.3
|
| 305 |
+
contrast: 0.4
|
| 306 |
+
saturation: 0.5
|
| 307 |
+
hue: 0.08
|
| 308 |
+
- _target_: groot.vla.data.transform.VideoToNumpy
|
| 309 |
+
apply_to:
|
| 310 |
+
- video.exterior_image_1_left
|
| 311 |
+
- video.exterior_image_2_left
|
| 312 |
+
- video.wrist_image_left
|
| 313 |
+
- _target_: groot.vla.data.transform.StateActionToTensor
|
| 314 |
+
apply_to:
|
| 315 |
+
- state.joint_position
|
| 316 |
+
- state.gripper_position
|
| 317 |
+
- _target_: groot.vla.data.transform.StateActionTransform
|
| 318 |
+
apply_to:
|
| 319 |
+
- state.joint_position
|
| 320 |
+
- state.gripper_position
|
| 321 |
+
normalization_modes:
|
| 322 |
+
state.joint_position: q99
|
| 323 |
+
state.gripper_position: q99
|
| 324 |
+
- _target_: groot.vla.data.transform.StateActionToTensor
|
| 325 |
+
apply_to:
|
| 326 |
+
- action.joint_position
|
| 327 |
+
- action.gripper_position
|
| 328 |
+
- _target_: groot.vla.data.transform.StateActionTransform
|
| 329 |
+
apply_to:
|
| 330 |
+
- action.joint_position
|
| 331 |
+
- action.gripper_position
|
| 332 |
+
normalization_modes:
|
| 333 |
+
action.joint_position: q99
|
| 334 |
+
action.gripper_position: q99
|
| 335 |
+
- _target_: groot.vla.data.transform.ConcatTransform
|
| 336 |
+
video_concat_order:
|
| 337 |
+
- video.exterior_image_1_left
|
| 338 |
+
- video.exterior_image_2_left
|
| 339 |
+
- video.wrist_image_left
|
| 340 |
+
state_concat_order:
|
| 341 |
+
- state.joint_position
|
| 342 |
+
- state.gripper_position
|
| 343 |
+
action_concat_order:
|
| 344 |
+
- action.joint_position
|
| 345 |
+
- action.gripper_position
|
| 346 |
+
- _target_: groot.vla.model.dreamzero.transform.dreamzero_cotrain.DreamTransform
|
| 347 |
+
default_instruction: Perform the default behavior.
|
| 348 |
+
language_dropout_prob: 0.0
|
| 349 |
+
always_use_default_instruction: false
|
| 350 |
+
max_state_dim: 64
|
| 351 |
+
max_action_dim: 32
|
| 352 |
+
max_length: 512
|
| 353 |
+
state_horizon: 1
|
| 354 |
+
action_horizon: 24
|
| 355 |
+
embodiment_tag_mapping:
|
| 356 |
+
real_gr1_arms_only: 0
|
| 357 |
+
real_gr1_arms_only_annotated: 1
|
| 358 |
+
real_gr1_arms_waist: 2
|
| 359 |
+
real_gr1_arms_waist_annotated: 3
|
| 360 |
+
dexmg_gr1_arms_only_inspire: 4
|
| 361 |
+
dexmg_gr1_arms_only_fourier: 5
|
| 362 |
+
dexmg_gr1_arms_waist_fourier: 6
|
| 363 |
+
robocasa_single_arm: 7
|
| 364 |
+
onex_eve_gripper: 8
|
| 365 |
+
robocasa_gr1_arms_only_inspire_hands: 9
|
| 366 |
+
robocasa_gr1_arms_only_fourier_hands: 10
|
| 367 |
+
robocasa_gr1_fixed_lower_body_inspire_hands: 11
|
| 368 |
+
robocasa_gr1_fixed_lower_body_fourier_hands: 12
|
| 369 |
+
robocasa_panda_omron: 13
|
| 370 |
+
robocasa_bimanual_panda_parallel_gripper: 15
|
| 371 |
+
robocasa_bimanual_panda_inspire_hand: 16
|
| 372 |
+
oxe_droid: 17
|
| 373 |
+
oxe_fractal: 18
|
| 374 |
+
oxe_language_table: 19
|
| 375 |
+
oxe_bridge: 20
|
| 376 |
+
real_panda_single_arm: 21
|
| 377 |
+
hot3d_hands_only: 23
|
| 378 |
+
gr1_unified: 24
|
| 379 |
+
robocasa_gr1_arms_waist_fourier_hands: 25
|
| 380 |
+
agibot: 26
|
| 381 |
+
lapa: 27
|
| 382 |
+
oxe_mutex: 28
|
| 383 |
+
oxe_roboset: 29
|
| 384 |
+
oxe_plex: 30
|
| 385 |
+
dream: 31
|
| 386 |
+
xdof: 22
|
| 387 |
+
gr1_unified_segmentation: 14
|
| 388 |
+
language_table_sim: 7
|
| 389 |
+
gr1_isaac: 0
|
| 390 |
+
sim_behavior_r1_pro: 31
|
| 391 |
+
mecka_hands: 27
|
| 392 |
+
real_r1_pro_sharpa: 28
|
| 393 |
+
libero_sim: 7
|
| 394 |
+
tokenizer_path: /n/netscratch/sham_lab/Lab/chloe00/umt5-xxl
|
| 395 |
+
libero_sim:
|
| 396 |
+
_target_: groot.vla.data.transform.ComposedModalityTransform
|
| 397 |
+
transforms:
|
| 398 |
+
- _target_: groot.vla.data.transform.VideoToTensor
|
| 399 |
+
apply_to:
|
| 400 |
+
- video.agentview_rgb
|
| 401 |
+
- video.eye_in_hand_rgb
|
| 402 |
+
- _target_: groot.vla.data.transform.VideoCrop
|
| 403 |
+
apply_to:
|
| 404 |
+
- video.agentview_rgb
|
| 405 |
+
- video.eye_in_hand_rgb
|
| 406 |
+
scale: 0.95
|
| 407 |
+
mode: random
|
| 408 |
+
- _target_: groot.vla.data.transform.VideoResize
|
| 409 |
+
apply_to:
|
| 410 |
+
- video.agentview_rgb
|
| 411 |
+
- video.eye_in_hand_rgb
|
| 412 |
+
height: 176
|
| 413 |
+
width: 320
|
| 414 |
+
interpolation: linear
|
| 415 |
+
- _target_: groot.vla.data.transform.VideoColorJitter
|
| 416 |
+
apply_to:
|
| 417 |
+
- video.agentview_rgb
|
| 418 |
+
- video.eye_in_hand_rgb
|
| 419 |
+
brightness: 0.3
|
| 420 |
+
contrast: 0.4
|
| 421 |
+
saturation: 0.5
|
| 422 |
+
hue: 0.08
|
| 423 |
+
- _target_: groot.vla.data.transform.VideoToNumpy
|
| 424 |
+
apply_to:
|
| 425 |
+
- video.agentview_rgb
|
| 426 |
+
- video.eye_in_hand_rgb
|
| 427 |
+
- _target_: groot.vla.data.transform.StateActionToTensor
|
| 428 |
+
apply_to:
|
| 429 |
+
- state.joint_position
|
| 430 |
+
- state.gripper_position
|
| 431 |
+
- _target_: groot.vla.data.transform.StateActionTransform
|
| 432 |
+
apply_to:
|
| 433 |
+
- state.joint_position
|
| 434 |
+
- state.gripper_position
|
| 435 |
+
normalization_modes:
|
| 436 |
+
state.joint_position: q99
|
| 437 |
+
state.gripper_position: q99
|
| 438 |
+
- _target_: groot.vla.data.transform.StateActionToTensor
|
| 439 |
+
apply_to:
|
| 440 |
+
- action.joint_position
|
| 441 |
+
- _target_: groot.vla.data.transform.StateActionTransform
|
| 442 |
+
apply_to:
|
| 443 |
+
- action.joint_position
|
| 444 |
+
normalization_modes:
|
| 445 |
+
action.joint_position: q99
|
| 446 |
+
- _target_: groot.vla.data.transform.ConcatTransform
|
| 447 |
+
video_concat_order:
|
| 448 |
+
- video.agentview_rgb
|
| 449 |
+
- video.eye_in_hand_rgb
|
| 450 |
+
state_concat_order:
|
| 451 |
+
- state.joint_position
|
| 452 |
+
- state.gripper_position
|
| 453 |
+
action_concat_order:
|
| 454 |
+
- action.joint_position
|
| 455 |
+
- _target_: groot.vla.model.dreamzero.transform.dreamzero_cotrain.DreamTransform
|
| 456 |
+
default_instruction: Perform the default behavior.
|
| 457 |
+
language_dropout_prob: 0.0
|
| 458 |
+
always_use_default_instruction: false
|
| 459 |
+
max_state_dim: 64
|
| 460 |
+
max_action_dim: 32
|
| 461 |
+
max_length: 512
|
| 462 |
+
state_horizon: 1
|
| 463 |
+
action_horizon: 24
|
| 464 |
+
embodiment_tag_mapping:
|
| 465 |
+
real_gr1_arms_only: 0
|
| 466 |
+
real_gr1_arms_only_annotated: 1
|
| 467 |
+
real_gr1_arms_waist: 2
|
| 468 |
+
real_gr1_arms_waist_annotated: 3
|
| 469 |
+
dexmg_gr1_arms_only_inspire: 4
|
| 470 |
+
dexmg_gr1_arms_only_fourier: 5
|
| 471 |
+
dexmg_gr1_arms_waist_fourier: 6
|
| 472 |
+
robocasa_single_arm: 7
|
| 473 |
+
onex_eve_gripper: 8
|
| 474 |
+
robocasa_gr1_arms_only_inspire_hands: 9
|
| 475 |
+
robocasa_gr1_arms_only_fourier_hands: 10
|
| 476 |
+
robocasa_gr1_fixed_lower_body_inspire_hands: 11
|
| 477 |
+
robocasa_gr1_fixed_lower_body_fourier_hands: 12
|
| 478 |
+
robocasa_panda_omron: 13
|
| 479 |
+
robocasa_bimanual_panda_parallel_gripper: 15
|
| 480 |
+
robocasa_bimanual_panda_inspire_hand: 16
|
| 481 |
+
oxe_droid: 17
|
| 482 |
+
oxe_fractal: 18
|
| 483 |
+
oxe_language_table: 19
|
| 484 |
+
oxe_bridge: 20
|
| 485 |
+
real_panda_single_arm: 21
|
| 486 |
+
hot3d_hands_only: 23
|
| 487 |
+
gr1_unified: 24
|
| 488 |
+
robocasa_gr1_arms_waist_fourier_hands: 25
|
| 489 |
+
agibot: 26
|
| 490 |
+
lapa: 27
|
| 491 |
+
oxe_mutex: 28
|
| 492 |
+
oxe_roboset: 29
|
| 493 |
+
oxe_plex: 30
|
| 494 |
+
dream: 31
|
| 495 |
+
xdof: 22
|
| 496 |
+
gr1_unified_segmentation: 14
|
| 497 |
+
language_table_sim: 7
|
| 498 |
+
gr1_isaac: 0
|
| 499 |
+
sim_behavior_r1_pro: 31
|
| 500 |
+
mecka_hands: 27
|
| 501 |
+
real_r1_pro_sharpa: 28
|
| 502 |
+
libero_sim: 7
|
| 503 |
+
tokenizer_path: /n/netscratch/sham_lab/Lab/chloe00/umt5-xxl
|
| 504 |
+
metadata_versions:
|
| 505 |
+
oxe_droid: '0221'
|
| 506 |
+
libero_sim: '0221'
|
| 507 |
+
fps: {}
|
| 508 |
+
dataset_kwargs:
|
| 509 |
+
video_backend: decord
|
| 510 |
+
use_global_metadata: false
|
| 511 |
+
max_chunk_size: 4
|
| 512 |
+
relative_action: false
|
| 513 |
+
relative_action_keys:
|
| 514 |
+
- joint_position
|
| 515 |
+
relative_action_per_horizon: false
|
| 516 |
+
mixture_kwargs:
|
| 517 |
+
training: true
|
| 518 |
+
balance_dataset_weights: false
|
| 519 |
+
seed: 42
|
| 520 |
+
shard_sampling_rate: 0.1
|
| 521 |
+
trainer:
|
| 522 |
+
_target_: groot.vla.experiment.VLATrainer
|
| 523 |
+
_partial_: true
|
| 524 |
+
_recursive_: false
|
| 525 |
+
callbacks: null
|
| 526 |
+
model: ???
|
| 527 |
+
train_dataset: ???
|
| 528 |
+
compute_dtype: ???
|
| 529 |
+
benchmark_time: false
|
| 530 |
+
enable_profiling: false
|
| 531 |
+
profiling_steps: 5
|
| 532 |
+
enable_prof_callback: false
|
| 533 |
+
profile_start_step: 50
|
| 534 |
+
profile_warmup_steps: 1
|
| 535 |
+
profile_active_steps: 3
|
| 536 |
+
profile_record_shapes: false
|
| 537 |
+
profile_with_stack: false
|
| 538 |
+
profile_memory: false
|
| 539 |
+
wandb_project: dreamzero_libero_all
|
| 540 |
+
output_dir: /n/netscratch/sham_lab/Lab/chloe00/libero/dreamzero_libero_all_lora
|
| 541 |
+
load_from_yaml: null
|
| 542 |
+
gear_credentials: null
|
| 543 |
+
upload_checkpoints: false
|
| 544 |
+
upload_every: 1000
|
| 545 |
+
upload_last_n_checkpoints: 5
|
| 546 |
+
remove_unused_columns: false
|
| 547 |
+
bf16: true
|
| 548 |
+
tf32: true
|
| 549 |
+
global_batch_size: null
|
| 550 |
+
raise_error_if_global_batch_size_not_set: false
|
| 551 |
+
per_device_train_batch_size: 2
|
| 552 |
+
per_device_eval_batch_size: 64
|
| 553 |
+
gradient_accumulation_steps: 1
|
| 554 |
+
dataloader_num_workers: 1
|
| 555 |
+
dataloader_pin_memory: false
|
| 556 |
+
dataloader_persistent_workers: true
|
| 557 |
+
optim: adamw_torch
|
| 558 |
+
learning_rate: 0.0001
|
| 559 |
+
adam_beta1: 0.95
|
| 560 |
+
adam_beta2: 0.999
|
| 561 |
+
adam_epsilon: 1.0e-08
|
| 562 |
+
weight_decay: 1.0e-05
|
| 563 |
+
lr_scheduler_type: cosine
|
| 564 |
+
warmup_ratio: 0.05
|
| 565 |
+
logging_steps: 10.0
|
| 566 |
+
num_train_epochs: 1000
|
| 567 |
+
max_steps: 10000
|
| 568 |
+
save_strategy: steps
|
| 569 |
+
save_steps: 200
|
| 570 |
+
eval_strategy: 'no'
|
| 571 |
+
save_total_limit: 5
|
| 572 |
+
report_to: wandb
|
| 573 |
+
seed: 42
|
| 574 |
+
do_eval: false
|
| 575 |
+
gradient_checkpointing: false
|
| 576 |
+
ddp_find_unused_parameters: false
|
| 577 |
+
ddp_bucket_cap_mb: 100
|
| 578 |
+
ray_num_workers: ???
|
| 579 |
+
eval_bf16: true
|
| 580 |
+
torch_compile_mode: null
|
| 581 |
+
pretrained_model_path: null
|
| 582 |
+
only_tune_projectors: false
|
| 583 |
+
save_llm: false
|
| 584 |
+
save_lora_only: true
|
| 585 |
+
save_value_model: false
|
| 586 |
+
save_q_model: false
|
| 587 |
+
download_cache: false
|
| 588 |
+
training_args:
|
| 589 |
+
_target_: transformers.TrainingArguments
|
| 590 |
+
output_dir: /n/netscratch/sham_lab/Lab/chloe00/libero/dreamzero_libero_all_lora
|
| 591 |
+
run_name: dreamzero_libero_all_lora
|
| 592 |
+
remove_unused_columns: false
|
| 593 |
+
deepspeed: groot/vla/configs/deepspeed/zero3.json
|
| 594 |
+
gradient_checkpointing: false
|
| 595 |
+
bf16: true
|
| 596 |
+
tf32: true
|
| 597 |
+
per_device_train_batch_size: 2
|
| 598 |
+
per_device_eval_batch_size: 64
|
| 599 |
+
gradient_accumulation_steps: 1
|
| 600 |
+
dataloader_num_workers: 1
|
| 601 |
+
dataloader_pin_memory: false
|
| 602 |
+
dataloader_persistent_workers: true
|
| 603 |
+
optim: adamw_torch
|
| 604 |
+
adam_beta1: 0.95
|
| 605 |
+
adam_beta2: 0.999
|
| 606 |
+
adam_epsilon: 1.0e-08
|
| 607 |
+
learning_rate: 1.0e-05
|
| 608 |
+
weight_decay: 1.0e-05
|
| 609 |
+
warmup_ratio: 0.05
|
| 610 |
+
lr_scheduler_type: cosine
|
| 611 |
+
logging_steps: 10.0
|
| 612 |
+
num_train_epochs: 1000
|
| 613 |
+
max_steps: 10000
|
| 614 |
+
save_strategy: steps
|
| 615 |
+
save_steps: 200
|
| 616 |
+
save_total_limit: 5
|
| 617 |
+
report_to: wandb
|
| 618 |
+
seed: 42
|
| 619 |
+
do_eval: false
|
| 620 |
+
ddp_find_unused_parameters: false
|
| 621 |
+
ddp_bucket_cap_mb: 100
|
| 622 |
+
torch_compile_mode: null
|
| 623 |
+
profile_dir: null
|
| 624 |
+
backbone_hidden_size: 0
|
| 625 |
+
backbone_cfg:
|
| 626 |
+
_target_: groot.vla.model.dreamzero.backbone.identity.IdentityBackbone
|
| 627 |
+
action_head_cfg:
|
| 628 |
+
config:
|
| 629 |
+
backbone_features_projector_cfg: null
|
| 630 |
+
_target_: groot.vla.model.dreamzero.action_head.wan_flow_matching_action_tf.WANPolicyHeadConfig
|
| 631 |
+
_recursive_: false
|
| 632 |
+
tiled: false
|
| 633 |
+
tile_size_height: 34
|
| 634 |
+
tile_size_width: 34
|
| 635 |
+
tile_stride_height: 18
|
| 636 |
+
tile_stride_width: 16
|
| 637 |
+
lora_rank: 4
|
| 638 |
+
lora_alpha: 4
|
| 639 |
+
num_frames: 33
|
| 640 |
+
num_frame_per_block: 2
|
| 641 |
+
lora_target_modules: q,k,v,o,ffn.0,ffn.2
|
| 642 |
+
init_lora_weights: kaiming
|
| 643 |
+
train_architecture: lora
|
| 644 |
+
use_gradient_checkpointing: true
|
| 645 |
+
add_pos_embed: true
|
| 646 |
+
model_dtype: float32
|
| 647 |
+
max_state_dim: 64
|
| 648 |
+
max_action_dim: 32
|
| 649 |
+
action_loss_embodiment_ids:
|
| 650 |
+
- 26
|
| 651 |
+
- 17
|
| 652 |
+
hidden_size: 64
|
| 653 |
+
input_embedding_dim: 1536
|
| 654 |
+
backbone_embedding_dim: 0
|
| 655 |
+
repa_layer: 8
|
| 656 |
+
repa_coeff: 1.0
|
| 657 |
+
load_pretrained_det_decode_layer_path: null
|
| 658 |
+
freeze_decode_layer: false
|
| 659 |
+
expand_batch: null
|
| 660 |
+
use_vlln: true
|
| 661 |
+
vl_self_attention_cfg:
|
| 662 |
+
_target_: groot.vla.model.n1_5.modules.cross_attention_dit.SelfAttentionTransformer
|
| 663 |
+
positional_embeddings: null
|
| 664 |
+
num_layers: 4
|
| 665 |
+
num_attention_heads: 24
|
| 666 |
+
attention_head_dim: 64
|
| 667 |
+
dropout: 0.2
|
| 668 |
+
final_dropout: true
|
| 669 |
+
diffusion_model_cfg:
|
| 670 |
+
_target_: groot.vla.model.dreamzero.modules.wan_video_dit_action_casual_chunk.CausalWanModel
|
| 671 |
+
_convert_: object
|
| 672 |
+
diffusion_model_pretrained_path: /n/netscratch/sham_lab/Lab/chloe00/Wan2.1-I2V-14B-480P
|
| 673 |
+
model_type: i2v
|
| 674 |
+
frame_seqlen: 880
|
| 675 |
+
dim: 5120
|
| 676 |
+
in_dim: 36
|
| 677 |
+
ffn_dim: 13824
|
| 678 |
+
out_dim: 16
|
| 679 |
+
freq_dim: 256
|
| 680 |
+
eps: 1.0e-06
|
| 681 |
+
num_heads: 40
|
| 682 |
+
num_layers: 40
|
| 683 |
+
max_chunk_size: 4
|
| 684 |
+
num_frame_per_block: 2
|
| 685 |
+
num_action_per_block: 24
|
| 686 |
+
num_state_per_block: 1
|
| 687 |
+
text_encoder_cfg:
|
| 688 |
+
_target_: groot.vla.model.dreamzero.modules.wan_video_text_encoder.WanTextEncoder
|
| 689 |
+
_convert_: object
|
| 690 |
+
text_encoder_pretrained_path: /n/netscratch/sham_lab/Lab/chloe00/Wan2.1-I2V-14B-480P/models_t5_umt5-xxl-enc-bf16.pth
|
| 691 |
+
image_encoder_cfg:
|
| 692 |
+
_target_: groot.vla.model.dreamzero.modules.wan_video_image_encoder.WanImageEncoder
|
| 693 |
+
_convert_: object
|
| 694 |
+
image_encoder_pretrained_path: /n/netscratch/sham_lab/Lab/chloe00/Wan2.1-I2V-14B-480P/models_clip_open-clip-xlm-roberta-large-vit-huge-14.pth
|
| 695 |
+
vae_cfg:
|
| 696 |
+
_target_: groot.vla.model.dreamzero.modules.wan_video_vae.WanVideoVAE
|
| 697 |
+
_convert_: object
|
| 698 |
+
vae_pretrained_path: /n/netscratch/sham_lab/Lab/chloe00/Wan2.1-I2V-14B-480P/Wan2.1_VAE.pth
|
| 699 |
+
action_dim: 32
|
| 700 |
+
action_horizon: 24
|
| 701 |
+
num_inference_timesteps: 4
|
| 702 |
+
noise_beta_alpha: 1.5
|
| 703 |
+
noise_beta_beta: 1.0
|
| 704 |
+
noise_s: 0.999
|
| 705 |
+
num_timestep_buckets: 1000
|
| 706 |
+
decouple_video_action_noise: false
|
| 707 |
+
video_noise_beta_alpha: 3.0
|
| 708 |
+
video_noise_beta_beta: 1.0
|
| 709 |
+
tune_projector: true
|
| 710 |
+
tune_diffusion_model: true
|
| 711 |
+
_target_: groot.vla.model.dreamzero.action_head.wan_flow_matching_action_tf.WANPolicyHead
|
| 712 |
+
_convert_: object
|
| 713 |
+
add_pos_embed: true
|
| 714 |
+
hidden_size: 64
|
| 715 |
+
attn_dropout: 0.2
|
| 716 |
+
repa_layer: 8
|
| 717 |
+
repa_coeff: 1.0
|
| 718 |
+
load_pretrained_det_decode_layer_path: null
|
| 719 |
+
expand_batch: null
|
| 720 |
+
dit_version: /n/netscratch/sham_lab/Lab/chloe00/Wan2.1-I2V-14B-480P
|
| 721 |
+
text_encoder_pretrained_path: /n/netscratch/sham_lab/Lab/chloe00/Wan2.1-I2V-14B-480P/models_t5_umt5-xxl-enc-bf16.pth
|
| 722 |
+
image_encoder_pretrained_path: /n/netscratch/sham_lab/Lab/chloe00/Wan2.1-I2V-14B-480P/models_clip_open-clip-xlm-roberta-large-vit-huge-14.pth
|
| 723 |
+
vae_pretrained_path: /n/netscratch/sham_lab/Lab/chloe00/Wan2.1-I2V-14B-480P/Wan2.1_VAE.pth
|
| 724 |
+
train_architecture: lora
|
| 725 |
+
num_frame_per_block: 2
|
| 726 |
+
num_action_per_block: 24
|
| 727 |
+
num_state_per_block: 1
|
| 728 |
+
frame_seqlen: 880
|
| 729 |
+
embodiment_tag_to_projector_index:
|
| 730 |
+
real_gr1_arms_only: 0
|
| 731 |
+
real_gr1_arms_only_annotated: 1
|
| 732 |
+
real_gr1_arms_waist: 2
|
| 733 |
+
real_gr1_arms_waist_annotated: 3
|
| 734 |
+
dexmg_gr1_arms_only_inspire: 4
|
| 735 |
+
dexmg_gr1_arms_only_fourier: 5
|
| 736 |
+
dexmg_gr1_arms_waist_fourier: 6
|
| 737 |
+
robocasa_single_arm: 7
|
| 738 |
+
onex_eve_gripper: 8
|
| 739 |
+
robocasa_gr1_arms_only_inspire_hands: 9
|
| 740 |
+
robocasa_gr1_arms_only_fourier_hands: 10
|
| 741 |
+
robocasa_gr1_fixed_lower_body_inspire_hands: 11
|
| 742 |
+
robocasa_gr1_fixed_lower_body_fourier_hands: 12
|
| 743 |
+
robocasa_panda_omron: 13
|
| 744 |
+
robocasa_bimanual_panda_parallel_gripper: 15
|
| 745 |
+
robocasa_bimanual_panda_inspire_hand: 16
|
| 746 |
+
oxe_droid: 17
|
| 747 |
+
oxe_fractal: 18
|
| 748 |
+
oxe_language_table: 19
|
| 749 |
+
oxe_bridge: 20
|
| 750 |
+
real_panda_single_arm: 21
|
| 751 |
+
hot3d_hands_only: 23
|
| 752 |
+
gr1_unified: 24
|
| 753 |
+
robocasa_gr1_arms_waist_fourier_hands: 25
|
| 754 |
+
agibot: 26
|
| 755 |
+
lapa: 27
|
| 756 |
+
oxe_mutex: 28
|
| 757 |
+
oxe_roboset: 29
|
| 758 |
+
oxe_plex: 30
|
| 759 |
+
dream: 31
|
| 760 |
+
xdof: 22
|
| 761 |
+
gr1_unified_segmentation: 14
|
| 762 |
+
language_table_sim: 7
|
| 763 |
+
gr1_isaac: 0
|
| 764 |
+
sim_behavior_r1_pro: 31
|
| 765 |
+
mecka_hands: 27
|
| 766 |
+
real_r1_pro_sharpa: 28
|
| 767 |
+
libero_sim: 7
|
| 768 |
+
max_length: 512
|
| 769 |
+
num_views: 2
|
| 770 |
+
tokenizer_path: /n/netscratch/sham_lab/Lab/chloe00/umt5-xxl
|
| 771 |
+
data_collator:
|
| 772 |
+
_target_: groot.vla.model.dreamzero.transform.dreamzero_cotrain.DefaultDataCollator
|
| 773 |
+
tokenizer_path: /n/netscratch/sham_lab/Lab/chloe00/umt5-xxl
|
| 774 |
+
max_length: 512
|
| 775 |
+
num_views: 2
|
| 776 |
+
embodiment_tag_mapping:
|
| 777 |
+
real_gr1_arms_only: 0
|
| 778 |
+
real_gr1_arms_only_annotated: 1
|
| 779 |
+
real_gr1_arms_waist: 2
|
| 780 |
+
real_gr1_arms_waist_annotated: 3
|
| 781 |
+
dexmg_gr1_arms_only_inspire: 4
|
| 782 |
+
dexmg_gr1_arms_only_fourier: 5
|
| 783 |
+
dexmg_gr1_arms_waist_fourier: 6
|
| 784 |
+
robocasa_single_arm: 7
|
| 785 |
+
onex_eve_gripper: 8
|
| 786 |
+
robocasa_gr1_arms_only_inspire_hands: 9
|
| 787 |
+
robocasa_gr1_arms_only_fourier_hands: 10
|
| 788 |
+
robocasa_gr1_fixed_lower_body_inspire_hands: 11
|
| 789 |
+
robocasa_gr1_fixed_lower_body_fourier_hands: 12
|
| 790 |
+
robocasa_panda_omron: 13
|
| 791 |
+
robocasa_bimanual_panda_parallel_gripper: 15
|
| 792 |
+
robocasa_bimanual_panda_inspire_hand: 16
|
| 793 |
+
oxe_droid: 17
|
| 794 |
+
oxe_fractal: 18
|
| 795 |
+
oxe_language_table: 19
|
| 796 |
+
oxe_bridge: 20
|
| 797 |
+
real_panda_single_arm: 21
|
| 798 |
+
hot3d_hands_only: 23
|
| 799 |
+
gr1_unified: 24
|
| 800 |
+
robocasa_gr1_arms_waist_fourier_hands: 25
|
| 801 |
+
agibot: 26
|
| 802 |
+
lapa: 27
|
| 803 |
+
oxe_mutex: 28
|
| 804 |
+
oxe_roboset: 29
|
| 805 |
+
oxe_plex: 30
|
| 806 |
+
dream: 31
|
| 807 |
+
xdof: 22
|
| 808 |
+
gr1_unified_segmentation: 14
|
| 809 |
+
language_table_sim: 7
|
| 810 |
+
gr1_isaac: 0
|
| 811 |
+
sim_behavior_r1_pro: 31
|
| 812 |
+
mecka_hands: 27
|
| 813 |
+
real_r1_pro_sharpa: 28
|
| 814 |
+
libero_sim: 7
|
| 815 |
+
num_visual_tokens_per_frame: 16
|
| 816 |
+
max_state_dim: 64
|
| 817 |
+
max_action_dim: 32
|
| 818 |
+
language_dropout_prob: 0.0
|
| 819 |
+
model_specific_transform:
|
| 820 |
+
_target_: groot.vla.model.dreamzero.transform.dreamzero_cotrain.DreamTransform
|
| 821 |
+
default_instruction: Perform the default behavior.
|
| 822 |
+
language_dropout_prob: 0.0
|
| 823 |
+
always_use_default_instruction: false
|
| 824 |
+
max_state_dim: 64
|
| 825 |
+
max_action_dim: 32
|
| 826 |
+
max_length: 512
|
| 827 |
+
state_horizon: 1
|
| 828 |
+
action_horizon: 24
|
| 829 |
+
embodiment_tag_mapping:
|
| 830 |
+
real_gr1_arms_only: 0
|
| 831 |
+
real_gr1_arms_only_annotated: 1
|
| 832 |
+
real_gr1_arms_waist: 2
|
| 833 |
+
real_gr1_arms_waist_annotated: 3
|
| 834 |
+
dexmg_gr1_arms_only_inspire: 4
|
| 835 |
+
dexmg_gr1_arms_only_fourier: 5
|
| 836 |
+
dexmg_gr1_arms_waist_fourier: 6
|
| 837 |
+
robocasa_single_arm: 7
|
| 838 |
+
onex_eve_gripper: 8
|
| 839 |
+
robocasa_gr1_arms_only_inspire_hands: 9
|
| 840 |
+
robocasa_gr1_arms_only_fourier_hands: 10
|
| 841 |
+
robocasa_gr1_fixed_lower_body_inspire_hands: 11
|
| 842 |
+
robocasa_gr1_fixed_lower_body_fourier_hands: 12
|
| 843 |
+
robocasa_panda_omron: 13
|
| 844 |
+
robocasa_bimanual_panda_parallel_gripper: 15
|
| 845 |
+
robocasa_bimanual_panda_inspire_hand: 16
|
| 846 |
+
oxe_droid: 17
|
| 847 |
+
oxe_fractal: 18
|
| 848 |
+
oxe_language_table: 19
|
| 849 |
+
oxe_bridge: 20
|
| 850 |
+
real_panda_single_arm: 21
|
| 851 |
+
hot3d_hands_only: 23
|
| 852 |
+
gr1_unified: 24
|
| 853 |
+
robocasa_gr1_arms_waist_fourier_hands: 25
|
| 854 |
+
agibot: 26
|
| 855 |
+
lapa: 27
|
| 856 |
+
oxe_mutex: 28
|
| 857 |
+
oxe_roboset: 29
|
| 858 |
+
oxe_plex: 30
|
| 859 |
+
dream: 31
|
| 860 |
+
xdof: 22
|
| 861 |
+
gr1_unified_segmentation: 14
|
| 862 |
+
language_table_sim: 7
|
| 863 |
+
gr1_isaac: 0
|
| 864 |
+
sim_behavior_r1_pro: 31
|
| 865 |
+
mecka_hands: 27
|
| 866 |
+
real_r1_pro_sharpa: 28
|
| 867 |
+
libero_sim: 7
|
| 868 |
+
tokenizer_path: /n/netscratch/sham_lab/Lab/chloe00/umt5-xxl
|
| 869 |
+
use_global_metadata: false
|
| 870 |
+
num_frames: 33
|
| 871 |
+
action_horizon: 24
|
| 872 |
+
state_horizon: 1
|
| 873 |
+
image_resolution_width: 320
|
| 874 |
+
image_resolution_height: 176
|
| 875 |
+
image_resolution_width_single_frame: 256
|
| 876 |
+
image_resolution_height_single_frame: 256
|
| 877 |
+
totensor_cfg:
|
| 878 |
+
_target_: groot.vla.data.transform.VideoToTensor
|
| 879 |
+
apply_to: ???
|
| 880 |
+
crop_cfg:
|
| 881 |
+
_target_: groot.vla.data.transform.VideoCrop
|
| 882 |
+
apply_to: ???
|
| 883 |
+
scale: 0.95
|
| 884 |
+
mode: random
|
| 885 |
+
resize_cfg:
|
| 886 |
+
_target_: groot.vla.data.transform.VideoResize
|
| 887 |
+
apply_to: ???
|
| 888 |
+
height: 176
|
| 889 |
+
width: 320
|
| 890 |
+
interpolation: linear
|
| 891 |
+
resize_cfg_single_frame:
|
| 892 |
+
_target_: groot.vla.data.transform.VideoResize
|
| 893 |
+
apply_to: ???
|
| 894 |
+
height: 256
|
| 895 |
+
width: 256
|
| 896 |
+
interpolation: linear
|
| 897 |
+
color_jitter_cfg:
|
| 898 |
+
_target_: groot.vla.data.transform.VideoColorJitter
|
| 899 |
+
apply_to: ???
|
| 900 |
+
brightness: 0.3
|
| 901 |
+
contrast: 0.4
|
| 902 |
+
saturation: 0.5
|
| 903 |
+
hue: 0.08
|
| 904 |
+
random_grayscale_cfg:
|
| 905 |
+
_target_: groot.vla.data.transform.VideoRandomGrayscale
|
| 906 |
+
apply_to: ???
|
| 907 |
+
p: 0.1
|
| 908 |
+
random_posterize_cfg:
|
| 909 |
+
_target_: groot.vla.data.transform.VideoRandomPosterize
|
| 910 |
+
apply_to: ???
|
| 911 |
+
bits: 4
|
| 912 |
+
p: 0.1
|
| 913 |
+
normalize_cfg:
|
| 914 |
+
_target_: groot.vla.data.transform.VideoNormalize
|
| 915 |
+
apply_to: ???
|
| 916 |
+
mean:
|
| 917 |
+
- 0.5
|
| 918 |
+
- 0.5
|
| 919 |
+
- 0.5
|
| 920 |
+
std:
|
| 921 |
+
- 0.5
|
| 922 |
+
- 0.5
|
| 923 |
+
- 0.5
|
| 924 |
+
to_numpy_cfg:
|
| 925 |
+
_target_: groot.vla.data.transform.VideoToNumpy
|
| 926 |
+
apply_to: ???
|
| 927 |
+
modality_config_oxe_droid:
|
| 928 |
+
video:
|
| 929 |
+
_target_: groot.vla.data.dataset.ModalityConfig
|
| 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 |
+
eval_delta_indices:
|
| 957 |
+
- 0
|
| 958 |
+
modality_keys:
|
| 959 |
+
- video.exterior_image_1_left
|
| 960 |
+
- video.exterior_image_2_left
|
| 961 |
+
- video.wrist_image_left
|
| 962 |
+
state:
|
| 963 |
+
_target_: groot.vla.data.dataset.ModalityConfig
|
| 964 |
+
delta_indices:
|
| 965 |
+
- 0
|
| 966 |
+
modality_keys:
|
| 967 |
+
- state.joint_position
|
| 968 |
+
- state.gripper_position
|
| 969 |
+
action:
|
| 970 |
+
_target_: groot.vla.data.dataset.ModalityConfig
|
| 971 |
+
delta_indices:
|
| 972 |
+
- 0
|
| 973 |
+
- 1
|
| 974 |
+
- 2
|
| 975 |
+
- 3
|
| 976 |
+
- 4
|
| 977 |
+
- 5
|
| 978 |
+
- 6
|
| 979 |
+
- 7
|
| 980 |
+
- 8
|
| 981 |
+
- 9
|
| 982 |
+
- 10
|
| 983 |
+
- 11
|
| 984 |
+
- 12
|
| 985 |
+
- 13
|
| 986 |
+
- 14
|
| 987 |
+
- 15
|
| 988 |
+
- 16
|
| 989 |
+
- 17
|
| 990 |
+
- 18
|
| 991 |
+
- 19
|
| 992 |
+
- 20
|
| 993 |
+
- 21
|
| 994 |
+
- 22
|
| 995 |
+
- 23
|
| 996 |
+
modality_keys:
|
| 997 |
+
- action.joint_position
|
| 998 |
+
- action.gripper_position
|
| 999 |
+
language:
|
| 1000 |
+
_target_: groot.vla.data.dataset.ModalityConfig
|
| 1001 |
+
delta_indices:
|
| 1002 |
+
- 0
|
| 1003 |
+
modality_keys:
|
| 1004 |
+
- annotation.language.language_instruction
|
| 1005 |
+
- annotation.language.language_instruction_2
|
| 1006 |
+
- annotation.language.language_instruction_3
|
| 1007 |
+
lapa_action:
|
| 1008 |
+
_target_: groot.vla.data.dataset.ModalityConfig
|
| 1009 |
+
delta_indices:
|
| 1010 |
+
- 0
|
| 1011 |
+
modality_keys:
|
| 1012 |
+
- lapa_action
|
| 1013 |
+
transform_oxe_droid:
|
| 1014 |
+
_target_: groot.vla.data.transform.ComposedModalityTransform
|
| 1015 |
+
transforms:
|
| 1016 |
+
- _target_: groot.vla.data.transform.VideoToTensor
|
| 1017 |
+
apply_to:
|
| 1018 |
+
- video.exterior_image_1_left
|
| 1019 |
+
- video.exterior_image_2_left
|
| 1020 |
+
- video.wrist_image_left
|
| 1021 |
+
- _target_: groot.vla.data.transform.VideoCrop
|
| 1022 |
+
apply_to:
|
| 1023 |
+
- video.exterior_image_1_left
|
| 1024 |
+
- video.exterior_image_2_left
|
| 1025 |
+
- video.wrist_image_left
|
| 1026 |
+
scale: 0.95
|
| 1027 |
+
mode: random
|
| 1028 |
+
- _target_: groot.vla.data.transform.VideoResize
|
| 1029 |
+
apply_to:
|
| 1030 |
+
- video.exterior_image_1_left
|
| 1031 |
+
- video.exterior_image_2_left
|
| 1032 |
+
- video.wrist_image_left
|
| 1033 |
+
height: 176
|
| 1034 |
+
width: 320
|
| 1035 |
+
interpolation: linear
|
| 1036 |
+
- _target_: groot.vla.data.transform.VideoColorJitter
|
| 1037 |
+
apply_to:
|
| 1038 |
+
- video.exterior_image_1_left
|
| 1039 |
+
- video.exterior_image_2_left
|
| 1040 |
+
- video.wrist_image_left
|
| 1041 |
+
brightness: 0.3
|
| 1042 |
+
contrast: 0.4
|
| 1043 |
+
saturation: 0.5
|
| 1044 |
+
hue: 0.08
|
| 1045 |
+
- _target_: groot.vla.data.transform.VideoToNumpy
|
| 1046 |
+
apply_to:
|
| 1047 |
+
- video.exterior_image_1_left
|
| 1048 |
+
- video.exterior_image_2_left
|
| 1049 |
+
- video.wrist_image_left
|
| 1050 |
+
- _target_: groot.vla.data.transform.StateActionToTensor
|
| 1051 |
+
apply_to:
|
| 1052 |
+
- state.joint_position
|
| 1053 |
+
- state.gripper_position
|
| 1054 |
+
- _target_: groot.vla.data.transform.StateActionTransform
|
| 1055 |
+
apply_to:
|
| 1056 |
+
- state.joint_position
|
| 1057 |
+
- state.gripper_position
|
| 1058 |
+
normalization_modes:
|
| 1059 |
+
state.joint_position: q99
|
| 1060 |
+
state.gripper_position: q99
|
| 1061 |
+
- _target_: groot.vla.data.transform.StateActionToTensor
|
| 1062 |
+
apply_to:
|
| 1063 |
+
- action.joint_position
|
| 1064 |
+
- action.gripper_position
|
| 1065 |
+
- _target_: groot.vla.data.transform.StateActionTransform
|
| 1066 |
+
apply_to:
|
| 1067 |
+
- action.joint_position
|
| 1068 |
+
- action.gripper_position
|
| 1069 |
+
normalization_modes:
|
| 1070 |
+
action.joint_position: q99
|
| 1071 |
+
action.gripper_position: q99
|
| 1072 |
+
- _target_: groot.vla.data.transform.ConcatTransform
|
| 1073 |
+
video_concat_order:
|
| 1074 |
+
- video.exterior_image_1_left
|
| 1075 |
+
- video.exterior_image_2_left
|
| 1076 |
+
- video.wrist_image_left
|
| 1077 |
+
state_concat_order:
|
| 1078 |
+
- state.joint_position
|
| 1079 |
+
- state.gripper_position
|
| 1080 |
+
action_concat_order:
|
| 1081 |
+
- action.joint_position
|
| 1082 |
+
- action.gripper_position
|
| 1083 |
+
- _target_: groot.vla.model.dreamzero.transform.dreamzero_cotrain.DreamTransform
|
| 1084 |
+
default_instruction: Perform the default behavior.
|
| 1085 |
+
language_dropout_prob: 0.0
|
| 1086 |
+
always_use_default_instruction: false
|
| 1087 |
+
max_state_dim: 64
|
| 1088 |
+
max_action_dim: 32
|
| 1089 |
+
max_length: 512
|
| 1090 |
+
state_horizon: 1
|
| 1091 |
+
action_horizon: 24
|
| 1092 |
+
embodiment_tag_mapping:
|
| 1093 |
+
real_gr1_arms_only: 0
|
| 1094 |
+
real_gr1_arms_only_annotated: 1
|
| 1095 |
+
real_gr1_arms_waist: 2
|
| 1096 |
+
real_gr1_arms_waist_annotated: 3
|
| 1097 |
+
dexmg_gr1_arms_only_inspire: 4
|
| 1098 |
+
dexmg_gr1_arms_only_fourier: 5
|
| 1099 |
+
dexmg_gr1_arms_waist_fourier: 6
|
| 1100 |
+
robocasa_single_arm: 7
|
| 1101 |
+
onex_eve_gripper: 8
|
| 1102 |
+
robocasa_gr1_arms_only_inspire_hands: 9
|
| 1103 |
+
robocasa_gr1_arms_only_fourier_hands: 10
|
| 1104 |
+
robocasa_gr1_fixed_lower_body_inspire_hands: 11
|
| 1105 |
+
robocasa_gr1_fixed_lower_body_fourier_hands: 12
|
| 1106 |
+
robocasa_panda_omron: 13
|
| 1107 |
+
robocasa_bimanual_panda_parallel_gripper: 15
|
| 1108 |
+
robocasa_bimanual_panda_inspire_hand: 16
|
| 1109 |
+
oxe_droid: 17
|
| 1110 |
+
oxe_fractal: 18
|
| 1111 |
+
oxe_language_table: 19
|
| 1112 |
+
oxe_bridge: 20
|
| 1113 |
+
real_panda_single_arm: 21
|
| 1114 |
+
hot3d_hands_only: 23
|
| 1115 |
+
gr1_unified: 24
|
| 1116 |
+
robocasa_gr1_arms_waist_fourier_hands: 25
|
| 1117 |
+
agibot: 26
|
| 1118 |
+
lapa: 27
|
| 1119 |
+
oxe_mutex: 28
|
| 1120 |
+
oxe_roboset: 29
|
| 1121 |
+
oxe_plex: 30
|
| 1122 |
+
dream: 31
|
| 1123 |
+
xdof: 22
|
| 1124 |
+
gr1_unified_segmentation: 14
|
| 1125 |
+
language_table_sim: 7
|
| 1126 |
+
gr1_isaac: 0
|
| 1127 |
+
sim_behavior_r1_pro: 31
|
| 1128 |
+
mecka_hands: 27
|
| 1129 |
+
real_r1_pro_sharpa: 28
|
| 1130 |
+
libero_sim: 7
|
| 1131 |
+
tokenizer_path: /n/netscratch/sham_lab/Lab/chloe00/umt5-xxl
|
| 1132 |
+
modality_configs:
|
| 1133 |
+
oxe_droid:
|
| 1134 |
+
video:
|
| 1135 |
+
_target_: groot.vla.data.dataset.ModalityConfig
|
| 1136 |
+
delta_indices:
|
| 1137 |
+
- 0
|
| 1138 |
+
- 1
|
| 1139 |
+
- 2
|
| 1140 |
+
- 3
|
| 1141 |
+
- 4
|
| 1142 |
+
- 5
|
| 1143 |
+
- 6
|
| 1144 |
+
- 7
|
| 1145 |
+
- 8
|
| 1146 |
+
- 9
|
| 1147 |
+
- 10
|
| 1148 |
+
- 11
|
| 1149 |
+
- 12
|
| 1150 |
+
- 13
|
| 1151 |
+
- 14
|
| 1152 |
+
- 15
|
| 1153 |
+
- 16
|
| 1154 |
+
- 17
|
| 1155 |
+
- 18
|
| 1156 |
+
- 19
|
| 1157 |
+
- 20
|
| 1158 |
+
- 21
|
| 1159 |
+
- 22
|
| 1160 |
+
- 23
|
| 1161 |
+
- 24
|
| 1162 |
+
eval_delta_indices:
|
| 1163 |
+
- 0
|
| 1164 |
+
modality_keys:
|
| 1165 |
+
- video.exterior_image_1_left
|
| 1166 |
+
- video.exterior_image_2_left
|
| 1167 |
+
- video.wrist_image_left
|
| 1168 |
+
state:
|
| 1169 |
+
_target_: groot.vla.data.dataset.ModalityConfig
|
| 1170 |
+
delta_indices:
|
| 1171 |
+
- 0
|
| 1172 |
+
modality_keys:
|
| 1173 |
+
- state.joint_position
|
| 1174 |
+
- state.gripper_position
|
| 1175 |
+
action:
|
| 1176 |
+
_target_: groot.vla.data.dataset.ModalityConfig
|
| 1177 |
+
delta_indices:
|
| 1178 |
+
- 0
|
| 1179 |
+
- 1
|
| 1180 |
+
- 2
|
| 1181 |
+
- 3
|
| 1182 |
+
- 4
|
| 1183 |
+
- 5
|
| 1184 |
+
- 6
|
| 1185 |
+
- 7
|
| 1186 |
+
- 8
|
| 1187 |
+
- 9
|
| 1188 |
+
- 10
|
| 1189 |
+
- 11
|
| 1190 |
+
- 12
|
| 1191 |
+
- 13
|
| 1192 |
+
- 14
|
| 1193 |
+
- 15
|
| 1194 |
+
- 16
|
| 1195 |
+
- 17
|
| 1196 |
+
- 18
|
| 1197 |
+
- 19
|
| 1198 |
+
- 20
|
| 1199 |
+
- 21
|
| 1200 |
+
- 22
|
| 1201 |
+
- 23
|
| 1202 |
+
modality_keys:
|
| 1203 |
+
- action.joint_position
|
| 1204 |
+
- action.gripper_position
|
| 1205 |
+
language:
|
| 1206 |
+
_target_: groot.vla.data.dataset.ModalityConfig
|
| 1207 |
+
delta_indices:
|
| 1208 |
+
- 0
|
| 1209 |
+
modality_keys:
|
| 1210 |
+
- annotation.language.language_instruction
|
| 1211 |
+
- annotation.language.language_instruction_2
|
| 1212 |
+
- annotation.language.language_instruction_3
|
| 1213 |
+
lapa_action:
|
| 1214 |
+
_target_: groot.vla.data.dataset.ModalityConfig
|
| 1215 |
+
delta_indices:
|
| 1216 |
+
- 0
|
| 1217 |
+
modality_keys:
|
| 1218 |
+
- lapa_action
|
| 1219 |
+
libero_sim:
|
| 1220 |
+
video:
|
| 1221 |
+
_target_: groot.vla.data.dataset.ModalityConfig
|
| 1222 |
+
delta_indices:
|
| 1223 |
+
- 0
|
| 1224 |
+
- 1
|
| 1225 |
+
- 2
|
| 1226 |
+
- 3
|
| 1227 |
+
- 4
|
| 1228 |
+
- 5
|
| 1229 |
+
- 6
|
| 1230 |
+
- 7
|
| 1231 |
+
- 8
|
| 1232 |
+
- 9
|
| 1233 |
+
- 10
|
| 1234 |
+
- 11
|
| 1235 |
+
- 12
|
| 1236 |
+
- 13
|
| 1237 |
+
- 14
|
| 1238 |
+
- 15
|
| 1239 |
+
- 16
|
| 1240 |
+
- 17
|
| 1241 |
+
- 18
|
| 1242 |
+
- 19
|
| 1243 |
+
- 20
|
| 1244 |
+
- 21
|
| 1245 |
+
- 22
|
| 1246 |
+
- 23
|
| 1247 |
+
- 24
|
| 1248 |
+
eval_delta_indices:
|
| 1249 |
+
- 0
|
| 1250 |
+
modality_keys:
|
| 1251 |
+
- video.agentview_rgb
|
| 1252 |
+
- video.eye_in_hand_rgb
|
| 1253 |
+
state:
|
| 1254 |
+
_target_: groot.vla.data.dataset.ModalityConfig
|
| 1255 |
+
delta_indices:
|
| 1256 |
+
- 0
|
| 1257 |
+
modality_keys:
|
| 1258 |
+
- state.joint_position
|
| 1259 |
+
- state.gripper_position
|
| 1260 |
+
action:
|
| 1261 |
+
_target_: groot.vla.data.dataset.ModalityConfig
|
| 1262 |
+
delta_indices:
|
| 1263 |
+
- 0
|
| 1264 |
+
- 1
|
| 1265 |
+
- 2
|
| 1266 |
+
- 3
|
| 1267 |
+
- 4
|
| 1268 |
+
- 5
|
| 1269 |
+
- 6
|
| 1270 |
+
- 7
|
| 1271 |
+
- 8
|
| 1272 |
+
- 9
|
| 1273 |
+
- 10
|
| 1274 |
+
- 11
|
| 1275 |
+
- 12
|
| 1276 |
+
- 13
|
| 1277 |
+
- 14
|
| 1278 |
+
- 15
|
| 1279 |
+
- 16
|
| 1280 |
+
- 17
|
| 1281 |
+
- 18
|
| 1282 |
+
- 19
|
| 1283 |
+
- 20
|
| 1284 |
+
- 21
|
| 1285 |
+
- 22
|
| 1286 |
+
- 23
|
| 1287 |
+
modality_keys:
|
| 1288 |
+
- action.joint_position
|
| 1289 |
+
language:
|
| 1290 |
+
_target_: groot.vla.data.dataset.ModalityConfig
|
| 1291 |
+
delta_indices:
|
| 1292 |
+
- 0
|
| 1293 |
+
modality_keys:
|
| 1294 |
+
- annotation.language.language_instruction
|
| 1295 |
+
transforms:
|
| 1296 |
+
oxe_droid:
|
| 1297 |
+
_target_: groot.vla.data.transform.ComposedModalityTransform
|
| 1298 |
+
transforms:
|
| 1299 |
+
- _target_: groot.vla.data.transform.VideoToTensor
|
| 1300 |
+
apply_to:
|
| 1301 |
+
- video.exterior_image_1_left
|
| 1302 |
+
- video.exterior_image_2_left
|
| 1303 |
+
- video.wrist_image_left
|
| 1304 |
+
- _target_: groot.vla.data.transform.VideoCrop
|
| 1305 |
+
apply_to:
|
| 1306 |
+
- video.exterior_image_1_left
|
| 1307 |
+
- video.exterior_image_2_left
|
| 1308 |
+
- video.wrist_image_left
|
| 1309 |
+
scale: 0.95
|
| 1310 |
+
mode: random
|
| 1311 |
+
- _target_: groot.vla.data.transform.VideoResize
|
| 1312 |
+
apply_to:
|
| 1313 |
+
- video.exterior_image_1_left
|
| 1314 |
+
- video.exterior_image_2_left
|
| 1315 |
+
- video.wrist_image_left
|
| 1316 |
+
height: 176
|
| 1317 |
+
width: 320
|
| 1318 |
+
interpolation: linear
|
| 1319 |
+
- _target_: groot.vla.data.transform.VideoColorJitter
|
| 1320 |
+
apply_to:
|
| 1321 |
+
- video.exterior_image_1_left
|
| 1322 |
+
- video.exterior_image_2_left
|
| 1323 |
+
- video.wrist_image_left
|
| 1324 |
+
brightness: 0.3
|
| 1325 |
+
contrast: 0.4
|
| 1326 |
+
saturation: 0.5
|
| 1327 |
+
hue: 0.08
|
| 1328 |
+
- _target_: groot.vla.data.transform.VideoToNumpy
|
| 1329 |
+
apply_to:
|
| 1330 |
+
- video.exterior_image_1_left
|
| 1331 |
+
- video.exterior_image_2_left
|
| 1332 |
+
- video.wrist_image_left
|
| 1333 |
+
- _target_: groot.vla.data.transform.StateActionToTensor
|
| 1334 |
+
apply_to:
|
| 1335 |
+
- state.joint_position
|
| 1336 |
+
- state.gripper_position
|
| 1337 |
+
- _target_: groot.vla.data.transform.StateActionTransform
|
| 1338 |
+
apply_to:
|
| 1339 |
+
- state.joint_position
|
| 1340 |
+
- state.gripper_position
|
| 1341 |
+
normalization_modes:
|
| 1342 |
+
state.joint_position: q99
|
| 1343 |
+
state.gripper_position: q99
|
| 1344 |
+
- _target_: groot.vla.data.transform.StateActionToTensor
|
| 1345 |
+
apply_to:
|
| 1346 |
+
- action.joint_position
|
| 1347 |
+
- action.gripper_position
|
| 1348 |
+
- _target_: groot.vla.data.transform.StateActionTransform
|
| 1349 |
+
apply_to:
|
| 1350 |
+
- action.joint_position
|
| 1351 |
+
- action.gripper_position
|
| 1352 |
+
normalization_modes:
|
| 1353 |
+
action.joint_position: q99
|
| 1354 |
+
action.gripper_position: q99
|
| 1355 |
+
- _target_: groot.vla.data.transform.ConcatTransform
|
| 1356 |
+
video_concat_order:
|
| 1357 |
+
- video.exterior_image_1_left
|
| 1358 |
+
- video.exterior_image_2_left
|
| 1359 |
+
- video.wrist_image_left
|
| 1360 |
+
state_concat_order:
|
| 1361 |
+
- state.joint_position
|
| 1362 |
+
- state.gripper_position
|
| 1363 |
+
action_concat_order:
|
| 1364 |
+
- action.joint_position
|
| 1365 |
+
- action.gripper_position
|
| 1366 |
+
- _target_: groot.vla.model.dreamzero.transform.dreamzero_cotrain.DreamTransform
|
| 1367 |
+
default_instruction: Perform the default behavior.
|
| 1368 |
+
language_dropout_prob: 0.0
|
| 1369 |
+
always_use_default_instruction: false
|
| 1370 |
+
max_state_dim: 64
|
| 1371 |
+
max_action_dim: 32
|
| 1372 |
+
max_length: 512
|
| 1373 |
+
state_horizon: 1
|
| 1374 |
+
action_horizon: 24
|
| 1375 |
+
embodiment_tag_mapping:
|
| 1376 |
+
real_gr1_arms_only: 0
|
| 1377 |
+
real_gr1_arms_only_annotated: 1
|
| 1378 |
+
real_gr1_arms_waist: 2
|
| 1379 |
+
real_gr1_arms_waist_annotated: 3
|
| 1380 |
+
dexmg_gr1_arms_only_inspire: 4
|
| 1381 |
+
dexmg_gr1_arms_only_fourier: 5
|
| 1382 |
+
dexmg_gr1_arms_waist_fourier: 6
|
| 1383 |
+
robocasa_single_arm: 7
|
| 1384 |
+
onex_eve_gripper: 8
|
| 1385 |
+
robocasa_gr1_arms_only_inspire_hands: 9
|
| 1386 |
+
robocasa_gr1_arms_only_fourier_hands: 10
|
| 1387 |
+
robocasa_gr1_fixed_lower_body_inspire_hands: 11
|
| 1388 |
+
robocasa_gr1_fixed_lower_body_fourier_hands: 12
|
| 1389 |
+
robocasa_panda_omron: 13
|
| 1390 |
+
robocasa_bimanual_panda_parallel_gripper: 15
|
| 1391 |
+
robocasa_bimanual_panda_inspire_hand: 16
|
| 1392 |
+
oxe_droid: 17
|
| 1393 |
+
oxe_fractal: 18
|
| 1394 |
+
oxe_language_table: 19
|
| 1395 |
+
oxe_bridge: 20
|
| 1396 |
+
real_panda_single_arm: 21
|
| 1397 |
+
hot3d_hands_only: 23
|
| 1398 |
+
gr1_unified: 24
|
| 1399 |
+
robocasa_gr1_arms_waist_fourier_hands: 25
|
| 1400 |
+
agibot: 26
|
| 1401 |
+
lapa: 27
|
| 1402 |
+
oxe_mutex: 28
|
| 1403 |
+
oxe_roboset: 29
|
| 1404 |
+
oxe_plex: 30
|
| 1405 |
+
dream: 31
|
| 1406 |
+
xdof: 22
|
| 1407 |
+
gr1_unified_segmentation: 14
|
| 1408 |
+
language_table_sim: 7
|
| 1409 |
+
gr1_isaac: 0
|
| 1410 |
+
sim_behavior_r1_pro: 31
|
| 1411 |
+
mecka_hands: 27
|
| 1412 |
+
real_r1_pro_sharpa: 28
|
| 1413 |
+
libero_sim: 7
|
| 1414 |
+
tokenizer_path: /n/netscratch/sham_lab/Lab/chloe00/umt5-xxl
|
| 1415 |
+
libero_sim:
|
| 1416 |
+
_target_: groot.vla.data.transform.ComposedModalityTransform
|
| 1417 |
+
transforms:
|
| 1418 |
+
- _target_: groot.vla.data.transform.VideoToTensor
|
| 1419 |
+
apply_to:
|
| 1420 |
+
- video.agentview_rgb
|
| 1421 |
+
- video.eye_in_hand_rgb
|
| 1422 |
+
- _target_: groot.vla.data.transform.VideoCrop
|
| 1423 |
+
apply_to:
|
| 1424 |
+
- video.agentview_rgb
|
| 1425 |
+
- video.eye_in_hand_rgb
|
| 1426 |
+
scale: 0.95
|
| 1427 |
+
mode: random
|
| 1428 |
+
- _target_: groot.vla.data.transform.VideoResize
|
| 1429 |
+
apply_to:
|
| 1430 |
+
- video.agentview_rgb
|
| 1431 |
+
- video.eye_in_hand_rgb
|
| 1432 |
+
height: 176
|
| 1433 |
+
width: 320
|
| 1434 |
+
interpolation: linear
|
| 1435 |
+
- _target_: groot.vla.data.transform.VideoColorJitter
|
| 1436 |
+
apply_to:
|
| 1437 |
+
- video.agentview_rgb
|
| 1438 |
+
- video.eye_in_hand_rgb
|
| 1439 |
+
brightness: 0.3
|
| 1440 |
+
contrast: 0.4
|
| 1441 |
+
saturation: 0.5
|
| 1442 |
+
hue: 0.08
|
| 1443 |
+
- _target_: groot.vla.data.transform.VideoToNumpy
|
| 1444 |
+
apply_to:
|
| 1445 |
+
- video.agentview_rgb
|
| 1446 |
+
- video.eye_in_hand_rgb
|
| 1447 |
+
- _target_: groot.vla.data.transform.StateActionToTensor
|
| 1448 |
+
apply_to:
|
| 1449 |
+
- state.joint_position
|
| 1450 |
+
- state.gripper_position
|
| 1451 |
+
- _target_: groot.vla.data.transform.StateActionTransform
|
| 1452 |
+
apply_to:
|
| 1453 |
+
- state.joint_position
|
| 1454 |
+
- state.gripper_position
|
| 1455 |
+
normalization_modes:
|
| 1456 |
+
state.joint_position: q99
|
| 1457 |
+
state.gripper_position: q99
|
| 1458 |
+
- _target_: groot.vla.data.transform.StateActionToTensor
|
| 1459 |
+
apply_to:
|
| 1460 |
+
- action.joint_position
|
| 1461 |
+
- _target_: groot.vla.data.transform.StateActionTransform
|
| 1462 |
+
apply_to:
|
| 1463 |
+
- action.joint_position
|
| 1464 |
+
normalization_modes:
|
| 1465 |
+
action.joint_position: q99
|
| 1466 |
+
- _target_: groot.vla.data.transform.ConcatTransform
|
| 1467 |
+
video_concat_order:
|
| 1468 |
+
- video.agentview_rgb
|
| 1469 |
+
- video.eye_in_hand_rgb
|
| 1470 |
+
state_concat_order:
|
| 1471 |
+
- state.joint_position
|
| 1472 |
+
- state.gripper_position
|
| 1473 |
+
action_concat_order:
|
| 1474 |
+
- action.joint_position
|
| 1475 |
+
- _target_: groot.vla.model.dreamzero.transform.dreamzero_cotrain.DreamTransform
|
| 1476 |
+
default_instruction: Perform the default behavior.
|
| 1477 |
+
language_dropout_prob: 0.0
|
| 1478 |
+
always_use_default_instruction: false
|
| 1479 |
+
max_state_dim: 64
|
| 1480 |
+
max_action_dim: 32
|
| 1481 |
+
max_length: 512
|
| 1482 |
+
state_horizon: 1
|
| 1483 |
+
action_horizon: 24
|
| 1484 |
+
embodiment_tag_mapping:
|
| 1485 |
+
real_gr1_arms_only: 0
|
| 1486 |
+
real_gr1_arms_only_annotated: 1
|
| 1487 |
+
real_gr1_arms_waist: 2
|
| 1488 |
+
real_gr1_arms_waist_annotated: 3
|
| 1489 |
+
dexmg_gr1_arms_only_inspire: 4
|
| 1490 |
+
dexmg_gr1_arms_only_fourier: 5
|
| 1491 |
+
dexmg_gr1_arms_waist_fourier: 6
|
| 1492 |
+
robocasa_single_arm: 7
|
| 1493 |
+
onex_eve_gripper: 8
|
| 1494 |
+
robocasa_gr1_arms_only_inspire_hands: 9
|
| 1495 |
+
robocasa_gr1_arms_only_fourier_hands: 10
|
| 1496 |
+
robocasa_gr1_fixed_lower_body_inspire_hands: 11
|
| 1497 |
+
robocasa_gr1_fixed_lower_body_fourier_hands: 12
|
| 1498 |
+
robocasa_panda_omron: 13
|
| 1499 |
+
robocasa_bimanual_panda_parallel_gripper: 15
|
| 1500 |
+
robocasa_bimanual_panda_inspire_hand: 16
|
| 1501 |
+
oxe_droid: 17
|
| 1502 |
+
oxe_fractal: 18
|
| 1503 |
+
oxe_language_table: 19
|
| 1504 |
+
oxe_bridge: 20
|
| 1505 |
+
real_panda_single_arm: 21
|
| 1506 |
+
hot3d_hands_only: 23
|
| 1507 |
+
gr1_unified: 24
|
| 1508 |
+
robocasa_gr1_arms_waist_fourier_hands: 25
|
| 1509 |
+
agibot: 26
|
| 1510 |
+
lapa: 27
|
| 1511 |
+
oxe_mutex: 28
|
| 1512 |
+
oxe_roboset: 29
|
| 1513 |
+
oxe_plex: 30
|
| 1514 |
+
dream: 31
|
| 1515 |
+
xdof: 22
|
| 1516 |
+
gr1_unified_segmentation: 14
|
| 1517 |
+
language_table_sim: 7
|
| 1518 |
+
gr1_isaac: 0
|
| 1519 |
+
sim_behavior_r1_pro: 31
|
| 1520 |
+
mecka_hands: 27
|
| 1521 |
+
real_r1_pro_sharpa: 28
|
| 1522 |
+
libero_sim: 7
|
| 1523 |
+
tokenizer_path: /n/netscratch/sham_lab/Lab/chloe00/umt5-xxl
|
| 1524 |
+
metadata_versions:
|
| 1525 |
+
oxe_droid: '0221'
|
| 1526 |
+
libero_sim: '0221'
|
| 1527 |
+
fps: {}
|
| 1528 |
+
relative_action: false
|
| 1529 |
+
relative_action_per_horizon: false
|
| 1530 |
+
relative_action_keys:
|
| 1531 |
+
- joint_position
|
| 1532 |
+
max_chunk_size: 4
|
| 1533 |
+
dataset_shard_sampling_rate: 0.1
|
| 1534 |
+
mixture_dataset_cls: groot.vla.data.dataset.lerobot_sharded.ShardedLeRobotMixtureDataset.from_mixture_spec
|
| 1535 |
+
single_dataset_cls: groot.vla.data.dataset.lerobot_sharded.ShardedLeRobotSubLangSingleActionChunkDatasetDROID
|
| 1536 |
+
libero_data_root: /dev/null
|
| 1537 |
+
modality_config_libero_sim:
|
| 1538 |
+
video:
|
| 1539 |
+
_target_: groot.vla.data.dataset.ModalityConfig
|
| 1540 |
+
delta_indices:
|
| 1541 |
+
- 0
|
| 1542 |
+
- 1
|
| 1543 |
+
- 2
|
| 1544 |
+
- 3
|
| 1545 |
+
- 4
|
| 1546 |
+
- 5
|
| 1547 |
+
- 6
|
| 1548 |
+
- 7
|
| 1549 |
+
- 8
|
| 1550 |
+
- 9
|
| 1551 |
+
- 10
|
| 1552 |
+
- 11
|
| 1553 |
+
- 12
|
| 1554 |
+
- 13
|
| 1555 |
+
- 14
|
| 1556 |
+
- 15
|
| 1557 |
+
- 16
|
| 1558 |
+
- 17
|
| 1559 |
+
- 18
|
| 1560 |
+
- 19
|
| 1561 |
+
- 20
|
| 1562 |
+
- 21
|
| 1563 |
+
- 22
|
| 1564 |
+
- 23
|
| 1565 |
+
- 24
|
| 1566 |
+
eval_delta_indices:
|
| 1567 |
+
- 0
|
| 1568 |
+
modality_keys:
|
| 1569 |
+
- video.agentview_rgb
|
| 1570 |
+
- video.eye_in_hand_rgb
|
| 1571 |
+
state:
|
| 1572 |
+
_target_: groot.vla.data.dataset.ModalityConfig
|
| 1573 |
+
delta_indices:
|
| 1574 |
+
- 0
|
| 1575 |
+
modality_keys:
|
| 1576 |
+
- state.joint_position
|
| 1577 |
+
- state.gripper_position
|
| 1578 |
+
action:
|
| 1579 |
+
_target_: groot.vla.data.dataset.ModalityConfig
|
| 1580 |
+
delta_indices:
|
| 1581 |
+
- 0
|
| 1582 |
+
- 1
|
| 1583 |
+
- 2
|
| 1584 |
+
- 3
|
| 1585 |
+
- 4
|
| 1586 |
+
- 5
|
| 1587 |
+
- 6
|
| 1588 |
+
- 7
|
| 1589 |
+
- 8
|
| 1590 |
+
- 9
|
| 1591 |
+
- 10
|
| 1592 |
+
- 11
|
| 1593 |
+
- 12
|
| 1594 |
+
- 13
|
| 1595 |
+
- 14
|
| 1596 |
+
- 15
|
| 1597 |
+
- 16
|
| 1598 |
+
- 17
|
| 1599 |
+
- 18
|
| 1600 |
+
- 19
|
| 1601 |
+
- 20
|
| 1602 |
+
- 21
|
| 1603 |
+
- 22
|
| 1604 |
+
- 23
|
| 1605 |
+
modality_keys:
|
| 1606 |
+
- action.joint_position
|
| 1607 |
+
language:
|
| 1608 |
+
_target_: groot.vla.data.dataset.ModalityConfig
|
| 1609 |
+
delta_indices:
|
| 1610 |
+
- 0
|
| 1611 |
+
modality_keys:
|
| 1612 |
+
- annotation.language.language_instruction
|
| 1613 |
+
transform_libero_sim:
|
| 1614 |
+
_target_: groot.vla.data.transform.ComposedModalityTransform
|
| 1615 |
+
transforms:
|
| 1616 |
+
- _target_: groot.vla.data.transform.VideoToTensor
|
| 1617 |
+
apply_to:
|
| 1618 |
+
- video.agentview_rgb
|
| 1619 |
+
- video.eye_in_hand_rgb
|
| 1620 |
+
- _target_: groot.vla.data.transform.VideoCrop
|
| 1621 |
+
apply_to:
|
| 1622 |
+
- video.agentview_rgb
|
| 1623 |
+
- video.eye_in_hand_rgb
|
| 1624 |
+
scale: 0.95
|
| 1625 |
+
mode: random
|
| 1626 |
+
- _target_: groot.vla.data.transform.VideoResize
|
| 1627 |
+
apply_to:
|
| 1628 |
+
- video.agentview_rgb
|
| 1629 |
+
- video.eye_in_hand_rgb
|
| 1630 |
+
height: 176
|
| 1631 |
+
width: 320
|
| 1632 |
+
interpolation: linear
|
| 1633 |
+
- _target_: groot.vla.data.transform.VideoColorJitter
|
| 1634 |
+
apply_to:
|
| 1635 |
+
- video.agentview_rgb
|
| 1636 |
+
- video.eye_in_hand_rgb
|
| 1637 |
+
brightness: 0.3
|
| 1638 |
+
contrast: 0.4
|
| 1639 |
+
saturation: 0.5
|
| 1640 |
+
hue: 0.08
|
| 1641 |
+
- _target_: groot.vla.data.transform.VideoToNumpy
|
| 1642 |
+
apply_to:
|
| 1643 |
+
- video.agentview_rgb
|
| 1644 |
+
- video.eye_in_hand_rgb
|
| 1645 |
+
- _target_: groot.vla.data.transform.StateActionToTensor
|
| 1646 |
+
apply_to:
|
| 1647 |
+
- state.joint_position
|
| 1648 |
+
- state.gripper_position
|
| 1649 |
+
- _target_: groot.vla.data.transform.StateActionTransform
|
| 1650 |
+
apply_to:
|
| 1651 |
+
- state.joint_position
|
| 1652 |
+
- state.gripper_position
|
| 1653 |
+
normalization_modes:
|
| 1654 |
+
state.joint_position: q99
|
| 1655 |
+
state.gripper_position: q99
|
| 1656 |
+
- _target_: groot.vla.data.transform.StateActionToTensor
|
| 1657 |
+
apply_to:
|
| 1658 |
+
- action.joint_position
|
| 1659 |
+
- _target_: groot.vla.data.transform.StateActionTransform
|
| 1660 |
+
apply_to:
|
| 1661 |
+
- action.joint_position
|
| 1662 |
+
normalization_modes:
|
| 1663 |
+
action.joint_position: q99
|
| 1664 |
+
- _target_: groot.vla.data.transform.ConcatTransform
|
| 1665 |
+
video_concat_order:
|
| 1666 |
+
- video.agentview_rgb
|
| 1667 |
+
- video.eye_in_hand_rgb
|
| 1668 |
+
state_concat_order:
|
| 1669 |
+
- state.joint_position
|
| 1670 |
+
- state.gripper_position
|
| 1671 |
+
action_concat_order:
|
| 1672 |
+
- action.joint_position
|
| 1673 |
+
- _target_: groot.vla.model.dreamzero.transform.dreamzero_cotrain.DreamTransform
|
| 1674 |
+
default_instruction: Perform the default behavior.
|
| 1675 |
+
language_dropout_prob: 0.0
|
| 1676 |
+
always_use_default_instruction: false
|
| 1677 |
+
max_state_dim: 64
|
| 1678 |
+
max_action_dim: 32
|
| 1679 |
+
max_length: 512
|
| 1680 |
+
state_horizon: 1
|
| 1681 |
+
action_horizon: 24
|
| 1682 |
+
embodiment_tag_mapping:
|
| 1683 |
+
real_gr1_arms_only: 0
|
| 1684 |
+
real_gr1_arms_only_annotated: 1
|
| 1685 |
+
real_gr1_arms_waist: 2
|
| 1686 |
+
real_gr1_arms_waist_annotated: 3
|
| 1687 |
+
dexmg_gr1_arms_only_inspire: 4
|
| 1688 |
+
dexmg_gr1_arms_only_fourier: 5
|
| 1689 |
+
dexmg_gr1_arms_waist_fourier: 6
|
| 1690 |
+
robocasa_single_arm: 7
|
| 1691 |
+
onex_eve_gripper: 8
|
| 1692 |
+
robocasa_gr1_arms_only_inspire_hands: 9
|
| 1693 |
+
robocasa_gr1_arms_only_fourier_hands: 10
|
| 1694 |
+
robocasa_gr1_fixed_lower_body_inspire_hands: 11
|
| 1695 |
+
robocasa_gr1_fixed_lower_body_fourier_hands: 12
|
| 1696 |
+
robocasa_panda_omron: 13
|
| 1697 |
+
robocasa_bimanual_panda_parallel_gripper: 15
|
| 1698 |
+
robocasa_bimanual_panda_inspire_hand: 16
|
| 1699 |
+
oxe_droid: 17
|
| 1700 |
+
oxe_fractal: 18
|
| 1701 |
+
oxe_language_table: 19
|
| 1702 |
+
oxe_bridge: 20
|
| 1703 |
+
real_panda_single_arm: 21
|
| 1704 |
+
hot3d_hands_only: 23
|
| 1705 |
+
gr1_unified: 24
|
| 1706 |
+
robocasa_gr1_arms_waist_fourier_hands: 25
|
| 1707 |
+
agibot: 26
|
| 1708 |
+
lapa: 27
|
| 1709 |
+
oxe_mutex: 28
|
| 1710 |
+
oxe_roboset: 29
|
| 1711 |
+
oxe_plex: 30
|
| 1712 |
+
dream: 31
|
| 1713 |
+
xdof: 22
|
| 1714 |
+
gr1_unified_segmentation: 14
|
| 1715 |
+
language_table_sim: 7
|
| 1716 |
+
gr1_isaac: 0
|
| 1717 |
+
sim_behavior_r1_pro: 31
|
| 1718 |
+
mecka_hands: 27
|
| 1719 |
+
real_r1_pro_sharpa: 28
|
| 1720 |
+
libero_sim: 7
|
| 1721 |
+
tokenizer_path: /n/netscratch/sham_lab/Lab/chloe00/umt5-xxl
|
| 1722 |
+
total_training_steps: 524288000000
|
checkpoint-3400/experiment_cfg/metadata.json
ADDED
|
@@ -0,0 +1,191 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 1 |
+
{
|
| 2 |
+
"libero_sim": {
|
| 3 |
+
"statistics": {
|
| 4 |
+
"state": {
|
| 5 |
+
"joint_position": {
|
| 6 |
+
"max": [
|
| 7 |
+
1.2063851356506348,
|
| 8 |
+
1.729349970817566,
|
| 9 |
+
0.7443497180938721,
|
| 10 |
+
-0.05991530045866966,
|
| 11 |
+
2.9023241996765137,
|
| 12 |
+
3.768294095993042,
|
| 13 |
+
2.90535569190979
|
| 14 |
+
],
|
| 15 |
+
"min": [
|
| 16 |
+
-0.6767155528068542,
|
| 17 |
+
-0.7506840825080872,
|
| 18 |
+
-1.0042388439178467,
|
| 19 |
+
-3.0741348266601562,
|
| 20 |
+
-2.011885643005371,
|
| 21 |
+
0.5113848447799683,
|
| 22 |
+
-2.1146721839904785
|
| 23 |
+
],
|
| 24 |
+
"mean": [
|
| 25 |
+
0.025744481750079096,
|
| 26 |
+
0.43215939487495864,
|
| 27 |
+
0.025442487822457314,
|
| 28 |
+
-1.9090985448580677,
|
| 29 |
+
0.01173245511433578,
|
| 30 |
+
2.2628080163969915,
|
| 31 |
+
0.9817070450726793
|
| 32 |
+
],
|
| 33 |
+
"std": [
|
| 34 |
+
0.13120026577032912,
|
| 35 |
+
0.3519826025816616,
|
| 36 |
+
0.16982776528420965,
|
| 37 |
+
0.4719381821602884,
|
| 38 |
+
0.36521165782433973,
|
| 39 |
+
0.3474397294407293,
|
| 40 |
+
0.6404750819409163
|
| 41 |
+
],
|
| 42 |
+
"q01": [
|
| 43 |
+
-0.34054815769195557,
|
| 44 |
+
-0.3165711760520935,
|
| 45 |
+
-0.3763498067855835,
|
| 46 |
+
-2.832064390182495,
|
| 47 |
+
-1.4012118577957153,
|
| 48 |
+
0.9309872984886169,
|
| 49 |
+
-1.3892768621444702
|
| 50 |
+
],
|
| 51 |
+
"q99": [
|
| 52 |
+
0.40299752354621887,
|
| 53 |
+
1.5907022953033447,
|
| 54 |
+
0.44117674231529236,
|
| 55 |
+
-0.06977366656064987,
|
| 56 |
+
1.3430962562561035,
|
| 57 |
+
3.1563124656677246,
|
| 58 |
+
2.4489285945892334
|
| 59 |
+
]
|
| 60 |
+
},
|
| 61 |
+
"gripper_position": {
|
| 62 |
+
"max": [
|
| 63 |
+
0.043038416653871536
|
| 64 |
+
],
|
| 65 |
+
"min": [
|
| 66 |
+
-0.0017239076551049948
|
| 67 |
+
],
|
| 68 |
+
"mean": [
|
| 69 |
+
0.026799723877622618
|
| 70 |
+
],
|
| 71 |
+
"std": [
|
| 72 |
+
0.014535988245479439
|
| 73 |
+
],
|
| 74 |
+
"q01": [
|
| 75 |
+
0.0005400532390922308
|
| 76 |
+
],
|
| 77 |
+
"q99": [
|
| 78 |
+
0.040614932775497437
|
| 79 |
+
]
|
| 80 |
+
}
|
| 81 |
+
},
|
| 82 |
+
"action": {
|
| 83 |
+
"joint_position": {
|
| 84 |
+
"max": [
|
| 85 |
+
0.9375,
|
| 86 |
+
0.9375,
|
| 87 |
+
0.9375,
|
| 88 |
+
0.3557142913341522,
|
| 89 |
+
0.375,
|
| 90 |
+
0.375,
|
| 91 |
+
1.0
|
| 92 |
+
],
|
| 93 |
+
"min": [
|
| 94 |
+
-0.9375,
|
| 95 |
+
-0.9375,
|
| 96 |
+
-0.9375,
|
| 97 |
+
-0.2582142949104309,
|
| 98 |
+
-0.375,
|
| 99 |
+
-0.3675000071525574,
|
| 100 |
+
-1.0
|
| 101 |
+
],
|
| 102 |
+
"mean": [
|
| 103 |
+
0.05814696231386708,
|
| 104 |
+
0.0831766843709954,
|
| 105 |
+
-0.08981711208867654,
|
| 106 |
+
0.0009011770947906824,
|
| 107 |
+
0.005159359273612763,
|
| 108 |
+
-0.005383313765142389,
|
| 109 |
+
-0.06720814950020937
|
| 110 |
+
],
|
| 111 |
+
"std": [
|
| 112 |
+
0.33412004252377164,
|
| 113 |
+
0.37447903751767636,
|
| 114 |
+
0.4366533244960553,
|
| 115 |
+
0.04048210853993295,
|
| 116 |
+
0.06329095024195727,
|
| 117 |
+
0.07978823507333486,
|
| 118 |
+
0.9976675265241381
|
| 119 |
+
],
|
| 120 |
+
"q01": [
|
| 121 |
+
-0.8973214030265808,
|
| 122 |
+
-0.8758928775787354,
|
| 123 |
+
-0.9375,
|
| 124 |
+
-0.15214285254478455,
|
| 125 |
+
-0.2046428620815277,
|
| 126 |
+
-0.27868926525115967,
|
| 127 |
+
-1.0
|
| 128 |
+
],
|
| 129 |
+
"q99": [
|
| 130 |
+
0.9375,
|
| 131 |
+
0.9133928418159485,
|
| 132 |
+
0.9375,
|
| 133 |
+
0.21214285492897034,
|
| 134 |
+
0.2582142949104309,
|
| 135 |
+
0.375,
|
| 136 |
+
1.0
|
| 137 |
+
]
|
| 138 |
+
}
|
| 139 |
+
}
|
| 140 |
+
},
|
| 141 |
+
"modalities": {
|
| 142 |
+
"video": {
|
| 143 |
+
"agentview_rgb": {
|
| 144 |
+
"resolution": [
|
| 145 |
+
256,
|
| 146 |
+
256
|
| 147 |
+
],
|
| 148 |
+
"channels": 3,
|
| 149 |
+
"fps": 20.0
|
| 150 |
+
},
|
| 151 |
+
"eye_in_hand_rgb": {
|
| 152 |
+
"resolution": [
|
| 153 |
+
256,
|
| 154 |
+
256
|
| 155 |
+
],
|
| 156 |
+
"channels": 3,
|
| 157 |
+
"fps": 20.0
|
| 158 |
+
}
|
| 159 |
+
},
|
| 160 |
+
"state": {
|
| 161 |
+
"joint_position": {
|
| 162 |
+
"absolute": true,
|
| 163 |
+
"rotation_type": null,
|
| 164 |
+
"shape": [
|
| 165 |
+
7
|
| 166 |
+
],
|
| 167 |
+
"continuous": true
|
| 168 |
+
},
|
| 169 |
+
"gripper_position": {
|
| 170 |
+
"absolute": true,
|
| 171 |
+
"rotation_type": null,
|
| 172 |
+
"shape": [
|
| 173 |
+
1
|
| 174 |
+
],
|
| 175 |
+
"continuous": true
|
| 176 |
+
}
|
| 177 |
+
},
|
| 178 |
+
"action": {
|
| 179 |
+
"joint_position": {
|
| 180 |
+
"absolute": true,
|
| 181 |
+
"rotation_type": null,
|
| 182 |
+
"shape": [
|
| 183 |
+
7
|
| 184 |
+
],
|
| 185 |
+
"continuous": true
|
| 186 |
+
}
|
| 187 |
+
}
|
| 188 |
+
},
|
| 189 |
+
"embodiment_tag": "libero_sim"
|
| 190 |
+
}
|
| 191 |
+
}
|
checkpoint-3400/global_step3400/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:63935350662ffbc700447f2b8933b04ad4f13bd683c04a023839caae85f7370a
|
| 3 |
+
size 325752816
|
checkpoint-3400/global_step3400/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:7e1a9c81736d557dc9e1e63e4d1870a5759a5694e2d59f2001fe91f486d468bc
|
| 3 |
+
size 325752816
|
checkpoint-3400/global_step3400/bf16_zero_pp_rank_2_mp_rank_00_optim_states.pt
ADDED
|
@@ -0,0 +1,3 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
| 1 |
+
version https://git-lfs.github.com/spec/v1
|
| 2 |
+
oid sha256:024f2077aac46495fc53bf7c8df7e30a7a031d3def1df82ca7c2dd786e4a95ba
|
| 3 |
+
size 325752816
|
checkpoint-3400/global_step3400/bf16_zero_pp_rank_3_mp_rank_00_optim_states.pt
ADDED
|
@@ -0,0 +1,3 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
| 1 |
+
version https://git-lfs.github.com/spec/v1
|
| 2 |
+
oid sha256:c80c6538000c2be49b28508a89de3acd96c133582fbf1d65a3f678734c69a424
|
| 3 |
+
size 325752816
|
checkpoint-3400/global_step3400/zero_pp_rank_0_mp_rank_00_model_states.pt
ADDED
|
@@ -0,0 +1,3 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
| 1 |
+
version https://git-lfs.github.com/spec/v1
|
| 2 |
+
oid sha256:369ed0a97d86962213d92802f92285d0e9a526cfdba50e64d5fa5336ef2da396
|
| 3 |
+
size 11420051798
|
checkpoint-3400/global_step3400/zero_pp_rank_1_mp_rank_00_model_states.pt
ADDED
|
@@ -0,0 +1,3 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
| 1 |
+
version https://git-lfs.github.com/spec/v1
|
| 2 |
+
oid sha256:754bd17a8e0d16994f62a29b22d3db6aa64afd6bef018f364bca722d417cc2d2
|
| 3 |
+
size 11420051798
|
checkpoint-3400/global_step3400/zero_pp_rank_2_mp_rank_00_model_states.pt
ADDED
|
@@ -0,0 +1,3 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
| 1 |
+
version https://git-lfs.github.com/spec/v1
|
| 2 |
+
oid sha256:18767e4aa1096ef02176992af50e7362a23688ee6a68a5af3b556bab973c4b37
|
| 3 |
+
size 11420051798
|
checkpoint-3400/global_step3400/zero_pp_rank_3_mp_rank_00_model_states.pt
ADDED
|
@@ -0,0 +1,3 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
| 1 |
+
version https://git-lfs.github.com/spec/v1
|
| 2 |
+
oid sha256:1763a69729a2545ea61ad7ccd2ab3ef17c8c3ff67f7f4c13e31ce82b8b966391
|
| 3 |
+
size 11420051798
|
checkpoint-3400/latest
ADDED
|
@@ -0,0 +1 @@
|
|
|
|
|
|
|
| 1 |
+
global_step3400
|
checkpoint-3400/model.safetensors
ADDED
|
@@ -0,0 +1,3 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
| 1 |
+
version https://git-lfs.github.com/spec/v1
|
| 2 |
+
oid sha256:9cb1099f99e62c64cae386ce8f3067166e8beb3c98857a29893ec25388e02855
|
| 3 |
+
size 39028544
|
checkpoint-3400/rng_state_0.pth
ADDED
|
@@ -0,0 +1,3 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
| 1 |
+
version https://git-lfs.github.com/spec/v1
|
| 2 |
+
oid sha256:fb0ce939bf2a4c7e1c96a202a01495fcebede96d0324d91e77f0b2fc02f6852d
|
| 3 |
+
size 15024
|
checkpoint-3400/rng_state_1.pth
ADDED
|
@@ -0,0 +1,3 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
| 1 |
+
version https://git-lfs.github.com/spec/v1
|
| 2 |
+
oid sha256:8a8ae121bed201296f8b830d035532afa7578be5aa68ee3aacbb020e6e19a638
|
| 3 |
+
size 15024
|
checkpoint-3400/rng_state_2.pth
ADDED
|
@@ -0,0 +1,3 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
| 1 |
+
version https://git-lfs.github.com/spec/v1
|
| 2 |
+
oid sha256:9a59de4736374ae04df70e31be0932bff4143b8570de20da211a77ee026a85b4
|
| 3 |
+
size 15024
|
checkpoint-3400/rng_state_3.pth
ADDED
|
@@ -0,0 +1,3 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
| 1 |
+
version https://git-lfs.github.com/spec/v1
|
| 2 |
+
oid sha256:81d1ccf8d21c5bb304b69b54782802f65966aad55d97a5c5e1e4837be246e001
|
| 3 |
+
size 15024
|
checkpoint-3400/scheduler.pt
ADDED
|
@@ -0,0 +1,3 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
| 1 |
+
version https://git-lfs.github.com/spec/v1
|
| 2 |
+
oid sha256:f8b838e104fca7c2e26059b35d205ad006c3ffa57d1fb6ff3cf08db859098e9d
|
| 3 |
+
size 1064
|
checkpoint-3400/trainer_state.json
ADDED
|
The diff for this file is too large to render.
See raw diff
|
|
|
checkpoint-3400/wandb_config.json
ADDED
|
@@ -0,0 +1 @@
|
|
|
|
|
|
|
| 1 |
+
{"project": "dreamzero_libero_all", "run_id": ""}
|
checkpoint-3400/zero_to_fp32.py
ADDED
|
@@ -0,0 +1,760 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|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
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 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)
|