LinhanWang commited on
Commit
f074754
·
verified ·
1 Parent(s): 8190915

Add files using upload-large-folder tool

Browse files
Files changed (50) hide show
  1. logs/UNIVLA_SIMPLERENV_BRIDGE_VIDEO_BS128_20k/checkpoint-12000/config.json +61 -0
  2. logs/UNIVLA_SIMPLERENV_BRIDGE_VIDEO_BS128_20k/checkpoint-12000/emu3_vision_tokens.txt +0 -0
  3. logs/UNIVLA_SIMPLERENV_BRIDGE_VIDEO_BS128_20k/checkpoint-12000/generation_config.json +7 -0
  4. logs/UNIVLA_SIMPLERENV_BRIDGE_VIDEO_BS128_20k/checkpoint-12000/latest +1 -0
  5. logs/UNIVLA_SIMPLERENV_BRIDGE_VIDEO_BS128_20k/checkpoint-12000/model.safetensors.index.json +298 -0
  6. logs/UNIVLA_SIMPLERENV_BRIDGE_VIDEO_BS128_20k/checkpoint-12000/special_tokens_map.json +5 -0
  7. logs/UNIVLA_SIMPLERENV_BRIDGE_VIDEO_BS128_20k/checkpoint-12000/tokenizer_config.json +18 -0
  8. logs/UNIVLA_SIMPLERENV_BRIDGE_VIDEO_BS128_20k/checkpoint-12000/trainer_state.json +0 -0
  9. logs/UNIVLA_SIMPLERENV_BRIDGE_VIDEO_BS128_20k/checkpoint-12000/zero_to_fp32.py +760 -0
  10. logs/UNIVLA_SIMPLERENV_BRIDGE_VIDEO_BS128_20k/checkpoint-16000/config.json +61 -0
  11. logs/UNIVLA_SIMPLERENV_BRIDGE_VIDEO_BS128_20k/checkpoint-16000/emu3.tiktoken +0 -0
  12. logs/UNIVLA_SIMPLERENV_BRIDGE_VIDEO_BS128_20k/checkpoint-16000/emu3_vision_tokens.txt +0 -0
  13. logs/UNIVLA_SIMPLERENV_BRIDGE_VIDEO_BS128_20k/checkpoint-16000/model.safetensors.index.json +298 -0
  14. logs/UNIVLA_SIMPLERENV_BRIDGE_VIDEO_BS128_20k/checkpoint-16000/special_tokens_map.json +5 -0
  15. logs/UNIVLA_SIMPLERENV_BRIDGE_VIDEO_BS128_20k/checkpoint-16000/tokenizer_config.json +18 -0
  16. logs/UNIVLA_SIMPLERENV_BRIDGE_VIDEO_BS128_20k/checkpoint-16000/zero_to_fp32.py +760 -0
  17. logs/UNIVLA_SIMPLERENV_BRIDGE_VIDEO_BS128_20k/checkpoint-20000/config.json +61 -0
  18. logs/UNIVLA_SIMPLERENV_BRIDGE_VIDEO_BS128_20k/checkpoint-20000/emu3.tiktoken +0 -0
  19. logs/UNIVLA_SIMPLERENV_BRIDGE_VIDEO_BS128_20k/checkpoint-20000/emu3_vision_tokens.txt +0 -0
  20. logs/UNIVLA_SIMPLERENV_BRIDGE_VIDEO_BS128_20k/checkpoint-20000/generation_config.json +7 -0
  21. logs/UNIVLA_SIMPLERENV_BRIDGE_VIDEO_BS128_20k/checkpoint-20000/latest +1 -0
  22. logs/UNIVLA_SIMPLERENV_BRIDGE_VIDEO_BS128_20k/checkpoint-20000/model.safetensors.index.json +298 -0
  23. logs/UNIVLA_SIMPLERENV_BRIDGE_VIDEO_BS128_20k/checkpoint-20000/special_tokens_map.json +5 -0
  24. logs/UNIVLA_SIMPLERENV_BRIDGE_VIDEO_BS128_20k/checkpoint-20000/tokenizer_config.json +18 -0
  25. logs/UNIVLA_SIMPLERENV_BRIDGE_VIDEO_BS128_20k/checkpoint-20000/trainer_state.json +0 -0
  26. logs/UNIVLA_SIMPLERENV_BRIDGE_VIDEO_BS128_20k/checkpoint-20000/zero_to_fp32.py +760 -0
  27. logs/UNIVLA_SIMPLERENV_BRIDGE_VIDEO_BS128_20k/checkpoint-4000/config.json +61 -0
  28. logs/UNIVLA_SIMPLERENV_BRIDGE_VIDEO_BS128_20k/checkpoint-4000/emu3.tiktoken +0 -0
  29. logs/UNIVLA_SIMPLERENV_BRIDGE_VIDEO_BS128_20k/checkpoint-4000/emu3_vision_tokens.txt +0 -0
  30. logs/UNIVLA_SIMPLERENV_BRIDGE_VIDEO_BS128_20k/checkpoint-4000/model.safetensors.index.json +298 -0
  31. logs/UNIVLA_SIMPLERENV_BRIDGE_VIDEO_BS128_20k/checkpoint-4000/trainer_state.json +1434 -0
  32. logs/UNIVLA_SIMPLERENV_BRIDGE_VIDEO_BS128_20k/checkpoint-4000/zero_to_fp32.py +760 -0
  33. logs/UNIVLA_SIMPLERENV_BRIDGE_VIDEO_BS128_20k/checkpoint-8000/config.json +61 -0
  34. logs/UNIVLA_SIMPLERENV_BRIDGE_VIDEO_BS128_20k/checkpoint-8000/emu3.tiktoken +0 -0
  35. logs/UNIVLA_SIMPLERENV_BRIDGE_VIDEO_BS128_20k/checkpoint-8000/emu3_vision_tokens.txt +0 -0
  36. logs/UNIVLA_SIMPLERENV_BRIDGE_VIDEO_BS128_20k/checkpoint-8000/generation_config.json +7 -0
  37. logs/UNIVLA_SIMPLERENV_BRIDGE_VIDEO_BS128_20k/checkpoint-8000/latest +1 -0
  38. logs/UNIVLA_SIMPLERENV_BRIDGE_VIDEO_BS128_20k/checkpoint-8000/model.safetensors.index.json +298 -0
  39. logs/UNIVLA_SIMPLERENV_BRIDGE_VIDEO_BS128_20k/checkpoint-8000/special_tokens_map.json +5 -0
  40. logs/UNIVLA_SIMPLERENV_BRIDGE_VIDEO_BS128_20k/checkpoint-8000/tokenizer_config.json +18 -0
  41. logs/UNIVLA_SIMPLERENV_BRIDGE_VIDEO_BS128_20k/checkpoint-8000/trainer_state.json +2834 -0
  42. logs/UNIVLA_SIMPLERENV_BRIDGE_VIDEO_BS128_20k/checkpoint-8000/zero_to_fp32.py +760 -0
  43. logs/UNIVLA_SIMPLERENV_BRIDGE_VIDEO_BS128_20k/config.json +61 -0
  44. logs/UNIVLA_SIMPLERENV_BRIDGE_VIDEO_BS128_20k/emu3.tiktoken +0 -0
  45. logs/UNIVLA_SIMPLERENV_BRIDGE_VIDEO_BS128_20k/emu3_vision_tokens.txt +0 -0
  46. logs/UNIVLA_SIMPLERENV_BRIDGE_VIDEO_BS128_20k/generation_config.json +7 -0
  47. logs/UNIVLA_SIMPLERENV_BRIDGE_VIDEO_BS128_20k/model.safetensors.index.json +298 -0
  48. logs/UNIVLA_SIMPLERENV_BRIDGE_VIDEO_BS128_20k/special_tokens_map.json +5 -0
  49. logs/UNIVLA_SIMPLERENV_BRIDGE_VIDEO_BS128_20k/tokenizer_config.json +18 -0
  50. logs/UNIVLA_SIMPLERENV_BRIDGE_VIDEO_BS128_20k/trainer_state.json +0 -0
logs/UNIVLA_SIMPLERENV_BRIDGE_VIDEO_BS128_20k/checkpoint-12000/config.json ADDED
@@ -0,0 +1,61 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ {
2
+ "action_config": {
3
+ "_attn_implementation": "sdpa",
4
+ "action_dim": 7,
5
+ "attention_dropout": 0.0,
6
+ "hidden_act": "silu",
7
+ "hidden_size": 4096,
8
+ "initializer_range": 0.02,
9
+ "intermediate_size": 2048,
10
+ "max_position_embeddings": 5120,
11
+ "num_attention_heads": 32,
12
+ "num_hidden_layers": 2,
13
+ "num_key_value_heads": 8,
14
+ "pad_token_id": 151643,
15
+ "pretraining_tp": 1,
16
+ "rms_norm_eps": 1e-05,
17
+ "rope_scaling": null,
18
+ "rope_theta": 10000.0,
19
+ "tie_word_embeddings": false,
20
+ "use_cache": true,
21
+ "vision_loss_weight": 5.0
22
+ },
23
+ "action_dim": 7,
24
+ "action_experts": false,
25
+ "architectures": [
26
+ "Emu3MoE"
27
+ ],
28
+ "attention_dropout": 0.1,
29
+ "boa_token_id": 151844,
30
+ "boi_token_id": 151852,
31
+ "bos_token_id": 151849,
32
+ "bov_token_id": 151854,
33
+ "eof_token_id": 151847,
34
+ "eoi_token_id": 151853,
35
+ "eol_token_id": 151846,
36
+ "eos_token_id": 151850,
37
+ "eov_token_id": 184621,
38
+ "hidden_act": "silu",
39
+ "hidden_size": 4096,
40
+ "image_area": 262144,
41
+ "img_token_id": 151851,
42
+ "initializer_range": 0.02,
43
+ "intermediate_size": 14336,
44
+ "max_position_embeddings": 2400,
45
+ "model_type": "Emu3",
46
+ "num_attention_heads": 32,
47
+ "num_hidden_layers": 32,
48
+ "num_key_value_heads": 8,
49
+ "pad_token_id": 151643,
50
+ "pretraining_tp": 1,
51
+ "qkv_bias": false,
52
+ "rms_norm_eps": 1e-05,
53
+ "rope_scaling": null,
54
+ "rope_theta": 1000000.0,
55
+ "tie_word_embeddings": false,
56
+ "torch_dtype": "bfloat16",
57
+ "transformers_version": "4.51.0",
58
+ "use_cache": true,
59
+ "vision_loss_weight": 0.5,
60
+ "vocab_size": 184622
61
+ }
logs/UNIVLA_SIMPLERENV_BRIDGE_VIDEO_BS128_20k/checkpoint-12000/emu3_vision_tokens.txt ADDED
The diff for this file is too large to render. See raw diff
 
logs/UNIVLA_SIMPLERENV_BRIDGE_VIDEO_BS128_20k/checkpoint-12000/generation_config.json ADDED
@@ -0,0 +1,7 @@
 
 
 
 
 
 
 
 
1
+ {
2
+ "_from_model_config": true,
3
+ "bos_token_id": 151849,
4
+ "eos_token_id": 151850,
5
+ "pad_token_id": 151643,
6
+ "transformers_version": "4.51.0"
7
+ }
logs/UNIVLA_SIMPLERENV_BRIDGE_VIDEO_BS128_20k/checkpoint-12000/latest ADDED
@@ -0,0 +1 @@
 
 
1
+ global_step12000
logs/UNIVLA_SIMPLERENV_BRIDGE_VIDEO_BS128_20k/checkpoint-12000/model.safetensors.index.json ADDED
@@ -0,0 +1,298 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ {
2
+ "metadata": {
3
+ "total_size": 16984023040
4
+ },
5
+ "weight_map": {
6
+ "lm_head.weight": "model-00004-of-00004.safetensors",
7
+ "model.embed_tokens.weight": "model-00001-of-00004.safetensors",
8
+ "model.layers.0.input_layernorm.weight": "model-00001-of-00004.safetensors",
9
+ "model.layers.0.mlp.down_proj.weight": "model-00001-of-00004.safetensors",
10
+ "model.layers.0.mlp.gate_proj.weight": "model-00001-of-00004.safetensors",
11
+ "model.layers.0.mlp.up_proj.weight": "model-00001-of-00004.safetensors",
12
+ "model.layers.0.post_attention_layernorm.weight": "model-00001-of-00004.safetensors",
13
+ "model.layers.0.self_attn.k_proj.weight": "model-00001-of-00004.safetensors",
14
+ "model.layers.0.self_attn.o_proj.weight": "model-00001-of-00004.safetensors",
15
+ "model.layers.0.self_attn.q_proj.weight": "model-00001-of-00004.safetensors",
16
+ "model.layers.0.self_attn.v_proj.weight": "model-00001-of-00004.safetensors",
17
+ "model.layers.1.input_layernorm.weight": "model-00001-of-00004.safetensors",
18
+ "model.layers.1.mlp.down_proj.weight": "model-00001-of-00004.safetensors",
19
+ "model.layers.1.mlp.gate_proj.weight": "model-00001-of-00004.safetensors",
20
+ "model.layers.1.mlp.up_proj.weight": "model-00001-of-00004.safetensors",
21
+ "model.layers.1.post_attention_layernorm.weight": "model-00001-of-00004.safetensors",
22
+ "model.layers.1.self_attn.k_proj.weight": "model-00001-of-00004.safetensors",
23
+ "model.layers.1.self_attn.o_proj.weight": "model-00001-of-00004.safetensors",
24
+ "model.layers.1.self_attn.q_proj.weight": "model-00001-of-00004.safetensors",
25
+ "model.layers.1.self_attn.v_proj.weight": "model-00001-of-00004.safetensors",
26
+ "model.layers.10.input_layernorm.weight": "model-00002-of-00004.safetensors",
27
+ "model.layers.10.mlp.down_proj.weight": "model-00002-of-00004.safetensors",
28
+ "model.layers.10.mlp.gate_proj.weight": "model-00002-of-00004.safetensors",
29
+ "model.layers.10.mlp.up_proj.weight": "model-00002-of-00004.safetensors",
30
+ "model.layers.10.post_attention_layernorm.weight": "model-00002-of-00004.safetensors",
31
+ "model.layers.10.self_attn.k_proj.weight": "model-00002-of-00004.safetensors",
32
+ "model.layers.10.self_attn.o_proj.weight": "model-00002-of-00004.safetensors",
33
+ "model.layers.10.self_attn.q_proj.weight": "model-00002-of-00004.safetensors",
34
+ "model.layers.10.self_attn.v_proj.weight": "model-00002-of-00004.safetensors",
35
+ "model.layers.11.input_layernorm.weight": "model-00002-of-00004.safetensors",
36
+ "model.layers.11.mlp.down_proj.weight": "model-00002-of-00004.safetensors",
37
+ "model.layers.11.mlp.gate_proj.weight": "model-00002-of-00004.safetensors",
38
+ "model.layers.11.mlp.up_proj.weight": "model-00002-of-00004.safetensors",
39
+ "model.layers.11.post_attention_layernorm.weight": "model-00002-of-00004.safetensors",
40
+ "model.layers.11.self_attn.k_proj.weight": "model-00002-of-00004.safetensors",
41
+ "model.layers.11.self_attn.o_proj.weight": "model-00002-of-00004.safetensors",
42
+ "model.layers.11.self_attn.q_proj.weight": "model-00002-of-00004.safetensors",
43
+ "model.layers.11.self_attn.v_proj.weight": "model-00002-of-00004.safetensors",
44
+ "model.layers.12.input_layernorm.weight": "model-00002-of-00004.safetensors",
45
+ "model.layers.12.mlp.down_proj.weight": "model-00002-of-00004.safetensors",
46
+ "model.layers.12.mlp.gate_proj.weight": "model-00002-of-00004.safetensors",
47
+ "model.layers.12.mlp.up_proj.weight": "model-00002-of-00004.safetensors",
48
+ "model.layers.12.post_attention_layernorm.weight": "model-00002-of-00004.safetensors",
49
+ "model.layers.12.self_attn.k_proj.weight": "model-00002-of-00004.safetensors",
50
+ "model.layers.12.self_attn.o_proj.weight": "model-00002-of-00004.safetensors",
51
+ "model.layers.12.self_attn.q_proj.weight": "model-00002-of-00004.safetensors",
52
+ "model.layers.12.self_attn.v_proj.weight": "model-00002-of-00004.safetensors",
53
+ "model.layers.13.input_layernorm.weight": "model-00002-of-00004.safetensors",
54
+ "model.layers.13.mlp.down_proj.weight": "model-00002-of-00004.safetensors",
55
+ "model.layers.13.mlp.gate_proj.weight": "model-00002-of-00004.safetensors",
56
+ "model.layers.13.mlp.up_proj.weight": "model-00002-of-00004.safetensors",
57
+ "model.layers.13.post_attention_layernorm.weight": "model-00002-of-00004.safetensors",
58
+ "model.layers.13.self_attn.k_proj.weight": "model-00002-of-00004.safetensors",
59
+ "model.layers.13.self_attn.o_proj.weight": "model-00002-of-00004.safetensors",
60
+ "model.layers.13.self_attn.q_proj.weight": "model-00002-of-00004.safetensors",
61
+ "model.layers.13.self_attn.v_proj.weight": "model-00002-of-00004.safetensors",
62
+ "model.layers.14.input_layernorm.weight": "model-00002-of-00004.safetensors",
63
+ "model.layers.14.mlp.down_proj.weight": "model-00002-of-00004.safetensors",
64
+ "model.layers.14.mlp.gate_proj.weight": "model-00002-of-00004.safetensors",
65
+ "model.layers.14.mlp.up_proj.weight": "model-00002-of-00004.safetensors",
66
+ "model.layers.14.post_attention_layernorm.weight": "model-00002-of-00004.safetensors",
67
+ "model.layers.14.self_attn.k_proj.weight": "model-00002-of-00004.safetensors",
68
+ "model.layers.14.self_attn.o_proj.weight": "model-00002-of-00004.safetensors",
69
+ "model.layers.14.self_attn.q_proj.weight": "model-00002-of-00004.safetensors",
70
+ "model.layers.14.self_attn.v_proj.weight": "model-00002-of-00004.safetensors",
71
+ "model.layers.15.input_layernorm.weight": "model-00002-of-00004.safetensors",
72
+ "model.layers.15.mlp.down_proj.weight": "model-00002-of-00004.safetensors",
73
+ "model.layers.15.mlp.gate_proj.weight": "model-00002-of-00004.safetensors",
74
+ "model.layers.15.mlp.up_proj.weight": "model-00002-of-00004.safetensors",
75
+ "model.layers.15.post_attention_layernorm.weight": "model-00002-of-00004.safetensors",
76
+ "model.layers.15.self_attn.k_proj.weight": "model-00002-of-00004.safetensors",
77
+ "model.layers.15.self_attn.o_proj.weight": "model-00002-of-00004.safetensors",
78
+ "model.layers.15.self_attn.q_proj.weight": "model-00002-of-00004.safetensors",
79
+ "model.layers.15.self_attn.v_proj.weight": "model-00002-of-00004.safetensors",
80
+ "model.layers.16.input_layernorm.weight": "model-00002-of-00004.safetensors",
81
+ "model.layers.16.mlp.down_proj.weight": "model-00002-of-00004.safetensors",
82
+ "model.layers.16.mlp.gate_proj.weight": "model-00002-of-00004.safetensors",
83
+ "model.layers.16.mlp.up_proj.weight": "model-00002-of-00004.safetensors",
84
+ "model.layers.16.post_attention_layernorm.weight": "model-00002-of-00004.safetensors",
85
+ "model.layers.16.self_attn.k_proj.weight": "model-00002-of-00004.safetensors",
86
+ "model.layers.16.self_attn.o_proj.weight": "model-00002-of-00004.safetensors",
87
+ "model.layers.16.self_attn.q_proj.weight": "model-00002-of-00004.safetensors",
88
+ "model.layers.16.self_attn.v_proj.weight": "model-00002-of-00004.safetensors",
89
+ "model.layers.17.input_layernorm.weight": "model-00002-of-00004.safetensors",
90
+ "model.layers.17.mlp.down_proj.weight": "model-00002-of-00004.safetensors",
91
+ "model.layers.17.mlp.gate_proj.weight": "model-00002-of-00004.safetensors",
92
+ "model.layers.17.mlp.up_proj.weight": "model-00002-of-00004.safetensors",
93
+ "model.layers.17.post_attention_layernorm.weight": "model-00002-of-00004.safetensors",
94
+ "model.layers.17.self_attn.k_proj.weight": "model-00002-of-00004.safetensors",
95
+ "model.layers.17.self_attn.o_proj.weight": "model-00002-of-00004.safetensors",
96
+ "model.layers.17.self_attn.q_proj.weight": "model-00002-of-00004.safetensors",
97
+ "model.layers.17.self_attn.v_proj.weight": "model-00002-of-00004.safetensors",
98
+ "model.layers.18.input_layernorm.weight": "model-00002-of-00004.safetensors",
99
+ "model.layers.18.mlp.down_proj.weight": "model-00002-of-00004.safetensors",
100
+ "model.layers.18.mlp.gate_proj.weight": "model-00002-of-00004.safetensors",
101
+ "model.layers.18.mlp.up_proj.weight": "model-00002-of-00004.safetensors",
102
+ "model.layers.18.post_attention_layernorm.weight": "model-00002-of-00004.safetensors",
103
+ "model.layers.18.self_attn.k_proj.weight": "model-00002-of-00004.safetensors",
104
+ "model.layers.18.self_attn.o_proj.weight": "model-00002-of-00004.safetensors",
105
+ "model.layers.18.self_attn.q_proj.weight": "model-00002-of-00004.safetensors",
106
+ "model.layers.18.self_attn.v_proj.weight": "model-00002-of-00004.safetensors",
107
+ "model.layers.19.input_layernorm.weight": "model-00003-of-00004.safetensors",
108
+ "model.layers.19.mlp.down_proj.weight": "model-00003-of-00004.safetensors",
109
+ "model.layers.19.mlp.gate_proj.weight": "model-00003-of-00004.safetensors",
110
+ "model.layers.19.mlp.up_proj.weight": "model-00003-of-00004.safetensors",
111
+ "model.layers.19.post_attention_layernorm.weight": "model-00003-of-00004.safetensors",
112
+ "model.layers.19.self_attn.k_proj.weight": "model-00002-of-00004.safetensors",
113
+ "model.layers.19.self_attn.o_proj.weight": "model-00002-of-00004.safetensors",
114
+ "model.layers.19.self_attn.q_proj.weight": "model-00002-of-00004.safetensors",
115
+ "model.layers.19.self_attn.v_proj.weight": "model-00002-of-00004.safetensors",
116
+ "model.layers.2.input_layernorm.weight": "model-00001-of-00004.safetensors",
117
+ "model.layers.2.mlp.down_proj.weight": "model-00001-of-00004.safetensors",
118
+ "model.layers.2.mlp.gate_proj.weight": "model-00001-of-00004.safetensors",
119
+ "model.layers.2.mlp.up_proj.weight": "model-00001-of-00004.safetensors",
120
+ "model.layers.2.post_attention_layernorm.weight": "model-00001-of-00004.safetensors",
121
+ "model.layers.2.self_attn.k_proj.weight": "model-00001-of-00004.safetensors",
122
+ "model.layers.2.self_attn.o_proj.weight": "model-00001-of-00004.safetensors",
123
+ "model.layers.2.self_attn.q_proj.weight": "model-00001-of-00004.safetensors",
124
+ "model.layers.2.self_attn.v_proj.weight": "model-00001-of-00004.safetensors",
125
+ "model.layers.20.input_layernorm.weight": "model-00003-of-00004.safetensors",
126
+ "model.layers.20.mlp.down_proj.weight": "model-00003-of-00004.safetensors",
127
+ "model.layers.20.mlp.gate_proj.weight": "model-00003-of-00004.safetensors",
128
+ "model.layers.20.mlp.up_proj.weight": "model-00003-of-00004.safetensors",
129
+ "model.layers.20.post_attention_layernorm.weight": "model-00003-of-00004.safetensors",
130
+ "model.layers.20.self_attn.k_proj.weight": "model-00003-of-00004.safetensors",
131
+ "model.layers.20.self_attn.o_proj.weight": "model-00003-of-00004.safetensors",
132
+ "model.layers.20.self_attn.q_proj.weight": "model-00003-of-00004.safetensors",
133
+ "model.layers.20.self_attn.v_proj.weight": "model-00003-of-00004.safetensors",
134
+ "model.layers.21.input_layernorm.weight": "model-00003-of-00004.safetensors",
135
+ "model.layers.21.mlp.down_proj.weight": "model-00003-of-00004.safetensors",
136
+ "model.layers.21.mlp.gate_proj.weight": "model-00003-of-00004.safetensors",
137
+ "model.layers.21.mlp.up_proj.weight": "model-00003-of-00004.safetensors",
138
+ "model.layers.21.post_attention_layernorm.weight": "model-00003-of-00004.safetensors",
139
+ "model.layers.21.self_attn.k_proj.weight": "model-00003-of-00004.safetensors",
140
+ "model.layers.21.self_attn.o_proj.weight": "model-00003-of-00004.safetensors",
141
+ "model.layers.21.self_attn.q_proj.weight": "model-00003-of-00004.safetensors",
142
+ "model.layers.21.self_attn.v_proj.weight": "model-00003-of-00004.safetensors",
143
+ "model.layers.22.input_layernorm.weight": "model-00003-of-00004.safetensors",
144
+ "model.layers.22.mlp.down_proj.weight": "model-00003-of-00004.safetensors",
145
+ "model.layers.22.mlp.gate_proj.weight": "model-00003-of-00004.safetensors",
146
+ "model.layers.22.mlp.up_proj.weight": "model-00003-of-00004.safetensors",
147
+ "model.layers.22.post_attention_layernorm.weight": "model-00003-of-00004.safetensors",
148
+ "model.layers.22.self_attn.k_proj.weight": "model-00003-of-00004.safetensors",
149
+ "model.layers.22.self_attn.o_proj.weight": "model-00003-of-00004.safetensors",
150
+ "model.layers.22.self_attn.q_proj.weight": "model-00003-of-00004.safetensors",
151
+ "model.layers.22.self_attn.v_proj.weight": "model-00003-of-00004.safetensors",
152
+ "model.layers.23.input_layernorm.weight": "model-00003-of-00004.safetensors",
153
+ "model.layers.23.mlp.down_proj.weight": "model-00003-of-00004.safetensors",
154
+ "model.layers.23.mlp.gate_proj.weight": "model-00003-of-00004.safetensors",
155
+ "model.layers.23.mlp.up_proj.weight": "model-00003-of-00004.safetensors",
156
+ "model.layers.23.post_attention_layernorm.weight": "model-00003-of-00004.safetensors",
157
+ "model.layers.23.self_attn.k_proj.weight": "model-00003-of-00004.safetensors",
158
+ "model.layers.23.self_attn.o_proj.weight": "model-00003-of-00004.safetensors",
159
+ "model.layers.23.self_attn.q_proj.weight": "model-00003-of-00004.safetensors",
160
+ "model.layers.23.self_attn.v_proj.weight": "model-00003-of-00004.safetensors",
161
+ "model.layers.24.input_layernorm.weight": "model-00003-of-00004.safetensors",
162
+ "model.layers.24.mlp.down_proj.weight": "model-00003-of-00004.safetensors",
163
+ "model.layers.24.mlp.gate_proj.weight": "model-00003-of-00004.safetensors",
164
+ "model.layers.24.mlp.up_proj.weight": "model-00003-of-00004.safetensors",
165
+ "model.layers.24.post_attention_layernorm.weight": "model-00003-of-00004.safetensors",
166
+ "model.layers.24.self_attn.k_proj.weight": "model-00003-of-00004.safetensors",
167
+ "model.layers.24.self_attn.o_proj.weight": "model-00003-of-00004.safetensors",
168
+ "model.layers.24.self_attn.q_proj.weight": "model-00003-of-00004.safetensors",
169
+ "model.layers.24.self_attn.v_proj.weight": "model-00003-of-00004.safetensors",
170
+ "model.layers.25.input_layernorm.weight": "model-00003-of-00004.safetensors",
171
+ "model.layers.25.mlp.down_proj.weight": "model-00003-of-00004.safetensors",
172
+ "model.layers.25.mlp.gate_proj.weight": "model-00003-of-00004.safetensors",
173
+ "model.layers.25.mlp.up_proj.weight": "model-00003-of-00004.safetensors",
174
+ "model.layers.25.post_attention_layernorm.weight": "model-00003-of-00004.safetensors",
175
+ "model.layers.25.self_attn.k_proj.weight": "model-00003-of-00004.safetensors",
176
+ "model.layers.25.self_attn.o_proj.weight": "model-00003-of-00004.safetensors",
177
+ "model.layers.25.self_attn.q_proj.weight": "model-00003-of-00004.safetensors",
178
+ "model.layers.25.self_attn.v_proj.weight": "model-00003-of-00004.safetensors",
179
+ "model.layers.26.input_layernorm.weight": "model-00003-of-00004.safetensors",
180
+ "model.layers.26.mlp.down_proj.weight": "model-00003-of-00004.safetensors",
181
+ "model.layers.26.mlp.gate_proj.weight": "model-00003-of-00004.safetensors",
182
+ "model.layers.26.mlp.up_proj.weight": "model-00003-of-00004.safetensors",
183
+ "model.layers.26.post_attention_layernorm.weight": "model-00003-of-00004.safetensors",
184
+ "model.layers.26.self_attn.k_proj.weight": "model-00003-of-00004.safetensors",
185
+ "model.layers.26.self_attn.o_proj.weight": "model-00003-of-00004.safetensors",
186
+ "model.layers.26.self_attn.q_proj.weight": "model-00003-of-00004.safetensors",
187
+ "model.layers.26.self_attn.v_proj.weight": "model-00003-of-00004.safetensors",
188
+ "model.layers.27.input_layernorm.weight": "model-00003-of-00004.safetensors",
189
+ "model.layers.27.mlp.down_proj.weight": "model-00003-of-00004.safetensors",
190
+ "model.layers.27.mlp.gate_proj.weight": "model-00003-of-00004.safetensors",
191
+ "model.layers.27.mlp.up_proj.weight": "model-00003-of-00004.safetensors",
192
+ "model.layers.27.post_attention_layernorm.weight": "model-00003-of-00004.safetensors",
193
+ "model.layers.27.self_attn.k_proj.weight": "model-00003-of-00004.safetensors",
194
+ "model.layers.27.self_attn.o_proj.weight": "model-00003-of-00004.safetensors",
195
+ "model.layers.27.self_attn.q_proj.weight": "model-00003-of-00004.safetensors",
196
+ "model.layers.27.self_attn.v_proj.weight": "model-00003-of-00004.safetensors",
197
+ "model.layers.28.input_layernorm.weight": "model-00003-of-00004.safetensors",
198
+ "model.layers.28.mlp.down_proj.weight": "model-00003-of-00004.safetensors",
199
+ "model.layers.28.mlp.gate_proj.weight": "model-00003-of-00004.safetensors",
200
+ "model.layers.28.mlp.up_proj.weight": "model-00003-of-00004.safetensors",
201
+ "model.layers.28.post_attention_layernorm.weight": "model-00003-of-00004.safetensors",
202
+ "model.layers.28.self_attn.k_proj.weight": "model-00003-of-00004.safetensors",
203
+ "model.layers.28.self_attn.o_proj.weight": "model-00003-of-00004.safetensors",
204
+ "model.layers.28.self_attn.q_proj.weight": "model-00003-of-00004.safetensors",
205
+ "model.layers.28.self_attn.v_proj.weight": "model-00003-of-00004.safetensors",
206
+ "model.layers.29.input_layernorm.weight": "model-00003-of-00004.safetensors",
207
+ "model.layers.29.mlp.down_proj.weight": "model-00003-of-00004.safetensors",
208
+ "model.layers.29.mlp.gate_proj.weight": "model-00003-of-00004.safetensors",
209
+ "model.layers.29.mlp.up_proj.weight": "model-00003-of-00004.safetensors",
210
+ "model.layers.29.post_attention_layernorm.weight": "model-00003-of-00004.safetensors",
211
+ "model.layers.29.self_attn.k_proj.weight": "model-00003-of-00004.safetensors",
212
+ "model.layers.29.self_attn.o_proj.weight": "model-00003-of-00004.safetensors",
213
+ "model.layers.29.self_attn.q_proj.weight": "model-00003-of-00004.safetensors",
214
+ "model.layers.29.self_attn.v_proj.weight": "model-00003-of-00004.safetensors",
215
+ "model.layers.3.input_layernorm.weight": "model-00001-of-00004.safetensors",
216
+ "model.layers.3.mlp.down_proj.weight": "model-00001-of-00004.safetensors",
217
+ "model.layers.3.mlp.gate_proj.weight": "model-00001-of-00004.safetensors",
218
+ "model.layers.3.mlp.up_proj.weight": "model-00001-of-00004.safetensors",
219
+ "model.layers.3.post_attention_layernorm.weight": "model-00001-of-00004.safetensors",
220
+ "model.layers.3.self_attn.k_proj.weight": "model-00001-of-00004.safetensors",
221
+ "model.layers.3.self_attn.o_proj.weight": "model-00001-of-00004.safetensors",
222
+ "model.layers.3.self_attn.q_proj.weight": "model-00001-of-00004.safetensors",
223
+ "model.layers.3.self_attn.v_proj.weight": "model-00001-of-00004.safetensors",
224
+ "model.layers.30.input_layernorm.weight": "model-00004-of-00004.safetensors",
225
+ "model.layers.30.mlp.down_proj.weight": "model-00004-of-00004.safetensors",
226
+ "model.layers.30.mlp.gate_proj.weight": "model-00003-of-00004.safetensors",
227
+ "model.layers.30.mlp.up_proj.weight": "model-00004-of-00004.safetensors",
228
+ "model.layers.30.post_attention_layernorm.weight": "model-00004-of-00004.safetensors",
229
+ "model.layers.30.self_attn.k_proj.weight": "model-00003-of-00004.safetensors",
230
+ "model.layers.30.self_attn.o_proj.weight": "model-00003-of-00004.safetensors",
231
+ "model.layers.30.self_attn.q_proj.weight": "model-00003-of-00004.safetensors",
232
+ "model.layers.30.self_attn.v_proj.weight": "model-00003-of-00004.safetensors",
233
+ "model.layers.31.input_layernorm.weight": "model-00004-of-00004.safetensors",
234
+ "model.layers.31.mlp.down_proj.weight": "model-00004-of-00004.safetensors",
235
+ "model.layers.31.mlp.gate_proj.weight": "model-00004-of-00004.safetensors",
236
+ "model.layers.31.mlp.up_proj.weight": "model-00004-of-00004.safetensors",
237
+ "model.layers.31.post_attention_layernorm.weight": "model-00004-of-00004.safetensors",
238
+ "model.layers.31.self_attn.k_proj.weight": "model-00004-of-00004.safetensors",
239
+ "model.layers.31.self_attn.o_proj.weight": "model-00004-of-00004.safetensors",
240
+ "model.layers.31.self_attn.q_proj.weight": "model-00004-of-00004.safetensors",
241
+ "model.layers.31.self_attn.v_proj.weight": "model-00004-of-00004.safetensors",
242
+ "model.layers.4.input_layernorm.weight": "model-00001-of-00004.safetensors",
243
+ "model.layers.4.mlp.down_proj.weight": "model-00001-of-00004.safetensors",
244
+ "model.layers.4.mlp.gate_proj.weight": "model-00001-of-00004.safetensors",
245
+ "model.layers.4.mlp.up_proj.weight": "model-00001-of-00004.safetensors",
246
+ "model.layers.4.post_attention_layernorm.weight": "model-00001-of-00004.safetensors",
247
+ "model.layers.4.self_attn.k_proj.weight": "model-00001-of-00004.safetensors",
248
+ "model.layers.4.self_attn.o_proj.weight": "model-00001-of-00004.safetensors",
249
+ "model.layers.4.self_attn.q_proj.weight": "model-00001-of-00004.safetensors",
250
+ "model.layers.4.self_attn.v_proj.weight": "model-00001-of-00004.safetensors",
251
+ "model.layers.5.input_layernorm.weight": "model-00001-of-00004.safetensors",
252
+ "model.layers.5.mlp.down_proj.weight": "model-00001-of-00004.safetensors",
253
+ "model.layers.5.mlp.gate_proj.weight": "model-00001-of-00004.safetensors",
254
+ "model.layers.5.mlp.up_proj.weight": "model-00001-of-00004.safetensors",
255
+ "model.layers.5.post_attention_layernorm.weight": "model-00001-of-00004.safetensors",
256
+ "model.layers.5.self_attn.k_proj.weight": "model-00001-of-00004.safetensors",
257
+ "model.layers.5.self_attn.o_proj.weight": "model-00001-of-00004.safetensors",
258
+ "model.layers.5.self_attn.q_proj.weight": "model-00001-of-00004.safetensors",
259
+ "model.layers.5.self_attn.v_proj.weight": "model-00001-of-00004.safetensors",
260
+ "model.layers.6.input_layernorm.weight": "model-00001-of-00004.safetensors",
261
+ "model.layers.6.mlp.down_proj.weight": "model-00001-of-00004.safetensors",
262
+ "model.layers.6.mlp.gate_proj.weight": "model-00001-of-00004.safetensors",
263
+ "model.layers.6.mlp.up_proj.weight": "model-00001-of-00004.safetensors",
264
+ "model.layers.6.post_attention_layernorm.weight": "model-00001-of-00004.safetensors",
265
+ "model.layers.6.self_attn.k_proj.weight": "model-00001-of-00004.safetensors",
266
+ "model.layers.6.self_attn.o_proj.weight": "model-00001-of-00004.safetensors",
267
+ "model.layers.6.self_attn.q_proj.weight": "model-00001-of-00004.safetensors",
268
+ "model.layers.6.self_attn.v_proj.weight": "model-00001-of-00004.safetensors",
269
+ "model.layers.7.input_layernorm.weight": "model-00002-of-00004.safetensors",
270
+ "model.layers.7.mlp.down_proj.weight": "model-00002-of-00004.safetensors",
271
+ "model.layers.7.mlp.gate_proj.weight": "model-00001-of-00004.safetensors",
272
+ "model.layers.7.mlp.up_proj.weight": "model-00001-of-00004.safetensors",
273
+ "model.layers.7.post_attention_layernorm.weight": "model-00002-of-00004.safetensors",
274
+ "model.layers.7.self_attn.k_proj.weight": "model-00001-of-00004.safetensors",
275
+ "model.layers.7.self_attn.o_proj.weight": "model-00001-of-00004.safetensors",
276
+ "model.layers.7.self_attn.q_proj.weight": "model-00001-of-00004.safetensors",
277
+ "model.layers.7.self_attn.v_proj.weight": "model-00001-of-00004.safetensors",
278
+ "model.layers.8.input_layernorm.weight": "model-00002-of-00004.safetensors",
279
+ "model.layers.8.mlp.down_proj.weight": "model-00002-of-00004.safetensors",
280
+ "model.layers.8.mlp.gate_proj.weight": "model-00002-of-00004.safetensors",
281
+ "model.layers.8.mlp.up_proj.weight": "model-00002-of-00004.safetensors",
282
+ "model.layers.8.post_attention_layernorm.weight": "model-00002-of-00004.safetensors",
283
+ "model.layers.8.self_attn.k_proj.weight": "model-00002-of-00004.safetensors",
284
+ "model.layers.8.self_attn.o_proj.weight": "model-00002-of-00004.safetensors",
285
+ "model.layers.8.self_attn.q_proj.weight": "model-00002-of-00004.safetensors",
286
+ "model.layers.8.self_attn.v_proj.weight": "model-00002-of-00004.safetensors",
287
+ "model.layers.9.input_layernorm.weight": "model-00002-of-00004.safetensors",
288
+ "model.layers.9.mlp.down_proj.weight": "model-00002-of-00004.safetensors",
289
+ "model.layers.9.mlp.gate_proj.weight": "model-00002-of-00004.safetensors",
290
+ "model.layers.9.mlp.up_proj.weight": "model-00002-of-00004.safetensors",
291
+ "model.layers.9.post_attention_layernorm.weight": "model-00002-of-00004.safetensors",
292
+ "model.layers.9.self_attn.k_proj.weight": "model-00002-of-00004.safetensors",
293
+ "model.layers.9.self_attn.o_proj.weight": "model-00002-of-00004.safetensors",
294
+ "model.layers.9.self_attn.q_proj.weight": "model-00002-of-00004.safetensors",
295
+ "model.layers.9.self_attn.v_proj.weight": "model-00002-of-00004.safetensors",
296
+ "model.norm.weight": "model-00004-of-00004.safetensors"
297
+ }
298
+ }
logs/UNIVLA_SIMPLERENV_BRIDGE_VIDEO_BS128_20k/checkpoint-12000/special_tokens_map.json ADDED
@@ -0,0 +1,5 @@
 
 
 
 
 
 
1
+ {
2
+ "bos_token": "<|extra_203|>",
3
+ "eos_token": "<|extra_204|>",
4
+ "pad_token": "<|endoftext|>"
5
+ }
logs/UNIVLA_SIMPLERENV_BRIDGE_VIDEO_BS128_20k/checkpoint-12000/tokenizer_config.json ADDED
@@ -0,0 +1,18 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ {
2
+ "added_tokens_decoder": {},
3
+ "auto_map": {
4
+ "AutoTokenizer": [
5
+ "tokenization_emu3.Emu3Tokenizer",
6
+ null
7
+ ]
8
+ },
9
+ "bos_token": "<|extra_203|>",
10
+ "clean_up_tokenization_spaces": true,
11
+ "eos_token": "<|extra_204|>",
12
+ "extra_special_tokens": {},
13
+ "model_max_length": 2400,
14
+ "pad_token": "<|endoftext|>",
15
+ "padding_side": "right",
16
+ "tokenizer_class": "Emu3Tokenizer",
17
+ "use_fast": false
18
+ }
logs/UNIVLA_SIMPLERENV_BRIDGE_VIDEO_BS128_20k/checkpoint-12000/trainer_state.json ADDED
The diff for this file is too large to render. See raw diff
 
logs/UNIVLA_SIMPLERENV_BRIDGE_VIDEO_BS128_20k/checkpoint-12000/zero_to_fp32.py ADDED
@@ -0,0 +1,760 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ #!/usr/bin/env python
2
+
3
+ # Copyright (c) Microsoft Corporation.
4
+ # SPDX-License-Identifier: Apache-2.0
5
+
6
+ # DeepSpeed Team
7
+
8
+ # This script extracts fp32 consolidated weights from a zero 1, 2 and 3 DeepSpeed checkpoints. It gets
9
+ # copied into the top level checkpoint dir, so the user can easily do the conversion at any point in
10
+ # the future. Once extracted, the weights don't require DeepSpeed and can be used in any
11
+ # application.
12
+ #
13
+ # example:
14
+ # python zero_to_fp32.py . output_dir/
15
+ # or
16
+ # python zero_to_fp32.py . output_dir/ --safe_serialization
17
+
18
+ import argparse
19
+ import torch
20
+ import glob
21
+ import math
22
+ import os
23
+ import re
24
+ import gc
25
+ import json
26
+ import numpy as np
27
+ from tqdm import tqdm
28
+ from collections import OrderedDict
29
+ from dataclasses import dataclass
30
+
31
+ # while this script doesn't use deepspeed to recover data, since the checkpoints are pickled with
32
+ # DeepSpeed data structures it has to be available in the current python environment.
33
+ from deepspeed.utils import logger
34
+ from deepspeed.checkpoint.constants import (DS_VERSION, OPTIMIZER_STATE_DICT, SINGLE_PARTITION_OF_FP32_GROUPS,
35
+ FP32_FLAT_GROUPS, ZERO_STAGE, PARTITION_COUNT, PARAM_SHAPES, BUFFER_NAMES,
36
+ FROZEN_PARAM_SHAPES, FROZEN_PARAM_FRAGMENTS)
37
+
38
+
39
+ @dataclass
40
+ class zero_model_state:
41
+ buffers: dict()
42
+ param_shapes: dict()
43
+ shared_params: list
44
+ ds_version: int
45
+ frozen_param_shapes: dict()
46
+ frozen_param_fragments: dict()
47
+
48
+
49
+ debug = 0
50
+
51
+ # load to cpu
52
+ device = torch.device('cpu')
53
+
54
+
55
+ def atoi(text):
56
+ return int(text) if text.isdigit() else text
57
+
58
+
59
+ def natural_keys(text):
60
+ '''
61
+ alist.sort(key=natural_keys) sorts in human order
62
+ http://nedbatchelder.com/blog/200712/human_sorting.html
63
+ (See Toothy's implementation in the comments)
64
+ '''
65
+ return [atoi(c) for c in re.split(r'(\d+)', text)]
66
+
67
+
68
+ def get_model_state_file(checkpoint_dir, zero_stage):
69
+ if not os.path.isdir(checkpoint_dir):
70
+ raise FileNotFoundError(f"Directory '{checkpoint_dir}' doesn't exist")
71
+
72
+ # there should be only one file
73
+ if zero_stage <= 2:
74
+ file = os.path.join(checkpoint_dir, "mp_rank_00_model_states.pt")
75
+ elif zero_stage == 3:
76
+ file = os.path.join(checkpoint_dir, "zero_pp_rank_0_mp_rank_00_model_states.pt")
77
+
78
+ if not os.path.exists(file):
79
+ raise FileNotFoundError(f"can't find model states file at '{file}'")
80
+
81
+ return file
82
+
83
+
84
+ def get_checkpoint_files(checkpoint_dir, glob_pattern):
85
+ # XXX: need to test that this simple glob rule works for multi-node setup too
86
+ ckpt_files = sorted(glob.glob(os.path.join(checkpoint_dir, glob_pattern)), key=natural_keys)
87
+
88
+ if len(ckpt_files) == 0:
89
+ raise FileNotFoundError(f"can't find {glob_pattern} files in directory '{checkpoint_dir}'")
90
+
91
+ return ckpt_files
92
+
93
+
94
+ def get_optim_files(checkpoint_dir):
95
+ return get_checkpoint_files(checkpoint_dir, "*_optim_states.pt")
96
+
97
+
98
+ def get_model_state_files(checkpoint_dir):
99
+ return get_checkpoint_files(checkpoint_dir, "*_model_states.pt")
100
+
101
+
102
+ def parse_model_states(files):
103
+ zero_model_states = []
104
+ for file in files:
105
+ state_dict = torch.load(file, map_location=device, weights_only=False)
106
+
107
+ if BUFFER_NAMES not in state_dict:
108
+ raise ValueError(f"{file} is not a model state checkpoint")
109
+ buffer_names = state_dict[BUFFER_NAMES]
110
+ if debug:
111
+ print("Found buffers:", buffer_names)
112
+
113
+ # recover just the buffers while restoring them to fp32 if they were saved in fp16
114
+ buffers = {k: v.float() for k, v in state_dict["module"].items() if k in buffer_names}
115
+ param_shapes = state_dict[PARAM_SHAPES]
116
+
117
+ # collect parameters that are included in param_shapes
118
+ param_names = []
119
+ for s in param_shapes:
120
+ for name in s.keys():
121
+ param_names.append(name)
122
+
123
+ # update with frozen parameters
124
+ frozen_param_shapes = state_dict.get(FROZEN_PARAM_SHAPES, None)
125
+ if frozen_param_shapes is not None:
126
+ if debug:
127
+ print(f"Found frozen_param_shapes: {frozen_param_shapes}")
128
+ param_names += list(frozen_param_shapes.keys())
129
+
130
+ # handle shared params
131
+ shared_params = [[k, v] for k, v in state_dict["shared_params"].items()]
132
+
133
+ ds_version = state_dict.get(DS_VERSION, None)
134
+
135
+ frozen_param_fragments = state_dict.get(FROZEN_PARAM_FRAGMENTS, None)
136
+
137
+ z_model_state = zero_model_state(buffers=buffers,
138
+ param_shapes=param_shapes,
139
+ shared_params=shared_params,
140
+ ds_version=ds_version,
141
+ frozen_param_shapes=frozen_param_shapes,
142
+ frozen_param_fragments=frozen_param_fragments)
143
+ zero_model_states.append(z_model_state)
144
+
145
+ return zero_model_states
146
+
147
+
148
+ def parse_optim_states(files, ds_checkpoint_dir):
149
+ total_files = len(files)
150
+ state_dicts = []
151
+ for f in tqdm(files, desc='Loading checkpoint shards'):
152
+ state_dict = torch.load(f, map_location=device, mmap=True, weights_only=False)
153
+ # immediately discard the potentially huge 2 optimizer states as we only care for fp32 master weights
154
+ # and also handle the case where it was already removed by another helper script
155
+ state_dict["optimizer_state_dict"].pop("optimizer_state_dict", None)
156
+ state_dicts.append(state_dict)
157
+
158
+ if ZERO_STAGE not in state_dicts[0][OPTIMIZER_STATE_DICT]:
159
+ raise ValueError(f"{files[0]} is not a zero checkpoint")
160
+ zero_stage = state_dicts[0][OPTIMIZER_STATE_DICT][ZERO_STAGE]
161
+ world_size = state_dicts[0][OPTIMIZER_STATE_DICT][PARTITION_COUNT]
162
+
163
+ # For ZeRO-2 each param group can have different partition_count as data parallelism for expert
164
+ # parameters can be different from data parallelism for non-expert parameters. So we can just
165
+ # use the max of the partition_count to get the dp world_size.
166
+
167
+ if type(world_size) is list:
168
+ world_size = max(world_size)
169
+
170
+ if world_size != total_files:
171
+ raise ValueError(
172
+ f"Expected {world_size} of '*_optim_states.pt' under '{ds_checkpoint_dir}' but found {total_files} files. "
173
+ "Possibly due to an overwrite of an old checkpoint, or a checkpoint didn't get saved by one or more processes."
174
+ )
175
+
176
+ # the groups are named differently in each stage
177
+ if zero_stage <= 2:
178
+ fp32_groups_key = SINGLE_PARTITION_OF_FP32_GROUPS
179
+ elif zero_stage == 3:
180
+ fp32_groups_key = FP32_FLAT_GROUPS
181
+ else:
182
+ raise ValueError(f"unknown zero stage {zero_stage}")
183
+
184
+ fp32_flat_groups = [state_dicts[i][OPTIMIZER_STATE_DICT][fp32_groups_key] for i in range(len(state_dicts))]
185
+ return zero_stage, world_size, fp32_flat_groups
186
+
187
+
188
+ def _get_fp32_state_dict_from_zero_checkpoint(ds_checkpoint_dir, exclude_frozen_parameters):
189
+ """
190
+ Returns fp32 state_dict reconstructed from ds checkpoint
191
+
192
+ Args:
193
+ - ``ds_checkpoint_dir``: path to the deepspeed checkpoint folder (where the optimizer files are)
194
+
195
+ """
196
+ print(f"Processing zero checkpoint '{ds_checkpoint_dir}'")
197
+
198
+ optim_files = get_optim_files(ds_checkpoint_dir)
199
+ zero_stage, world_size, fp32_flat_groups = parse_optim_states(optim_files, ds_checkpoint_dir)
200
+ print(f"Detected checkpoint of type zero stage {zero_stage}, world_size: {world_size}")
201
+
202
+ model_files = get_model_state_files(ds_checkpoint_dir)
203
+
204
+ zero_model_states = parse_model_states(model_files)
205
+ print(f'Parsing checkpoint created by deepspeed=={zero_model_states[0].ds_version}')
206
+
207
+ if zero_stage <= 2:
208
+ return _get_fp32_state_dict_from_zero2_checkpoint(world_size, fp32_flat_groups, zero_model_states,
209
+ exclude_frozen_parameters)
210
+ elif zero_stage == 3:
211
+ return _get_fp32_state_dict_from_zero3_checkpoint(world_size, fp32_flat_groups, zero_model_states,
212
+ exclude_frozen_parameters)
213
+
214
+
215
+ def _zero2_merge_frozen_params(state_dict, zero_model_states):
216
+ if zero_model_states[0].frozen_param_shapes is None or len(zero_model_states[0].frozen_param_shapes) == 0:
217
+ return
218
+
219
+ frozen_param_shapes = zero_model_states[0].frozen_param_shapes
220
+ frozen_param_fragments = zero_model_states[0].frozen_param_fragments
221
+
222
+ if debug:
223
+ num_elem = sum(s.numel() for s in frozen_param_shapes.values())
224
+ print(f'rank 0: {FROZEN_PARAM_SHAPES}.numel = {num_elem}')
225
+
226
+ wanted_params = len(frozen_param_shapes)
227
+ wanted_numel = sum(s.numel() for s in frozen_param_shapes.values())
228
+ avail_numel = sum([p.numel() for p in frozen_param_fragments.values()])
229
+ print(f'Frozen params: Have {avail_numel} numels to process.')
230
+ print(f'Frozen params: Need {wanted_numel} numels in {wanted_params} params')
231
+
232
+ total_params = 0
233
+ total_numel = 0
234
+ for name, shape in frozen_param_shapes.items():
235
+ total_params += 1
236
+ unpartitioned_numel = shape.numel()
237
+ total_numel += unpartitioned_numel
238
+
239
+ state_dict[name] = frozen_param_fragments[name]
240
+
241
+ if debug:
242
+ print(f"{name} full shape: {shape} unpartitioned numel {unpartitioned_numel} ")
243
+
244
+ print(f"Reconstructed Frozen fp32 state dict with {total_params} params {total_numel} elements")
245
+
246
+
247
+ def _has_callable(obj, fn):
248
+ attr = getattr(obj, fn, None)
249
+ return callable(attr)
250
+
251
+
252
+ def _zero2_merge_trainable_params(state_dict, world_size, fp32_flat_groups, zero_model_states):
253
+ param_shapes = zero_model_states[0].param_shapes
254
+
255
+ # Reconstruction protocol:
256
+ #
257
+ # XXX: document this
258
+
259
+ if debug:
260
+ for i in range(world_size):
261
+ for j in range(len(fp32_flat_groups[0])):
262
+ print(f"{FP32_FLAT_GROUPS}[{i}][{j}].shape={fp32_flat_groups[i][j].shape}")
263
+
264
+ # XXX: memory usage doubles here (zero2)
265
+ num_param_groups = len(fp32_flat_groups[0])
266
+ merged_single_partition_of_fp32_groups = []
267
+ for i in range(num_param_groups):
268
+ merged_partitions = [sd[i] for sd in fp32_flat_groups]
269
+ full_single_fp32_vector = torch.cat(merged_partitions, 0)
270
+ merged_single_partition_of_fp32_groups.append(full_single_fp32_vector)
271
+ avail_numel = sum(
272
+ [full_single_fp32_vector.numel() for full_single_fp32_vector in merged_single_partition_of_fp32_groups])
273
+
274
+ if debug:
275
+ wanted_params = sum([len(shapes) for shapes in param_shapes])
276
+ wanted_numel = sum([sum(shape.numel() for shape in shapes.values()) for shapes in param_shapes])
277
+ # not asserting if there is a mismatch due to possible padding
278
+ print(f"Have {avail_numel} numels to process.")
279
+ print(f"Need {wanted_numel} numels in {wanted_params} params.")
280
+
281
+ # params
282
+ # XXX: for huge models that can't fit into the host's RAM we will have to recode this to support
283
+ # out-of-core computing solution
284
+ total_numel = 0
285
+ total_params = 0
286
+ for shapes, full_single_fp32_vector in zip(param_shapes, merged_single_partition_of_fp32_groups):
287
+ offset = 0
288
+ avail_numel = full_single_fp32_vector.numel()
289
+ for name, shape in shapes.items():
290
+
291
+ unpartitioned_numel = shape.numel() if _has_callable(shape, 'numel') else math.prod(shape)
292
+ total_numel += unpartitioned_numel
293
+ total_params += 1
294
+
295
+ if debug:
296
+ print(f"{name} full shape: {shape} unpartitioned numel {unpartitioned_numel} ")
297
+ state_dict[name] = full_single_fp32_vector.narrow(0, offset, unpartitioned_numel).view(shape)
298
+ offset += unpartitioned_numel
299
+
300
+ # Z2 started to align to 2*world_size to improve nccl performance. Therefore both offset and
301
+ # avail_numel can differ by anywhere between 0..2*world_size. Due to two unrelated complex
302
+ # paddings performed in the code it's almost impossible to predict the exact numbers w/o the
303
+ # live optimizer object, so we are checking that the numbers are within the right range
304
+ align_to = 2 * world_size
305
+
306
+ def zero2_align(x):
307
+ return align_to * math.ceil(x / align_to)
308
+
309
+ if debug:
310
+ print(f"original offset={offset}, avail_numel={avail_numel}")
311
+
312
+ offset = zero2_align(offset)
313
+ avail_numel = zero2_align(avail_numel)
314
+
315
+ if debug:
316
+ print(f"aligned offset={offset}, avail_numel={avail_numel}")
317
+
318
+ # Sanity check
319
+ if offset != avail_numel:
320
+ raise ValueError(f"consumed {offset} numels out of {avail_numel} - something is wrong")
321
+
322
+ print(f"Reconstructed fp32 state dict with {total_params} params {total_numel} elements")
323
+
324
+
325
+ def _get_fp32_state_dict_from_zero2_checkpoint(world_size, fp32_flat_groups, zero_model_states,
326
+ exclude_frozen_parameters):
327
+ state_dict = OrderedDict()
328
+
329
+ # buffers
330
+ buffers = zero_model_states[0].buffers
331
+ state_dict.update(buffers)
332
+ if debug:
333
+ print(f"added {len(buffers)} buffers")
334
+
335
+ if not exclude_frozen_parameters:
336
+ _zero2_merge_frozen_params(state_dict, zero_model_states)
337
+
338
+ _zero2_merge_trainable_params(state_dict, world_size, fp32_flat_groups, zero_model_states)
339
+
340
+ # recover shared parameters
341
+ for pair in zero_model_states[0].shared_params:
342
+ if pair[1] in state_dict:
343
+ state_dict[pair[0]] = state_dict[pair[1]]
344
+
345
+ return state_dict
346
+
347
+
348
+ def zero3_partitioned_param_info(unpartitioned_numel, world_size):
349
+ remainder = unpartitioned_numel % world_size
350
+ padding_numel = (world_size - remainder) if remainder else 0
351
+ partitioned_numel = math.ceil(unpartitioned_numel / world_size)
352
+ return partitioned_numel, padding_numel
353
+
354
+
355
+ def _zero3_merge_frozen_params(state_dict, world_size, zero_model_states):
356
+ if zero_model_states[0].frozen_param_shapes is None or len(zero_model_states[0].frozen_param_shapes) == 0:
357
+ return
358
+
359
+ if debug:
360
+ for i in range(world_size):
361
+ num_elem = sum(s.numel() for s in zero_model_states[i].frozen_param_fragments.values())
362
+ print(f'rank {i}: {FROZEN_PARAM_SHAPES}.numel = {num_elem}')
363
+
364
+ frozen_param_shapes = zero_model_states[0].frozen_param_shapes
365
+ wanted_params = len(frozen_param_shapes)
366
+ wanted_numel = sum(s.numel() for s in frozen_param_shapes.values())
367
+ avail_numel = sum([p.numel() for p in zero_model_states[0].frozen_param_fragments.values()]) * world_size
368
+ print(f'Frozen params: Have {avail_numel} numels to process.')
369
+ print(f'Frozen params: Need {wanted_numel} numels in {wanted_params} params')
370
+
371
+ total_params = 0
372
+ total_numel = 0
373
+ for name, shape in zero_model_states[0].frozen_param_shapes.items():
374
+ total_params += 1
375
+ unpartitioned_numel = shape.numel()
376
+ total_numel += unpartitioned_numel
377
+
378
+ param_frags = tuple(model_state.frozen_param_fragments[name] for model_state in zero_model_states)
379
+ state_dict[name] = torch.cat(param_frags, 0).narrow(0, 0, unpartitioned_numel).view(shape)
380
+
381
+ partitioned_numel, partitioned_padding_numel = zero3_partitioned_param_info(unpartitioned_numel, world_size)
382
+
383
+ if debug:
384
+ print(
385
+ f"Frozen params: {total_params} {name} full shape: {shape} partition0 numel={partitioned_numel} partitioned_padding_numel={partitioned_padding_numel}"
386
+ )
387
+
388
+ print(f"Reconstructed Frozen fp32 state dict with {total_params} params {total_numel} elements")
389
+
390
+
391
+ class GatheredTensor:
392
+ """
393
+ A pseudo tensor that collects partitioned weights.
394
+ It is more memory efficient when there are multiple groups.
395
+ """
396
+
397
+ def __init__(self, flat_groups, flat_groups_offset, offset, partitioned_numel, shape):
398
+ self.flat_groups = flat_groups
399
+ self.flat_groups_offset = flat_groups_offset
400
+ self.offset = offset
401
+ self.partitioned_numel = partitioned_numel
402
+ self.shape = shape
403
+ self.dtype = self.flat_groups[0][0].dtype
404
+
405
+ def contiguous(self):
406
+ """
407
+ Merge partitioned weights from flat_groups into a single tensor.
408
+ """
409
+ end_idx = self.offset + self.partitioned_numel
410
+ world_size = len(self.flat_groups)
411
+ pad_flat_param_chunks = []
412
+
413
+ for rank_i in range(world_size):
414
+ # for each rank, we need to collect weights from related group/groups
415
+ flat_groups_at_rank_i = self.flat_groups[rank_i]
416
+ start_group_id = None
417
+ end_group_id = None
418
+ for group_id in range(len(self.flat_groups_offset)):
419
+ if self.flat_groups_offset[group_id] <= self.offset < self.flat_groups_offset[group_id + 1]:
420
+ start_group_id = group_id
421
+ if self.flat_groups_offset[group_id] < end_idx <= self.flat_groups_offset[group_id + 1]:
422
+ end_group_id = group_id
423
+ break
424
+ # collect weights from related group/groups
425
+ for group_id in range(start_group_id, end_group_id + 1):
426
+ flat_tensor = flat_groups_at_rank_i[group_id]
427
+ start_offset = self.offset - self.flat_groups_offset[group_id]
428
+ end_offset = min(end_idx, self.flat_groups_offset[group_id + 1]) - self.flat_groups_offset[group_id]
429
+ pad_flat_param_chunks.append(flat_tensor[start_offset:end_offset])
430
+
431
+ # collect weights from all ranks
432
+ pad_flat_param = torch.cat(pad_flat_param_chunks, dim=0)
433
+ param = pad_flat_param[:self.shape.numel()].view(self.shape).contiguous()
434
+ return param
435
+
436
+
437
+ def _zero3_merge_trainable_params(state_dict, world_size, fp32_flat_groups, zero_model_states):
438
+ param_shapes = zero_model_states[0].param_shapes
439
+ avail_numel = sum([flat_group.numel() for flat_group in fp32_flat_groups[0]]) * world_size
440
+
441
+ # Reconstruction protocol: For zero3 we need to zip the partitions together at boundary of each
442
+ # param, re-consolidating each param, while dealing with padding if any
443
+
444
+ # merge list of dicts, preserving order
445
+ param_shapes = {k: v for d in param_shapes for k, v in d.items()}
446
+
447
+ if debug:
448
+ for i in range(world_size):
449
+ print(f"{FP32_FLAT_GROUPS}[{i}].shape={fp32_flat_groups[i].shape}")
450
+
451
+ wanted_params = len(param_shapes)
452
+ wanted_numel = sum(shape.numel() for shape in param_shapes.values())
453
+ # not asserting if there is a mismatch due to possible padding
454
+ avail_numel = fp32_flat_groups[0].numel() * world_size
455
+ print(f"Trainable params: Have {avail_numel} numels to process.")
456
+ print(f"Trainable params: Need {wanted_numel} numels in {wanted_params} params.")
457
+
458
+ # params
459
+ # XXX: for huge models that can't fit into the host's RAM we will have to recode this to support
460
+ # out-of-core computing solution
461
+ offset = 0
462
+ total_numel = 0
463
+ total_params = 0
464
+ flat_groups_offset = [0] + list(np.cumsum([flat_tensor.numel() for flat_tensor in fp32_flat_groups[0]]))
465
+ for name, shape in tqdm(param_shapes.items(), desc='Gathering sharded weights'):
466
+ unpartitioned_numel = shape.numel()
467
+ total_numel += unpartitioned_numel
468
+ total_params += 1
469
+ partitioned_numel, partitioned_padding_numel = zero3_partitioned_param_info(unpartitioned_numel, world_size)
470
+
471
+ if debug:
472
+ print(
473
+ f"Trainable params: {total_params} {name} full shape: {shape} partition0 numel={partitioned_numel} partitioned_padding_numel={partitioned_padding_numel}"
474
+ )
475
+
476
+ # memory efficient tensor
477
+ tensor = GatheredTensor(fp32_flat_groups, flat_groups_offset, offset, partitioned_numel, shape)
478
+ state_dict[name] = tensor
479
+ offset += partitioned_numel
480
+
481
+ offset *= world_size
482
+
483
+ # Sanity check
484
+ if offset != avail_numel:
485
+ raise ValueError(f"consumed {offset} numels out of {avail_numel} - something is wrong")
486
+
487
+ print(f"Reconstructed Trainable fp32 state dict with {total_params} params {total_numel} elements")
488
+
489
+
490
+ def _get_fp32_state_dict_from_zero3_checkpoint(world_size, fp32_flat_groups, zero_model_states,
491
+ exclude_frozen_parameters):
492
+ state_dict = OrderedDict()
493
+
494
+ # buffers
495
+ buffers = zero_model_states[0].buffers
496
+ state_dict.update(buffers)
497
+ if debug:
498
+ print(f"added {len(buffers)} buffers")
499
+
500
+ if not exclude_frozen_parameters:
501
+ _zero3_merge_frozen_params(state_dict, world_size, zero_model_states)
502
+
503
+ _zero3_merge_trainable_params(state_dict, world_size, fp32_flat_groups, zero_model_states)
504
+
505
+ # recover shared parameters
506
+ for pair in zero_model_states[0].shared_params:
507
+ if pair[1] in state_dict:
508
+ state_dict[pair[0]] = state_dict[pair[1]]
509
+
510
+ return state_dict
511
+
512
+
513
+ def to_torch_tensor(state_dict, return_empty_tensor=False):
514
+ """
515
+ Convert state_dict of GatheredTensor to torch tensor
516
+ """
517
+ torch_state_dict = {}
518
+ converted_tensors = {}
519
+ for name, tensor in state_dict.items():
520
+ tensor_id = id(tensor)
521
+ if tensor_id in converted_tensors: # shared tensors
522
+ shared_tensor = torch_state_dict[converted_tensors[tensor_id]]
523
+ torch_state_dict[name] = shared_tensor
524
+ else:
525
+ converted_tensors[tensor_id] = name
526
+ if return_empty_tensor:
527
+ torch_state_dict[name] = torch.empty(tensor.shape, dtype=tensor.dtype)
528
+ else:
529
+ torch_state_dict[name] = tensor.contiguous()
530
+ return torch_state_dict
531
+
532
+
533
+ def get_fp32_state_dict_from_zero_checkpoint(checkpoint_dir,
534
+ tag=None,
535
+ exclude_frozen_parameters=False,
536
+ lazy_mode=False):
537
+ """
538
+ Convert ZeRO 2 or 3 checkpoint into a single fp32 consolidated state_dict that can be loaded with
539
+ ``load_state_dict()`` and used for training without DeepSpeed or shared with others, for example
540
+ via a model hub.
541
+
542
+ Args:
543
+ - ``checkpoint_dir``: path to the desired checkpoint folder
544
+ - ``tag``: checkpoint tag used as a unique identifier for checkpoint. If not provided will attempt to load tag in 'latest' file. e.g., ``global_step14``
545
+ - ``exclude_frozen_parameters``: exclude frozen parameters
546
+ - ``lazy_mode``: get state_dict in lazy mode. It returns a dict of pesduo tensor instead of torch tensor, which is more memory efficient.
547
+ Convert the pesduo tensor to torch tensor by ``.contiguous()``
548
+
549
+ Returns:
550
+ - pytorch ``state_dict``
551
+
552
+ A typical usage might be ::
553
+
554
+ from deepspeed.utils.zero_to_fp32 import get_fp32_state_dict_from_zero_checkpoint
555
+ # do the training and checkpoint saving
556
+ state_dict = get_fp32_state_dict_from_zero_checkpoint(checkpoint_dir) # already on cpu
557
+ model = model.cpu() # move to cpu
558
+ model.load_state_dict(state_dict)
559
+ # submit to model hub or save the model to share with others
560
+
561
+ In this example the ``model`` will no longer be usable in the deepspeed context of the same
562
+ application. i.e. you will need to re-initialize the deepspeed engine, since
563
+ ``model.load_state_dict(state_dict)`` will remove all the deepspeed magic from it.
564
+
565
+ If you want it all done for you, use ``load_state_dict_from_zero_checkpoint`` instead.
566
+
567
+ Note: the above usage may not work if your application doesn't have sufficient free CPU memory.
568
+ You may need to use the offline approach using the ``zero_to_fp32.py`` script that is saved with
569
+ the checkpoint. Or you can load state_dict in lazy mode ::
570
+
571
+ from deepspeed.utils.zero_to_fp32 import get_fp32_state_dict_from_zero_checkpoint
572
+ state_dict = get_fp32_state_dict_from_zero_checkpoint(checkpoint_dir, lazy_mode=True) # not on cpu
573
+ for name, lazy_tensor in state_dict.item():
574
+ tensor = lazy_tensor.contiguous() # to cpu
575
+ print(name, tensor)
576
+ # del tensor to release memory if it no longer in use
577
+ """
578
+ if tag is None:
579
+ latest_path = os.path.join(checkpoint_dir, 'latest')
580
+ if os.path.isfile(latest_path):
581
+ with open(latest_path, 'r') as fd:
582
+ tag = fd.read().strip()
583
+ else:
584
+ raise ValueError(f"Unable to find 'latest' file at {latest_path}")
585
+
586
+ ds_checkpoint_dir = os.path.join(checkpoint_dir, tag)
587
+
588
+ if not os.path.isdir(ds_checkpoint_dir):
589
+ raise FileNotFoundError(f"Directory '{ds_checkpoint_dir}' doesn't exist")
590
+
591
+ state_dict = _get_fp32_state_dict_from_zero_checkpoint(ds_checkpoint_dir, exclude_frozen_parameters)
592
+ if lazy_mode:
593
+ return state_dict
594
+ else:
595
+ return to_torch_tensor(state_dict)
596
+
597
+
598
+ def convert_zero_checkpoint_to_fp32_state_dict(checkpoint_dir,
599
+ output_dir,
600
+ max_shard_size="5GB",
601
+ safe_serialization=False,
602
+ tag=None,
603
+ exclude_frozen_parameters=False):
604
+ """
605
+ Convert ZeRO 2 or 3 checkpoint into a single fp32 consolidated ``state_dict`` file that can be
606
+ loaded with ``torch.load(file)`` + ``load_state_dict()`` and used for training without DeepSpeed.
607
+
608
+ Args:
609
+ - ``checkpoint_dir``: path to the desired checkpoint folder. (one that contains the tag-folder, like ``global_step14``)
610
+ - ``output_dir``: directory to the pytorch fp32 state_dict output files
611
+ - ``max_shard_size``: the maximum size for a checkpoint before being sharded, default value is 5GB
612
+ - ``safe_serialization``: whether to save the model using `safetensors` or the traditional PyTorch way (that uses `pickle`).
613
+ - ``tag``: checkpoint tag used as a unique identifier for checkpoint. If not provided will attempt to load tag in the file named ``latest`` in the checkpoint folder, e.g., ``global_step14``
614
+ - ``exclude_frozen_parameters``: exclude frozen parameters
615
+ """
616
+
617
+ # Dependency pre-check
618
+ if safe_serialization:
619
+ try:
620
+ from safetensors.torch import save_file
621
+ except ImportError:
622
+ print('If you want to use `safe_serialization`, please `pip install safetensors`')
623
+ raise
624
+ if max_shard_size is not None:
625
+ try:
626
+ from huggingface_hub import split_torch_state_dict_into_shards
627
+ except ImportError:
628
+ print('If you want to use `max_shard_size`, please `pip install huggingface_hub`')
629
+ raise
630
+
631
+ # Convert zero checkpoint to state_dict
632
+ state_dict = get_fp32_state_dict_from_zero_checkpoint(checkpoint_dir,
633
+ tag,
634
+ exclude_frozen_parameters,
635
+ lazy_mode=True)
636
+
637
+ # Shard the model if it is too big.
638
+ weights_name = "model.safetensors" if safe_serialization else "pytorch_model.bin"
639
+ if max_shard_size is not None:
640
+ filename_pattern = weights_name.replace(".bin", "{suffix}.bin").replace(".safetensors", "{suffix}.safetensors")
641
+ # an memory-efficient approach for sharding
642
+ empty_state_dict = to_torch_tensor(state_dict, return_empty_tensor=True)
643
+ state_dict_split = split_torch_state_dict_into_shards(empty_state_dict,
644
+ filename_pattern=filename_pattern,
645
+ max_shard_size=max_shard_size)
646
+ else:
647
+ from collections import namedtuple
648
+ StateDictSplit = namedtuple("StateDictSplit", ["is_sharded", "filename_to_tensors"])
649
+ state_dict_split = StateDictSplit(is_sharded=False,
650
+ filename_to_tensors={weights_name: list(state_dict.keys())})
651
+
652
+ # Save the model by shard
653
+ os.makedirs(output_dir, exist_ok=True)
654
+ filename_to_tensors = state_dict_split.filename_to_tensors.items()
655
+ for shard_file, tensors in tqdm(filename_to_tensors, desc="Saving checkpoint shards"):
656
+ shard_state_dict = {tensor_name: state_dict[tensor_name] for tensor_name in tensors}
657
+ shard_state_dict = to_torch_tensor(shard_state_dict)
658
+ output_path = os.path.join(output_dir, shard_file)
659
+ if safe_serialization:
660
+ save_file(shard_state_dict, output_path, metadata={"format": "pt"})
661
+ else:
662
+ torch.save(shard_state_dict, output_path)
663
+ # release the memory of current shard
664
+ for tensor_name in list(shard_state_dict.keys()):
665
+ del state_dict[tensor_name]
666
+ del shard_state_dict[tensor_name]
667
+ del shard_state_dict
668
+ gc.collect()
669
+
670
+ # Save index if sharded
671
+ if state_dict_split.is_sharded:
672
+ index = {
673
+ "metadata": state_dict_split.metadata,
674
+ "weight_map": state_dict_split.tensor_to_filename,
675
+ }
676
+ save_index_file = "model.safetensors.index.json" if safe_serialization else "pytorch_model.bin.index.json"
677
+ save_index_file = os.path.join(output_dir, save_index_file)
678
+ with open(save_index_file, "w", encoding="utf-8") as f:
679
+ content = json.dumps(index, indent=2, sort_keys=True) + "\n"
680
+ f.write(content)
681
+
682
+
683
+ def load_state_dict_from_zero_checkpoint(model, checkpoint_dir, tag=None):
684
+ """
685
+ 1. Put the provided model to cpu
686
+ 2. Convert ZeRO 2 or 3 checkpoint into a single fp32 consolidated ``state_dict``
687
+ 3. Load it into the provided model
688
+
689
+ Args:
690
+ - ``model``: the model object to update
691
+ - ``checkpoint_dir``: path to the desired checkpoint folder. (one that contains the tag-folder, like ``global_step14``)
692
+ - ``tag``: checkpoint tag used as a unique identifier for checkpoint. If not provided will attempt to load tag in the file named ``latest`` in the checkpoint folder, e.g., ``global_step14``
693
+
694
+ Returns:
695
+ - ``model`: modified model
696
+
697
+ Make sure you have plenty of CPU memory available before you call this function. If you don't
698
+ have enough use the ``zero_to_fp32.py`` utility to do the conversion. You will find it
699
+ conveniently placed for you in the checkpoint folder.
700
+
701
+ A typical usage might be ::
702
+
703
+ from deepspeed.utils.zero_to_fp32 import load_state_dict_from_zero_checkpoint
704
+ model = load_state_dict_from_zero_checkpoint(trainer.model, checkpoint_dir)
705
+ # submit to model hub or save the model to share with others
706
+
707
+ Note, that once this was run, the ``model`` will no longer be usable in the deepspeed context
708
+ of the same application. i.e. you will need to re-initialize the deepspeed engine, since
709
+ ``model.load_state_dict(state_dict)`` will remove all the deepspeed magic from it.
710
+
711
+ """
712
+ logger.info("Extracting fp32 weights")
713
+ state_dict = get_fp32_state_dict_from_zero_checkpoint(checkpoint_dir, tag)
714
+
715
+ logger.info("Overwriting model with fp32 weights")
716
+ model = model.cpu()
717
+ model.load_state_dict(state_dict, strict=False)
718
+
719
+ return model
720
+
721
+
722
+ if __name__ == "__main__":
723
+ parser = argparse.ArgumentParser()
724
+ parser.add_argument("checkpoint_dir",
725
+ type=str,
726
+ help="path to the desired checkpoint folder, e.g., path/checkpoint-12")
727
+ parser.add_argument("output_dir",
728
+ type=str,
729
+ help="directory to the pytorch fp32 state_dict output files"
730
+ "(e.g. path/checkpoint-12-output/)")
731
+ parser.add_argument(
732
+ "--max_shard_size",
733
+ type=str,
734
+ default="5GB",
735
+ help="The maximum size for a checkpoint before being sharded. Checkpoints shard will then be each of size"
736
+ "lower than this size. If expressed as a string, needs to be digits followed by a unit (like `5MB`"
737
+ "We default it to 5GB in order for models to be able to run easily on free-tier google colab instances"
738
+ "without CPU OOM issues.")
739
+ parser.add_argument(
740
+ "--safe_serialization",
741
+ default=False,
742
+ action='store_true',
743
+ help="Whether to save the model using `safetensors` or the traditional PyTorch way (that uses `pickle`).")
744
+ parser.add_argument("-t",
745
+ "--tag",
746
+ type=str,
747
+ default=None,
748
+ help="checkpoint tag used as a unique identifier for checkpoint. e.g., global_step1")
749
+ parser.add_argument("--exclude_frozen_parameters", action='store_true', help="exclude frozen parameters")
750
+ parser.add_argument("-d", "--debug", action='store_true', help="enable debug")
751
+ args = parser.parse_args()
752
+
753
+ debug = args.debug
754
+
755
+ convert_zero_checkpoint_to_fp32_state_dict(args.checkpoint_dir,
756
+ args.output_dir,
757
+ max_shard_size=args.max_shard_size,
758
+ safe_serialization=args.safe_serialization,
759
+ tag=args.tag,
760
+ exclude_frozen_parameters=args.exclude_frozen_parameters)
logs/UNIVLA_SIMPLERENV_BRIDGE_VIDEO_BS128_20k/checkpoint-16000/config.json ADDED
@@ -0,0 +1,61 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ {
2
+ "action_config": {
3
+ "_attn_implementation": "sdpa",
4
+ "action_dim": 7,
5
+ "attention_dropout": 0.0,
6
+ "hidden_act": "silu",
7
+ "hidden_size": 4096,
8
+ "initializer_range": 0.02,
9
+ "intermediate_size": 2048,
10
+ "max_position_embeddings": 5120,
11
+ "num_attention_heads": 32,
12
+ "num_hidden_layers": 2,
13
+ "num_key_value_heads": 8,
14
+ "pad_token_id": 151643,
15
+ "pretraining_tp": 1,
16
+ "rms_norm_eps": 1e-05,
17
+ "rope_scaling": null,
18
+ "rope_theta": 10000.0,
19
+ "tie_word_embeddings": false,
20
+ "use_cache": true,
21
+ "vision_loss_weight": 5.0
22
+ },
23
+ "action_dim": 7,
24
+ "action_experts": false,
25
+ "architectures": [
26
+ "Emu3MoE"
27
+ ],
28
+ "attention_dropout": 0.1,
29
+ "boa_token_id": 151844,
30
+ "boi_token_id": 151852,
31
+ "bos_token_id": 151849,
32
+ "bov_token_id": 151854,
33
+ "eof_token_id": 151847,
34
+ "eoi_token_id": 151853,
35
+ "eol_token_id": 151846,
36
+ "eos_token_id": 151850,
37
+ "eov_token_id": 184621,
38
+ "hidden_act": "silu",
39
+ "hidden_size": 4096,
40
+ "image_area": 262144,
41
+ "img_token_id": 151851,
42
+ "initializer_range": 0.02,
43
+ "intermediate_size": 14336,
44
+ "max_position_embeddings": 2400,
45
+ "model_type": "Emu3",
46
+ "num_attention_heads": 32,
47
+ "num_hidden_layers": 32,
48
+ "num_key_value_heads": 8,
49
+ "pad_token_id": 151643,
50
+ "pretraining_tp": 1,
51
+ "qkv_bias": false,
52
+ "rms_norm_eps": 1e-05,
53
+ "rope_scaling": null,
54
+ "rope_theta": 1000000.0,
55
+ "tie_word_embeddings": false,
56
+ "torch_dtype": "bfloat16",
57
+ "transformers_version": "4.51.0",
58
+ "use_cache": true,
59
+ "vision_loss_weight": 0.5,
60
+ "vocab_size": 184622
61
+ }
logs/UNIVLA_SIMPLERENV_BRIDGE_VIDEO_BS128_20k/checkpoint-16000/emu3.tiktoken ADDED
The diff for this file is too large to render. See raw diff
 
logs/UNIVLA_SIMPLERENV_BRIDGE_VIDEO_BS128_20k/checkpoint-16000/emu3_vision_tokens.txt ADDED
The diff for this file is too large to render. See raw diff
 
logs/UNIVLA_SIMPLERENV_BRIDGE_VIDEO_BS128_20k/checkpoint-16000/model.safetensors.index.json ADDED
@@ -0,0 +1,298 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ {
2
+ "metadata": {
3
+ "total_size": 16984023040
4
+ },
5
+ "weight_map": {
6
+ "lm_head.weight": "model-00004-of-00004.safetensors",
7
+ "model.embed_tokens.weight": "model-00001-of-00004.safetensors",
8
+ "model.layers.0.input_layernorm.weight": "model-00001-of-00004.safetensors",
9
+ "model.layers.0.mlp.down_proj.weight": "model-00001-of-00004.safetensors",
10
+ "model.layers.0.mlp.gate_proj.weight": "model-00001-of-00004.safetensors",
11
+ "model.layers.0.mlp.up_proj.weight": "model-00001-of-00004.safetensors",
12
+ "model.layers.0.post_attention_layernorm.weight": "model-00001-of-00004.safetensors",
13
+ "model.layers.0.self_attn.k_proj.weight": "model-00001-of-00004.safetensors",
14
+ "model.layers.0.self_attn.o_proj.weight": "model-00001-of-00004.safetensors",
15
+ "model.layers.0.self_attn.q_proj.weight": "model-00001-of-00004.safetensors",
16
+ "model.layers.0.self_attn.v_proj.weight": "model-00001-of-00004.safetensors",
17
+ "model.layers.1.input_layernorm.weight": "model-00001-of-00004.safetensors",
18
+ "model.layers.1.mlp.down_proj.weight": "model-00001-of-00004.safetensors",
19
+ "model.layers.1.mlp.gate_proj.weight": "model-00001-of-00004.safetensors",
20
+ "model.layers.1.mlp.up_proj.weight": "model-00001-of-00004.safetensors",
21
+ "model.layers.1.post_attention_layernorm.weight": "model-00001-of-00004.safetensors",
22
+ "model.layers.1.self_attn.k_proj.weight": "model-00001-of-00004.safetensors",
23
+ "model.layers.1.self_attn.o_proj.weight": "model-00001-of-00004.safetensors",
24
+ "model.layers.1.self_attn.q_proj.weight": "model-00001-of-00004.safetensors",
25
+ "model.layers.1.self_attn.v_proj.weight": "model-00001-of-00004.safetensors",
26
+ "model.layers.10.input_layernorm.weight": "model-00002-of-00004.safetensors",
27
+ "model.layers.10.mlp.down_proj.weight": "model-00002-of-00004.safetensors",
28
+ "model.layers.10.mlp.gate_proj.weight": "model-00002-of-00004.safetensors",
29
+ "model.layers.10.mlp.up_proj.weight": "model-00002-of-00004.safetensors",
30
+ "model.layers.10.post_attention_layernorm.weight": "model-00002-of-00004.safetensors",
31
+ "model.layers.10.self_attn.k_proj.weight": "model-00002-of-00004.safetensors",
32
+ "model.layers.10.self_attn.o_proj.weight": "model-00002-of-00004.safetensors",
33
+ "model.layers.10.self_attn.q_proj.weight": "model-00002-of-00004.safetensors",
34
+ "model.layers.10.self_attn.v_proj.weight": "model-00002-of-00004.safetensors",
35
+ "model.layers.11.input_layernorm.weight": "model-00002-of-00004.safetensors",
36
+ "model.layers.11.mlp.down_proj.weight": "model-00002-of-00004.safetensors",
37
+ "model.layers.11.mlp.gate_proj.weight": "model-00002-of-00004.safetensors",
38
+ "model.layers.11.mlp.up_proj.weight": "model-00002-of-00004.safetensors",
39
+ "model.layers.11.post_attention_layernorm.weight": "model-00002-of-00004.safetensors",
40
+ "model.layers.11.self_attn.k_proj.weight": "model-00002-of-00004.safetensors",
41
+ "model.layers.11.self_attn.o_proj.weight": "model-00002-of-00004.safetensors",
42
+ "model.layers.11.self_attn.q_proj.weight": "model-00002-of-00004.safetensors",
43
+ "model.layers.11.self_attn.v_proj.weight": "model-00002-of-00004.safetensors",
44
+ "model.layers.12.input_layernorm.weight": "model-00002-of-00004.safetensors",
45
+ "model.layers.12.mlp.down_proj.weight": "model-00002-of-00004.safetensors",
46
+ "model.layers.12.mlp.gate_proj.weight": "model-00002-of-00004.safetensors",
47
+ "model.layers.12.mlp.up_proj.weight": "model-00002-of-00004.safetensors",
48
+ "model.layers.12.post_attention_layernorm.weight": "model-00002-of-00004.safetensors",
49
+ "model.layers.12.self_attn.k_proj.weight": "model-00002-of-00004.safetensors",
50
+ "model.layers.12.self_attn.o_proj.weight": "model-00002-of-00004.safetensors",
51
+ "model.layers.12.self_attn.q_proj.weight": "model-00002-of-00004.safetensors",
52
+ "model.layers.12.self_attn.v_proj.weight": "model-00002-of-00004.safetensors",
53
+ "model.layers.13.input_layernorm.weight": "model-00002-of-00004.safetensors",
54
+ "model.layers.13.mlp.down_proj.weight": "model-00002-of-00004.safetensors",
55
+ "model.layers.13.mlp.gate_proj.weight": "model-00002-of-00004.safetensors",
56
+ "model.layers.13.mlp.up_proj.weight": "model-00002-of-00004.safetensors",
57
+ "model.layers.13.post_attention_layernorm.weight": "model-00002-of-00004.safetensors",
58
+ "model.layers.13.self_attn.k_proj.weight": "model-00002-of-00004.safetensors",
59
+ "model.layers.13.self_attn.o_proj.weight": "model-00002-of-00004.safetensors",
60
+ "model.layers.13.self_attn.q_proj.weight": "model-00002-of-00004.safetensors",
61
+ "model.layers.13.self_attn.v_proj.weight": "model-00002-of-00004.safetensors",
62
+ "model.layers.14.input_layernorm.weight": "model-00002-of-00004.safetensors",
63
+ "model.layers.14.mlp.down_proj.weight": "model-00002-of-00004.safetensors",
64
+ "model.layers.14.mlp.gate_proj.weight": "model-00002-of-00004.safetensors",
65
+ "model.layers.14.mlp.up_proj.weight": "model-00002-of-00004.safetensors",
66
+ "model.layers.14.post_attention_layernorm.weight": "model-00002-of-00004.safetensors",
67
+ "model.layers.14.self_attn.k_proj.weight": "model-00002-of-00004.safetensors",
68
+ "model.layers.14.self_attn.o_proj.weight": "model-00002-of-00004.safetensors",
69
+ "model.layers.14.self_attn.q_proj.weight": "model-00002-of-00004.safetensors",
70
+ "model.layers.14.self_attn.v_proj.weight": "model-00002-of-00004.safetensors",
71
+ "model.layers.15.input_layernorm.weight": "model-00002-of-00004.safetensors",
72
+ "model.layers.15.mlp.down_proj.weight": "model-00002-of-00004.safetensors",
73
+ "model.layers.15.mlp.gate_proj.weight": "model-00002-of-00004.safetensors",
74
+ "model.layers.15.mlp.up_proj.weight": "model-00002-of-00004.safetensors",
75
+ "model.layers.15.post_attention_layernorm.weight": "model-00002-of-00004.safetensors",
76
+ "model.layers.15.self_attn.k_proj.weight": "model-00002-of-00004.safetensors",
77
+ "model.layers.15.self_attn.o_proj.weight": "model-00002-of-00004.safetensors",
78
+ "model.layers.15.self_attn.q_proj.weight": "model-00002-of-00004.safetensors",
79
+ "model.layers.15.self_attn.v_proj.weight": "model-00002-of-00004.safetensors",
80
+ "model.layers.16.input_layernorm.weight": "model-00002-of-00004.safetensors",
81
+ "model.layers.16.mlp.down_proj.weight": "model-00002-of-00004.safetensors",
82
+ "model.layers.16.mlp.gate_proj.weight": "model-00002-of-00004.safetensors",
83
+ "model.layers.16.mlp.up_proj.weight": "model-00002-of-00004.safetensors",
84
+ "model.layers.16.post_attention_layernorm.weight": "model-00002-of-00004.safetensors",
85
+ "model.layers.16.self_attn.k_proj.weight": "model-00002-of-00004.safetensors",
86
+ "model.layers.16.self_attn.o_proj.weight": "model-00002-of-00004.safetensors",
87
+ "model.layers.16.self_attn.q_proj.weight": "model-00002-of-00004.safetensors",
88
+ "model.layers.16.self_attn.v_proj.weight": "model-00002-of-00004.safetensors",
89
+ "model.layers.17.input_layernorm.weight": "model-00002-of-00004.safetensors",
90
+ "model.layers.17.mlp.down_proj.weight": "model-00002-of-00004.safetensors",
91
+ "model.layers.17.mlp.gate_proj.weight": "model-00002-of-00004.safetensors",
92
+ "model.layers.17.mlp.up_proj.weight": "model-00002-of-00004.safetensors",
93
+ "model.layers.17.post_attention_layernorm.weight": "model-00002-of-00004.safetensors",
94
+ "model.layers.17.self_attn.k_proj.weight": "model-00002-of-00004.safetensors",
95
+ "model.layers.17.self_attn.o_proj.weight": "model-00002-of-00004.safetensors",
96
+ "model.layers.17.self_attn.q_proj.weight": "model-00002-of-00004.safetensors",
97
+ "model.layers.17.self_attn.v_proj.weight": "model-00002-of-00004.safetensors",
98
+ "model.layers.18.input_layernorm.weight": "model-00002-of-00004.safetensors",
99
+ "model.layers.18.mlp.down_proj.weight": "model-00002-of-00004.safetensors",
100
+ "model.layers.18.mlp.gate_proj.weight": "model-00002-of-00004.safetensors",
101
+ "model.layers.18.mlp.up_proj.weight": "model-00002-of-00004.safetensors",
102
+ "model.layers.18.post_attention_layernorm.weight": "model-00002-of-00004.safetensors",
103
+ "model.layers.18.self_attn.k_proj.weight": "model-00002-of-00004.safetensors",
104
+ "model.layers.18.self_attn.o_proj.weight": "model-00002-of-00004.safetensors",
105
+ "model.layers.18.self_attn.q_proj.weight": "model-00002-of-00004.safetensors",
106
+ "model.layers.18.self_attn.v_proj.weight": "model-00002-of-00004.safetensors",
107
+ "model.layers.19.input_layernorm.weight": "model-00003-of-00004.safetensors",
108
+ "model.layers.19.mlp.down_proj.weight": "model-00003-of-00004.safetensors",
109
+ "model.layers.19.mlp.gate_proj.weight": "model-00003-of-00004.safetensors",
110
+ "model.layers.19.mlp.up_proj.weight": "model-00003-of-00004.safetensors",
111
+ "model.layers.19.post_attention_layernorm.weight": "model-00003-of-00004.safetensors",
112
+ "model.layers.19.self_attn.k_proj.weight": "model-00002-of-00004.safetensors",
113
+ "model.layers.19.self_attn.o_proj.weight": "model-00002-of-00004.safetensors",
114
+ "model.layers.19.self_attn.q_proj.weight": "model-00002-of-00004.safetensors",
115
+ "model.layers.19.self_attn.v_proj.weight": "model-00002-of-00004.safetensors",
116
+ "model.layers.2.input_layernorm.weight": "model-00001-of-00004.safetensors",
117
+ "model.layers.2.mlp.down_proj.weight": "model-00001-of-00004.safetensors",
118
+ "model.layers.2.mlp.gate_proj.weight": "model-00001-of-00004.safetensors",
119
+ "model.layers.2.mlp.up_proj.weight": "model-00001-of-00004.safetensors",
120
+ "model.layers.2.post_attention_layernorm.weight": "model-00001-of-00004.safetensors",
121
+ "model.layers.2.self_attn.k_proj.weight": "model-00001-of-00004.safetensors",
122
+ "model.layers.2.self_attn.o_proj.weight": "model-00001-of-00004.safetensors",
123
+ "model.layers.2.self_attn.q_proj.weight": "model-00001-of-00004.safetensors",
124
+ "model.layers.2.self_attn.v_proj.weight": "model-00001-of-00004.safetensors",
125
+ "model.layers.20.input_layernorm.weight": "model-00003-of-00004.safetensors",
126
+ "model.layers.20.mlp.down_proj.weight": "model-00003-of-00004.safetensors",
127
+ "model.layers.20.mlp.gate_proj.weight": "model-00003-of-00004.safetensors",
128
+ "model.layers.20.mlp.up_proj.weight": "model-00003-of-00004.safetensors",
129
+ "model.layers.20.post_attention_layernorm.weight": "model-00003-of-00004.safetensors",
130
+ "model.layers.20.self_attn.k_proj.weight": "model-00003-of-00004.safetensors",
131
+ "model.layers.20.self_attn.o_proj.weight": "model-00003-of-00004.safetensors",
132
+ "model.layers.20.self_attn.q_proj.weight": "model-00003-of-00004.safetensors",
133
+ "model.layers.20.self_attn.v_proj.weight": "model-00003-of-00004.safetensors",
134
+ "model.layers.21.input_layernorm.weight": "model-00003-of-00004.safetensors",
135
+ "model.layers.21.mlp.down_proj.weight": "model-00003-of-00004.safetensors",
136
+ "model.layers.21.mlp.gate_proj.weight": "model-00003-of-00004.safetensors",
137
+ "model.layers.21.mlp.up_proj.weight": "model-00003-of-00004.safetensors",
138
+ "model.layers.21.post_attention_layernorm.weight": "model-00003-of-00004.safetensors",
139
+ "model.layers.21.self_attn.k_proj.weight": "model-00003-of-00004.safetensors",
140
+ "model.layers.21.self_attn.o_proj.weight": "model-00003-of-00004.safetensors",
141
+ "model.layers.21.self_attn.q_proj.weight": "model-00003-of-00004.safetensors",
142
+ "model.layers.21.self_attn.v_proj.weight": "model-00003-of-00004.safetensors",
143
+ "model.layers.22.input_layernorm.weight": "model-00003-of-00004.safetensors",
144
+ "model.layers.22.mlp.down_proj.weight": "model-00003-of-00004.safetensors",
145
+ "model.layers.22.mlp.gate_proj.weight": "model-00003-of-00004.safetensors",
146
+ "model.layers.22.mlp.up_proj.weight": "model-00003-of-00004.safetensors",
147
+ "model.layers.22.post_attention_layernorm.weight": "model-00003-of-00004.safetensors",
148
+ "model.layers.22.self_attn.k_proj.weight": "model-00003-of-00004.safetensors",
149
+ "model.layers.22.self_attn.o_proj.weight": "model-00003-of-00004.safetensors",
150
+ "model.layers.22.self_attn.q_proj.weight": "model-00003-of-00004.safetensors",
151
+ "model.layers.22.self_attn.v_proj.weight": "model-00003-of-00004.safetensors",
152
+ "model.layers.23.input_layernorm.weight": "model-00003-of-00004.safetensors",
153
+ "model.layers.23.mlp.down_proj.weight": "model-00003-of-00004.safetensors",
154
+ "model.layers.23.mlp.gate_proj.weight": "model-00003-of-00004.safetensors",
155
+ "model.layers.23.mlp.up_proj.weight": "model-00003-of-00004.safetensors",
156
+ "model.layers.23.post_attention_layernorm.weight": "model-00003-of-00004.safetensors",
157
+ "model.layers.23.self_attn.k_proj.weight": "model-00003-of-00004.safetensors",
158
+ "model.layers.23.self_attn.o_proj.weight": "model-00003-of-00004.safetensors",
159
+ "model.layers.23.self_attn.q_proj.weight": "model-00003-of-00004.safetensors",
160
+ "model.layers.23.self_attn.v_proj.weight": "model-00003-of-00004.safetensors",
161
+ "model.layers.24.input_layernorm.weight": "model-00003-of-00004.safetensors",
162
+ "model.layers.24.mlp.down_proj.weight": "model-00003-of-00004.safetensors",
163
+ "model.layers.24.mlp.gate_proj.weight": "model-00003-of-00004.safetensors",
164
+ "model.layers.24.mlp.up_proj.weight": "model-00003-of-00004.safetensors",
165
+ "model.layers.24.post_attention_layernorm.weight": "model-00003-of-00004.safetensors",
166
+ "model.layers.24.self_attn.k_proj.weight": "model-00003-of-00004.safetensors",
167
+ "model.layers.24.self_attn.o_proj.weight": "model-00003-of-00004.safetensors",
168
+ "model.layers.24.self_attn.q_proj.weight": "model-00003-of-00004.safetensors",
169
+ "model.layers.24.self_attn.v_proj.weight": "model-00003-of-00004.safetensors",
170
+ "model.layers.25.input_layernorm.weight": "model-00003-of-00004.safetensors",
171
+ "model.layers.25.mlp.down_proj.weight": "model-00003-of-00004.safetensors",
172
+ "model.layers.25.mlp.gate_proj.weight": "model-00003-of-00004.safetensors",
173
+ "model.layers.25.mlp.up_proj.weight": "model-00003-of-00004.safetensors",
174
+ "model.layers.25.post_attention_layernorm.weight": "model-00003-of-00004.safetensors",
175
+ "model.layers.25.self_attn.k_proj.weight": "model-00003-of-00004.safetensors",
176
+ "model.layers.25.self_attn.o_proj.weight": "model-00003-of-00004.safetensors",
177
+ "model.layers.25.self_attn.q_proj.weight": "model-00003-of-00004.safetensors",
178
+ "model.layers.25.self_attn.v_proj.weight": "model-00003-of-00004.safetensors",
179
+ "model.layers.26.input_layernorm.weight": "model-00003-of-00004.safetensors",
180
+ "model.layers.26.mlp.down_proj.weight": "model-00003-of-00004.safetensors",
181
+ "model.layers.26.mlp.gate_proj.weight": "model-00003-of-00004.safetensors",
182
+ "model.layers.26.mlp.up_proj.weight": "model-00003-of-00004.safetensors",
183
+ "model.layers.26.post_attention_layernorm.weight": "model-00003-of-00004.safetensors",
184
+ "model.layers.26.self_attn.k_proj.weight": "model-00003-of-00004.safetensors",
185
+ "model.layers.26.self_attn.o_proj.weight": "model-00003-of-00004.safetensors",
186
+ "model.layers.26.self_attn.q_proj.weight": "model-00003-of-00004.safetensors",
187
+ "model.layers.26.self_attn.v_proj.weight": "model-00003-of-00004.safetensors",
188
+ "model.layers.27.input_layernorm.weight": "model-00003-of-00004.safetensors",
189
+ "model.layers.27.mlp.down_proj.weight": "model-00003-of-00004.safetensors",
190
+ "model.layers.27.mlp.gate_proj.weight": "model-00003-of-00004.safetensors",
191
+ "model.layers.27.mlp.up_proj.weight": "model-00003-of-00004.safetensors",
192
+ "model.layers.27.post_attention_layernorm.weight": "model-00003-of-00004.safetensors",
193
+ "model.layers.27.self_attn.k_proj.weight": "model-00003-of-00004.safetensors",
194
+ "model.layers.27.self_attn.o_proj.weight": "model-00003-of-00004.safetensors",
195
+ "model.layers.27.self_attn.q_proj.weight": "model-00003-of-00004.safetensors",
196
+ "model.layers.27.self_attn.v_proj.weight": "model-00003-of-00004.safetensors",
197
+ "model.layers.28.input_layernorm.weight": "model-00003-of-00004.safetensors",
198
+ "model.layers.28.mlp.down_proj.weight": "model-00003-of-00004.safetensors",
199
+ "model.layers.28.mlp.gate_proj.weight": "model-00003-of-00004.safetensors",
200
+ "model.layers.28.mlp.up_proj.weight": "model-00003-of-00004.safetensors",
201
+ "model.layers.28.post_attention_layernorm.weight": "model-00003-of-00004.safetensors",
202
+ "model.layers.28.self_attn.k_proj.weight": "model-00003-of-00004.safetensors",
203
+ "model.layers.28.self_attn.o_proj.weight": "model-00003-of-00004.safetensors",
204
+ "model.layers.28.self_attn.q_proj.weight": "model-00003-of-00004.safetensors",
205
+ "model.layers.28.self_attn.v_proj.weight": "model-00003-of-00004.safetensors",
206
+ "model.layers.29.input_layernorm.weight": "model-00003-of-00004.safetensors",
207
+ "model.layers.29.mlp.down_proj.weight": "model-00003-of-00004.safetensors",
208
+ "model.layers.29.mlp.gate_proj.weight": "model-00003-of-00004.safetensors",
209
+ "model.layers.29.mlp.up_proj.weight": "model-00003-of-00004.safetensors",
210
+ "model.layers.29.post_attention_layernorm.weight": "model-00003-of-00004.safetensors",
211
+ "model.layers.29.self_attn.k_proj.weight": "model-00003-of-00004.safetensors",
212
+ "model.layers.29.self_attn.o_proj.weight": "model-00003-of-00004.safetensors",
213
+ "model.layers.29.self_attn.q_proj.weight": "model-00003-of-00004.safetensors",
214
+ "model.layers.29.self_attn.v_proj.weight": "model-00003-of-00004.safetensors",
215
+ "model.layers.3.input_layernorm.weight": "model-00001-of-00004.safetensors",
216
+ "model.layers.3.mlp.down_proj.weight": "model-00001-of-00004.safetensors",
217
+ "model.layers.3.mlp.gate_proj.weight": "model-00001-of-00004.safetensors",
218
+ "model.layers.3.mlp.up_proj.weight": "model-00001-of-00004.safetensors",
219
+ "model.layers.3.post_attention_layernorm.weight": "model-00001-of-00004.safetensors",
220
+ "model.layers.3.self_attn.k_proj.weight": "model-00001-of-00004.safetensors",
221
+ "model.layers.3.self_attn.o_proj.weight": "model-00001-of-00004.safetensors",
222
+ "model.layers.3.self_attn.q_proj.weight": "model-00001-of-00004.safetensors",
223
+ "model.layers.3.self_attn.v_proj.weight": "model-00001-of-00004.safetensors",
224
+ "model.layers.30.input_layernorm.weight": "model-00004-of-00004.safetensors",
225
+ "model.layers.30.mlp.down_proj.weight": "model-00004-of-00004.safetensors",
226
+ "model.layers.30.mlp.gate_proj.weight": "model-00003-of-00004.safetensors",
227
+ "model.layers.30.mlp.up_proj.weight": "model-00004-of-00004.safetensors",
228
+ "model.layers.30.post_attention_layernorm.weight": "model-00004-of-00004.safetensors",
229
+ "model.layers.30.self_attn.k_proj.weight": "model-00003-of-00004.safetensors",
230
+ "model.layers.30.self_attn.o_proj.weight": "model-00003-of-00004.safetensors",
231
+ "model.layers.30.self_attn.q_proj.weight": "model-00003-of-00004.safetensors",
232
+ "model.layers.30.self_attn.v_proj.weight": "model-00003-of-00004.safetensors",
233
+ "model.layers.31.input_layernorm.weight": "model-00004-of-00004.safetensors",
234
+ "model.layers.31.mlp.down_proj.weight": "model-00004-of-00004.safetensors",
235
+ "model.layers.31.mlp.gate_proj.weight": "model-00004-of-00004.safetensors",
236
+ "model.layers.31.mlp.up_proj.weight": "model-00004-of-00004.safetensors",
237
+ "model.layers.31.post_attention_layernorm.weight": "model-00004-of-00004.safetensors",
238
+ "model.layers.31.self_attn.k_proj.weight": "model-00004-of-00004.safetensors",
239
+ "model.layers.31.self_attn.o_proj.weight": "model-00004-of-00004.safetensors",
240
+ "model.layers.31.self_attn.q_proj.weight": "model-00004-of-00004.safetensors",
241
+ "model.layers.31.self_attn.v_proj.weight": "model-00004-of-00004.safetensors",
242
+ "model.layers.4.input_layernorm.weight": "model-00001-of-00004.safetensors",
243
+ "model.layers.4.mlp.down_proj.weight": "model-00001-of-00004.safetensors",
244
+ "model.layers.4.mlp.gate_proj.weight": "model-00001-of-00004.safetensors",
245
+ "model.layers.4.mlp.up_proj.weight": "model-00001-of-00004.safetensors",
246
+ "model.layers.4.post_attention_layernorm.weight": "model-00001-of-00004.safetensors",
247
+ "model.layers.4.self_attn.k_proj.weight": "model-00001-of-00004.safetensors",
248
+ "model.layers.4.self_attn.o_proj.weight": "model-00001-of-00004.safetensors",
249
+ "model.layers.4.self_attn.q_proj.weight": "model-00001-of-00004.safetensors",
250
+ "model.layers.4.self_attn.v_proj.weight": "model-00001-of-00004.safetensors",
251
+ "model.layers.5.input_layernorm.weight": "model-00001-of-00004.safetensors",
252
+ "model.layers.5.mlp.down_proj.weight": "model-00001-of-00004.safetensors",
253
+ "model.layers.5.mlp.gate_proj.weight": "model-00001-of-00004.safetensors",
254
+ "model.layers.5.mlp.up_proj.weight": "model-00001-of-00004.safetensors",
255
+ "model.layers.5.post_attention_layernorm.weight": "model-00001-of-00004.safetensors",
256
+ "model.layers.5.self_attn.k_proj.weight": "model-00001-of-00004.safetensors",
257
+ "model.layers.5.self_attn.o_proj.weight": "model-00001-of-00004.safetensors",
258
+ "model.layers.5.self_attn.q_proj.weight": "model-00001-of-00004.safetensors",
259
+ "model.layers.5.self_attn.v_proj.weight": "model-00001-of-00004.safetensors",
260
+ "model.layers.6.input_layernorm.weight": "model-00001-of-00004.safetensors",
261
+ "model.layers.6.mlp.down_proj.weight": "model-00001-of-00004.safetensors",
262
+ "model.layers.6.mlp.gate_proj.weight": "model-00001-of-00004.safetensors",
263
+ "model.layers.6.mlp.up_proj.weight": "model-00001-of-00004.safetensors",
264
+ "model.layers.6.post_attention_layernorm.weight": "model-00001-of-00004.safetensors",
265
+ "model.layers.6.self_attn.k_proj.weight": "model-00001-of-00004.safetensors",
266
+ "model.layers.6.self_attn.o_proj.weight": "model-00001-of-00004.safetensors",
267
+ "model.layers.6.self_attn.q_proj.weight": "model-00001-of-00004.safetensors",
268
+ "model.layers.6.self_attn.v_proj.weight": "model-00001-of-00004.safetensors",
269
+ "model.layers.7.input_layernorm.weight": "model-00002-of-00004.safetensors",
270
+ "model.layers.7.mlp.down_proj.weight": "model-00002-of-00004.safetensors",
271
+ "model.layers.7.mlp.gate_proj.weight": "model-00001-of-00004.safetensors",
272
+ "model.layers.7.mlp.up_proj.weight": "model-00001-of-00004.safetensors",
273
+ "model.layers.7.post_attention_layernorm.weight": "model-00002-of-00004.safetensors",
274
+ "model.layers.7.self_attn.k_proj.weight": "model-00001-of-00004.safetensors",
275
+ "model.layers.7.self_attn.o_proj.weight": "model-00001-of-00004.safetensors",
276
+ "model.layers.7.self_attn.q_proj.weight": "model-00001-of-00004.safetensors",
277
+ "model.layers.7.self_attn.v_proj.weight": "model-00001-of-00004.safetensors",
278
+ "model.layers.8.input_layernorm.weight": "model-00002-of-00004.safetensors",
279
+ "model.layers.8.mlp.down_proj.weight": "model-00002-of-00004.safetensors",
280
+ "model.layers.8.mlp.gate_proj.weight": "model-00002-of-00004.safetensors",
281
+ "model.layers.8.mlp.up_proj.weight": "model-00002-of-00004.safetensors",
282
+ "model.layers.8.post_attention_layernorm.weight": "model-00002-of-00004.safetensors",
283
+ "model.layers.8.self_attn.k_proj.weight": "model-00002-of-00004.safetensors",
284
+ "model.layers.8.self_attn.o_proj.weight": "model-00002-of-00004.safetensors",
285
+ "model.layers.8.self_attn.q_proj.weight": "model-00002-of-00004.safetensors",
286
+ "model.layers.8.self_attn.v_proj.weight": "model-00002-of-00004.safetensors",
287
+ "model.layers.9.input_layernorm.weight": "model-00002-of-00004.safetensors",
288
+ "model.layers.9.mlp.down_proj.weight": "model-00002-of-00004.safetensors",
289
+ "model.layers.9.mlp.gate_proj.weight": "model-00002-of-00004.safetensors",
290
+ "model.layers.9.mlp.up_proj.weight": "model-00002-of-00004.safetensors",
291
+ "model.layers.9.post_attention_layernorm.weight": "model-00002-of-00004.safetensors",
292
+ "model.layers.9.self_attn.k_proj.weight": "model-00002-of-00004.safetensors",
293
+ "model.layers.9.self_attn.o_proj.weight": "model-00002-of-00004.safetensors",
294
+ "model.layers.9.self_attn.q_proj.weight": "model-00002-of-00004.safetensors",
295
+ "model.layers.9.self_attn.v_proj.weight": "model-00002-of-00004.safetensors",
296
+ "model.norm.weight": "model-00004-of-00004.safetensors"
297
+ }
298
+ }
logs/UNIVLA_SIMPLERENV_BRIDGE_VIDEO_BS128_20k/checkpoint-16000/special_tokens_map.json ADDED
@@ -0,0 +1,5 @@
 
 
 
 
 
 
1
+ {
2
+ "bos_token": "<|extra_203|>",
3
+ "eos_token": "<|extra_204|>",
4
+ "pad_token": "<|endoftext|>"
5
+ }
logs/UNIVLA_SIMPLERENV_BRIDGE_VIDEO_BS128_20k/checkpoint-16000/tokenizer_config.json ADDED
@@ -0,0 +1,18 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ {
2
+ "added_tokens_decoder": {},
3
+ "auto_map": {
4
+ "AutoTokenizer": [
5
+ "tokenization_emu3.Emu3Tokenizer",
6
+ null
7
+ ]
8
+ },
9
+ "bos_token": "<|extra_203|>",
10
+ "clean_up_tokenization_spaces": true,
11
+ "eos_token": "<|extra_204|>",
12
+ "extra_special_tokens": {},
13
+ "model_max_length": 2400,
14
+ "pad_token": "<|endoftext|>",
15
+ "padding_side": "right",
16
+ "tokenizer_class": "Emu3Tokenizer",
17
+ "use_fast": false
18
+ }
logs/UNIVLA_SIMPLERENV_BRIDGE_VIDEO_BS128_20k/checkpoint-16000/zero_to_fp32.py ADDED
@@ -0,0 +1,760 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ #!/usr/bin/env python
2
+
3
+ # Copyright (c) Microsoft Corporation.
4
+ # SPDX-License-Identifier: Apache-2.0
5
+
6
+ # DeepSpeed Team
7
+
8
+ # This script extracts fp32 consolidated weights from a zero 1, 2 and 3 DeepSpeed checkpoints. It gets
9
+ # copied into the top level checkpoint dir, so the user can easily do the conversion at any point in
10
+ # the future. Once extracted, the weights don't require DeepSpeed and can be used in any
11
+ # application.
12
+ #
13
+ # example:
14
+ # python zero_to_fp32.py . output_dir/
15
+ # or
16
+ # python zero_to_fp32.py . output_dir/ --safe_serialization
17
+
18
+ import argparse
19
+ import torch
20
+ import glob
21
+ import math
22
+ import os
23
+ import re
24
+ import gc
25
+ import json
26
+ import numpy as np
27
+ from tqdm import tqdm
28
+ from collections import OrderedDict
29
+ from dataclasses import dataclass
30
+
31
+ # while this script doesn't use deepspeed to recover data, since the checkpoints are pickled with
32
+ # DeepSpeed data structures it has to be available in the current python environment.
33
+ from deepspeed.utils import logger
34
+ from deepspeed.checkpoint.constants import (DS_VERSION, OPTIMIZER_STATE_DICT, SINGLE_PARTITION_OF_FP32_GROUPS,
35
+ FP32_FLAT_GROUPS, ZERO_STAGE, PARTITION_COUNT, PARAM_SHAPES, BUFFER_NAMES,
36
+ FROZEN_PARAM_SHAPES, FROZEN_PARAM_FRAGMENTS)
37
+
38
+
39
+ @dataclass
40
+ class zero_model_state:
41
+ buffers: dict()
42
+ param_shapes: dict()
43
+ shared_params: list
44
+ ds_version: int
45
+ frozen_param_shapes: dict()
46
+ frozen_param_fragments: dict()
47
+
48
+
49
+ debug = 0
50
+
51
+ # load to cpu
52
+ device = torch.device('cpu')
53
+
54
+
55
+ def atoi(text):
56
+ return int(text) if text.isdigit() else text
57
+
58
+
59
+ def natural_keys(text):
60
+ '''
61
+ alist.sort(key=natural_keys) sorts in human order
62
+ http://nedbatchelder.com/blog/200712/human_sorting.html
63
+ (See Toothy's implementation in the comments)
64
+ '''
65
+ return [atoi(c) for c in re.split(r'(\d+)', text)]
66
+
67
+
68
+ def get_model_state_file(checkpoint_dir, zero_stage):
69
+ if not os.path.isdir(checkpoint_dir):
70
+ raise FileNotFoundError(f"Directory '{checkpoint_dir}' doesn't exist")
71
+
72
+ # there should be only one file
73
+ if zero_stage <= 2:
74
+ file = os.path.join(checkpoint_dir, "mp_rank_00_model_states.pt")
75
+ elif zero_stage == 3:
76
+ file = os.path.join(checkpoint_dir, "zero_pp_rank_0_mp_rank_00_model_states.pt")
77
+
78
+ if not os.path.exists(file):
79
+ raise FileNotFoundError(f"can't find model states file at '{file}'")
80
+
81
+ return file
82
+
83
+
84
+ def get_checkpoint_files(checkpoint_dir, glob_pattern):
85
+ # XXX: need to test that this simple glob rule works for multi-node setup too
86
+ ckpt_files = sorted(glob.glob(os.path.join(checkpoint_dir, glob_pattern)), key=natural_keys)
87
+
88
+ if len(ckpt_files) == 0:
89
+ raise FileNotFoundError(f"can't find {glob_pattern} files in directory '{checkpoint_dir}'")
90
+
91
+ return ckpt_files
92
+
93
+
94
+ def get_optim_files(checkpoint_dir):
95
+ return get_checkpoint_files(checkpoint_dir, "*_optim_states.pt")
96
+
97
+
98
+ def get_model_state_files(checkpoint_dir):
99
+ return get_checkpoint_files(checkpoint_dir, "*_model_states.pt")
100
+
101
+
102
+ def parse_model_states(files):
103
+ zero_model_states = []
104
+ for file in files:
105
+ state_dict = torch.load(file, map_location=device, weights_only=False)
106
+
107
+ if BUFFER_NAMES not in state_dict:
108
+ raise ValueError(f"{file} is not a model state checkpoint")
109
+ buffer_names = state_dict[BUFFER_NAMES]
110
+ if debug:
111
+ print("Found buffers:", buffer_names)
112
+
113
+ # recover just the buffers while restoring them to fp32 if they were saved in fp16
114
+ buffers = {k: v.float() for k, v in state_dict["module"].items() if k in buffer_names}
115
+ param_shapes = state_dict[PARAM_SHAPES]
116
+
117
+ # collect parameters that are included in param_shapes
118
+ param_names = []
119
+ for s in param_shapes:
120
+ for name in s.keys():
121
+ param_names.append(name)
122
+
123
+ # update with frozen parameters
124
+ frozen_param_shapes = state_dict.get(FROZEN_PARAM_SHAPES, None)
125
+ if frozen_param_shapes is not None:
126
+ if debug:
127
+ print(f"Found frozen_param_shapes: {frozen_param_shapes}")
128
+ param_names += list(frozen_param_shapes.keys())
129
+
130
+ # handle shared params
131
+ shared_params = [[k, v] for k, v in state_dict["shared_params"].items()]
132
+
133
+ ds_version = state_dict.get(DS_VERSION, None)
134
+
135
+ frozen_param_fragments = state_dict.get(FROZEN_PARAM_FRAGMENTS, None)
136
+
137
+ z_model_state = zero_model_state(buffers=buffers,
138
+ param_shapes=param_shapes,
139
+ shared_params=shared_params,
140
+ ds_version=ds_version,
141
+ frozen_param_shapes=frozen_param_shapes,
142
+ frozen_param_fragments=frozen_param_fragments)
143
+ zero_model_states.append(z_model_state)
144
+
145
+ return zero_model_states
146
+
147
+
148
+ def parse_optim_states(files, ds_checkpoint_dir):
149
+ total_files = len(files)
150
+ state_dicts = []
151
+ for f in tqdm(files, desc='Loading checkpoint shards'):
152
+ state_dict = torch.load(f, map_location=device, mmap=True, weights_only=False)
153
+ # immediately discard the potentially huge 2 optimizer states as we only care for fp32 master weights
154
+ # and also handle the case where it was already removed by another helper script
155
+ state_dict["optimizer_state_dict"].pop("optimizer_state_dict", None)
156
+ state_dicts.append(state_dict)
157
+
158
+ if ZERO_STAGE not in state_dicts[0][OPTIMIZER_STATE_DICT]:
159
+ raise ValueError(f"{files[0]} is not a zero checkpoint")
160
+ zero_stage = state_dicts[0][OPTIMIZER_STATE_DICT][ZERO_STAGE]
161
+ world_size = state_dicts[0][OPTIMIZER_STATE_DICT][PARTITION_COUNT]
162
+
163
+ # For ZeRO-2 each param group can have different partition_count as data parallelism for expert
164
+ # parameters can be different from data parallelism for non-expert parameters. So we can just
165
+ # use the max of the partition_count to get the dp world_size.
166
+
167
+ if type(world_size) is list:
168
+ world_size = max(world_size)
169
+
170
+ if world_size != total_files:
171
+ raise ValueError(
172
+ f"Expected {world_size} of '*_optim_states.pt' under '{ds_checkpoint_dir}' but found {total_files} files. "
173
+ "Possibly due to an overwrite of an old checkpoint, or a checkpoint didn't get saved by one or more processes."
174
+ )
175
+
176
+ # the groups are named differently in each stage
177
+ if zero_stage <= 2:
178
+ fp32_groups_key = SINGLE_PARTITION_OF_FP32_GROUPS
179
+ elif zero_stage == 3:
180
+ fp32_groups_key = FP32_FLAT_GROUPS
181
+ else:
182
+ raise ValueError(f"unknown zero stage {zero_stage}")
183
+
184
+ fp32_flat_groups = [state_dicts[i][OPTIMIZER_STATE_DICT][fp32_groups_key] for i in range(len(state_dicts))]
185
+ return zero_stage, world_size, fp32_flat_groups
186
+
187
+
188
+ def _get_fp32_state_dict_from_zero_checkpoint(ds_checkpoint_dir, exclude_frozen_parameters):
189
+ """
190
+ Returns fp32 state_dict reconstructed from ds checkpoint
191
+
192
+ Args:
193
+ - ``ds_checkpoint_dir``: path to the deepspeed checkpoint folder (where the optimizer files are)
194
+
195
+ """
196
+ print(f"Processing zero checkpoint '{ds_checkpoint_dir}'")
197
+
198
+ optim_files = get_optim_files(ds_checkpoint_dir)
199
+ zero_stage, world_size, fp32_flat_groups = parse_optim_states(optim_files, ds_checkpoint_dir)
200
+ print(f"Detected checkpoint of type zero stage {zero_stage}, world_size: {world_size}")
201
+
202
+ model_files = get_model_state_files(ds_checkpoint_dir)
203
+
204
+ zero_model_states = parse_model_states(model_files)
205
+ print(f'Parsing checkpoint created by deepspeed=={zero_model_states[0].ds_version}')
206
+
207
+ if zero_stage <= 2:
208
+ return _get_fp32_state_dict_from_zero2_checkpoint(world_size, fp32_flat_groups, zero_model_states,
209
+ exclude_frozen_parameters)
210
+ elif zero_stage == 3:
211
+ return _get_fp32_state_dict_from_zero3_checkpoint(world_size, fp32_flat_groups, zero_model_states,
212
+ exclude_frozen_parameters)
213
+
214
+
215
+ def _zero2_merge_frozen_params(state_dict, zero_model_states):
216
+ if zero_model_states[0].frozen_param_shapes is None or len(zero_model_states[0].frozen_param_shapes) == 0:
217
+ return
218
+
219
+ frozen_param_shapes = zero_model_states[0].frozen_param_shapes
220
+ frozen_param_fragments = zero_model_states[0].frozen_param_fragments
221
+
222
+ if debug:
223
+ num_elem = sum(s.numel() for s in frozen_param_shapes.values())
224
+ print(f'rank 0: {FROZEN_PARAM_SHAPES}.numel = {num_elem}')
225
+
226
+ wanted_params = len(frozen_param_shapes)
227
+ wanted_numel = sum(s.numel() for s in frozen_param_shapes.values())
228
+ avail_numel = sum([p.numel() for p in frozen_param_fragments.values()])
229
+ print(f'Frozen params: Have {avail_numel} numels to process.')
230
+ print(f'Frozen params: Need {wanted_numel} numels in {wanted_params} params')
231
+
232
+ total_params = 0
233
+ total_numel = 0
234
+ for name, shape in frozen_param_shapes.items():
235
+ total_params += 1
236
+ unpartitioned_numel = shape.numel()
237
+ total_numel += unpartitioned_numel
238
+
239
+ state_dict[name] = frozen_param_fragments[name]
240
+
241
+ if debug:
242
+ print(f"{name} full shape: {shape} unpartitioned numel {unpartitioned_numel} ")
243
+
244
+ print(f"Reconstructed Frozen fp32 state dict with {total_params} params {total_numel} elements")
245
+
246
+
247
+ def _has_callable(obj, fn):
248
+ attr = getattr(obj, fn, None)
249
+ return callable(attr)
250
+
251
+
252
+ def _zero2_merge_trainable_params(state_dict, world_size, fp32_flat_groups, zero_model_states):
253
+ param_shapes = zero_model_states[0].param_shapes
254
+
255
+ # Reconstruction protocol:
256
+ #
257
+ # XXX: document this
258
+
259
+ if debug:
260
+ for i in range(world_size):
261
+ for j in range(len(fp32_flat_groups[0])):
262
+ print(f"{FP32_FLAT_GROUPS}[{i}][{j}].shape={fp32_flat_groups[i][j].shape}")
263
+
264
+ # XXX: memory usage doubles here (zero2)
265
+ num_param_groups = len(fp32_flat_groups[0])
266
+ merged_single_partition_of_fp32_groups = []
267
+ for i in range(num_param_groups):
268
+ merged_partitions = [sd[i] for sd in fp32_flat_groups]
269
+ full_single_fp32_vector = torch.cat(merged_partitions, 0)
270
+ merged_single_partition_of_fp32_groups.append(full_single_fp32_vector)
271
+ avail_numel = sum(
272
+ [full_single_fp32_vector.numel() for full_single_fp32_vector in merged_single_partition_of_fp32_groups])
273
+
274
+ if debug:
275
+ wanted_params = sum([len(shapes) for shapes in param_shapes])
276
+ wanted_numel = sum([sum(shape.numel() for shape in shapes.values()) for shapes in param_shapes])
277
+ # not asserting if there is a mismatch due to possible padding
278
+ print(f"Have {avail_numel} numels to process.")
279
+ print(f"Need {wanted_numel} numels in {wanted_params} params.")
280
+
281
+ # params
282
+ # XXX: for huge models that can't fit into the host's RAM we will have to recode this to support
283
+ # out-of-core computing solution
284
+ total_numel = 0
285
+ total_params = 0
286
+ for shapes, full_single_fp32_vector in zip(param_shapes, merged_single_partition_of_fp32_groups):
287
+ offset = 0
288
+ avail_numel = full_single_fp32_vector.numel()
289
+ for name, shape in shapes.items():
290
+
291
+ unpartitioned_numel = shape.numel() if _has_callable(shape, 'numel') else math.prod(shape)
292
+ total_numel += unpartitioned_numel
293
+ total_params += 1
294
+
295
+ if debug:
296
+ print(f"{name} full shape: {shape} unpartitioned numel {unpartitioned_numel} ")
297
+ state_dict[name] = full_single_fp32_vector.narrow(0, offset, unpartitioned_numel).view(shape)
298
+ offset += unpartitioned_numel
299
+
300
+ # Z2 started to align to 2*world_size to improve nccl performance. Therefore both offset and
301
+ # avail_numel can differ by anywhere between 0..2*world_size. Due to two unrelated complex
302
+ # paddings performed in the code it's almost impossible to predict the exact numbers w/o the
303
+ # live optimizer object, so we are checking that the numbers are within the right range
304
+ align_to = 2 * world_size
305
+
306
+ def zero2_align(x):
307
+ return align_to * math.ceil(x / align_to)
308
+
309
+ if debug:
310
+ print(f"original offset={offset}, avail_numel={avail_numel}")
311
+
312
+ offset = zero2_align(offset)
313
+ avail_numel = zero2_align(avail_numel)
314
+
315
+ if debug:
316
+ print(f"aligned offset={offset}, avail_numel={avail_numel}")
317
+
318
+ # Sanity check
319
+ if offset != avail_numel:
320
+ raise ValueError(f"consumed {offset} numels out of {avail_numel} - something is wrong")
321
+
322
+ print(f"Reconstructed fp32 state dict with {total_params} params {total_numel} elements")
323
+
324
+
325
+ def _get_fp32_state_dict_from_zero2_checkpoint(world_size, fp32_flat_groups, zero_model_states,
326
+ exclude_frozen_parameters):
327
+ state_dict = OrderedDict()
328
+
329
+ # buffers
330
+ buffers = zero_model_states[0].buffers
331
+ state_dict.update(buffers)
332
+ if debug:
333
+ print(f"added {len(buffers)} buffers")
334
+
335
+ if not exclude_frozen_parameters:
336
+ _zero2_merge_frozen_params(state_dict, zero_model_states)
337
+
338
+ _zero2_merge_trainable_params(state_dict, world_size, fp32_flat_groups, zero_model_states)
339
+
340
+ # recover shared parameters
341
+ for pair in zero_model_states[0].shared_params:
342
+ if pair[1] in state_dict:
343
+ state_dict[pair[0]] = state_dict[pair[1]]
344
+
345
+ return state_dict
346
+
347
+
348
+ def zero3_partitioned_param_info(unpartitioned_numel, world_size):
349
+ remainder = unpartitioned_numel % world_size
350
+ padding_numel = (world_size - remainder) if remainder else 0
351
+ partitioned_numel = math.ceil(unpartitioned_numel / world_size)
352
+ return partitioned_numel, padding_numel
353
+
354
+
355
+ def _zero3_merge_frozen_params(state_dict, world_size, zero_model_states):
356
+ if zero_model_states[0].frozen_param_shapes is None or len(zero_model_states[0].frozen_param_shapes) == 0:
357
+ return
358
+
359
+ if debug:
360
+ for i in range(world_size):
361
+ num_elem = sum(s.numel() for s in zero_model_states[i].frozen_param_fragments.values())
362
+ print(f'rank {i}: {FROZEN_PARAM_SHAPES}.numel = {num_elem}')
363
+
364
+ frozen_param_shapes = zero_model_states[0].frozen_param_shapes
365
+ wanted_params = len(frozen_param_shapes)
366
+ wanted_numel = sum(s.numel() for s in frozen_param_shapes.values())
367
+ avail_numel = sum([p.numel() for p in zero_model_states[0].frozen_param_fragments.values()]) * world_size
368
+ print(f'Frozen params: Have {avail_numel} numels to process.')
369
+ print(f'Frozen params: Need {wanted_numel} numels in {wanted_params} params')
370
+
371
+ total_params = 0
372
+ total_numel = 0
373
+ for name, shape in zero_model_states[0].frozen_param_shapes.items():
374
+ total_params += 1
375
+ unpartitioned_numel = shape.numel()
376
+ total_numel += unpartitioned_numel
377
+
378
+ param_frags = tuple(model_state.frozen_param_fragments[name] for model_state in zero_model_states)
379
+ state_dict[name] = torch.cat(param_frags, 0).narrow(0, 0, unpartitioned_numel).view(shape)
380
+
381
+ partitioned_numel, partitioned_padding_numel = zero3_partitioned_param_info(unpartitioned_numel, world_size)
382
+
383
+ if debug:
384
+ print(
385
+ f"Frozen params: {total_params} {name} full shape: {shape} partition0 numel={partitioned_numel} partitioned_padding_numel={partitioned_padding_numel}"
386
+ )
387
+
388
+ print(f"Reconstructed Frozen fp32 state dict with {total_params} params {total_numel} elements")
389
+
390
+
391
+ class GatheredTensor:
392
+ """
393
+ A pseudo tensor that collects partitioned weights.
394
+ It is more memory efficient when there are multiple groups.
395
+ """
396
+
397
+ def __init__(self, flat_groups, flat_groups_offset, offset, partitioned_numel, shape):
398
+ self.flat_groups = flat_groups
399
+ self.flat_groups_offset = flat_groups_offset
400
+ self.offset = offset
401
+ self.partitioned_numel = partitioned_numel
402
+ self.shape = shape
403
+ self.dtype = self.flat_groups[0][0].dtype
404
+
405
+ def contiguous(self):
406
+ """
407
+ Merge partitioned weights from flat_groups into a single tensor.
408
+ """
409
+ end_idx = self.offset + self.partitioned_numel
410
+ world_size = len(self.flat_groups)
411
+ pad_flat_param_chunks = []
412
+
413
+ for rank_i in range(world_size):
414
+ # for each rank, we need to collect weights from related group/groups
415
+ flat_groups_at_rank_i = self.flat_groups[rank_i]
416
+ start_group_id = None
417
+ end_group_id = None
418
+ for group_id in range(len(self.flat_groups_offset)):
419
+ if self.flat_groups_offset[group_id] <= self.offset < self.flat_groups_offset[group_id + 1]:
420
+ start_group_id = group_id
421
+ if self.flat_groups_offset[group_id] < end_idx <= self.flat_groups_offset[group_id + 1]:
422
+ end_group_id = group_id
423
+ break
424
+ # collect weights from related group/groups
425
+ for group_id in range(start_group_id, end_group_id + 1):
426
+ flat_tensor = flat_groups_at_rank_i[group_id]
427
+ start_offset = self.offset - self.flat_groups_offset[group_id]
428
+ end_offset = min(end_idx, self.flat_groups_offset[group_id + 1]) - self.flat_groups_offset[group_id]
429
+ pad_flat_param_chunks.append(flat_tensor[start_offset:end_offset])
430
+
431
+ # collect weights from all ranks
432
+ pad_flat_param = torch.cat(pad_flat_param_chunks, dim=0)
433
+ param = pad_flat_param[:self.shape.numel()].view(self.shape).contiguous()
434
+ return param
435
+
436
+
437
+ def _zero3_merge_trainable_params(state_dict, world_size, fp32_flat_groups, zero_model_states):
438
+ param_shapes = zero_model_states[0].param_shapes
439
+ avail_numel = sum([flat_group.numel() for flat_group in fp32_flat_groups[0]]) * world_size
440
+
441
+ # Reconstruction protocol: For zero3 we need to zip the partitions together at boundary of each
442
+ # param, re-consolidating each param, while dealing with padding if any
443
+
444
+ # merge list of dicts, preserving order
445
+ param_shapes = {k: v for d in param_shapes for k, v in d.items()}
446
+
447
+ if debug:
448
+ for i in range(world_size):
449
+ print(f"{FP32_FLAT_GROUPS}[{i}].shape={fp32_flat_groups[i].shape}")
450
+
451
+ wanted_params = len(param_shapes)
452
+ wanted_numel = sum(shape.numel() for shape in param_shapes.values())
453
+ # not asserting if there is a mismatch due to possible padding
454
+ avail_numel = fp32_flat_groups[0].numel() * world_size
455
+ print(f"Trainable params: Have {avail_numel} numels to process.")
456
+ print(f"Trainable params: Need {wanted_numel} numels in {wanted_params} params.")
457
+
458
+ # params
459
+ # XXX: for huge models that can't fit into the host's RAM we will have to recode this to support
460
+ # out-of-core computing solution
461
+ offset = 0
462
+ total_numel = 0
463
+ total_params = 0
464
+ flat_groups_offset = [0] + list(np.cumsum([flat_tensor.numel() for flat_tensor in fp32_flat_groups[0]]))
465
+ for name, shape in tqdm(param_shapes.items(), desc='Gathering sharded weights'):
466
+ unpartitioned_numel = shape.numel()
467
+ total_numel += unpartitioned_numel
468
+ total_params += 1
469
+ partitioned_numel, partitioned_padding_numel = zero3_partitioned_param_info(unpartitioned_numel, world_size)
470
+
471
+ if debug:
472
+ print(
473
+ f"Trainable params: {total_params} {name} full shape: {shape} partition0 numel={partitioned_numel} partitioned_padding_numel={partitioned_padding_numel}"
474
+ )
475
+
476
+ # memory efficient tensor
477
+ tensor = GatheredTensor(fp32_flat_groups, flat_groups_offset, offset, partitioned_numel, shape)
478
+ state_dict[name] = tensor
479
+ offset += partitioned_numel
480
+
481
+ offset *= world_size
482
+
483
+ # Sanity check
484
+ if offset != avail_numel:
485
+ raise ValueError(f"consumed {offset} numels out of {avail_numel} - something is wrong")
486
+
487
+ print(f"Reconstructed Trainable fp32 state dict with {total_params} params {total_numel} elements")
488
+
489
+
490
+ def _get_fp32_state_dict_from_zero3_checkpoint(world_size, fp32_flat_groups, zero_model_states,
491
+ exclude_frozen_parameters):
492
+ state_dict = OrderedDict()
493
+
494
+ # buffers
495
+ buffers = zero_model_states[0].buffers
496
+ state_dict.update(buffers)
497
+ if debug:
498
+ print(f"added {len(buffers)} buffers")
499
+
500
+ if not exclude_frozen_parameters:
501
+ _zero3_merge_frozen_params(state_dict, world_size, zero_model_states)
502
+
503
+ _zero3_merge_trainable_params(state_dict, world_size, fp32_flat_groups, zero_model_states)
504
+
505
+ # recover shared parameters
506
+ for pair in zero_model_states[0].shared_params:
507
+ if pair[1] in state_dict:
508
+ state_dict[pair[0]] = state_dict[pair[1]]
509
+
510
+ return state_dict
511
+
512
+
513
+ def to_torch_tensor(state_dict, return_empty_tensor=False):
514
+ """
515
+ Convert state_dict of GatheredTensor to torch tensor
516
+ """
517
+ torch_state_dict = {}
518
+ converted_tensors = {}
519
+ for name, tensor in state_dict.items():
520
+ tensor_id = id(tensor)
521
+ if tensor_id in converted_tensors: # shared tensors
522
+ shared_tensor = torch_state_dict[converted_tensors[tensor_id]]
523
+ torch_state_dict[name] = shared_tensor
524
+ else:
525
+ converted_tensors[tensor_id] = name
526
+ if return_empty_tensor:
527
+ torch_state_dict[name] = torch.empty(tensor.shape, dtype=tensor.dtype)
528
+ else:
529
+ torch_state_dict[name] = tensor.contiguous()
530
+ return torch_state_dict
531
+
532
+
533
+ def get_fp32_state_dict_from_zero_checkpoint(checkpoint_dir,
534
+ tag=None,
535
+ exclude_frozen_parameters=False,
536
+ lazy_mode=False):
537
+ """
538
+ Convert ZeRO 2 or 3 checkpoint into a single fp32 consolidated state_dict that can be loaded with
539
+ ``load_state_dict()`` and used for training without DeepSpeed or shared with others, for example
540
+ via a model hub.
541
+
542
+ Args:
543
+ - ``checkpoint_dir``: path to the desired checkpoint folder
544
+ - ``tag``: checkpoint tag used as a unique identifier for checkpoint. If not provided will attempt to load tag in 'latest' file. e.g., ``global_step14``
545
+ - ``exclude_frozen_parameters``: exclude frozen parameters
546
+ - ``lazy_mode``: get state_dict in lazy mode. It returns a dict of pesduo tensor instead of torch tensor, which is more memory efficient.
547
+ Convert the pesduo tensor to torch tensor by ``.contiguous()``
548
+
549
+ Returns:
550
+ - pytorch ``state_dict``
551
+
552
+ A typical usage might be ::
553
+
554
+ from deepspeed.utils.zero_to_fp32 import get_fp32_state_dict_from_zero_checkpoint
555
+ # do the training and checkpoint saving
556
+ state_dict = get_fp32_state_dict_from_zero_checkpoint(checkpoint_dir) # already on cpu
557
+ model = model.cpu() # move to cpu
558
+ model.load_state_dict(state_dict)
559
+ # submit to model hub or save the model to share with others
560
+
561
+ In this example the ``model`` will no longer be usable in the deepspeed context of the same
562
+ application. i.e. you will need to re-initialize the deepspeed engine, since
563
+ ``model.load_state_dict(state_dict)`` will remove all the deepspeed magic from it.
564
+
565
+ If you want it all done for you, use ``load_state_dict_from_zero_checkpoint`` instead.
566
+
567
+ Note: the above usage may not work if your application doesn't have sufficient free CPU memory.
568
+ You may need to use the offline approach using the ``zero_to_fp32.py`` script that is saved with
569
+ the checkpoint. Or you can load state_dict in lazy mode ::
570
+
571
+ from deepspeed.utils.zero_to_fp32 import get_fp32_state_dict_from_zero_checkpoint
572
+ state_dict = get_fp32_state_dict_from_zero_checkpoint(checkpoint_dir, lazy_mode=True) # not on cpu
573
+ for name, lazy_tensor in state_dict.item():
574
+ tensor = lazy_tensor.contiguous() # to cpu
575
+ print(name, tensor)
576
+ # del tensor to release memory if it no longer in use
577
+ """
578
+ if tag is None:
579
+ latest_path = os.path.join(checkpoint_dir, 'latest')
580
+ if os.path.isfile(latest_path):
581
+ with open(latest_path, 'r') as fd:
582
+ tag = fd.read().strip()
583
+ else:
584
+ raise ValueError(f"Unable to find 'latest' file at {latest_path}")
585
+
586
+ ds_checkpoint_dir = os.path.join(checkpoint_dir, tag)
587
+
588
+ if not os.path.isdir(ds_checkpoint_dir):
589
+ raise FileNotFoundError(f"Directory '{ds_checkpoint_dir}' doesn't exist")
590
+
591
+ state_dict = _get_fp32_state_dict_from_zero_checkpoint(ds_checkpoint_dir, exclude_frozen_parameters)
592
+ if lazy_mode:
593
+ return state_dict
594
+ else:
595
+ return to_torch_tensor(state_dict)
596
+
597
+
598
+ def convert_zero_checkpoint_to_fp32_state_dict(checkpoint_dir,
599
+ output_dir,
600
+ max_shard_size="5GB",
601
+ safe_serialization=False,
602
+ tag=None,
603
+ exclude_frozen_parameters=False):
604
+ """
605
+ Convert ZeRO 2 or 3 checkpoint into a single fp32 consolidated ``state_dict`` file that can be
606
+ loaded with ``torch.load(file)`` + ``load_state_dict()`` and used for training without DeepSpeed.
607
+
608
+ Args:
609
+ - ``checkpoint_dir``: path to the desired checkpoint folder. (one that contains the tag-folder, like ``global_step14``)
610
+ - ``output_dir``: directory to the pytorch fp32 state_dict output files
611
+ - ``max_shard_size``: the maximum size for a checkpoint before being sharded, default value is 5GB
612
+ - ``safe_serialization``: whether to save the model using `safetensors` or the traditional PyTorch way (that uses `pickle`).
613
+ - ``tag``: checkpoint tag used as a unique identifier for checkpoint. If not provided will attempt to load tag in the file named ``latest`` in the checkpoint folder, e.g., ``global_step14``
614
+ - ``exclude_frozen_parameters``: exclude frozen parameters
615
+ """
616
+
617
+ # Dependency pre-check
618
+ if safe_serialization:
619
+ try:
620
+ from safetensors.torch import save_file
621
+ except ImportError:
622
+ print('If you want to use `safe_serialization`, please `pip install safetensors`')
623
+ raise
624
+ if max_shard_size is not None:
625
+ try:
626
+ from huggingface_hub import split_torch_state_dict_into_shards
627
+ except ImportError:
628
+ print('If you want to use `max_shard_size`, please `pip install huggingface_hub`')
629
+ raise
630
+
631
+ # Convert zero checkpoint to state_dict
632
+ state_dict = get_fp32_state_dict_from_zero_checkpoint(checkpoint_dir,
633
+ tag,
634
+ exclude_frozen_parameters,
635
+ lazy_mode=True)
636
+
637
+ # Shard the model if it is too big.
638
+ weights_name = "model.safetensors" if safe_serialization else "pytorch_model.bin"
639
+ if max_shard_size is not None:
640
+ filename_pattern = weights_name.replace(".bin", "{suffix}.bin").replace(".safetensors", "{suffix}.safetensors")
641
+ # an memory-efficient approach for sharding
642
+ empty_state_dict = to_torch_tensor(state_dict, return_empty_tensor=True)
643
+ state_dict_split = split_torch_state_dict_into_shards(empty_state_dict,
644
+ filename_pattern=filename_pattern,
645
+ max_shard_size=max_shard_size)
646
+ else:
647
+ from collections import namedtuple
648
+ StateDictSplit = namedtuple("StateDictSplit", ["is_sharded", "filename_to_tensors"])
649
+ state_dict_split = StateDictSplit(is_sharded=False,
650
+ filename_to_tensors={weights_name: list(state_dict.keys())})
651
+
652
+ # Save the model by shard
653
+ os.makedirs(output_dir, exist_ok=True)
654
+ filename_to_tensors = state_dict_split.filename_to_tensors.items()
655
+ for shard_file, tensors in tqdm(filename_to_tensors, desc="Saving checkpoint shards"):
656
+ shard_state_dict = {tensor_name: state_dict[tensor_name] for tensor_name in tensors}
657
+ shard_state_dict = to_torch_tensor(shard_state_dict)
658
+ output_path = os.path.join(output_dir, shard_file)
659
+ if safe_serialization:
660
+ save_file(shard_state_dict, output_path, metadata={"format": "pt"})
661
+ else:
662
+ torch.save(shard_state_dict, output_path)
663
+ # release the memory of current shard
664
+ for tensor_name in list(shard_state_dict.keys()):
665
+ del state_dict[tensor_name]
666
+ del shard_state_dict[tensor_name]
667
+ del shard_state_dict
668
+ gc.collect()
669
+
670
+ # Save index if sharded
671
+ if state_dict_split.is_sharded:
672
+ index = {
673
+ "metadata": state_dict_split.metadata,
674
+ "weight_map": state_dict_split.tensor_to_filename,
675
+ }
676
+ save_index_file = "model.safetensors.index.json" if safe_serialization else "pytorch_model.bin.index.json"
677
+ save_index_file = os.path.join(output_dir, save_index_file)
678
+ with open(save_index_file, "w", encoding="utf-8") as f:
679
+ content = json.dumps(index, indent=2, sort_keys=True) + "\n"
680
+ f.write(content)
681
+
682
+
683
+ def load_state_dict_from_zero_checkpoint(model, checkpoint_dir, tag=None):
684
+ """
685
+ 1. Put the provided model to cpu
686
+ 2. Convert ZeRO 2 or 3 checkpoint into a single fp32 consolidated ``state_dict``
687
+ 3. Load it into the provided model
688
+
689
+ Args:
690
+ - ``model``: the model object to update
691
+ - ``checkpoint_dir``: path to the desired checkpoint folder. (one that contains the tag-folder, like ``global_step14``)
692
+ - ``tag``: checkpoint tag used as a unique identifier for checkpoint. If not provided will attempt to load tag in the file named ``latest`` in the checkpoint folder, e.g., ``global_step14``
693
+
694
+ Returns:
695
+ - ``model`: modified model
696
+
697
+ Make sure you have plenty of CPU memory available before you call this function. If you don't
698
+ have enough use the ``zero_to_fp32.py`` utility to do the conversion. You will find it
699
+ conveniently placed for you in the checkpoint folder.
700
+
701
+ A typical usage might be ::
702
+
703
+ from deepspeed.utils.zero_to_fp32 import load_state_dict_from_zero_checkpoint
704
+ model = load_state_dict_from_zero_checkpoint(trainer.model, checkpoint_dir)
705
+ # submit to model hub or save the model to share with others
706
+
707
+ Note, that once this was run, the ``model`` will no longer be usable in the deepspeed context
708
+ of the same application. i.e. you will need to re-initialize the deepspeed engine, since
709
+ ``model.load_state_dict(state_dict)`` will remove all the deepspeed magic from it.
710
+
711
+ """
712
+ logger.info("Extracting fp32 weights")
713
+ state_dict = get_fp32_state_dict_from_zero_checkpoint(checkpoint_dir, tag)
714
+
715
+ logger.info("Overwriting model with fp32 weights")
716
+ model = model.cpu()
717
+ model.load_state_dict(state_dict, strict=False)
718
+
719
+ return model
720
+
721
+
722
+ if __name__ == "__main__":
723
+ parser = argparse.ArgumentParser()
724
+ parser.add_argument("checkpoint_dir",
725
+ type=str,
726
+ help="path to the desired checkpoint folder, e.g., path/checkpoint-12")
727
+ parser.add_argument("output_dir",
728
+ type=str,
729
+ help="directory to the pytorch fp32 state_dict output files"
730
+ "(e.g. path/checkpoint-12-output/)")
731
+ parser.add_argument(
732
+ "--max_shard_size",
733
+ type=str,
734
+ default="5GB",
735
+ help="The maximum size for a checkpoint before being sharded. Checkpoints shard will then be each of size"
736
+ "lower than this size. If expressed as a string, needs to be digits followed by a unit (like `5MB`"
737
+ "We default it to 5GB in order for models to be able to run easily on free-tier google colab instances"
738
+ "without CPU OOM issues.")
739
+ parser.add_argument(
740
+ "--safe_serialization",
741
+ default=False,
742
+ action='store_true',
743
+ help="Whether to save the model using `safetensors` or the traditional PyTorch way (that uses `pickle`).")
744
+ parser.add_argument("-t",
745
+ "--tag",
746
+ type=str,
747
+ default=None,
748
+ help="checkpoint tag used as a unique identifier for checkpoint. e.g., global_step1")
749
+ parser.add_argument("--exclude_frozen_parameters", action='store_true', help="exclude frozen parameters")
750
+ parser.add_argument("-d", "--debug", action='store_true', help="enable debug")
751
+ args = parser.parse_args()
752
+
753
+ debug = args.debug
754
+
755
+ convert_zero_checkpoint_to_fp32_state_dict(args.checkpoint_dir,
756
+ args.output_dir,
757
+ max_shard_size=args.max_shard_size,
758
+ safe_serialization=args.safe_serialization,
759
+ tag=args.tag,
760
+ exclude_frozen_parameters=args.exclude_frozen_parameters)
logs/UNIVLA_SIMPLERENV_BRIDGE_VIDEO_BS128_20k/checkpoint-20000/config.json ADDED
@@ -0,0 +1,61 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ {
2
+ "action_config": {
3
+ "_attn_implementation": "sdpa",
4
+ "action_dim": 7,
5
+ "attention_dropout": 0.0,
6
+ "hidden_act": "silu",
7
+ "hidden_size": 4096,
8
+ "initializer_range": 0.02,
9
+ "intermediate_size": 2048,
10
+ "max_position_embeddings": 5120,
11
+ "num_attention_heads": 32,
12
+ "num_hidden_layers": 2,
13
+ "num_key_value_heads": 8,
14
+ "pad_token_id": 151643,
15
+ "pretraining_tp": 1,
16
+ "rms_norm_eps": 1e-05,
17
+ "rope_scaling": null,
18
+ "rope_theta": 10000.0,
19
+ "tie_word_embeddings": false,
20
+ "use_cache": true,
21
+ "vision_loss_weight": 5.0
22
+ },
23
+ "action_dim": 7,
24
+ "action_experts": false,
25
+ "architectures": [
26
+ "Emu3MoE"
27
+ ],
28
+ "attention_dropout": 0.1,
29
+ "boa_token_id": 151844,
30
+ "boi_token_id": 151852,
31
+ "bos_token_id": 151849,
32
+ "bov_token_id": 151854,
33
+ "eof_token_id": 151847,
34
+ "eoi_token_id": 151853,
35
+ "eol_token_id": 151846,
36
+ "eos_token_id": 151850,
37
+ "eov_token_id": 184621,
38
+ "hidden_act": "silu",
39
+ "hidden_size": 4096,
40
+ "image_area": 262144,
41
+ "img_token_id": 151851,
42
+ "initializer_range": 0.02,
43
+ "intermediate_size": 14336,
44
+ "max_position_embeddings": 2400,
45
+ "model_type": "Emu3",
46
+ "num_attention_heads": 32,
47
+ "num_hidden_layers": 32,
48
+ "num_key_value_heads": 8,
49
+ "pad_token_id": 151643,
50
+ "pretraining_tp": 1,
51
+ "qkv_bias": false,
52
+ "rms_norm_eps": 1e-05,
53
+ "rope_scaling": null,
54
+ "rope_theta": 1000000.0,
55
+ "tie_word_embeddings": false,
56
+ "torch_dtype": "bfloat16",
57
+ "transformers_version": "4.51.0",
58
+ "use_cache": true,
59
+ "vision_loss_weight": 0.5,
60
+ "vocab_size": 184622
61
+ }
logs/UNIVLA_SIMPLERENV_BRIDGE_VIDEO_BS128_20k/checkpoint-20000/emu3.tiktoken ADDED
The diff for this file is too large to render. See raw diff
 
logs/UNIVLA_SIMPLERENV_BRIDGE_VIDEO_BS128_20k/checkpoint-20000/emu3_vision_tokens.txt ADDED
The diff for this file is too large to render. See raw diff
 
logs/UNIVLA_SIMPLERENV_BRIDGE_VIDEO_BS128_20k/checkpoint-20000/generation_config.json ADDED
@@ -0,0 +1,7 @@
 
 
 
 
 
 
 
 
1
+ {
2
+ "_from_model_config": true,
3
+ "bos_token_id": 151849,
4
+ "eos_token_id": 151850,
5
+ "pad_token_id": 151643,
6
+ "transformers_version": "4.51.0"
7
+ }
logs/UNIVLA_SIMPLERENV_BRIDGE_VIDEO_BS128_20k/checkpoint-20000/latest ADDED
@@ -0,0 +1 @@
 
 
1
+ global_step20000
logs/UNIVLA_SIMPLERENV_BRIDGE_VIDEO_BS128_20k/checkpoint-20000/model.safetensors.index.json ADDED
@@ -0,0 +1,298 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ {
2
+ "metadata": {
3
+ "total_size": 16984023040
4
+ },
5
+ "weight_map": {
6
+ "lm_head.weight": "model-00004-of-00004.safetensors",
7
+ "model.embed_tokens.weight": "model-00001-of-00004.safetensors",
8
+ "model.layers.0.input_layernorm.weight": "model-00001-of-00004.safetensors",
9
+ "model.layers.0.mlp.down_proj.weight": "model-00001-of-00004.safetensors",
10
+ "model.layers.0.mlp.gate_proj.weight": "model-00001-of-00004.safetensors",
11
+ "model.layers.0.mlp.up_proj.weight": "model-00001-of-00004.safetensors",
12
+ "model.layers.0.post_attention_layernorm.weight": "model-00001-of-00004.safetensors",
13
+ "model.layers.0.self_attn.k_proj.weight": "model-00001-of-00004.safetensors",
14
+ "model.layers.0.self_attn.o_proj.weight": "model-00001-of-00004.safetensors",
15
+ "model.layers.0.self_attn.q_proj.weight": "model-00001-of-00004.safetensors",
16
+ "model.layers.0.self_attn.v_proj.weight": "model-00001-of-00004.safetensors",
17
+ "model.layers.1.input_layernorm.weight": "model-00001-of-00004.safetensors",
18
+ "model.layers.1.mlp.down_proj.weight": "model-00001-of-00004.safetensors",
19
+ "model.layers.1.mlp.gate_proj.weight": "model-00001-of-00004.safetensors",
20
+ "model.layers.1.mlp.up_proj.weight": "model-00001-of-00004.safetensors",
21
+ "model.layers.1.post_attention_layernorm.weight": "model-00001-of-00004.safetensors",
22
+ "model.layers.1.self_attn.k_proj.weight": "model-00001-of-00004.safetensors",
23
+ "model.layers.1.self_attn.o_proj.weight": "model-00001-of-00004.safetensors",
24
+ "model.layers.1.self_attn.q_proj.weight": "model-00001-of-00004.safetensors",
25
+ "model.layers.1.self_attn.v_proj.weight": "model-00001-of-00004.safetensors",
26
+ "model.layers.10.input_layernorm.weight": "model-00002-of-00004.safetensors",
27
+ "model.layers.10.mlp.down_proj.weight": "model-00002-of-00004.safetensors",
28
+ "model.layers.10.mlp.gate_proj.weight": "model-00002-of-00004.safetensors",
29
+ "model.layers.10.mlp.up_proj.weight": "model-00002-of-00004.safetensors",
30
+ "model.layers.10.post_attention_layernorm.weight": "model-00002-of-00004.safetensors",
31
+ "model.layers.10.self_attn.k_proj.weight": "model-00002-of-00004.safetensors",
32
+ "model.layers.10.self_attn.o_proj.weight": "model-00002-of-00004.safetensors",
33
+ "model.layers.10.self_attn.q_proj.weight": "model-00002-of-00004.safetensors",
34
+ "model.layers.10.self_attn.v_proj.weight": "model-00002-of-00004.safetensors",
35
+ "model.layers.11.input_layernorm.weight": "model-00002-of-00004.safetensors",
36
+ "model.layers.11.mlp.down_proj.weight": "model-00002-of-00004.safetensors",
37
+ "model.layers.11.mlp.gate_proj.weight": "model-00002-of-00004.safetensors",
38
+ "model.layers.11.mlp.up_proj.weight": "model-00002-of-00004.safetensors",
39
+ "model.layers.11.post_attention_layernorm.weight": "model-00002-of-00004.safetensors",
40
+ "model.layers.11.self_attn.k_proj.weight": "model-00002-of-00004.safetensors",
41
+ "model.layers.11.self_attn.o_proj.weight": "model-00002-of-00004.safetensors",
42
+ "model.layers.11.self_attn.q_proj.weight": "model-00002-of-00004.safetensors",
43
+ "model.layers.11.self_attn.v_proj.weight": "model-00002-of-00004.safetensors",
44
+ "model.layers.12.input_layernorm.weight": "model-00002-of-00004.safetensors",
45
+ "model.layers.12.mlp.down_proj.weight": "model-00002-of-00004.safetensors",
46
+ "model.layers.12.mlp.gate_proj.weight": "model-00002-of-00004.safetensors",
47
+ "model.layers.12.mlp.up_proj.weight": "model-00002-of-00004.safetensors",
48
+ "model.layers.12.post_attention_layernorm.weight": "model-00002-of-00004.safetensors",
49
+ "model.layers.12.self_attn.k_proj.weight": "model-00002-of-00004.safetensors",
50
+ "model.layers.12.self_attn.o_proj.weight": "model-00002-of-00004.safetensors",
51
+ "model.layers.12.self_attn.q_proj.weight": "model-00002-of-00004.safetensors",
52
+ "model.layers.12.self_attn.v_proj.weight": "model-00002-of-00004.safetensors",
53
+ "model.layers.13.input_layernorm.weight": "model-00002-of-00004.safetensors",
54
+ "model.layers.13.mlp.down_proj.weight": "model-00002-of-00004.safetensors",
55
+ "model.layers.13.mlp.gate_proj.weight": "model-00002-of-00004.safetensors",
56
+ "model.layers.13.mlp.up_proj.weight": "model-00002-of-00004.safetensors",
57
+ "model.layers.13.post_attention_layernorm.weight": "model-00002-of-00004.safetensors",
58
+ "model.layers.13.self_attn.k_proj.weight": "model-00002-of-00004.safetensors",
59
+ "model.layers.13.self_attn.o_proj.weight": "model-00002-of-00004.safetensors",
60
+ "model.layers.13.self_attn.q_proj.weight": "model-00002-of-00004.safetensors",
61
+ "model.layers.13.self_attn.v_proj.weight": "model-00002-of-00004.safetensors",
62
+ "model.layers.14.input_layernorm.weight": "model-00002-of-00004.safetensors",
63
+ "model.layers.14.mlp.down_proj.weight": "model-00002-of-00004.safetensors",
64
+ "model.layers.14.mlp.gate_proj.weight": "model-00002-of-00004.safetensors",
65
+ "model.layers.14.mlp.up_proj.weight": "model-00002-of-00004.safetensors",
66
+ "model.layers.14.post_attention_layernorm.weight": "model-00002-of-00004.safetensors",
67
+ "model.layers.14.self_attn.k_proj.weight": "model-00002-of-00004.safetensors",
68
+ "model.layers.14.self_attn.o_proj.weight": "model-00002-of-00004.safetensors",
69
+ "model.layers.14.self_attn.q_proj.weight": "model-00002-of-00004.safetensors",
70
+ "model.layers.14.self_attn.v_proj.weight": "model-00002-of-00004.safetensors",
71
+ "model.layers.15.input_layernorm.weight": "model-00002-of-00004.safetensors",
72
+ "model.layers.15.mlp.down_proj.weight": "model-00002-of-00004.safetensors",
73
+ "model.layers.15.mlp.gate_proj.weight": "model-00002-of-00004.safetensors",
74
+ "model.layers.15.mlp.up_proj.weight": "model-00002-of-00004.safetensors",
75
+ "model.layers.15.post_attention_layernorm.weight": "model-00002-of-00004.safetensors",
76
+ "model.layers.15.self_attn.k_proj.weight": "model-00002-of-00004.safetensors",
77
+ "model.layers.15.self_attn.o_proj.weight": "model-00002-of-00004.safetensors",
78
+ "model.layers.15.self_attn.q_proj.weight": "model-00002-of-00004.safetensors",
79
+ "model.layers.15.self_attn.v_proj.weight": "model-00002-of-00004.safetensors",
80
+ "model.layers.16.input_layernorm.weight": "model-00002-of-00004.safetensors",
81
+ "model.layers.16.mlp.down_proj.weight": "model-00002-of-00004.safetensors",
82
+ "model.layers.16.mlp.gate_proj.weight": "model-00002-of-00004.safetensors",
83
+ "model.layers.16.mlp.up_proj.weight": "model-00002-of-00004.safetensors",
84
+ "model.layers.16.post_attention_layernorm.weight": "model-00002-of-00004.safetensors",
85
+ "model.layers.16.self_attn.k_proj.weight": "model-00002-of-00004.safetensors",
86
+ "model.layers.16.self_attn.o_proj.weight": "model-00002-of-00004.safetensors",
87
+ "model.layers.16.self_attn.q_proj.weight": "model-00002-of-00004.safetensors",
88
+ "model.layers.16.self_attn.v_proj.weight": "model-00002-of-00004.safetensors",
89
+ "model.layers.17.input_layernorm.weight": "model-00002-of-00004.safetensors",
90
+ "model.layers.17.mlp.down_proj.weight": "model-00002-of-00004.safetensors",
91
+ "model.layers.17.mlp.gate_proj.weight": "model-00002-of-00004.safetensors",
92
+ "model.layers.17.mlp.up_proj.weight": "model-00002-of-00004.safetensors",
93
+ "model.layers.17.post_attention_layernorm.weight": "model-00002-of-00004.safetensors",
94
+ "model.layers.17.self_attn.k_proj.weight": "model-00002-of-00004.safetensors",
95
+ "model.layers.17.self_attn.o_proj.weight": "model-00002-of-00004.safetensors",
96
+ "model.layers.17.self_attn.q_proj.weight": "model-00002-of-00004.safetensors",
97
+ "model.layers.17.self_attn.v_proj.weight": "model-00002-of-00004.safetensors",
98
+ "model.layers.18.input_layernorm.weight": "model-00002-of-00004.safetensors",
99
+ "model.layers.18.mlp.down_proj.weight": "model-00002-of-00004.safetensors",
100
+ "model.layers.18.mlp.gate_proj.weight": "model-00002-of-00004.safetensors",
101
+ "model.layers.18.mlp.up_proj.weight": "model-00002-of-00004.safetensors",
102
+ "model.layers.18.post_attention_layernorm.weight": "model-00002-of-00004.safetensors",
103
+ "model.layers.18.self_attn.k_proj.weight": "model-00002-of-00004.safetensors",
104
+ "model.layers.18.self_attn.o_proj.weight": "model-00002-of-00004.safetensors",
105
+ "model.layers.18.self_attn.q_proj.weight": "model-00002-of-00004.safetensors",
106
+ "model.layers.18.self_attn.v_proj.weight": "model-00002-of-00004.safetensors",
107
+ "model.layers.19.input_layernorm.weight": "model-00003-of-00004.safetensors",
108
+ "model.layers.19.mlp.down_proj.weight": "model-00003-of-00004.safetensors",
109
+ "model.layers.19.mlp.gate_proj.weight": "model-00003-of-00004.safetensors",
110
+ "model.layers.19.mlp.up_proj.weight": "model-00003-of-00004.safetensors",
111
+ "model.layers.19.post_attention_layernorm.weight": "model-00003-of-00004.safetensors",
112
+ "model.layers.19.self_attn.k_proj.weight": "model-00002-of-00004.safetensors",
113
+ "model.layers.19.self_attn.o_proj.weight": "model-00002-of-00004.safetensors",
114
+ "model.layers.19.self_attn.q_proj.weight": "model-00002-of-00004.safetensors",
115
+ "model.layers.19.self_attn.v_proj.weight": "model-00002-of-00004.safetensors",
116
+ "model.layers.2.input_layernorm.weight": "model-00001-of-00004.safetensors",
117
+ "model.layers.2.mlp.down_proj.weight": "model-00001-of-00004.safetensors",
118
+ "model.layers.2.mlp.gate_proj.weight": "model-00001-of-00004.safetensors",
119
+ "model.layers.2.mlp.up_proj.weight": "model-00001-of-00004.safetensors",
120
+ "model.layers.2.post_attention_layernorm.weight": "model-00001-of-00004.safetensors",
121
+ "model.layers.2.self_attn.k_proj.weight": "model-00001-of-00004.safetensors",
122
+ "model.layers.2.self_attn.o_proj.weight": "model-00001-of-00004.safetensors",
123
+ "model.layers.2.self_attn.q_proj.weight": "model-00001-of-00004.safetensors",
124
+ "model.layers.2.self_attn.v_proj.weight": "model-00001-of-00004.safetensors",
125
+ "model.layers.20.input_layernorm.weight": "model-00003-of-00004.safetensors",
126
+ "model.layers.20.mlp.down_proj.weight": "model-00003-of-00004.safetensors",
127
+ "model.layers.20.mlp.gate_proj.weight": "model-00003-of-00004.safetensors",
128
+ "model.layers.20.mlp.up_proj.weight": "model-00003-of-00004.safetensors",
129
+ "model.layers.20.post_attention_layernorm.weight": "model-00003-of-00004.safetensors",
130
+ "model.layers.20.self_attn.k_proj.weight": "model-00003-of-00004.safetensors",
131
+ "model.layers.20.self_attn.o_proj.weight": "model-00003-of-00004.safetensors",
132
+ "model.layers.20.self_attn.q_proj.weight": "model-00003-of-00004.safetensors",
133
+ "model.layers.20.self_attn.v_proj.weight": "model-00003-of-00004.safetensors",
134
+ "model.layers.21.input_layernorm.weight": "model-00003-of-00004.safetensors",
135
+ "model.layers.21.mlp.down_proj.weight": "model-00003-of-00004.safetensors",
136
+ "model.layers.21.mlp.gate_proj.weight": "model-00003-of-00004.safetensors",
137
+ "model.layers.21.mlp.up_proj.weight": "model-00003-of-00004.safetensors",
138
+ "model.layers.21.post_attention_layernorm.weight": "model-00003-of-00004.safetensors",
139
+ "model.layers.21.self_attn.k_proj.weight": "model-00003-of-00004.safetensors",
140
+ "model.layers.21.self_attn.o_proj.weight": "model-00003-of-00004.safetensors",
141
+ "model.layers.21.self_attn.q_proj.weight": "model-00003-of-00004.safetensors",
142
+ "model.layers.21.self_attn.v_proj.weight": "model-00003-of-00004.safetensors",
143
+ "model.layers.22.input_layernorm.weight": "model-00003-of-00004.safetensors",
144
+ "model.layers.22.mlp.down_proj.weight": "model-00003-of-00004.safetensors",
145
+ "model.layers.22.mlp.gate_proj.weight": "model-00003-of-00004.safetensors",
146
+ "model.layers.22.mlp.up_proj.weight": "model-00003-of-00004.safetensors",
147
+ "model.layers.22.post_attention_layernorm.weight": "model-00003-of-00004.safetensors",
148
+ "model.layers.22.self_attn.k_proj.weight": "model-00003-of-00004.safetensors",
149
+ "model.layers.22.self_attn.o_proj.weight": "model-00003-of-00004.safetensors",
150
+ "model.layers.22.self_attn.q_proj.weight": "model-00003-of-00004.safetensors",
151
+ "model.layers.22.self_attn.v_proj.weight": "model-00003-of-00004.safetensors",
152
+ "model.layers.23.input_layernorm.weight": "model-00003-of-00004.safetensors",
153
+ "model.layers.23.mlp.down_proj.weight": "model-00003-of-00004.safetensors",
154
+ "model.layers.23.mlp.gate_proj.weight": "model-00003-of-00004.safetensors",
155
+ "model.layers.23.mlp.up_proj.weight": "model-00003-of-00004.safetensors",
156
+ "model.layers.23.post_attention_layernorm.weight": "model-00003-of-00004.safetensors",
157
+ "model.layers.23.self_attn.k_proj.weight": "model-00003-of-00004.safetensors",
158
+ "model.layers.23.self_attn.o_proj.weight": "model-00003-of-00004.safetensors",
159
+ "model.layers.23.self_attn.q_proj.weight": "model-00003-of-00004.safetensors",
160
+ "model.layers.23.self_attn.v_proj.weight": "model-00003-of-00004.safetensors",
161
+ "model.layers.24.input_layernorm.weight": "model-00003-of-00004.safetensors",
162
+ "model.layers.24.mlp.down_proj.weight": "model-00003-of-00004.safetensors",
163
+ "model.layers.24.mlp.gate_proj.weight": "model-00003-of-00004.safetensors",
164
+ "model.layers.24.mlp.up_proj.weight": "model-00003-of-00004.safetensors",
165
+ "model.layers.24.post_attention_layernorm.weight": "model-00003-of-00004.safetensors",
166
+ "model.layers.24.self_attn.k_proj.weight": "model-00003-of-00004.safetensors",
167
+ "model.layers.24.self_attn.o_proj.weight": "model-00003-of-00004.safetensors",
168
+ "model.layers.24.self_attn.q_proj.weight": "model-00003-of-00004.safetensors",
169
+ "model.layers.24.self_attn.v_proj.weight": "model-00003-of-00004.safetensors",
170
+ "model.layers.25.input_layernorm.weight": "model-00003-of-00004.safetensors",
171
+ "model.layers.25.mlp.down_proj.weight": "model-00003-of-00004.safetensors",
172
+ "model.layers.25.mlp.gate_proj.weight": "model-00003-of-00004.safetensors",
173
+ "model.layers.25.mlp.up_proj.weight": "model-00003-of-00004.safetensors",
174
+ "model.layers.25.post_attention_layernorm.weight": "model-00003-of-00004.safetensors",
175
+ "model.layers.25.self_attn.k_proj.weight": "model-00003-of-00004.safetensors",
176
+ "model.layers.25.self_attn.o_proj.weight": "model-00003-of-00004.safetensors",
177
+ "model.layers.25.self_attn.q_proj.weight": "model-00003-of-00004.safetensors",
178
+ "model.layers.25.self_attn.v_proj.weight": "model-00003-of-00004.safetensors",
179
+ "model.layers.26.input_layernorm.weight": "model-00003-of-00004.safetensors",
180
+ "model.layers.26.mlp.down_proj.weight": "model-00003-of-00004.safetensors",
181
+ "model.layers.26.mlp.gate_proj.weight": "model-00003-of-00004.safetensors",
182
+ "model.layers.26.mlp.up_proj.weight": "model-00003-of-00004.safetensors",
183
+ "model.layers.26.post_attention_layernorm.weight": "model-00003-of-00004.safetensors",
184
+ "model.layers.26.self_attn.k_proj.weight": "model-00003-of-00004.safetensors",
185
+ "model.layers.26.self_attn.o_proj.weight": "model-00003-of-00004.safetensors",
186
+ "model.layers.26.self_attn.q_proj.weight": "model-00003-of-00004.safetensors",
187
+ "model.layers.26.self_attn.v_proj.weight": "model-00003-of-00004.safetensors",
188
+ "model.layers.27.input_layernorm.weight": "model-00003-of-00004.safetensors",
189
+ "model.layers.27.mlp.down_proj.weight": "model-00003-of-00004.safetensors",
190
+ "model.layers.27.mlp.gate_proj.weight": "model-00003-of-00004.safetensors",
191
+ "model.layers.27.mlp.up_proj.weight": "model-00003-of-00004.safetensors",
192
+ "model.layers.27.post_attention_layernorm.weight": "model-00003-of-00004.safetensors",
193
+ "model.layers.27.self_attn.k_proj.weight": "model-00003-of-00004.safetensors",
194
+ "model.layers.27.self_attn.o_proj.weight": "model-00003-of-00004.safetensors",
195
+ "model.layers.27.self_attn.q_proj.weight": "model-00003-of-00004.safetensors",
196
+ "model.layers.27.self_attn.v_proj.weight": "model-00003-of-00004.safetensors",
197
+ "model.layers.28.input_layernorm.weight": "model-00003-of-00004.safetensors",
198
+ "model.layers.28.mlp.down_proj.weight": "model-00003-of-00004.safetensors",
199
+ "model.layers.28.mlp.gate_proj.weight": "model-00003-of-00004.safetensors",
200
+ "model.layers.28.mlp.up_proj.weight": "model-00003-of-00004.safetensors",
201
+ "model.layers.28.post_attention_layernorm.weight": "model-00003-of-00004.safetensors",
202
+ "model.layers.28.self_attn.k_proj.weight": "model-00003-of-00004.safetensors",
203
+ "model.layers.28.self_attn.o_proj.weight": "model-00003-of-00004.safetensors",
204
+ "model.layers.28.self_attn.q_proj.weight": "model-00003-of-00004.safetensors",
205
+ "model.layers.28.self_attn.v_proj.weight": "model-00003-of-00004.safetensors",
206
+ "model.layers.29.input_layernorm.weight": "model-00003-of-00004.safetensors",
207
+ "model.layers.29.mlp.down_proj.weight": "model-00003-of-00004.safetensors",
208
+ "model.layers.29.mlp.gate_proj.weight": "model-00003-of-00004.safetensors",
209
+ "model.layers.29.mlp.up_proj.weight": "model-00003-of-00004.safetensors",
210
+ "model.layers.29.post_attention_layernorm.weight": "model-00003-of-00004.safetensors",
211
+ "model.layers.29.self_attn.k_proj.weight": "model-00003-of-00004.safetensors",
212
+ "model.layers.29.self_attn.o_proj.weight": "model-00003-of-00004.safetensors",
213
+ "model.layers.29.self_attn.q_proj.weight": "model-00003-of-00004.safetensors",
214
+ "model.layers.29.self_attn.v_proj.weight": "model-00003-of-00004.safetensors",
215
+ "model.layers.3.input_layernorm.weight": "model-00001-of-00004.safetensors",
216
+ "model.layers.3.mlp.down_proj.weight": "model-00001-of-00004.safetensors",
217
+ "model.layers.3.mlp.gate_proj.weight": "model-00001-of-00004.safetensors",
218
+ "model.layers.3.mlp.up_proj.weight": "model-00001-of-00004.safetensors",
219
+ "model.layers.3.post_attention_layernorm.weight": "model-00001-of-00004.safetensors",
220
+ "model.layers.3.self_attn.k_proj.weight": "model-00001-of-00004.safetensors",
221
+ "model.layers.3.self_attn.o_proj.weight": "model-00001-of-00004.safetensors",
222
+ "model.layers.3.self_attn.q_proj.weight": "model-00001-of-00004.safetensors",
223
+ "model.layers.3.self_attn.v_proj.weight": "model-00001-of-00004.safetensors",
224
+ "model.layers.30.input_layernorm.weight": "model-00004-of-00004.safetensors",
225
+ "model.layers.30.mlp.down_proj.weight": "model-00004-of-00004.safetensors",
226
+ "model.layers.30.mlp.gate_proj.weight": "model-00003-of-00004.safetensors",
227
+ "model.layers.30.mlp.up_proj.weight": "model-00004-of-00004.safetensors",
228
+ "model.layers.30.post_attention_layernorm.weight": "model-00004-of-00004.safetensors",
229
+ "model.layers.30.self_attn.k_proj.weight": "model-00003-of-00004.safetensors",
230
+ "model.layers.30.self_attn.o_proj.weight": "model-00003-of-00004.safetensors",
231
+ "model.layers.30.self_attn.q_proj.weight": "model-00003-of-00004.safetensors",
232
+ "model.layers.30.self_attn.v_proj.weight": "model-00003-of-00004.safetensors",
233
+ "model.layers.31.input_layernorm.weight": "model-00004-of-00004.safetensors",
234
+ "model.layers.31.mlp.down_proj.weight": "model-00004-of-00004.safetensors",
235
+ "model.layers.31.mlp.gate_proj.weight": "model-00004-of-00004.safetensors",
236
+ "model.layers.31.mlp.up_proj.weight": "model-00004-of-00004.safetensors",
237
+ "model.layers.31.post_attention_layernorm.weight": "model-00004-of-00004.safetensors",
238
+ "model.layers.31.self_attn.k_proj.weight": "model-00004-of-00004.safetensors",
239
+ "model.layers.31.self_attn.o_proj.weight": "model-00004-of-00004.safetensors",
240
+ "model.layers.31.self_attn.q_proj.weight": "model-00004-of-00004.safetensors",
241
+ "model.layers.31.self_attn.v_proj.weight": "model-00004-of-00004.safetensors",
242
+ "model.layers.4.input_layernorm.weight": "model-00001-of-00004.safetensors",
243
+ "model.layers.4.mlp.down_proj.weight": "model-00001-of-00004.safetensors",
244
+ "model.layers.4.mlp.gate_proj.weight": "model-00001-of-00004.safetensors",
245
+ "model.layers.4.mlp.up_proj.weight": "model-00001-of-00004.safetensors",
246
+ "model.layers.4.post_attention_layernorm.weight": "model-00001-of-00004.safetensors",
247
+ "model.layers.4.self_attn.k_proj.weight": "model-00001-of-00004.safetensors",
248
+ "model.layers.4.self_attn.o_proj.weight": "model-00001-of-00004.safetensors",
249
+ "model.layers.4.self_attn.q_proj.weight": "model-00001-of-00004.safetensors",
250
+ "model.layers.4.self_attn.v_proj.weight": "model-00001-of-00004.safetensors",
251
+ "model.layers.5.input_layernorm.weight": "model-00001-of-00004.safetensors",
252
+ "model.layers.5.mlp.down_proj.weight": "model-00001-of-00004.safetensors",
253
+ "model.layers.5.mlp.gate_proj.weight": "model-00001-of-00004.safetensors",
254
+ "model.layers.5.mlp.up_proj.weight": "model-00001-of-00004.safetensors",
255
+ "model.layers.5.post_attention_layernorm.weight": "model-00001-of-00004.safetensors",
256
+ "model.layers.5.self_attn.k_proj.weight": "model-00001-of-00004.safetensors",
257
+ "model.layers.5.self_attn.o_proj.weight": "model-00001-of-00004.safetensors",
258
+ "model.layers.5.self_attn.q_proj.weight": "model-00001-of-00004.safetensors",
259
+ "model.layers.5.self_attn.v_proj.weight": "model-00001-of-00004.safetensors",
260
+ "model.layers.6.input_layernorm.weight": "model-00001-of-00004.safetensors",
261
+ "model.layers.6.mlp.down_proj.weight": "model-00001-of-00004.safetensors",
262
+ "model.layers.6.mlp.gate_proj.weight": "model-00001-of-00004.safetensors",
263
+ "model.layers.6.mlp.up_proj.weight": "model-00001-of-00004.safetensors",
264
+ "model.layers.6.post_attention_layernorm.weight": "model-00001-of-00004.safetensors",
265
+ "model.layers.6.self_attn.k_proj.weight": "model-00001-of-00004.safetensors",
266
+ "model.layers.6.self_attn.o_proj.weight": "model-00001-of-00004.safetensors",
267
+ "model.layers.6.self_attn.q_proj.weight": "model-00001-of-00004.safetensors",
268
+ "model.layers.6.self_attn.v_proj.weight": "model-00001-of-00004.safetensors",
269
+ "model.layers.7.input_layernorm.weight": "model-00002-of-00004.safetensors",
270
+ "model.layers.7.mlp.down_proj.weight": "model-00002-of-00004.safetensors",
271
+ "model.layers.7.mlp.gate_proj.weight": "model-00001-of-00004.safetensors",
272
+ "model.layers.7.mlp.up_proj.weight": "model-00001-of-00004.safetensors",
273
+ "model.layers.7.post_attention_layernorm.weight": "model-00002-of-00004.safetensors",
274
+ "model.layers.7.self_attn.k_proj.weight": "model-00001-of-00004.safetensors",
275
+ "model.layers.7.self_attn.o_proj.weight": "model-00001-of-00004.safetensors",
276
+ "model.layers.7.self_attn.q_proj.weight": "model-00001-of-00004.safetensors",
277
+ "model.layers.7.self_attn.v_proj.weight": "model-00001-of-00004.safetensors",
278
+ "model.layers.8.input_layernorm.weight": "model-00002-of-00004.safetensors",
279
+ "model.layers.8.mlp.down_proj.weight": "model-00002-of-00004.safetensors",
280
+ "model.layers.8.mlp.gate_proj.weight": "model-00002-of-00004.safetensors",
281
+ "model.layers.8.mlp.up_proj.weight": "model-00002-of-00004.safetensors",
282
+ "model.layers.8.post_attention_layernorm.weight": "model-00002-of-00004.safetensors",
283
+ "model.layers.8.self_attn.k_proj.weight": "model-00002-of-00004.safetensors",
284
+ "model.layers.8.self_attn.o_proj.weight": "model-00002-of-00004.safetensors",
285
+ "model.layers.8.self_attn.q_proj.weight": "model-00002-of-00004.safetensors",
286
+ "model.layers.8.self_attn.v_proj.weight": "model-00002-of-00004.safetensors",
287
+ "model.layers.9.input_layernorm.weight": "model-00002-of-00004.safetensors",
288
+ "model.layers.9.mlp.down_proj.weight": "model-00002-of-00004.safetensors",
289
+ "model.layers.9.mlp.gate_proj.weight": "model-00002-of-00004.safetensors",
290
+ "model.layers.9.mlp.up_proj.weight": "model-00002-of-00004.safetensors",
291
+ "model.layers.9.post_attention_layernorm.weight": "model-00002-of-00004.safetensors",
292
+ "model.layers.9.self_attn.k_proj.weight": "model-00002-of-00004.safetensors",
293
+ "model.layers.9.self_attn.o_proj.weight": "model-00002-of-00004.safetensors",
294
+ "model.layers.9.self_attn.q_proj.weight": "model-00002-of-00004.safetensors",
295
+ "model.layers.9.self_attn.v_proj.weight": "model-00002-of-00004.safetensors",
296
+ "model.norm.weight": "model-00004-of-00004.safetensors"
297
+ }
298
+ }
logs/UNIVLA_SIMPLERENV_BRIDGE_VIDEO_BS128_20k/checkpoint-20000/special_tokens_map.json ADDED
@@ -0,0 +1,5 @@
 
 
 
 
 
 
1
+ {
2
+ "bos_token": "<|extra_203|>",
3
+ "eos_token": "<|extra_204|>",
4
+ "pad_token": "<|endoftext|>"
5
+ }
logs/UNIVLA_SIMPLERENV_BRIDGE_VIDEO_BS128_20k/checkpoint-20000/tokenizer_config.json ADDED
@@ -0,0 +1,18 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ {
2
+ "added_tokens_decoder": {},
3
+ "auto_map": {
4
+ "AutoTokenizer": [
5
+ "tokenization_emu3.Emu3Tokenizer",
6
+ null
7
+ ]
8
+ },
9
+ "bos_token": "<|extra_203|>",
10
+ "clean_up_tokenization_spaces": true,
11
+ "eos_token": "<|extra_204|>",
12
+ "extra_special_tokens": {},
13
+ "model_max_length": 2400,
14
+ "pad_token": "<|endoftext|>",
15
+ "padding_side": "right",
16
+ "tokenizer_class": "Emu3Tokenizer",
17
+ "use_fast": false
18
+ }
logs/UNIVLA_SIMPLERENV_BRIDGE_VIDEO_BS128_20k/checkpoint-20000/trainer_state.json ADDED
The diff for this file is too large to render. See raw diff
 
logs/UNIVLA_SIMPLERENV_BRIDGE_VIDEO_BS128_20k/checkpoint-20000/zero_to_fp32.py ADDED
@@ -0,0 +1,760 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ #!/usr/bin/env python
2
+
3
+ # Copyright (c) Microsoft Corporation.
4
+ # SPDX-License-Identifier: Apache-2.0
5
+
6
+ # DeepSpeed Team
7
+
8
+ # This script extracts fp32 consolidated weights from a zero 1, 2 and 3 DeepSpeed checkpoints. It gets
9
+ # copied into the top level checkpoint dir, so the user can easily do the conversion at any point in
10
+ # the future. Once extracted, the weights don't require DeepSpeed and can be used in any
11
+ # application.
12
+ #
13
+ # example:
14
+ # python zero_to_fp32.py . output_dir/
15
+ # or
16
+ # python zero_to_fp32.py . output_dir/ --safe_serialization
17
+
18
+ import argparse
19
+ import torch
20
+ import glob
21
+ import math
22
+ import os
23
+ import re
24
+ import gc
25
+ import json
26
+ import numpy as np
27
+ from tqdm import tqdm
28
+ from collections import OrderedDict
29
+ from dataclasses import dataclass
30
+
31
+ # while this script doesn't use deepspeed to recover data, since the checkpoints are pickled with
32
+ # DeepSpeed data structures it has to be available in the current python environment.
33
+ from deepspeed.utils import logger
34
+ from deepspeed.checkpoint.constants import (DS_VERSION, OPTIMIZER_STATE_DICT, SINGLE_PARTITION_OF_FP32_GROUPS,
35
+ FP32_FLAT_GROUPS, ZERO_STAGE, PARTITION_COUNT, PARAM_SHAPES, BUFFER_NAMES,
36
+ FROZEN_PARAM_SHAPES, FROZEN_PARAM_FRAGMENTS)
37
+
38
+
39
+ @dataclass
40
+ class zero_model_state:
41
+ buffers: dict()
42
+ param_shapes: dict()
43
+ shared_params: list
44
+ ds_version: int
45
+ frozen_param_shapes: dict()
46
+ frozen_param_fragments: dict()
47
+
48
+
49
+ debug = 0
50
+
51
+ # load to cpu
52
+ device = torch.device('cpu')
53
+
54
+
55
+ def atoi(text):
56
+ return int(text) if text.isdigit() else text
57
+
58
+
59
+ def natural_keys(text):
60
+ '''
61
+ alist.sort(key=natural_keys) sorts in human order
62
+ http://nedbatchelder.com/blog/200712/human_sorting.html
63
+ (See Toothy's implementation in the comments)
64
+ '''
65
+ return [atoi(c) for c in re.split(r'(\d+)', text)]
66
+
67
+
68
+ def get_model_state_file(checkpoint_dir, zero_stage):
69
+ if not os.path.isdir(checkpoint_dir):
70
+ raise FileNotFoundError(f"Directory '{checkpoint_dir}' doesn't exist")
71
+
72
+ # there should be only one file
73
+ if zero_stage <= 2:
74
+ file = os.path.join(checkpoint_dir, "mp_rank_00_model_states.pt")
75
+ elif zero_stage == 3:
76
+ file = os.path.join(checkpoint_dir, "zero_pp_rank_0_mp_rank_00_model_states.pt")
77
+
78
+ if not os.path.exists(file):
79
+ raise FileNotFoundError(f"can't find model states file at '{file}'")
80
+
81
+ return file
82
+
83
+
84
+ def get_checkpoint_files(checkpoint_dir, glob_pattern):
85
+ # XXX: need to test that this simple glob rule works for multi-node setup too
86
+ ckpt_files = sorted(glob.glob(os.path.join(checkpoint_dir, glob_pattern)), key=natural_keys)
87
+
88
+ if len(ckpt_files) == 0:
89
+ raise FileNotFoundError(f"can't find {glob_pattern} files in directory '{checkpoint_dir}'")
90
+
91
+ return ckpt_files
92
+
93
+
94
+ def get_optim_files(checkpoint_dir):
95
+ return get_checkpoint_files(checkpoint_dir, "*_optim_states.pt")
96
+
97
+
98
+ def get_model_state_files(checkpoint_dir):
99
+ return get_checkpoint_files(checkpoint_dir, "*_model_states.pt")
100
+
101
+
102
+ def parse_model_states(files):
103
+ zero_model_states = []
104
+ for file in files:
105
+ state_dict = torch.load(file, map_location=device, weights_only=False)
106
+
107
+ if BUFFER_NAMES not in state_dict:
108
+ raise ValueError(f"{file} is not a model state checkpoint")
109
+ buffer_names = state_dict[BUFFER_NAMES]
110
+ if debug:
111
+ print("Found buffers:", buffer_names)
112
+
113
+ # recover just the buffers while restoring them to fp32 if they were saved in fp16
114
+ buffers = {k: v.float() for k, v in state_dict["module"].items() if k in buffer_names}
115
+ param_shapes = state_dict[PARAM_SHAPES]
116
+
117
+ # collect parameters that are included in param_shapes
118
+ param_names = []
119
+ for s in param_shapes:
120
+ for name in s.keys():
121
+ param_names.append(name)
122
+
123
+ # update with frozen parameters
124
+ frozen_param_shapes = state_dict.get(FROZEN_PARAM_SHAPES, None)
125
+ if frozen_param_shapes is not None:
126
+ if debug:
127
+ print(f"Found frozen_param_shapes: {frozen_param_shapes}")
128
+ param_names += list(frozen_param_shapes.keys())
129
+
130
+ # handle shared params
131
+ shared_params = [[k, v] for k, v in state_dict["shared_params"].items()]
132
+
133
+ ds_version = state_dict.get(DS_VERSION, None)
134
+
135
+ frozen_param_fragments = state_dict.get(FROZEN_PARAM_FRAGMENTS, None)
136
+
137
+ z_model_state = zero_model_state(buffers=buffers,
138
+ param_shapes=param_shapes,
139
+ shared_params=shared_params,
140
+ ds_version=ds_version,
141
+ frozen_param_shapes=frozen_param_shapes,
142
+ frozen_param_fragments=frozen_param_fragments)
143
+ zero_model_states.append(z_model_state)
144
+
145
+ return zero_model_states
146
+
147
+
148
+ def parse_optim_states(files, ds_checkpoint_dir):
149
+ total_files = len(files)
150
+ state_dicts = []
151
+ for f in tqdm(files, desc='Loading checkpoint shards'):
152
+ state_dict = torch.load(f, map_location=device, mmap=True, weights_only=False)
153
+ # immediately discard the potentially huge 2 optimizer states as we only care for fp32 master weights
154
+ # and also handle the case where it was already removed by another helper script
155
+ state_dict["optimizer_state_dict"].pop("optimizer_state_dict", None)
156
+ state_dicts.append(state_dict)
157
+
158
+ if ZERO_STAGE not in state_dicts[0][OPTIMIZER_STATE_DICT]:
159
+ raise ValueError(f"{files[0]} is not a zero checkpoint")
160
+ zero_stage = state_dicts[0][OPTIMIZER_STATE_DICT][ZERO_STAGE]
161
+ world_size = state_dicts[0][OPTIMIZER_STATE_DICT][PARTITION_COUNT]
162
+
163
+ # For ZeRO-2 each param group can have different partition_count as data parallelism for expert
164
+ # parameters can be different from data parallelism for non-expert parameters. So we can just
165
+ # use the max of the partition_count to get the dp world_size.
166
+
167
+ if type(world_size) is list:
168
+ world_size = max(world_size)
169
+
170
+ if world_size != total_files:
171
+ raise ValueError(
172
+ f"Expected {world_size} of '*_optim_states.pt' under '{ds_checkpoint_dir}' but found {total_files} files. "
173
+ "Possibly due to an overwrite of an old checkpoint, or a checkpoint didn't get saved by one or more processes."
174
+ )
175
+
176
+ # the groups are named differently in each stage
177
+ if zero_stage <= 2:
178
+ fp32_groups_key = SINGLE_PARTITION_OF_FP32_GROUPS
179
+ elif zero_stage == 3:
180
+ fp32_groups_key = FP32_FLAT_GROUPS
181
+ else:
182
+ raise ValueError(f"unknown zero stage {zero_stage}")
183
+
184
+ fp32_flat_groups = [state_dicts[i][OPTIMIZER_STATE_DICT][fp32_groups_key] for i in range(len(state_dicts))]
185
+ return zero_stage, world_size, fp32_flat_groups
186
+
187
+
188
+ def _get_fp32_state_dict_from_zero_checkpoint(ds_checkpoint_dir, exclude_frozen_parameters):
189
+ """
190
+ Returns fp32 state_dict reconstructed from ds checkpoint
191
+
192
+ Args:
193
+ - ``ds_checkpoint_dir``: path to the deepspeed checkpoint folder (where the optimizer files are)
194
+
195
+ """
196
+ print(f"Processing zero checkpoint '{ds_checkpoint_dir}'")
197
+
198
+ optim_files = get_optim_files(ds_checkpoint_dir)
199
+ zero_stage, world_size, fp32_flat_groups = parse_optim_states(optim_files, ds_checkpoint_dir)
200
+ print(f"Detected checkpoint of type zero stage {zero_stage}, world_size: {world_size}")
201
+
202
+ model_files = get_model_state_files(ds_checkpoint_dir)
203
+
204
+ zero_model_states = parse_model_states(model_files)
205
+ print(f'Parsing checkpoint created by deepspeed=={zero_model_states[0].ds_version}')
206
+
207
+ if zero_stage <= 2:
208
+ return _get_fp32_state_dict_from_zero2_checkpoint(world_size, fp32_flat_groups, zero_model_states,
209
+ exclude_frozen_parameters)
210
+ elif zero_stage == 3:
211
+ return _get_fp32_state_dict_from_zero3_checkpoint(world_size, fp32_flat_groups, zero_model_states,
212
+ exclude_frozen_parameters)
213
+
214
+
215
+ def _zero2_merge_frozen_params(state_dict, zero_model_states):
216
+ if zero_model_states[0].frozen_param_shapes is None or len(zero_model_states[0].frozen_param_shapes) == 0:
217
+ return
218
+
219
+ frozen_param_shapes = zero_model_states[0].frozen_param_shapes
220
+ frozen_param_fragments = zero_model_states[0].frozen_param_fragments
221
+
222
+ if debug:
223
+ num_elem = sum(s.numel() for s in frozen_param_shapes.values())
224
+ print(f'rank 0: {FROZEN_PARAM_SHAPES}.numel = {num_elem}')
225
+
226
+ wanted_params = len(frozen_param_shapes)
227
+ wanted_numel = sum(s.numel() for s in frozen_param_shapes.values())
228
+ avail_numel = sum([p.numel() for p in frozen_param_fragments.values()])
229
+ print(f'Frozen params: Have {avail_numel} numels to process.')
230
+ print(f'Frozen params: Need {wanted_numel} numels in {wanted_params} params')
231
+
232
+ total_params = 0
233
+ total_numel = 0
234
+ for name, shape in frozen_param_shapes.items():
235
+ total_params += 1
236
+ unpartitioned_numel = shape.numel()
237
+ total_numel += unpartitioned_numel
238
+
239
+ state_dict[name] = frozen_param_fragments[name]
240
+
241
+ if debug:
242
+ print(f"{name} full shape: {shape} unpartitioned numel {unpartitioned_numel} ")
243
+
244
+ print(f"Reconstructed Frozen fp32 state dict with {total_params} params {total_numel} elements")
245
+
246
+
247
+ def _has_callable(obj, fn):
248
+ attr = getattr(obj, fn, None)
249
+ return callable(attr)
250
+
251
+
252
+ def _zero2_merge_trainable_params(state_dict, world_size, fp32_flat_groups, zero_model_states):
253
+ param_shapes = zero_model_states[0].param_shapes
254
+
255
+ # Reconstruction protocol:
256
+ #
257
+ # XXX: document this
258
+
259
+ if debug:
260
+ for i in range(world_size):
261
+ for j in range(len(fp32_flat_groups[0])):
262
+ print(f"{FP32_FLAT_GROUPS}[{i}][{j}].shape={fp32_flat_groups[i][j].shape}")
263
+
264
+ # XXX: memory usage doubles here (zero2)
265
+ num_param_groups = len(fp32_flat_groups[0])
266
+ merged_single_partition_of_fp32_groups = []
267
+ for i in range(num_param_groups):
268
+ merged_partitions = [sd[i] for sd in fp32_flat_groups]
269
+ full_single_fp32_vector = torch.cat(merged_partitions, 0)
270
+ merged_single_partition_of_fp32_groups.append(full_single_fp32_vector)
271
+ avail_numel = sum(
272
+ [full_single_fp32_vector.numel() for full_single_fp32_vector in merged_single_partition_of_fp32_groups])
273
+
274
+ if debug:
275
+ wanted_params = sum([len(shapes) for shapes in param_shapes])
276
+ wanted_numel = sum([sum(shape.numel() for shape in shapes.values()) for shapes in param_shapes])
277
+ # not asserting if there is a mismatch due to possible padding
278
+ print(f"Have {avail_numel} numels to process.")
279
+ print(f"Need {wanted_numel} numels in {wanted_params} params.")
280
+
281
+ # params
282
+ # XXX: for huge models that can't fit into the host's RAM we will have to recode this to support
283
+ # out-of-core computing solution
284
+ total_numel = 0
285
+ total_params = 0
286
+ for shapes, full_single_fp32_vector in zip(param_shapes, merged_single_partition_of_fp32_groups):
287
+ offset = 0
288
+ avail_numel = full_single_fp32_vector.numel()
289
+ for name, shape in shapes.items():
290
+
291
+ unpartitioned_numel = shape.numel() if _has_callable(shape, 'numel') else math.prod(shape)
292
+ total_numel += unpartitioned_numel
293
+ total_params += 1
294
+
295
+ if debug:
296
+ print(f"{name} full shape: {shape} unpartitioned numel {unpartitioned_numel} ")
297
+ state_dict[name] = full_single_fp32_vector.narrow(0, offset, unpartitioned_numel).view(shape)
298
+ offset += unpartitioned_numel
299
+
300
+ # Z2 started to align to 2*world_size to improve nccl performance. Therefore both offset and
301
+ # avail_numel can differ by anywhere between 0..2*world_size. Due to two unrelated complex
302
+ # paddings performed in the code it's almost impossible to predict the exact numbers w/o the
303
+ # live optimizer object, so we are checking that the numbers are within the right range
304
+ align_to = 2 * world_size
305
+
306
+ def zero2_align(x):
307
+ return align_to * math.ceil(x / align_to)
308
+
309
+ if debug:
310
+ print(f"original offset={offset}, avail_numel={avail_numel}")
311
+
312
+ offset = zero2_align(offset)
313
+ avail_numel = zero2_align(avail_numel)
314
+
315
+ if debug:
316
+ print(f"aligned offset={offset}, avail_numel={avail_numel}")
317
+
318
+ # Sanity check
319
+ if offset != avail_numel:
320
+ raise ValueError(f"consumed {offset} numels out of {avail_numel} - something is wrong")
321
+
322
+ print(f"Reconstructed fp32 state dict with {total_params} params {total_numel} elements")
323
+
324
+
325
+ def _get_fp32_state_dict_from_zero2_checkpoint(world_size, fp32_flat_groups, zero_model_states,
326
+ exclude_frozen_parameters):
327
+ state_dict = OrderedDict()
328
+
329
+ # buffers
330
+ buffers = zero_model_states[0].buffers
331
+ state_dict.update(buffers)
332
+ if debug:
333
+ print(f"added {len(buffers)} buffers")
334
+
335
+ if not exclude_frozen_parameters:
336
+ _zero2_merge_frozen_params(state_dict, zero_model_states)
337
+
338
+ _zero2_merge_trainable_params(state_dict, world_size, fp32_flat_groups, zero_model_states)
339
+
340
+ # recover shared parameters
341
+ for pair in zero_model_states[0].shared_params:
342
+ if pair[1] in state_dict:
343
+ state_dict[pair[0]] = state_dict[pair[1]]
344
+
345
+ return state_dict
346
+
347
+
348
+ def zero3_partitioned_param_info(unpartitioned_numel, world_size):
349
+ remainder = unpartitioned_numel % world_size
350
+ padding_numel = (world_size - remainder) if remainder else 0
351
+ partitioned_numel = math.ceil(unpartitioned_numel / world_size)
352
+ return partitioned_numel, padding_numel
353
+
354
+
355
+ def _zero3_merge_frozen_params(state_dict, world_size, zero_model_states):
356
+ if zero_model_states[0].frozen_param_shapes is None or len(zero_model_states[0].frozen_param_shapes) == 0:
357
+ return
358
+
359
+ if debug:
360
+ for i in range(world_size):
361
+ num_elem = sum(s.numel() for s in zero_model_states[i].frozen_param_fragments.values())
362
+ print(f'rank {i}: {FROZEN_PARAM_SHAPES}.numel = {num_elem}')
363
+
364
+ frozen_param_shapes = zero_model_states[0].frozen_param_shapes
365
+ wanted_params = len(frozen_param_shapes)
366
+ wanted_numel = sum(s.numel() for s in frozen_param_shapes.values())
367
+ avail_numel = sum([p.numel() for p in zero_model_states[0].frozen_param_fragments.values()]) * world_size
368
+ print(f'Frozen params: Have {avail_numel} numels to process.')
369
+ print(f'Frozen params: Need {wanted_numel} numels in {wanted_params} params')
370
+
371
+ total_params = 0
372
+ total_numel = 0
373
+ for name, shape in zero_model_states[0].frozen_param_shapes.items():
374
+ total_params += 1
375
+ unpartitioned_numel = shape.numel()
376
+ total_numel += unpartitioned_numel
377
+
378
+ param_frags = tuple(model_state.frozen_param_fragments[name] for model_state in zero_model_states)
379
+ state_dict[name] = torch.cat(param_frags, 0).narrow(0, 0, unpartitioned_numel).view(shape)
380
+
381
+ partitioned_numel, partitioned_padding_numel = zero3_partitioned_param_info(unpartitioned_numel, world_size)
382
+
383
+ if debug:
384
+ print(
385
+ f"Frozen params: {total_params} {name} full shape: {shape} partition0 numel={partitioned_numel} partitioned_padding_numel={partitioned_padding_numel}"
386
+ )
387
+
388
+ print(f"Reconstructed Frozen fp32 state dict with {total_params} params {total_numel} elements")
389
+
390
+
391
+ class GatheredTensor:
392
+ """
393
+ A pseudo tensor that collects partitioned weights.
394
+ It is more memory efficient when there are multiple groups.
395
+ """
396
+
397
+ def __init__(self, flat_groups, flat_groups_offset, offset, partitioned_numel, shape):
398
+ self.flat_groups = flat_groups
399
+ self.flat_groups_offset = flat_groups_offset
400
+ self.offset = offset
401
+ self.partitioned_numel = partitioned_numel
402
+ self.shape = shape
403
+ self.dtype = self.flat_groups[0][0].dtype
404
+
405
+ def contiguous(self):
406
+ """
407
+ Merge partitioned weights from flat_groups into a single tensor.
408
+ """
409
+ end_idx = self.offset + self.partitioned_numel
410
+ world_size = len(self.flat_groups)
411
+ pad_flat_param_chunks = []
412
+
413
+ for rank_i in range(world_size):
414
+ # for each rank, we need to collect weights from related group/groups
415
+ flat_groups_at_rank_i = self.flat_groups[rank_i]
416
+ start_group_id = None
417
+ end_group_id = None
418
+ for group_id in range(len(self.flat_groups_offset)):
419
+ if self.flat_groups_offset[group_id] <= self.offset < self.flat_groups_offset[group_id + 1]:
420
+ start_group_id = group_id
421
+ if self.flat_groups_offset[group_id] < end_idx <= self.flat_groups_offset[group_id + 1]:
422
+ end_group_id = group_id
423
+ break
424
+ # collect weights from related group/groups
425
+ for group_id in range(start_group_id, end_group_id + 1):
426
+ flat_tensor = flat_groups_at_rank_i[group_id]
427
+ start_offset = self.offset - self.flat_groups_offset[group_id]
428
+ end_offset = min(end_idx, self.flat_groups_offset[group_id + 1]) - self.flat_groups_offset[group_id]
429
+ pad_flat_param_chunks.append(flat_tensor[start_offset:end_offset])
430
+
431
+ # collect weights from all ranks
432
+ pad_flat_param = torch.cat(pad_flat_param_chunks, dim=0)
433
+ param = pad_flat_param[:self.shape.numel()].view(self.shape).contiguous()
434
+ return param
435
+
436
+
437
+ def _zero3_merge_trainable_params(state_dict, world_size, fp32_flat_groups, zero_model_states):
438
+ param_shapes = zero_model_states[0].param_shapes
439
+ avail_numel = sum([flat_group.numel() for flat_group in fp32_flat_groups[0]]) * world_size
440
+
441
+ # Reconstruction protocol: For zero3 we need to zip the partitions together at boundary of each
442
+ # param, re-consolidating each param, while dealing with padding if any
443
+
444
+ # merge list of dicts, preserving order
445
+ param_shapes = {k: v for d in param_shapes for k, v in d.items()}
446
+
447
+ if debug:
448
+ for i in range(world_size):
449
+ print(f"{FP32_FLAT_GROUPS}[{i}].shape={fp32_flat_groups[i].shape}")
450
+
451
+ wanted_params = len(param_shapes)
452
+ wanted_numel = sum(shape.numel() for shape in param_shapes.values())
453
+ # not asserting if there is a mismatch due to possible padding
454
+ avail_numel = fp32_flat_groups[0].numel() * world_size
455
+ print(f"Trainable params: Have {avail_numel} numels to process.")
456
+ print(f"Trainable params: Need {wanted_numel} numels in {wanted_params} params.")
457
+
458
+ # params
459
+ # XXX: for huge models that can't fit into the host's RAM we will have to recode this to support
460
+ # out-of-core computing solution
461
+ offset = 0
462
+ total_numel = 0
463
+ total_params = 0
464
+ flat_groups_offset = [0] + list(np.cumsum([flat_tensor.numel() for flat_tensor in fp32_flat_groups[0]]))
465
+ for name, shape in tqdm(param_shapes.items(), desc='Gathering sharded weights'):
466
+ unpartitioned_numel = shape.numel()
467
+ total_numel += unpartitioned_numel
468
+ total_params += 1
469
+ partitioned_numel, partitioned_padding_numel = zero3_partitioned_param_info(unpartitioned_numel, world_size)
470
+
471
+ if debug:
472
+ print(
473
+ f"Trainable params: {total_params} {name} full shape: {shape} partition0 numel={partitioned_numel} partitioned_padding_numel={partitioned_padding_numel}"
474
+ )
475
+
476
+ # memory efficient tensor
477
+ tensor = GatheredTensor(fp32_flat_groups, flat_groups_offset, offset, partitioned_numel, shape)
478
+ state_dict[name] = tensor
479
+ offset += partitioned_numel
480
+
481
+ offset *= world_size
482
+
483
+ # Sanity check
484
+ if offset != avail_numel:
485
+ raise ValueError(f"consumed {offset} numels out of {avail_numel} - something is wrong")
486
+
487
+ print(f"Reconstructed Trainable fp32 state dict with {total_params} params {total_numel} elements")
488
+
489
+
490
+ def _get_fp32_state_dict_from_zero3_checkpoint(world_size, fp32_flat_groups, zero_model_states,
491
+ exclude_frozen_parameters):
492
+ state_dict = OrderedDict()
493
+
494
+ # buffers
495
+ buffers = zero_model_states[0].buffers
496
+ state_dict.update(buffers)
497
+ if debug:
498
+ print(f"added {len(buffers)} buffers")
499
+
500
+ if not exclude_frozen_parameters:
501
+ _zero3_merge_frozen_params(state_dict, world_size, zero_model_states)
502
+
503
+ _zero3_merge_trainable_params(state_dict, world_size, fp32_flat_groups, zero_model_states)
504
+
505
+ # recover shared parameters
506
+ for pair in zero_model_states[0].shared_params:
507
+ if pair[1] in state_dict:
508
+ state_dict[pair[0]] = state_dict[pair[1]]
509
+
510
+ return state_dict
511
+
512
+
513
+ def to_torch_tensor(state_dict, return_empty_tensor=False):
514
+ """
515
+ Convert state_dict of GatheredTensor to torch tensor
516
+ """
517
+ torch_state_dict = {}
518
+ converted_tensors = {}
519
+ for name, tensor in state_dict.items():
520
+ tensor_id = id(tensor)
521
+ if tensor_id in converted_tensors: # shared tensors
522
+ shared_tensor = torch_state_dict[converted_tensors[tensor_id]]
523
+ torch_state_dict[name] = shared_tensor
524
+ else:
525
+ converted_tensors[tensor_id] = name
526
+ if return_empty_tensor:
527
+ torch_state_dict[name] = torch.empty(tensor.shape, dtype=tensor.dtype)
528
+ else:
529
+ torch_state_dict[name] = tensor.contiguous()
530
+ return torch_state_dict
531
+
532
+
533
+ def get_fp32_state_dict_from_zero_checkpoint(checkpoint_dir,
534
+ tag=None,
535
+ exclude_frozen_parameters=False,
536
+ lazy_mode=False):
537
+ """
538
+ Convert ZeRO 2 or 3 checkpoint into a single fp32 consolidated state_dict that can be loaded with
539
+ ``load_state_dict()`` and used for training without DeepSpeed or shared with others, for example
540
+ via a model hub.
541
+
542
+ Args:
543
+ - ``checkpoint_dir``: path to the desired checkpoint folder
544
+ - ``tag``: checkpoint tag used as a unique identifier for checkpoint. If not provided will attempt to load tag in 'latest' file. e.g., ``global_step14``
545
+ - ``exclude_frozen_parameters``: exclude frozen parameters
546
+ - ``lazy_mode``: get state_dict in lazy mode. It returns a dict of pesduo tensor instead of torch tensor, which is more memory efficient.
547
+ Convert the pesduo tensor to torch tensor by ``.contiguous()``
548
+
549
+ Returns:
550
+ - pytorch ``state_dict``
551
+
552
+ A typical usage might be ::
553
+
554
+ from deepspeed.utils.zero_to_fp32 import get_fp32_state_dict_from_zero_checkpoint
555
+ # do the training and checkpoint saving
556
+ state_dict = get_fp32_state_dict_from_zero_checkpoint(checkpoint_dir) # already on cpu
557
+ model = model.cpu() # move to cpu
558
+ model.load_state_dict(state_dict)
559
+ # submit to model hub or save the model to share with others
560
+
561
+ In this example the ``model`` will no longer be usable in the deepspeed context of the same
562
+ application. i.e. you will need to re-initialize the deepspeed engine, since
563
+ ``model.load_state_dict(state_dict)`` will remove all the deepspeed magic from it.
564
+
565
+ If you want it all done for you, use ``load_state_dict_from_zero_checkpoint`` instead.
566
+
567
+ Note: the above usage may not work if your application doesn't have sufficient free CPU memory.
568
+ You may need to use the offline approach using the ``zero_to_fp32.py`` script that is saved with
569
+ the checkpoint. Or you can load state_dict in lazy mode ::
570
+
571
+ from deepspeed.utils.zero_to_fp32 import get_fp32_state_dict_from_zero_checkpoint
572
+ state_dict = get_fp32_state_dict_from_zero_checkpoint(checkpoint_dir, lazy_mode=True) # not on cpu
573
+ for name, lazy_tensor in state_dict.item():
574
+ tensor = lazy_tensor.contiguous() # to cpu
575
+ print(name, tensor)
576
+ # del tensor to release memory if it no longer in use
577
+ """
578
+ if tag is None:
579
+ latest_path = os.path.join(checkpoint_dir, 'latest')
580
+ if os.path.isfile(latest_path):
581
+ with open(latest_path, 'r') as fd:
582
+ tag = fd.read().strip()
583
+ else:
584
+ raise ValueError(f"Unable to find 'latest' file at {latest_path}")
585
+
586
+ ds_checkpoint_dir = os.path.join(checkpoint_dir, tag)
587
+
588
+ if not os.path.isdir(ds_checkpoint_dir):
589
+ raise FileNotFoundError(f"Directory '{ds_checkpoint_dir}' doesn't exist")
590
+
591
+ state_dict = _get_fp32_state_dict_from_zero_checkpoint(ds_checkpoint_dir, exclude_frozen_parameters)
592
+ if lazy_mode:
593
+ return state_dict
594
+ else:
595
+ return to_torch_tensor(state_dict)
596
+
597
+
598
+ def convert_zero_checkpoint_to_fp32_state_dict(checkpoint_dir,
599
+ output_dir,
600
+ max_shard_size="5GB",
601
+ safe_serialization=False,
602
+ tag=None,
603
+ exclude_frozen_parameters=False):
604
+ """
605
+ Convert ZeRO 2 or 3 checkpoint into a single fp32 consolidated ``state_dict`` file that can be
606
+ loaded with ``torch.load(file)`` + ``load_state_dict()`` and used for training without DeepSpeed.
607
+
608
+ Args:
609
+ - ``checkpoint_dir``: path to the desired checkpoint folder. (one that contains the tag-folder, like ``global_step14``)
610
+ - ``output_dir``: directory to the pytorch fp32 state_dict output files
611
+ - ``max_shard_size``: the maximum size for a checkpoint before being sharded, default value is 5GB
612
+ - ``safe_serialization``: whether to save the model using `safetensors` or the traditional PyTorch way (that uses `pickle`).
613
+ - ``tag``: checkpoint tag used as a unique identifier for checkpoint. If not provided will attempt to load tag in the file named ``latest`` in the checkpoint folder, e.g., ``global_step14``
614
+ - ``exclude_frozen_parameters``: exclude frozen parameters
615
+ """
616
+
617
+ # Dependency pre-check
618
+ if safe_serialization:
619
+ try:
620
+ from safetensors.torch import save_file
621
+ except ImportError:
622
+ print('If you want to use `safe_serialization`, please `pip install safetensors`')
623
+ raise
624
+ if max_shard_size is not None:
625
+ try:
626
+ from huggingface_hub import split_torch_state_dict_into_shards
627
+ except ImportError:
628
+ print('If you want to use `max_shard_size`, please `pip install huggingface_hub`')
629
+ raise
630
+
631
+ # Convert zero checkpoint to state_dict
632
+ state_dict = get_fp32_state_dict_from_zero_checkpoint(checkpoint_dir,
633
+ tag,
634
+ exclude_frozen_parameters,
635
+ lazy_mode=True)
636
+
637
+ # Shard the model if it is too big.
638
+ weights_name = "model.safetensors" if safe_serialization else "pytorch_model.bin"
639
+ if max_shard_size is not None:
640
+ filename_pattern = weights_name.replace(".bin", "{suffix}.bin").replace(".safetensors", "{suffix}.safetensors")
641
+ # an memory-efficient approach for sharding
642
+ empty_state_dict = to_torch_tensor(state_dict, return_empty_tensor=True)
643
+ state_dict_split = split_torch_state_dict_into_shards(empty_state_dict,
644
+ filename_pattern=filename_pattern,
645
+ max_shard_size=max_shard_size)
646
+ else:
647
+ from collections import namedtuple
648
+ StateDictSplit = namedtuple("StateDictSplit", ["is_sharded", "filename_to_tensors"])
649
+ state_dict_split = StateDictSplit(is_sharded=False,
650
+ filename_to_tensors={weights_name: list(state_dict.keys())})
651
+
652
+ # Save the model by shard
653
+ os.makedirs(output_dir, exist_ok=True)
654
+ filename_to_tensors = state_dict_split.filename_to_tensors.items()
655
+ for shard_file, tensors in tqdm(filename_to_tensors, desc="Saving checkpoint shards"):
656
+ shard_state_dict = {tensor_name: state_dict[tensor_name] for tensor_name in tensors}
657
+ shard_state_dict = to_torch_tensor(shard_state_dict)
658
+ output_path = os.path.join(output_dir, shard_file)
659
+ if safe_serialization:
660
+ save_file(shard_state_dict, output_path, metadata={"format": "pt"})
661
+ else:
662
+ torch.save(shard_state_dict, output_path)
663
+ # release the memory of current shard
664
+ for tensor_name in list(shard_state_dict.keys()):
665
+ del state_dict[tensor_name]
666
+ del shard_state_dict[tensor_name]
667
+ del shard_state_dict
668
+ gc.collect()
669
+
670
+ # Save index if sharded
671
+ if state_dict_split.is_sharded:
672
+ index = {
673
+ "metadata": state_dict_split.metadata,
674
+ "weight_map": state_dict_split.tensor_to_filename,
675
+ }
676
+ save_index_file = "model.safetensors.index.json" if safe_serialization else "pytorch_model.bin.index.json"
677
+ save_index_file = os.path.join(output_dir, save_index_file)
678
+ with open(save_index_file, "w", encoding="utf-8") as f:
679
+ content = json.dumps(index, indent=2, sort_keys=True) + "\n"
680
+ f.write(content)
681
+
682
+
683
+ def load_state_dict_from_zero_checkpoint(model, checkpoint_dir, tag=None):
684
+ """
685
+ 1. Put the provided model to cpu
686
+ 2. Convert ZeRO 2 or 3 checkpoint into a single fp32 consolidated ``state_dict``
687
+ 3. Load it into the provided model
688
+
689
+ Args:
690
+ - ``model``: the model object to update
691
+ - ``checkpoint_dir``: path to the desired checkpoint folder. (one that contains the tag-folder, like ``global_step14``)
692
+ - ``tag``: checkpoint tag used as a unique identifier for checkpoint. If not provided will attempt to load tag in the file named ``latest`` in the checkpoint folder, e.g., ``global_step14``
693
+
694
+ Returns:
695
+ - ``model`: modified model
696
+
697
+ Make sure you have plenty of CPU memory available before you call this function. If you don't
698
+ have enough use the ``zero_to_fp32.py`` utility to do the conversion. You will find it
699
+ conveniently placed for you in the checkpoint folder.
700
+
701
+ A typical usage might be ::
702
+
703
+ from deepspeed.utils.zero_to_fp32 import load_state_dict_from_zero_checkpoint
704
+ model = load_state_dict_from_zero_checkpoint(trainer.model, checkpoint_dir)
705
+ # submit to model hub or save the model to share with others
706
+
707
+ Note, that once this was run, the ``model`` will no longer be usable in the deepspeed context
708
+ of the same application. i.e. you will need to re-initialize the deepspeed engine, since
709
+ ``model.load_state_dict(state_dict)`` will remove all the deepspeed magic from it.
710
+
711
+ """
712
+ logger.info("Extracting fp32 weights")
713
+ state_dict = get_fp32_state_dict_from_zero_checkpoint(checkpoint_dir, tag)
714
+
715
+ logger.info("Overwriting model with fp32 weights")
716
+ model = model.cpu()
717
+ model.load_state_dict(state_dict, strict=False)
718
+
719
+ return model
720
+
721
+
722
+ if __name__ == "__main__":
723
+ parser = argparse.ArgumentParser()
724
+ parser.add_argument("checkpoint_dir",
725
+ type=str,
726
+ help="path to the desired checkpoint folder, e.g., path/checkpoint-12")
727
+ parser.add_argument("output_dir",
728
+ type=str,
729
+ help="directory to the pytorch fp32 state_dict output files"
730
+ "(e.g. path/checkpoint-12-output/)")
731
+ parser.add_argument(
732
+ "--max_shard_size",
733
+ type=str,
734
+ default="5GB",
735
+ help="The maximum size for a checkpoint before being sharded. Checkpoints shard will then be each of size"
736
+ "lower than this size. If expressed as a string, needs to be digits followed by a unit (like `5MB`"
737
+ "We default it to 5GB in order for models to be able to run easily on free-tier google colab instances"
738
+ "without CPU OOM issues.")
739
+ parser.add_argument(
740
+ "--safe_serialization",
741
+ default=False,
742
+ action='store_true',
743
+ help="Whether to save the model using `safetensors` or the traditional PyTorch way (that uses `pickle`).")
744
+ parser.add_argument("-t",
745
+ "--tag",
746
+ type=str,
747
+ default=None,
748
+ help="checkpoint tag used as a unique identifier for checkpoint. e.g., global_step1")
749
+ parser.add_argument("--exclude_frozen_parameters", action='store_true', help="exclude frozen parameters")
750
+ parser.add_argument("-d", "--debug", action='store_true', help="enable debug")
751
+ args = parser.parse_args()
752
+
753
+ debug = args.debug
754
+
755
+ convert_zero_checkpoint_to_fp32_state_dict(args.checkpoint_dir,
756
+ args.output_dir,
757
+ max_shard_size=args.max_shard_size,
758
+ safe_serialization=args.safe_serialization,
759
+ tag=args.tag,
760
+ exclude_frozen_parameters=args.exclude_frozen_parameters)
logs/UNIVLA_SIMPLERENV_BRIDGE_VIDEO_BS128_20k/checkpoint-4000/config.json ADDED
@@ -0,0 +1,61 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ {
2
+ "action_config": {
3
+ "_attn_implementation": "sdpa",
4
+ "action_dim": 7,
5
+ "attention_dropout": 0.0,
6
+ "hidden_act": "silu",
7
+ "hidden_size": 4096,
8
+ "initializer_range": 0.02,
9
+ "intermediate_size": 2048,
10
+ "max_position_embeddings": 5120,
11
+ "num_attention_heads": 32,
12
+ "num_hidden_layers": 2,
13
+ "num_key_value_heads": 8,
14
+ "pad_token_id": 151643,
15
+ "pretraining_tp": 1,
16
+ "rms_norm_eps": 1e-05,
17
+ "rope_scaling": null,
18
+ "rope_theta": 10000.0,
19
+ "tie_word_embeddings": false,
20
+ "use_cache": true,
21
+ "vision_loss_weight": 5.0
22
+ },
23
+ "action_dim": 7,
24
+ "action_experts": false,
25
+ "architectures": [
26
+ "Emu3MoE"
27
+ ],
28
+ "attention_dropout": 0.1,
29
+ "boa_token_id": 151844,
30
+ "boi_token_id": 151852,
31
+ "bos_token_id": 151849,
32
+ "bov_token_id": 151854,
33
+ "eof_token_id": 151847,
34
+ "eoi_token_id": 151853,
35
+ "eol_token_id": 151846,
36
+ "eos_token_id": 151850,
37
+ "eov_token_id": 184621,
38
+ "hidden_act": "silu",
39
+ "hidden_size": 4096,
40
+ "image_area": 262144,
41
+ "img_token_id": 151851,
42
+ "initializer_range": 0.02,
43
+ "intermediate_size": 14336,
44
+ "max_position_embeddings": 2400,
45
+ "model_type": "Emu3",
46
+ "num_attention_heads": 32,
47
+ "num_hidden_layers": 32,
48
+ "num_key_value_heads": 8,
49
+ "pad_token_id": 151643,
50
+ "pretraining_tp": 1,
51
+ "qkv_bias": false,
52
+ "rms_norm_eps": 1e-05,
53
+ "rope_scaling": null,
54
+ "rope_theta": 1000000.0,
55
+ "tie_word_embeddings": false,
56
+ "torch_dtype": "bfloat16",
57
+ "transformers_version": "4.51.0",
58
+ "use_cache": true,
59
+ "vision_loss_weight": 0.5,
60
+ "vocab_size": 184622
61
+ }
logs/UNIVLA_SIMPLERENV_BRIDGE_VIDEO_BS128_20k/checkpoint-4000/emu3.tiktoken ADDED
The diff for this file is too large to render. See raw diff
 
logs/UNIVLA_SIMPLERENV_BRIDGE_VIDEO_BS128_20k/checkpoint-4000/emu3_vision_tokens.txt ADDED
The diff for this file is too large to render. See raw diff
 
logs/UNIVLA_SIMPLERENV_BRIDGE_VIDEO_BS128_20k/checkpoint-4000/model.safetensors.index.json ADDED
@@ -0,0 +1,298 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ {
2
+ "metadata": {
3
+ "total_size": 16984023040
4
+ },
5
+ "weight_map": {
6
+ "lm_head.weight": "model-00004-of-00004.safetensors",
7
+ "model.embed_tokens.weight": "model-00001-of-00004.safetensors",
8
+ "model.layers.0.input_layernorm.weight": "model-00001-of-00004.safetensors",
9
+ "model.layers.0.mlp.down_proj.weight": "model-00001-of-00004.safetensors",
10
+ "model.layers.0.mlp.gate_proj.weight": "model-00001-of-00004.safetensors",
11
+ "model.layers.0.mlp.up_proj.weight": "model-00001-of-00004.safetensors",
12
+ "model.layers.0.post_attention_layernorm.weight": "model-00001-of-00004.safetensors",
13
+ "model.layers.0.self_attn.k_proj.weight": "model-00001-of-00004.safetensors",
14
+ "model.layers.0.self_attn.o_proj.weight": "model-00001-of-00004.safetensors",
15
+ "model.layers.0.self_attn.q_proj.weight": "model-00001-of-00004.safetensors",
16
+ "model.layers.0.self_attn.v_proj.weight": "model-00001-of-00004.safetensors",
17
+ "model.layers.1.input_layernorm.weight": "model-00001-of-00004.safetensors",
18
+ "model.layers.1.mlp.down_proj.weight": "model-00001-of-00004.safetensors",
19
+ "model.layers.1.mlp.gate_proj.weight": "model-00001-of-00004.safetensors",
20
+ "model.layers.1.mlp.up_proj.weight": "model-00001-of-00004.safetensors",
21
+ "model.layers.1.post_attention_layernorm.weight": "model-00001-of-00004.safetensors",
22
+ "model.layers.1.self_attn.k_proj.weight": "model-00001-of-00004.safetensors",
23
+ "model.layers.1.self_attn.o_proj.weight": "model-00001-of-00004.safetensors",
24
+ "model.layers.1.self_attn.q_proj.weight": "model-00001-of-00004.safetensors",
25
+ "model.layers.1.self_attn.v_proj.weight": "model-00001-of-00004.safetensors",
26
+ "model.layers.10.input_layernorm.weight": "model-00002-of-00004.safetensors",
27
+ "model.layers.10.mlp.down_proj.weight": "model-00002-of-00004.safetensors",
28
+ "model.layers.10.mlp.gate_proj.weight": "model-00002-of-00004.safetensors",
29
+ "model.layers.10.mlp.up_proj.weight": "model-00002-of-00004.safetensors",
30
+ "model.layers.10.post_attention_layernorm.weight": "model-00002-of-00004.safetensors",
31
+ "model.layers.10.self_attn.k_proj.weight": "model-00002-of-00004.safetensors",
32
+ "model.layers.10.self_attn.o_proj.weight": "model-00002-of-00004.safetensors",
33
+ "model.layers.10.self_attn.q_proj.weight": "model-00002-of-00004.safetensors",
34
+ "model.layers.10.self_attn.v_proj.weight": "model-00002-of-00004.safetensors",
35
+ "model.layers.11.input_layernorm.weight": "model-00002-of-00004.safetensors",
36
+ "model.layers.11.mlp.down_proj.weight": "model-00002-of-00004.safetensors",
37
+ "model.layers.11.mlp.gate_proj.weight": "model-00002-of-00004.safetensors",
38
+ "model.layers.11.mlp.up_proj.weight": "model-00002-of-00004.safetensors",
39
+ "model.layers.11.post_attention_layernorm.weight": "model-00002-of-00004.safetensors",
40
+ "model.layers.11.self_attn.k_proj.weight": "model-00002-of-00004.safetensors",
41
+ "model.layers.11.self_attn.o_proj.weight": "model-00002-of-00004.safetensors",
42
+ "model.layers.11.self_attn.q_proj.weight": "model-00002-of-00004.safetensors",
43
+ "model.layers.11.self_attn.v_proj.weight": "model-00002-of-00004.safetensors",
44
+ "model.layers.12.input_layernorm.weight": "model-00002-of-00004.safetensors",
45
+ "model.layers.12.mlp.down_proj.weight": "model-00002-of-00004.safetensors",
46
+ "model.layers.12.mlp.gate_proj.weight": "model-00002-of-00004.safetensors",
47
+ "model.layers.12.mlp.up_proj.weight": "model-00002-of-00004.safetensors",
48
+ "model.layers.12.post_attention_layernorm.weight": "model-00002-of-00004.safetensors",
49
+ "model.layers.12.self_attn.k_proj.weight": "model-00002-of-00004.safetensors",
50
+ "model.layers.12.self_attn.o_proj.weight": "model-00002-of-00004.safetensors",
51
+ "model.layers.12.self_attn.q_proj.weight": "model-00002-of-00004.safetensors",
52
+ "model.layers.12.self_attn.v_proj.weight": "model-00002-of-00004.safetensors",
53
+ "model.layers.13.input_layernorm.weight": "model-00002-of-00004.safetensors",
54
+ "model.layers.13.mlp.down_proj.weight": "model-00002-of-00004.safetensors",
55
+ "model.layers.13.mlp.gate_proj.weight": "model-00002-of-00004.safetensors",
56
+ "model.layers.13.mlp.up_proj.weight": "model-00002-of-00004.safetensors",
57
+ "model.layers.13.post_attention_layernorm.weight": "model-00002-of-00004.safetensors",
58
+ "model.layers.13.self_attn.k_proj.weight": "model-00002-of-00004.safetensors",
59
+ "model.layers.13.self_attn.o_proj.weight": "model-00002-of-00004.safetensors",
60
+ "model.layers.13.self_attn.q_proj.weight": "model-00002-of-00004.safetensors",
61
+ "model.layers.13.self_attn.v_proj.weight": "model-00002-of-00004.safetensors",
62
+ "model.layers.14.input_layernorm.weight": "model-00002-of-00004.safetensors",
63
+ "model.layers.14.mlp.down_proj.weight": "model-00002-of-00004.safetensors",
64
+ "model.layers.14.mlp.gate_proj.weight": "model-00002-of-00004.safetensors",
65
+ "model.layers.14.mlp.up_proj.weight": "model-00002-of-00004.safetensors",
66
+ "model.layers.14.post_attention_layernorm.weight": "model-00002-of-00004.safetensors",
67
+ "model.layers.14.self_attn.k_proj.weight": "model-00002-of-00004.safetensors",
68
+ "model.layers.14.self_attn.o_proj.weight": "model-00002-of-00004.safetensors",
69
+ "model.layers.14.self_attn.q_proj.weight": "model-00002-of-00004.safetensors",
70
+ "model.layers.14.self_attn.v_proj.weight": "model-00002-of-00004.safetensors",
71
+ "model.layers.15.input_layernorm.weight": "model-00002-of-00004.safetensors",
72
+ "model.layers.15.mlp.down_proj.weight": "model-00002-of-00004.safetensors",
73
+ "model.layers.15.mlp.gate_proj.weight": "model-00002-of-00004.safetensors",
74
+ "model.layers.15.mlp.up_proj.weight": "model-00002-of-00004.safetensors",
75
+ "model.layers.15.post_attention_layernorm.weight": "model-00002-of-00004.safetensors",
76
+ "model.layers.15.self_attn.k_proj.weight": "model-00002-of-00004.safetensors",
77
+ "model.layers.15.self_attn.o_proj.weight": "model-00002-of-00004.safetensors",
78
+ "model.layers.15.self_attn.q_proj.weight": "model-00002-of-00004.safetensors",
79
+ "model.layers.15.self_attn.v_proj.weight": "model-00002-of-00004.safetensors",
80
+ "model.layers.16.input_layernorm.weight": "model-00002-of-00004.safetensors",
81
+ "model.layers.16.mlp.down_proj.weight": "model-00002-of-00004.safetensors",
82
+ "model.layers.16.mlp.gate_proj.weight": "model-00002-of-00004.safetensors",
83
+ "model.layers.16.mlp.up_proj.weight": "model-00002-of-00004.safetensors",
84
+ "model.layers.16.post_attention_layernorm.weight": "model-00002-of-00004.safetensors",
85
+ "model.layers.16.self_attn.k_proj.weight": "model-00002-of-00004.safetensors",
86
+ "model.layers.16.self_attn.o_proj.weight": "model-00002-of-00004.safetensors",
87
+ "model.layers.16.self_attn.q_proj.weight": "model-00002-of-00004.safetensors",
88
+ "model.layers.16.self_attn.v_proj.weight": "model-00002-of-00004.safetensors",
89
+ "model.layers.17.input_layernorm.weight": "model-00002-of-00004.safetensors",
90
+ "model.layers.17.mlp.down_proj.weight": "model-00002-of-00004.safetensors",
91
+ "model.layers.17.mlp.gate_proj.weight": "model-00002-of-00004.safetensors",
92
+ "model.layers.17.mlp.up_proj.weight": "model-00002-of-00004.safetensors",
93
+ "model.layers.17.post_attention_layernorm.weight": "model-00002-of-00004.safetensors",
94
+ "model.layers.17.self_attn.k_proj.weight": "model-00002-of-00004.safetensors",
95
+ "model.layers.17.self_attn.o_proj.weight": "model-00002-of-00004.safetensors",
96
+ "model.layers.17.self_attn.q_proj.weight": "model-00002-of-00004.safetensors",
97
+ "model.layers.17.self_attn.v_proj.weight": "model-00002-of-00004.safetensors",
98
+ "model.layers.18.input_layernorm.weight": "model-00002-of-00004.safetensors",
99
+ "model.layers.18.mlp.down_proj.weight": "model-00002-of-00004.safetensors",
100
+ "model.layers.18.mlp.gate_proj.weight": "model-00002-of-00004.safetensors",
101
+ "model.layers.18.mlp.up_proj.weight": "model-00002-of-00004.safetensors",
102
+ "model.layers.18.post_attention_layernorm.weight": "model-00002-of-00004.safetensors",
103
+ "model.layers.18.self_attn.k_proj.weight": "model-00002-of-00004.safetensors",
104
+ "model.layers.18.self_attn.o_proj.weight": "model-00002-of-00004.safetensors",
105
+ "model.layers.18.self_attn.q_proj.weight": "model-00002-of-00004.safetensors",
106
+ "model.layers.18.self_attn.v_proj.weight": "model-00002-of-00004.safetensors",
107
+ "model.layers.19.input_layernorm.weight": "model-00003-of-00004.safetensors",
108
+ "model.layers.19.mlp.down_proj.weight": "model-00003-of-00004.safetensors",
109
+ "model.layers.19.mlp.gate_proj.weight": "model-00003-of-00004.safetensors",
110
+ "model.layers.19.mlp.up_proj.weight": "model-00003-of-00004.safetensors",
111
+ "model.layers.19.post_attention_layernorm.weight": "model-00003-of-00004.safetensors",
112
+ "model.layers.19.self_attn.k_proj.weight": "model-00002-of-00004.safetensors",
113
+ "model.layers.19.self_attn.o_proj.weight": "model-00002-of-00004.safetensors",
114
+ "model.layers.19.self_attn.q_proj.weight": "model-00002-of-00004.safetensors",
115
+ "model.layers.19.self_attn.v_proj.weight": "model-00002-of-00004.safetensors",
116
+ "model.layers.2.input_layernorm.weight": "model-00001-of-00004.safetensors",
117
+ "model.layers.2.mlp.down_proj.weight": "model-00001-of-00004.safetensors",
118
+ "model.layers.2.mlp.gate_proj.weight": "model-00001-of-00004.safetensors",
119
+ "model.layers.2.mlp.up_proj.weight": "model-00001-of-00004.safetensors",
120
+ "model.layers.2.post_attention_layernorm.weight": "model-00001-of-00004.safetensors",
121
+ "model.layers.2.self_attn.k_proj.weight": "model-00001-of-00004.safetensors",
122
+ "model.layers.2.self_attn.o_proj.weight": "model-00001-of-00004.safetensors",
123
+ "model.layers.2.self_attn.q_proj.weight": "model-00001-of-00004.safetensors",
124
+ "model.layers.2.self_attn.v_proj.weight": "model-00001-of-00004.safetensors",
125
+ "model.layers.20.input_layernorm.weight": "model-00003-of-00004.safetensors",
126
+ "model.layers.20.mlp.down_proj.weight": "model-00003-of-00004.safetensors",
127
+ "model.layers.20.mlp.gate_proj.weight": "model-00003-of-00004.safetensors",
128
+ "model.layers.20.mlp.up_proj.weight": "model-00003-of-00004.safetensors",
129
+ "model.layers.20.post_attention_layernorm.weight": "model-00003-of-00004.safetensors",
130
+ "model.layers.20.self_attn.k_proj.weight": "model-00003-of-00004.safetensors",
131
+ "model.layers.20.self_attn.o_proj.weight": "model-00003-of-00004.safetensors",
132
+ "model.layers.20.self_attn.q_proj.weight": "model-00003-of-00004.safetensors",
133
+ "model.layers.20.self_attn.v_proj.weight": "model-00003-of-00004.safetensors",
134
+ "model.layers.21.input_layernorm.weight": "model-00003-of-00004.safetensors",
135
+ "model.layers.21.mlp.down_proj.weight": "model-00003-of-00004.safetensors",
136
+ "model.layers.21.mlp.gate_proj.weight": "model-00003-of-00004.safetensors",
137
+ "model.layers.21.mlp.up_proj.weight": "model-00003-of-00004.safetensors",
138
+ "model.layers.21.post_attention_layernorm.weight": "model-00003-of-00004.safetensors",
139
+ "model.layers.21.self_attn.k_proj.weight": "model-00003-of-00004.safetensors",
140
+ "model.layers.21.self_attn.o_proj.weight": "model-00003-of-00004.safetensors",
141
+ "model.layers.21.self_attn.q_proj.weight": "model-00003-of-00004.safetensors",
142
+ "model.layers.21.self_attn.v_proj.weight": "model-00003-of-00004.safetensors",
143
+ "model.layers.22.input_layernorm.weight": "model-00003-of-00004.safetensors",
144
+ "model.layers.22.mlp.down_proj.weight": "model-00003-of-00004.safetensors",
145
+ "model.layers.22.mlp.gate_proj.weight": "model-00003-of-00004.safetensors",
146
+ "model.layers.22.mlp.up_proj.weight": "model-00003-of-00004.safetensors",
147
+ "model.layers.22.post_attention_layernorm.weight": "model-00003-of-00004.safetensors",
148
+ "model.layers.22.self_attn.k_proj.weight": "model-00003-of-00004.safetensors",
149
+ "model.layers.22.self_attn.o_proj.weight": "model-00003-of-00004.safetensors",
150
+ "model.layers.22.self_attn.q_proj.weight": "model-00003-of-00004.safetensors",
151
+ "model.layers.22.self_attn.v_proj.weight": "model-00003-of-00004.safetensors",
152
+ "model.layers.23.input_layernorm.weight": "model-00003-of-00004.safetensors",
153
+ "model.layers.23.mlp.down_proj.weight": "model-00003-of-00004.safetensors",
154
+ "model.layers.23.mlp.gate_proj.weight": "model-00003-of-00004.safetensors",
155
+ "model.layers.23.mlp.up_proj.weight": "model-00003-of-00004.safetensors",
156
+ "model.layers.23.post_attention_layernorm.weight": "model-00003-of-00004.safetensors",
157
+ "model.layers.23.self_attn.k_proj.weight": "model-00003-of-00004.safetensors",
158
+ "model.layers.23.self_attn.o_proj.weight": "model-00003-of-00004.safetensors",
159
+ "model.layers.23.self_attn.q_proj.weight": "model-00003-of-00004.safetensors",
160
+ "model.layers.23.self_attn.v_proj.weight": "model-00003-of-00004.safetensors",
161
+ "model.layers.24.input_layernorm.weight": "model-00003-of-00004.safetensors",
162
+ "model.layers.24.mlp.down_proj.weight": "model-00003-of-00004.safetensors",
163
+ "model.layers.24.mlp.gate_proj.weight": "model-00003-of-00004.safetensors",
164
+ "model.layers.24.mlp.up_proj.weight": "model-00003-of-00004.safetensors",
165
+ "model.layers.24.post_attention_layernorm.weight": "model-00003-of-00004.safetensors",
166
+ "model.layers.24.self_attn.k_proj.weight": "model-00003-of-00004.safetensors",
167
+ "model.layers.24.self_attn.o_proj.weight": "model-00003-of-00004.safetensors",
168
+ "model.layers.24.self_attn.q_proj.weight": "model-00003-of-00004.safetensors",
169
+ "model.layers.24.self_attn.v_proj.weight": "model-00003-of-00004.safetensors",
170
+ "model.layers.25.input_layernorm.weight": "model-00003-of-00004.safetensors",
171
+ "model.layers.25.mlp.down_proj.weight": "model-00003-of-00004.safetensors",
172
+ "model.layers.25.mlp.gate_proj.weight": "model-00003-of-00004.safetensors",
173
+ "model.layers.25.mlp.up_proj.weight": "model-00003-of-00004.safetensors",
174
+ "model.layers.25.post_attention_layernorm.weight": "model-00003-of-00004.safetensors",
175
+ "model.layers.25.self_attn.k_proj.weight": "model-00003-of-00004.safetensors",
176
+ "model.layers.25.self_attn.o_proj.weight": "model-00003-of-00004.safetensors",
177
+ "model.layers.25.self_attn.q_proj.weight": "model-00003-of-00004.safetensors",
178
+ "model.layers.25.self_attn.v_proj.weight": "model-00003-of-00004.safetensors",
179
+ "model.layers.26.input_layernorm.weight": "model-00003-of-00004.safetensors",
180
+ "model.layers.26.mlp.down_proj.weight": "model-00003-of-00004.safetensors",
181
+ "model.layers.26.mlp.gate_proj.weight": "model-00003-of-00004.safetensors",
182
+ "model.layers.26.mlp.up_proj.weight": "model-00003-of-00004.safetensors",
183
+ "model.layers.26.post_attention_layernorm.weight": "model-00003-of-00004.safetensors",
184
+ "model.layers.26.self_attn.k_proj.weight": "model-00003-of-00004.safetensors",
185
+ "model.layers.26.self_attn.o_proj.weight": "model-00003-of-00004.safetensors",
186
+ "model.layers.26.self_attn.q_proj.weight": "model-00003-of-00004.safetensors",
187
+ "model.layers.26.self_attn.v_proj.weight": "model-00003-of-00004.safetensors",
188
+ "model.layers.27.input_layernorm.weight": "model-00003-of-00004.safetensors",
189
+ "model.layers.27.mlp.down_proj.weight": "model-00003-of-00004.safetensors",
190
+ "model.layers.27.mlp.gate_proj.weight": "model-00003-of-00004.safetensors",
191
+ "model.layers.27.mlp.up_proj.weight": "model-00003-of-00004.safetensors",
192
+ "model.layers.27.post_attention_layernorm.weight": "model-00003-of-00004.safetensors",
193
+ "model.layers.27.self_attn.k_proj.weight": "model-00003-of-00004.safetensors",
194
+ "model.layers.27.self_attn.o_proj.weight": "model-00003-of-00004.safetensors",
195
+ "model.layers.27.self_attn.q_proj.weight": "model-00003-of-00004.safetensors",
196
+ "model.layers.27.self_attn.v_proj.weight": "model-00003-of-00004.safetensors",
197
+ "model.layers.28.input_layernorm.weight": "model-00003-of-00004.safetensors",
198
+ "model.layers.28.mlp.down_proj.weight": "model-00003-of-00004.safetensors",
199
+ "model.layers.28.mlp.gate_proj.weight": "model-00003-of-00004.safetensors",
200
+ "model.layers.28.mlp.up_proj.weight": "model-00003-of-00004.safetensors",
201
+ "model.layers.28.post_attention_layernorm.weight": "model-00003-of-00004.safetensors",
202
+ "model.layers.28.self_attn.k_proj.weight": "model-00003-of-00004.safetensors",
203
+ "model.layers.28.self_attn.o_proj.weight": "model-00003-of-00004.safetensors",
204
+ "model.layers.28.self_attn.q_proj.weight": "model-00003-of-00004.safetensors",
205
+ "model.layers.28.self_attn.v_proj.weight": "model-00003-of-00004.safetensors",
206
+ "model.layers.29.input_layernorm.weight": "model-00003-of-00004.safetensors",
207
+ "model.layers.29.mlp.down_proj.weight": "model-00003-of-00004.safetensors",
208
+ "model.layers.29.mlp.gate_proj.weight": "model-00003-of-00004.safetensors",
209
+ "model.layers.29.mlp.up_proj.weight": "model-00003-of-00004.safetensors",
210
+ "model.layers.29.post_attention_layernorm.weight": "model-00003-of-00004.safetensors",
211
+ "model.layers.29.self_attn.k_proj.weight": "model-00003-of-00004.safetensors",
212
+ "model.layers.29.self_attn.o_proj.weight": "model-00003-of-00004.safetensors",
213
+ "model.layers.29.self_attn.q_proj.weight": "model-00003-of-00004.safetensors",
214
+ "model.layers.29.self_attn.v_proj.weight": "model-00003-of-00004.safetensors",
215
+ "model.layers.3.input_layernorm.weight": "model-00001-of-00004.safetensors",
216
+ "model.layers.3.mlp.down_proj.weight": "model-00001-of-00004.safetensors",
217
+ "model.layers.3.mlp.gate_proj.weight": "model-00001-of-00004.safetensors",
218
+ "model.layers.3.mlp.up_proj.weight": "model-00001-of-00004.safetensors",
219
+ "model.layers.3.post_attention_layernorm.weight": "model-00001-of-00004.safetensors",
220
+ "model.layers.3.self_attn.k_proj.weight": "model-00001-of-00004.safetensors",
221
+ "model.layers.3.self_attn.o_proj.weight": "model-00001-of-00004.safetensors",
222
+ "model.layers.3.self_attn.q_proj.weight": "model-00001-of-00004.safetensors",
223
+ "model.layers.3.self_attn.v_proj.weight": "model-00001-of-00004.safetensors",
224
+ "model.layers.30.input_layernorm.weight": "model-00004-of-00004.safetensors",
225
+ "model.layers.30.mlp.down_proj.weight": "model-00004-of-00004.safetensors",
226
+ "model.layers.30.mlp.gate_proj.weight": "model-00003-of-00004.safetensors",
227
+ "model.layers.30.mlp.up_proj.weight": "model-00004-of-00004.safetensors",
228
+ "model.layers.30.post_attention_layernorm.weight": "model-00004-of-00004.safetensors",
229
+ "model.layers.30.self_attn.k_proj.weight": "model-00003-of-00004.safetensors",
230
+ "model.layers.30.self_attn.o_proj.weight": "model-00003-of-00004.safetensors",
231
+ "model.layers.30.self_attn.q_proj.weight": "model-00003-of-00004.safetensors",
232
+ "model.layers.30.self_attn.v_proj.weight": "model-00003-of-00004.safetensors",
233
+ "model.layers.31.input_layernorm.weight": "model-00004-of-00004.safetensors",
234
+ "model.layers.31.mlp.down_proj.weight": "model-00004-of-00004.safetensors",
235
+ "model.layers.31.mlp.gate_proj.weight": "model-00004-of-00004.safetensors",
236
+ "model.layers.31.mlp.up_proj.weight": "model-00004-of-00004.safetensors",
237
+ "model.layers.31.post_attention_layernorm.weight": "model-00004-of-00004.safetensors",
238
+ "model.layers.31.self_attn.k_proj.weight": "model-00004-of-00004.safetensors",
239
+ "model.layers.31.self_attn.o_proj.weight": "model-00004-of-00004.safetensors",
240
+ "model.layers.31.self_attn.q_proj.weight": "model-00004-of-00004.safetensors",
241
+ "model.layers.31.self_attn.v_proj.weight": "model-00004-of-00004.safetensors",
242
+ "model.layers.4.input_layernorm.weight": "model-00001-of-00004.safetensors",
243
+ "model.layers.4.mlp.down_proj.weight": "model-00001-of-00004.safetensors",
244
+ "model.layers.4.mlp.gate_proj.weight": "model-00001-of-00004.safetensors",
245
+ "model.layers.4.mlp.up_proj.weight": "model-00001-of-00004.safetensors",
246
+ "model.layers.4.post_attention_layernorm.weight": "model-00001-of-00004.safetensors",
247
+ "model.layers.4.self_attn.k_proj.weight": "model-00001-of-00004.safetensors",
248
+ "model.layers.4.self_attn.o_proj.weight": "model-00001-of-00004.safetensors",
249
+ "model.layers.4.self_attn.q_proj.weight": "model-00001-of-00004.safetensors",
250
+ "model.layers.4.self_attn.v_proj.weight": "model-00001-of-00004.safetensors",
251
+ "model.layers.5.input_layernorm.weight": "model-00001-of-00004.safetensors",
252
+ "model.layers.5.mlp.down_proj.weight": "model-00001-of-00004.safetensors",
253
+ "model.layers.5.mlp.gate_proj.weight": "model-00001-of-00004.safetensors",
254
+ "model.layers.5.mlp.up_proj.weight": "model-00001-of-00004.safetensors",
255
+ "model.layers.5.post_attention_layernorm.weight": "model-00001-of-00004.safetensors",
256
+ "model.layers.5.self_attn.k_proj.weight": "model-00001-of-00004.safetensors",
257
+ "model.layers.5.self_attn.o_proj.weight": "model-00001-of-00004.safetensors",
258
+ "model.layers.5.self_attn.q_proj.weight": "model-00001-of-00004.safetensors",
259
+ "model.layers.5.self_attn.v_proj.weight": "model-00001-of-00004.safetensors",
260
+ "model.layers.6.input_layernorm.weight": "model-00001-of-00004.safetensors",
261
+ "model.layers.6.mlp.down_proj.weight": "model-00001-of-00004.safetensors",
262
+ "model.layers.6.mlp.gate_proj.weight": "model-00001-of-00004.safetensors",
263
+ "model.layers.6.mlp.up_proj.weight": "model-00001-of-00004.safetensors",
264
+ "model.layers.6.post_attention_layernorm.weight": "model-00001-of-00004.safetensors",
265
+ "model.layers.6.self_attn.k_proj.weight": "model-00001-of-00004.safetensors",
266
+ "model.layers.6.self_attn.o_proj.weight": "model-00001-of-00004.safetensors",
267
+ "model.layers.6.self_attn.q_proj.weight": "model-00001-of-00004.safetensors",
268
+ "model.layers.6.self_attn.v_proj.weight": "model-00001-of-00004.safetensors",
269
+ "model.layers.7.input_layernorm.weight": "model-00002-of-00004.safetensors",
270
+ "model.layers.7.mlp.down_proj.weight": "model-00002-of-00004.safetensors",
271
+ "model.layers.7.mlp.gate_proj.weight": "model-00001-of-00004.safetensors",
272
+ "model.layers.7.mlp.up_proj.weight": "model-00001-of-00004.safetensors",
273
+ "model.layers.7.post_attention_layernorm.weight": "model-00002-of-00004.safetensors",
274
+ "model.layers.7.self_attn.k_proj.weight": "model-00001-of-00004.safetensors",
275
+ "model.layers.7.self_attn.o_proj.weight": "model-00001-of-00004.safetensors",
276
+ "model.layers.7.self_attn.q_proj.weight": "model-00001-of-00004.safetensors",
277
+ "model.layers.7.self_attn.v_proj.weight": "model-00001-of-00004.safetensors",
278
+ "model.layers.8.input_layernorm.weight": "model-00002-of-00004.safetensors",
279
+ "model.layers.8.mlp.down_proj.weight": "model-00002-of-00004.safetensors",
280
+ "model.layers.8.mlp.gate_proj.weight": "model-00002-of-00004.safetensors",
281
+ "model.layers.8.mlp.up_proj.weight": "model-00002-of-00004.safetensors",
282
+ "model.layers.8.post_attention_layernorm.weight": "model-00002-of-00004.safetensors",
283
+ "model.layers.8.self_attn.k_proj.weight": "model-00002-of-00004.safetensors",
284
+ "model.layers.8.self_attn.o_proj.weight": "model-00002-of-00004.safetensors",
285
+ "model.layers.8.self_attn.q_proj.weight": "model-00002-of-00004.safetensors",
286
+ "model.layers.8.self_attn.v_proj.weight": "model-00002-of-00004.safetensors",
287
+ "model.layers.9.input_layernorm.weight": "model-00002-of-00004.safetensors",
288
+ "model.layers.9.mlp.down_proj.weight": "model-00002-of-00004.safetensors",
289
+ "model.layers.9.mlp.gate_proj.weight": "model-00002-of-00004.safetensors",
290
+ "model.layers.9.mlp.up_proj.weight": "model-00002-of-00004.safetensors",
291
+ "model.layers.9.post_attention_layernorm.weight": "model-00002-of-00004.safetensors",
292
+ "model.layers.9.self_attn.k_proj.weight": "model-00002-of-00004.safetensors",
293
+ "model.layers.9.self_attn.o_proj.weight": "model-00002-of-00004.safetensors",
294
+ "model.layers.9.self_attn.q_proj.weight": "model-00002-of-00004.safetensors",
295
+ "model.layers.9.self_attn.v_proj.weight": "model-00002-of-00004.safetensors",
296
+ "model.norm.weight": "model-00004-of-00004.safetensors"
297
+ }
298
+ }
logs/UNIVLA_SIMPLERENV_BRIDGE_VIDEO_BS128_20k/checkpoint-4000/trainer_state.json ADDED
@@ -0,0 +1,1434 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ {
2
+ "best_global_step": null,
3
+ "best_metric": null,
4
+ "best_model_checkpoint": null,
5
+ "epoch": 9.639324487334138,
6
+ "eval_steps": 500,
7
+ "global_step": 4000,
8
+ "is_hyper_param_search": false,
9
+ "is_local_process_zero": true,
10
+ "is_world_process_zero": true,
11
+ "log_history": [
12
+ {
13
+ "epoch": 0.04825090470446321,
14
+ "grad_norm": 7.026416301727295,
15
+ "learning_rate": 3.04e-06,
16
+ "loss": 15.8023,
17
+ "step": 20
18
+ },
19
+ {
20
+ "epoch": 0.09650180940892641,
21
+ "grad_norm": 17.09996795654297,
22
+ "learning_rate": 6.24e-06,
23
+ "loss": 11.433,
24
+ "step": 40
25
+ },
26
+ {
27
+ "epoch": 0.14475271411338964,
28
+ "grad_norm": 14.741419792175293,
29
+ "learning_rate": 9.440000000000001e-06,
30
+ "loss": 7.7933,
31
+ "step": 60
32
+ },
33
+ {
34
+ "epoch": 0.19300361881785283,
35
+ "grad_norm": 7.174521446228027,
36
+ "learning_rate": 1.2640000000000001e-05,
37
+ "loss": 5.9488,
38
+ "step": 80
39
+ },
40
+ {
41
+ "epoch": 0.24125452352231605,
42
+ "grad_norm": 4.024604320526123,
43
+ "learning_rate": 1.584e-05,
44
+ "loss": 5.5711,
45
+ "step": 100
46
+ },
47
+ {
48
+ "epoch": 0.28950542822677927,
49
+ "grad_norm": 3.4492595195770264,
50
+ "learning_rate": 1.904e-05,
51
+ "loss": 5.4286,
52
+ "step": 120
53
+ },
54
+ {
55
+ "epoch": 0.33775633293124246,
56
+ "grad_norm": 4.258691310882568,
57
+ "learning_rate": 2.2240000000000004e-05,
58
+ "loss": 5.322,
59
+ "step": 140
60
+ },
61
+ {
62
+ "epoch": 0.38600723763570566,
63
+ "grad_norm": 4.085258960723877,
64
+ "learning_rate": 2.5440000000000004e-05,
65
+ "loss": 5.2516,
66
+ "step": 160
67
+ },
68
+ {
69
+ "epoch": 0.43425814234016885,
70
+ "grad_norm": 5.170401096343994,
71
+ "learning_rate": 2.864e-05,
72
+ "loss": 5.2052,
73
+ "step": 180
74
+ },
75
+ {
76
+ "epoch": 0.4825090470446321,
77
+ "grad_norm": 4.532702445983887,
78
+ "learning_rate": 3.184000000000001e-05,
79
+ "loss": 5.1218,
80
+ "step": 200
81
+ },
82
+ {
83
+ "epoch": 0.5307599517490953,
84
+ "grad_norm": 8.81904411315918,
85
+ "learning_rate": 3.504e-05,
86
+ "loss": 5.0278,
87
+ "step": 220
88
+ },
89
+ {
90
+ "epoch": 0.5790108564535585,
91
+ "grad_norm": 4.430545806884766,
92
+ "learning_rate": 3.824e-05,
93
+ "loss": 4.8554,
94
+ "step": 240
95
+ },
96
+ {
97
+ "epoch": 0.6272617611580217,
98
+ "grad_norm": 5.596275329589844,
99
+ "learning_rate": 4.144e-05,
100
+ "loss": 4.6775,
101
+ "step": 260
102
+ },
103
+ {
104
+ "epoch": 0.6755126658624849,
105
+ "grad_norm": 4.189767837524414,
106
+ "learning_rate": 4.4640000000000006e-05,
107
+ "loss": 4.5501,
108
+ "step": 280
109
+ },
110
+ {
111
+ "epoch": 0.7237635705669482,
112
+ "grad_norm": 3.8358776569366455,
113
+ "learning_rate": 4.784e-05,
114
+ "loss": 4.4746,
115
+ "step": 300
116
+ },
117
+ {
118
+ "epoch": 0.7720144752714113,
119
+ "grad_norm": 3.698655605316162,
120
+ "learning_rate": 5.1040000000000006e-05,
121
+ "loss": 4.4219,
122
+ "step": 320
123
+ },
124
+ {
125
+ "epoch": 0.8202653799758746,
126
+ "grad_norm": 3.8315744400024414,
127
+ "learning_rate": 5.424000000000001e-05,
128
+ "loss": 4.3652,
129
+ "step": 340
130
+ },
131
+ {
132
+ "epoch": 0.8685162846803377,
133
+ "grad_norm": 3.743601083755493,
134
+ "learning_rate": 5.7440000000000006e-05,
135
+ "loss": 4.3409,
136
+ "step": 360
137
+ },
138
+ {
139
+ "epoch": 0.916767189384801,
140
+ "grad_norm": 3.9214954376220703,
141
+ "learning_rate": 6.064e-05,
142
+ "loss": 4.3001,
143
+ "step": 380
144
+ },
145
+ {
146
+ "epoch": 0.9650180940892642,
147
+ "grad_norm": 3.364896774291992,
148
+ "learning_rate": 6.384000000000001e-05,
149
+ "loss": 4.2918,
150
+ "step": 400
151
+ },
152
+ {
153
+ "epoch": 1.0120627261761157,
154
+ "grad_norm": 3.315551280975342,
155
+ "learning_rate": 6.704000000000001e-05,
156
+ "loss": 4.1463,
157
+ "step": 420
158
+ },
159
+ {
160
+ "epoch": 1.060313630880579,
161
+ "grad_norm": 3.339918613433838,
162
+ "learning_rate": 7.024e-05,
163
+ "loss": 4.2308,
164
+ "step": 440
165
+ },
166
+ {
167
+ "epoch": 1.1085645355850422,
168
+ "grad_norm": 3.6609926223754883,
169
+ "learning_rate": 7.344000000000002e-05,
170
+ "loss": 4.2112,
171
+ "step": 460
172
+ },
173
+ {
174
+ "epoch": 1.1568154402895054,
175
+ "grad_norm": 9.371408462524414,
176
+ "learning_rate": 7.664e-05,
177
+ "loss": 4.2259,
178
+ "step": 480
179
+ },
180
+ {
181
+ "epoch": 1.2050663449939687,
182
+ "grad_norm": 3.045787811279297,
183
+ "learning_rate": 7.984000000000001e-05,
184
+ "loss": 4.1758,
185
+ "step": 500
186
+ },
187
+ {
188
+ "epoch": 1.2533172496984317,
189
+ "grad_norm": 3.7252113819122314,
190
+ "learning_rate": 7.999982431339218e-05,
191
+ "loss": 4.161,
192
+ "step": 520
193
+ },
194
+ {
195
+ "epoch": 1.301568154402895,
196
+ "grad_norm": 2.8388564586639404,
197
+ "learning_rate": 7.999925978210515e-05,
198
+ "loss": 4.1421,
199
+ "step": 540
200
+ },
201
+ {
202
+ "epoch": 1.3498190591073582,
203
+ "grad_norm": 2.337611675262451,
204
+ "learning_rate": 7.999830592533314e-05,
205
+ "loss": 4.1337,
206
+ "step": 560
207
+ },
208
+ {
209
+ "epoch": 1.3980699638118215,
210
+ "grad_norm": 2.355480670928955,
211
+ "learning_rate": 7.999696275297925e-05,
212
+ "loss": 4.0918,
213
+ "step": 580
214
+ },
215
+ {
216
+ "epoch": 1.4463208685162847,
217
+ "grad_norm": 2.469529628753662,
218
+ "learning_rate": 7.999523027898864e-05,
219
+ "loss": 4.1032,
220
+ "step": 600
221
+ },
222
+ {
223
+ "epoch": 1.494571773220748,
224
+ "grad_norm": 2.394348621368408,
225
+ "learning_rate": 7.99931085213482e-05,
226
+ "loss": 4.0767,
227
+ "step": 620
228
+ },
229
+ {
230
+ "epoch": 1.5428226779252112,
231
+ "grad_norm": 2.333629608154297,
232
+ "learning_rate": 7.999059750208649e-05,
233
+ "loss": 4.0757,
234
+ "step": 640
235
+ },
236
+ {
237
+ "epoch": 1.5910735826296745,
238
+ "grad_norm": 2.3257668018341064,
239
+ "learning_rate": 7.998769724727347e-05,
240
+ "loss": 4.0554,
241
+ "step": 660
242
+ },
243
+ {
244
+ "epoch": 1.6393244873341375,
245
+ "grad_norm": 3.5393128395080566,
246
+ "learning_rate": 7.998440778702023e-05,
247
+ "loss": 4.056,
248
+ "step": 680
249
+ },
250
+ {
251
+ "epoch": 1.6875753920386007,
252
+ "grad_norm": 2.257028579711914,
253
+ "learning_rate": 7.998072915547861e-05,
254
+ "loss": 4.0406,
255
+ "step": 700
256
+ },
257
+ {
258
+ "epoch": 1.7358262967430638,
259
+ "grad_norm": 2.359814167022705,
260
+ "learning_rate": 7.997666139084099e-05,
261
+ "loss": 4.0236,
262
+ "step": 720
263
+ },
264
+ {
265
+ "epoch": 1.784077201447527,
266
+ "grad_norm": 2.2051610946655273,
267
+ "learning_rate": 7.997220453533982e-05,
268
+ "loss": 4.0183,
269
+ "step": 740
270
+ },
271
+ {
272
+ "epoch": 1.8323281061519903,
273
+ "grad_norm": 2.2289440631866455,
274
+ "learning_rate": 7.99673586352471e-05,
275
+ "loss": 4.0074,
276
+ "step": 760
277
+ },
278
+ {
279
+ "epoch": 1.8805790108564535,
280
+ "grad_norm": 2.1607367992401123,
281
+ "learning_rate": 7.996212374087405e-05,
282
+ "loss": 4.0073,
283
+ "step": 780
284
+ },
285
+ {
286
+ "epoch": 1.9288299155609168,
287
+ "grad_norm": 2.108910083770752,
288
+ "learning_rate": 7.995649990657048e-05,
289
+ "loss": 4.0017,
290
+ "step": 800
291
+ },
292
+ {
293
+ "epoch": 1.97708082026538,
294
+ "grad_norm": 2.0602197647094727,
295
+ "learning_rate": 7.995048719072424e-05,
296
+ "loss": 3.995,
297
+ "step": 820
298
+ },
299
+ {
300
+ "epoch": 2.0241254523522314,
301
+ "grad_norm": 2.2706081867218018,
302
+ "learning_rate": 7.994408565576069e-05,
303
+ "loss": 3.8672,
304
+ "step": 840
305
+ },
306
+ {
307
+ "epoch": 2.0723763570566947,
308
+ "grad_norm": 1.935584545135498,
309
+ "learning_rate": 7.993729536814194e-05,
310
+ "loss": 3.9759,
311
+ "step": 860
312
+ },
313
+ {
314
+ "epoch": 2.120627261761158,
315
+ "grad_norm": 2.0553081035614014,
316
+ "learning_rate": 7.993011639836622e-05,
317
+ "loss": 3.9617,
318
+ "step": 880
319
+ },
320
+ {
321
+ "epoch": 2.168878166465621,
322
+ "grad_norm": 2.818523645401001,
323
+ "learning_rate": 7.99225488209672e-05,
324
+ "loss": 3.9478,
325
+ "step": 900
326
+ },
327
+ {
328
+ "epoch": 2.2171290711700844,
329
+ "grad_norm": 2.4333460330963135,
330
+ "learning_rate": 7.991459271451308e-05,
331
+ "loss": 3.9508,
332
+ "step": 920
333
+ },
334
+ {
335
+ "epoch": 2.2653799758745476,
336
+ "grad_norm": 2.0779833793640137,
337
+ "learning_rate": 7.99062481616059e-05,
338
+ "loss": 3.9538,
339
+ "step": 940
340
+ },
341
+ {
342
+ "epoch": 2.313630880579011,
343
+ "grad_norm": 1.9196547269821167,
344
+ "learning_rate": 7.989751524888064e-05,
345
+ "loss": 3.9449,
346
+ "step": 960
347
+ },
348
+ {
349
+ "epoch": 2.361881785283474,
350
+ "grad_norm": 2.0229032039642334,
351
+ "learning_rate": 7.98883940670043e-05,
352
+ "loss": 3.9416,
353
+ "step": 980
354
+ },
355
+ {
356
+ "epoch": 2.4101326899879374,
357
+ "grad_norm": 2.1589977741241455,
358
+ "learning_rate": 7.987888471067497e-05,
359
+ "loss": 3.9347,
360
+ "step": 1000
361
+ },
362
+ {
363
+ "epoch": 2.4583835946924006,
364
+ "grad_norm": 1.8306351900100708,
365
+ "learning_rate": 7.986898727862085e-05,
366
+ "loss": 3.9323,
367
+ "step": 1020
368
+ },
369
+ {
370
+ "epoch": 2.5066344993968634,
371
+ "grad_norm": 1.7854081392288208,
372
+ "learning_rate": 7.985870187359925e-05,
373
+ "loss": 3.9195,
374
+ "step": 1040
375
+ },
376
+ {
377
+ "epoch": 2.554885404101327,
378
+ "grad_norm": 1.9807684421539307,
379
+ "learning_rate": 7.984802860239549e-05,
380
+ "loss": 3.9222,
381
+ "step": 1060
382
+ },
383
+ {
384
+ "epoch": 2.60313630880579,
385
+ "grad_norm": 1.9324214458465576,
386
+ "learning_rate": 7.983696757582178e-05,
387
+ "loss": 3.9163,
388
+ "step": 1080
389
+ },
390
+ {
391
+ "epoch": 2.651387213510253,
392
+ "grad_norm": 1.7838809490203857,
393
+ "learning_rate": 7.982551890871613e-05,
394
+ "loss": 3.9061,
395
+ "step": 1100
396
+ },
397
+ {
398
+ "epoch": 2.6996381182147164,
399
+ "grad_norm": 1.9327741861343384,
400
+ "learning_rate": 7.981368271994106e-05,
401
+ "loss": 3.9123,
402
+ "step": 1120
403
+ },
404
+ {
405
+ "epoch": 2.7478890229191797,
406
+ "grad_norm": 1.903687596321106,
407
+ "learning_rate": 7.98014591323825e-05,
408
+ "loss": 3.8985,
409
+ "step": 1140
410
+ },
411
+ {
412
+ "epoch": 2.796139927623643,
413
+ "grad_norm": 1.8757381439208984,
414
+ "learning_rate": 7.978884827294839e-05,
415
+ "loss": 3.8921,
416
+ "step": 1160
417
+ },
418
+ {
419
+ "epoch": 2.844390832328106,
420
+ "grad_norm": 3.0233168601989746,
421
+ "learning_rate": 7.977585027256739e-05,
422
+ "loss": 3.9097,
423
+ "step": 1180
424
+ },
425
+ {
426
+ "epoch": 2.8926417370325694,
427
+ "grad_norm": 1.8911226987838745,
428
+ "learning_rate": 7.976246526618761e-05,
429
+ "loss": 3.8993,
430
+ "step": 1200
431
+ },
432
+ {
433
+ "epoch": 2.9408926417370327,
434
+ "grad_norm": 1.9184162616729736,
435
+ "learning_rate": 7.974869339277508e-05,
436
+ "loss": 3.8966,
437
+ "step": 1220
438
+ },
439
+ {
440
+ "epoch": 2.989143546441496,
441
+ "grad_norm": 1.8520585298538208,
442
+ "learning_rate": 7.973453479531241e-05,
443
+ "loss": 3.8926,
444
+ "step": 1240
445
+ },
446
+ {
447
+ "epoch": 3.0361881785283473,
448
+ "grad_norm": 1.9462171792984009,
449
+ "learning_rate": 7.971998962079723e-05,
450
+ "loss": 3.7848,
451
+ "step": 1260
452
+ },
453
+ {
454
+ "epoch": 3.0844390832328106,
455
+ "grad_norm": 1.8553789854049683,
456
+ "learning_rate": 7.970505802024071e-05,
457
+ "loss": 3.87,
458
+ "step": 1280
459
+ },
460
+ {
461
+ "epoch": 3.132689987937274,
462
+ "grad_norm": 1.8585801124572754,
463
+ "learning_rate": 7.968974014866596e-05,
464
+ "loss": 3.8671,
465
+ "step": 1300
466
+ },
467
+ {
468
+ "epoch": 3.180940892641737,
469
+ "grad_norm": 1.7380430698394775,
470
+ "learning_rate": 7.967403616510651e-05,
471
+ "loss": 3.8828,
472
+ "step": 1320
473
+ },
474
+ {
475
+ "epoch": 3.2291917973462003,
476
+ "grad_norm": 1.831164002418518,
477
+ "learning_rate": 7.965794623260449e-05,
478
+ "loss": 3.8591,
479
+ "step": 1340
480
+ },
481
+ {
482
+ "epoch": 3.2774427020506636,
483
+ "grad_norm": 1.7813743352890015,
484
+ "learning_rate": 7.964147051820912e-05,
485
+ "loss": 3.8628,
486
+ "step": 1360
487
+ },
488
+ {
489
+ "epoch": 3.325693606755127,
490
+ "grad_norm": 1.6703109741210938,
491
+ "learning_rate": 7.962460919297484e-05,
492
+ "loss": 3.852,
493
+ "step": 1380
494
+ },
495
+ {
496
+ "epoch": 3.37394451145959,
497
+ "grad_norm": 1.7385988235473633,
498
+ "learning_rate": 7.960736243195959e-05,
499
+ "loss": 3.857,
500
+ "step": 1400
501
+ },
502
+ {
503
+ "epoch": 3.422195416164053,
504
+ "grad_norm": 1.7363609075546265,
505
+ "learning_rate": 7.958973041422303e-05,
506
+ "loss": 3.8527,
507
+ "step": 1420
508
+ },
509
+ {
510
+ "epoch": 3.470446320868516,
511
+ "grad_norm": 1.8170480728149414,
512
+ "learning_rate": 7.957171332282458e-05,
513
+ "loss": 3.8618,
514
+ "step": 1440
515
+ },
516
+ {
517
+ "epoch": 3.5186972255729794,
518
+ "grad_norm": 1.7080026865005493,
519
+ "learning_rate": 7.955331134482164e-05,
520
+ "loss": 3.8434,
521
+ "step": 1460
522
+ },
523
+ {
524
+ "epoch": 3.5669481302774426,
525
+ "grad_norm": 1.778691291809082,
526
+ "learning_rate": 7.953452467126753e-05,
527
+ "loss": 3.8567,
528
+ "step": 1480
529
+ },
530
+ {
531
+ "epoch": 3.615199034981906,
532
+ "grad_norm": 1.7791765928268433,
533
+ "learning_rate": 7.95153534972096e-05,
534
+ "loss": 3.8573,
535
+ "step": 1500
536
+ },
537
+ {
538
+ "epoch": 3.663449939686369,
539
+ "grad_norm": 1.5399912595748901,
540
+ "learning_rate": 7.949579802168714e-05,
541
+ "loss": 3.8459,
542
+ "step": 1520
543
+ },
544
+ {
545
+ "epoch": 3.7117008443908324,
546
+ "grad_norm": 1.7315200567245483,
547
+ "learning_rate": 7.947585844772937e-05,
548
+ "loss": 3.8456,
549
+ "step": 1540
550
+ },
551
+ {
552
+ "epoch": 3.7599517490952956,
553
+ "grad_norm": 1.7714298963546753,
554
+ "learning_rate": 7.94555349823533e-05,
555
+ "loss": 3.8354,
556
+ "step": 1560
557
+ },
558
+ {
559
+ "epoch": 3.808202653799759,
560
+ "grad_norm": 1.5930746793746948,
561
+ "learning_rate": 7.943482783656155e-05,
562
+ "loss": 3.8376,
563
+ "step": 1580
564
+ },
565
+ {
566
+ "epoch": 3.856453558504222,
567
+ "grad_norm": 1.5679261684417725,
568
+ "learning_rate": 7.941373722534024e-05,
569
+ "loss": 3.8395,
570
+ "step": 1600
571
+ },
572
+ {
573
+ "epoch": 3.9047044632086854,
574
+ "grad_norm": 1.7415728569030762,
575
+ "learning_rate": 7.939226336765669e-05,
576
+ "loss": 3.835,
577
+ "step": 1620
578
+ },
579
+ {
580
+ "epoch": 3.952955367913148,
581
+ "grad_norm": 1.7399849891662598,
582
+ "learning_rate": 7.937040648645716e-05,
583
+ "loss": 3.8345,
584
+ "step": 1640
585
+ },
586
+ {
587
+ "epoch": 4.0,
588
+ "grad_norm": 1.0328266620635986,
589
+ "learning_rate": 7.934816680866455e-05,
590
+ "loss": 3.7426,
591
+ "step": 1660
592
+ },
593
+ {
594
+ "epoch": 4.048250904704463,
595
+ "grad_norm": 1.805564045906067,
596
+ "learning_rate": 7.932554456517605e-05,
597
+ "loss": 3.817,
598
+ "step": 1680
599
+ },
600
+ {
601
+ "epoch": 4.0965018094089265,
602
+ "grad_norm": 1.8367509841918945,
603
+ "learning_rate": 7.930253999086072e-05,
604
+ "loss": 3.819,
605
+ "step": 1700
606
+ },
607
+ {
608
+ "epoch": 4.144752714113389,
609
+ "grad_norm": 1.6704336404800415,
610
+ "learning_rate": 7.927915332455707e-05,
611
+ "loss": 3.8212,
612
+ "step": 1720
613
+ },
614
+ {
615
+ "epoch": 4.193003618817853,
616
+ "grad_norm": 1.7369648218154907,
617
+ "learning_rate": 7.925538480907053e-05,
618
+ "loss": 3.8087,
619
+ "step": 1740
620
+ },
621
+ {
622
+ "epoch": 4.241254523522316,
623
+ "grad_norm": 1.6179964542388916,
624
+ "learning_rate": 7.923123469117104e-05,
625
+ "loss": 3.8153,
626
+ "step": 1760
627
+ },
628
+ {
629
+ "epoch": 4.2895054282267795,
630
+ "grad_norm": 1.7713810205459595,
631
+ "learning_rate": 7.920670322159038e-05,
632
+ "loss": 3.8114,
633
+ "step": 1780
634
+ },
635
+ {
636
+ "epoch": 4.337756332931242,
637
+ "grad_norm": 1.7568902969360352,
638
+ "learning_rate": 7.918179065501962e-05,
639
+ "loss": 3.8094,
640
+ "step": 1800
641
+ },
642
+ {
643
+ "epoch": 4.386007237635706,
644
+ "grad_norm": 1.6609630584716797,
645
+ "learning_rate": 7.915649725010642e-05,
646
+ "loss": 3.8153,
647
+ "step": 1820
648
+ },
649
+ {
650
+ "epoch": 4.434258142340169,
651
+ "grad_norm": 1.6581547260284424,
652
+ "learning_rate": 7.913082326945244e-05,
653
+ "loss": 3.8079,
654
+ "step": 1840
655
+ },
656
+ {
657
+ "epoch": 4.4825090470446325,
658
+ "grad_norm": 1.7007122039794922,
659
+ "learning_rate": 7.910476897961056e-05,
660
+ "loss": 3.8027,
661
+ "step": 1860
662
+ },
663
+ {
664
+ "epoch": 4.530759951749095,
665
+ "grad_norm": 1.7588753700256348,
666
+ "learning_rate": 7.907833465108206e-05,
667
+ "loss": 3.8054,
668
+ "step": 1880
669
+ },
670
+ {
671
+ "epoch": 4.579010856453559,
672
+ "grad_norm": 1.5165013074874878,
673
+ "learning_rate": 7.905152055831392e-05,
674
+ "loss": 3.8046,
675
+ "step": 1900
676
+ },
677
+ {
678
+ "epoch": 4.627261761158022,
679
+ "grad_norm": 1.5636579990386963,
680
+ "learning_rate": 7.902432697969589e-05,
681
+ "loss": 3.7965,
682
+ "step": 1920
683
+ },
684
+ {
685
+ "epoch": 4.675512665862485,
686
+ "grad_norm": 1.51137375831604,
687
+ "learning_rate": 7.899675419755764e-05,
688
+ "loss": 3.8075,
689
+ "step": 1940
690
+ },
691
+ {
692
+ "epoch": 4.723763570566948,
693
+ "grad_norm": 1.569756269454956,
694
+ "learning_rate": 7.896880249816576e-05,
695
+ "loss": 3.794,
696
+ "step": 1960
697
+ },
698
+ {
699
+ "epoch": 4.772014475271411,
700
+ "grad_norm": 1.6083672046661377,
701
+ "learning_rate": 7.894047217172092e-05,
702
+ "loss": 3.7943,
703
+ "step": 1980
704
+ },
705
+ {
706
+ "epoch": 4.820265379975875,
707
+ "grad_norm": 1.6656383275985718,
708
+ "learning_rate": 7.891176351235474e-05,
709
+ "loss": 3.7976,
710
+ "step": 2000
711
+ },
712
+ {
713
+ "epoch": 4.868516284680338,
714
+ "grad_norm": 1.6950315237045288,
715
+ "learning_rate": 7.888267681812675e-05,
716
+ "loss": 3.7881,
717
+ "step": 2020
718
+ },
719
+ {
720
+ "epoch": 4.916767189384801,
721
+ "grad_norm": 1.676330327987671,
722
+ "learning_rate": 7.885321239102137e-05,
723
+ "loss": 3.7889,
724
+ "step": 2040
725
+ },
726
+ {
727
+ "epoch": 4.965018094089264,
728
+ "grad_norm": 1.6131972074508667,
729
+ "learning_rate": 7.88233705369447e-05,
730
+ "loss": 3.7899,
731
+ "step": 2060
732
+ },
733
+ {
734
+ "epoch": 5.012062726176116,
735
+ "grad_norm": 1.5944993495941162,
736
+ "learning_rate": 7.879315156572137e-05,
737
+ "loss": 3.6855,
738
+ "step": 2080
739
+ },
740
+ {
741
+ "epoch": 5.060313630880579,
742
+ "grad_norm": 1.6135458946228027,
743
+ "learning_rate": 7.876255579109132e-05,
744
+ "loss": 3.7781,
745
+ "step": 2100
746
+ },
747
+ {
748
+ "epoch": 5.108564535585042,
749
+ "grad_norm": 1.5969358682632446,
750
+ "learning_rate": 7.873158353070655e-05,
751
+ "loss": 3.7815,
752
+ "step": 2120
753
+ },
754
+ {
755
+ "epoch": 5.156815440289505,
756
+ "grad_norm": 1.6171342134475708,
757
+ "learning_rate": 7.87002351061278e-05,
758
+ "loss": 3.7825,
759
+ "step": 2140
760
+ },
761
+ {
762
+ "epoch": 5.205066344993969,
763
+ "grad_norm": 1.6955264806747437,
764
+ "learning_rate": 7.866851084282125e-05,
765
+ "loss": 3.7839,
766
+ "step": 2160
767
+ },
768
+ {
769
+ "epoch": 5.253317249698432,
770
+ "grad_norm": 1.5927579402923584,
771
+ "learning_rate": 7.863641107015515e-05,
772
+ "loss": 3.7768,
773
+ "step": 2180
774
+ },
775
+ {
776
+ "epoch": 5.301568154402895,
777
+ "grad_norm": 1.6691913604736328,
778
+ "learning_rate": 7.860393612139628e-05,
779
+ "loss": 3.7799,
780
+ "step": 2200
781
+ },
782
+ {
783
+ "epoch": 5.349819059107358,
784
+ "grad_norm": 1.4885603189468384,
785
+ "learning_rate": 7.857108633370665e-05,
786
+ "loss": 3.7751,
787
+ "step": 2220
788
+ },
789
+ {
790
+ "epoch": 5.398069963811821,
791
+ "grad_norm": 1.6115903854370117,
792
+ "learning_rate": 7.853786204813994e-05,
793
+ "loss": 3.7734,
794
+ "step": 2240
795
+ },
796
+ {
797
+ "epoch": 5.446320868516285,
798
+ "grad_norm": 1.5585155487060547,
799
+ "learning_rate": 7.85042636096379e-05,
800
+ "loss": 3.7676,
801
+ "step": 2260
802
+ },
803
+ {
804
+ "epoch": 5.4945717732207475,
805
+ "grad_norm": 1.5992586612701416,
806
+ "learning_rate": 7.847029136702682e-05,
807
+ "loss": 3.7782,
808
+ "step": 2280
809
+ },
810
+ {
811
+ "epoch": 5.542822677925211,
812
+ "grad_norm": 1.611501932144165,
813
+ "learning_rate": 7.843594567301397e-05,
814
+ "loss": 3.7587,
815
+ "step": 2300
816
+ },
817
+ {
818
+ "epoch": 5.591073582629674,
819
+ "grad_norm": 1.6179744005203247,
820
+ "learning_rate": 7.840122688418376e-05,
821
+ "loss": 3.7649,
822
+ "step": 2320
823
+ },
824
+ {
825
+ "epoch": 5.639324487334138,
826
+ "grad_norm": 1.519940733909607,
827
+ "learning_rate": 7.836613536099429e-05,
828
+ "loss": 3.7743,
829
+ "step": 2340
830
+ },
831
+ {
832
+ "epoch": 5.6875753920386005,
833
+ "grad_norm": 1.5957964658737183,
834
+ "learning_rate": 7.833067146777337e-05,
835
+ "loss": 3.7653,
836
+ "step": 2360
837
+ },
838
+ {
839
+ "epoch": 5.735826296743064,
840
+ "grad_norm": 1.5739672183990479,
841
+ "learning_rate": 7.829483557271487e-05,
842
+ "loss": 3.7624,
843
+ "step": 2380
844
+ },
845
+ {
846
+ "epoch": 5.784077201447527,
847
+ "grad_norm": 1.4757063388824463,
848
+ "learning_rate": 7.825862804787484e-05,
849
+ "loss": 3.7599,
850
+ "step": 2400
851
+ },
852
+ {
853
+ "epoch": 5.832328106151991,
854
+ "grad_norm": 1.569327473640442,
855
+ "learning_rate": 7.822204926916772e-05,
856
+ "loss": 3.7703,
857
+ "step": 2420
858
+ },
859
+ {
860
+ "epoch": 5.8805790108564535,
861
+ "grad_norm": 1.4343711137771606,
862
+ "learning_rate": 7.818509961636234e-05,
863
+ "loss": 3.7553,
864
+ "step": 2440
865
+ },
866
+ {
867
+ "epoch": 5.928829915560916,
868
+ "grad_norm": 1.577562928199768,
869
+ "learning_rate": 7.814777947307808e-05,
870
+ "loss": 3.7599,
871
+ "step": 2460
872
+ },
873
+ {
874
+ "epoch": 5.97708082026538,
875
+ "grad_norm": 1.5376607179641724,
876
+ "learning_rate": 7.811008922678073e-05,
877
+ "loss": 3.7653,
878
+ "step": 2480
879
+ },
880
+ {
881
+ "epoch": 6.024125452352232,
882
+ "grad_norm": 1.7855195999145508,
883
+ "learning_rate": 7.80720292687787e-05,
884
+ "loss": 3.6591,
885
+ "step": 2500
886
+ },
887
+ {
888
+ "epoch": 6.072376357056695,
889
+ "grad_norm": 1.5300453901290894,
890
+ "learning_rate": 7.803359999421875e-05,
891
+ "loss": 3.7451,
892
+ "step": 2520
893
+ },
894
+ {
895
+ "epoch": 6.120627261761158,
896
+ "grad_norm": 1.612203598022461,
897
+ "learning_rate": 7.799480180208199e-05,
898
+ "loss": 3.7398,
899
+ "step": 2540
900
+ },
901
+ {
902
+ "epoch": 6.168878166465621,
903
+ "grad_norm": 1.6074904203414917,
904
+ "learning_rate": 7.795563509517966e-05,
905
+ "loss": 3.7539,
906
+ "step": 2560
907
+ },
908
+ {
909
+ "epoch": 6.217129071170085,
910
+ "grad_norm": 1.725329041481018,
911
+ "learning_rate": 7.791610028014911e-05,
912
+ "loss": 3.7524,
913
+ "step": 2580
914
+ },
915
+ {
916
+ "epoch": 6.265379975874548,
917
+ "grad_norm": 1.8740324974060059,
918
+ "learning_rate": 7.787619776744935e-05,
919
+ "loss": 3.7444,
920
+ "step": 2600
921
+ },
922
+ {
923
+ "epoch": 6.3136308805790105,
924
+ "grad_norm": 1.6437512636184692,
925
+ "learning_rate": 7.783592797135697e-05,
926
+ "loss": 3.7382,
927
+ "step": 2620
928
+ },
929
+ {
930
+ "epoch": 6.361881785283474,
931
+ "grad_norm": 1.6491422653198242,
932
+ "learning_rate": 7.779529130996179e-05,
933
+ "loss": 3.7511,
934
+ "step": 2640
935
+ },
936
+ {
937
+ "epoch": 6.410132689987937,
938
+ "grad_norm": 1.6270194053649902,
939
+ "learning_rate": 7.775428820516247e-05,
940
+ "loss": 3.7585,
941
+ "step": 2660
942
+ },
943
+ {
944
+ "epoch": 6.458383594692401,
945
+ "grad_norm": 1.4886605739593506,
946
+ "learning_rate": 7.771291908266217e-05,
947
+ "loss": 3.7494,
948
+ "step": 2680
949
+ },
950
+ {
951
+ "epoch": 6.5066344993968634,
952
+ "grad_norm": 1.4751015901565552,
953
+ "learning_rate": 7.767118437196413e-05,
954
+ "loss": 3.7355,
955
+ "step": 2700
956
+ },
957
+ {
958
+ "epoch": 6.554885404101327,
959
+ "grad_norm": 1.5424976348876953,
960
+ "learning_rate": 7.762908450636722e-05,
961
+ "loss": 3.7377,
962
+ "step": 2720
963
+ },
964
+ {
965
+ "epoch": 6.60313630880579,
966
+ "grad_norm": 1.52116060256958,
967
+ "learning_rate": 7.758661992296142e-05,
968
+ "loss": 3.7406,
969
+ "step": 2740
970
+ },
971
+ {
972
+ "epoch": 6.651387213510254,
973
+ "grad_norm": 1.449812889099121,
974
+ "learning_rate": 7.754379106262327e-05,
975
+ "loss": 3.7448,
976
+ "step": 2760
977
+ },
978
+ {
979
+ "epoch": 6.699638118214716,
980
+ "grad_norm": 1.650067687034607,
981
+ "learning_rate": 7.750059837001136e-05,
982
+ "loss": 3.7346,
983
+ "step": 2780
984
+ },
985
+ {
986
+ "epoch": 6.74788902291918,
987
+ "grad_norm": 1.5093579292297363,
988
+ "learning_rate": 7.74570422935616e-05,
989
+ "loss": 3.7328,
990
+ "step": 2800
991
+ },
992
+ {
993
+ "epoch": 6.796139927623643,
994
+ "grad_norm": 1.4587945938110352,
995
+ "learning_rate": 7.741312328548268e-05,
996
+ "loss": 3.7341,
997
+ "step": 2820
998
+ },
999
+ {
1000
+ "epoch": 6.844390832328106,
1001
+ "grad_norm": 1.4707450866699219,
1002
+ "learning_rate": 7.736884180175131e-05,
1003
+ "loss": 3.7375,
1004
+ "step": 2840
1005
+ },
1006
+ {
1007
+ "epoch": 6.892641737032569,
1008
+ "grad_norm": 1.5367634296417236,
1009
+ "learning_rate": 7.732419830210752e-05,
1010
+ "loss": 3.7361,
1011
+ "step": 2860
1012
+ },
1013
+ {
1014
+ "epoch": 6.940892641737032,
1015
+ "grad_norm": 1.4443663358688354,
1016
+ "learning_rate": 7.727919325004981e-05,
1017
+ "loss": 3.7369,
1018
+ "step": 2880
1019
+ },
1020
+ {
1021
+ "epoch": 6.989143546441496,
1022
+ "grad_norm": 1.5327068567276,
1023
+ "learning_rate": 7.723382711283045e-05,
1024
+ "loss": 3.7379,
1025
+ "step": 2900
1026
+ },
1027
+ {
1028
+ "epoch": 7.036188178528348,
1029
+ "grad_norm": 1.4400986433029175,
1030
+ "learning_rate": 7.718810036145059e-05,
1031
+ "loss": 3.6374,
1032
+ "step": 2920
1033
+ },
1034
+ {
1035
+ "epoch": 7.084439083232811,
1036
+ "grad_norm": 1.4702413082122803,
1037
+ "learning_rate": 7.71420134706553e-05,
1038
+ "loss": 3.7096,
1039
+ "step": 2940
1040
+ },
1041
+ {
1042
+ "epoch": 7.132689987937274,
1043
+ "grad_norm": 1.576393961906433,
1044
+ "learning_rate": 7.709556691892873e-05,
1045
+ "loss": 3.7196,
1046
+ "step": 2960
1047
+ },
1048
+ {
1049
+ "epoch": 7.180940892641737,
1050
+ "grad_norm": 1.579249382019043,
1051
+ "learning_rate": 7.704876118848908e-05,
1052
+ "loss": 3.7264,
1053
+ "step": 2980
1054
+ },
1055
+ {
1056
+ "epoch": 7.2291917973462,
1057
+ "grad_norm": 1.4190411567687988,
1058
+ "learning_rate": 7.700159676528366e-05,
1059
+ "loss": 3.7209,
1060
+ "step": 3000
1061
+ },
1062
+ {
1063
+ "epoch": 7.277442702050664,
1064
+ "grad_norm": 1.450442910194397,
1065
+ "learning_rate": 7.695407413898379e-05,
1066
+ "loss": 3.7369,
1067
+ "step": 3020
1068
+ },
1069
+ {
1070
+ "epoch": 7.325693606755126,
1071
+ "grad_norm": 1.4771963357925415,
1072
+ "learning_rate": 7.69061938029797e-05,
1073
+ "loss": 3.7216,
1074
+ "step": 3040
1075
+ },
1076
+ {
1077
+ "epoch": 7.37394451145959,
1078
+ "grad_norm": 1.4357682466506958,
1079
+ "learning_rate": 7.685795625437552e-05,
1080
+ "loss": 3.7191,
1081
+ "step": 3060
1082
+ },
1083
+ {
1084
+ "epoch": 7.422195416164053,
1085
+ "grad_norm": 1.537807583808899,
1086
+ "learning_rate": 7.680936199398394e-05,
1087
+ "loss": 3.725,
1088
+ "step": 3080
1089
+ },
1090
+ {
1091
+ "epoch": 7.470446320868517,
1092
+ "grad_norm": 1.5135725736618042,
1093
+ "learning_rate": 7.676041152632119e-05,
1094
+ "loss": 3.7247,
1095
+ "step": 3100
1096
+ },
1097
+ {
1098
+ "epoch": 7.518697225572979,
1099
+ "grad_norm": 1.5503147840499878,
1100
+ "learning_rate": 7.671110535960168e-05,
1101
+ "loss": 3.726,
1102
+ "step": 3120
1103
+ },
1104
+ {
1105
+ "epoch": 7.566948130277443,
1106
+ "grad_norm": 1.6059578657150269,
1107
+ "learning_rate": 7.666144400573278e-05,
1108
+ "loss": 3.7159,
1109
+ "step": 3140
1110
+ },
1111
+ {
1112
+ "epoch": 7.615199034981906,
1113
+ "grad_norm": 1.493248462677002,
1114
+ "learning_rate": 7.661142798030947e-05,
1115
+ "loss": 3.7209,
1116
+ "step": 3160
1117
+ },
1118
+ {
1119
+ "epoch": 7.66344993968637,
1120
+ "grad_norm": 1.4386259317398071,
1121
+ "learning_rate": 7.656105780260904e-05,
1122
+ "loss": 3.7242,
1123
+ "step": 3180
1124
+ },
1125
+ {
1126
+ "epoch": 7.711700844390832,
1127
+ "grad_norm": 1.5307894945144653,
1128
+ "learning_rate": 7.651033399558563e-05,
1129
+ "loss": 3.7278,
1130
+ "step": 3200
1131
+ },
1132
+ {
1133
+ "epoch": 7.759951749095295,
1134
+ "grad_norm": 8.02717399597168,
1135
+ "learning_rate": 7.645925708586489e-05,
1136
+ "loss": 3.7229,
1137
+ "step": 3220
1138
+ },
1139
+ {
1140
+ "epoch": 7.808202653799759,
1141
+ "grad_norm": 2.1728477478027344,
1142
+ "learning_rate": 7.640782760373839e-05,
1143
+ "loss": 3.7176,
1144
+ "step": 3240
1145
+ },
1146
+ {
1147
+ "epoch": 7.856453558504222,
1148
+ "grad_norm": 1.483292818069458,
1149
+ "learning_rate": 7.635604608315824e-05,
1150
+ "loss": 3.7256,
1151
+ "step": 3260
1152
+ },
1153
+ {
1154
+ "epoch": 7.904704463208685,
1155
+ "grad_norm": 1.4443011283874512,
1156
+ "learning_rate": 7.630391306173145e-05,
1157
+ "loss": 3.6971,
1158
+ "step": 3280
1159
+ },
1160
+ {
1161
+ "epoch": 7.952955367913148,
1162
+ "grad_norm": 1.4782264232635498,
1163
+ "learning_rate": 7.625142908071443e-05,
1164
+ "loss": 3.7192,
1165
+ "step": 3300
1166
+ },
1167
+ {
1168
+ "epoch": 8.0,
1169
+ "grad_norm": 1.0295357704162598,
1170
+ "learning_rate": 7.619859468500727e-05,
1171
+ "loss": 3.6172,
1172
+ "step": 3320
1173
+ },
1174
+ {
1175
+ "epoch": 8.048250904704464,
1176
+ "grad_norm": 1.495681643486023,
1177
+ "learning_rate": 7.614541042314822e-05,
1178
+ "loss": 3.6962,
1179
+ "step": 3340
1180
+ },
1181
+ {
1182
+ "epoch": 8.096501809408926,
1183
+ "grad_norm": 1.3702726364135742,
1184
+ "learning_rate": 7.609187684730784e-05,
1185
+ "loss": 3.7001,
1186
+ "step": 3360
1187
+ },
1188
+ {
1189
+ "epoch": 8.14475271411339,
1190
+ "grad_norm": 1.4463536739349365,
1191
+ "learning_rate": 7.60379945132834e-05,
1192
+ "loss": 3.6969,
1193
+ "step": 3380
1194
+ },
1195
+ {
1196
+ "epoch": 8.193003618817853,
1197
+ "grad_norm": 1.5541642904281616,
1198
+ "learning_rate": 7.598376398049301e-05,
1199
+ "loss": 3.699,
1200
+ "step": 3400
1201
+ },
1202
+ {
1203
+ "epoch": 8.241254523522317,
1204
+ "grad_norm": 1.5190789699554443,
1205
+ "learning_rate": 7.59291858119699e-05,
1206
+ "loss": 3.7044,
1207
+ "step": 3420
1208
+ },
1209
+ {
1210
+ "epoch": 8.289505428226779,
1211
+ "grad_norm": 1.4489225149154663,
1212
+ "learning_rate": 7.58742605743565e-05,
1213
+ "loss": 3.69,
1214
+ "step": 3440
1215
+ },
1216
+ {
1217
+ "epoch": 8.337756332931242,
1218
+ "grad_norm": 1.506798267364502,
1219
+ "learning_rate": 7.581898883789857e-05,
1220
+ "loss": 3.7024,
1221
+ "step": 3460
1222
+ },
1223
+ {
1224
+ "epoch": 8.386007237635706,
1225
+ "grad_norm": 1.4284615516662598,
1226
+ "learning_rate": 7.576337117643934e-05,
1227
+ "loss": 3.7032,
1228
+ "step": 3480
1229
+ },
1230
+ {
1231
+ "epoch": 8.43425814234017,
1232
+ "grad_norm": 1.4764567613601685,
1233
+ "learning_rate": 7.570740816741351e-05,
1234
+ "loss": 3.6948,
1235
+ "step": 3500
1236
+ },
1237
+ {
1238
+ "epoch": 8.482509047044632,
1239
+ "grad_norm": 1.420469880104065,
1240
+ "learning_rate": 7.56511003918412e-05,
1241
+ "loss": 3.7051,
1242
+ "step": 3520
1243
+ },
1244
+ {
1245
+ "epoch": 8.530759951749095,
1246
+ "grad_norm": 1.5950831174850464,
1247
+ "learning_rate": 7.559444843432199e-05,
1248
+ "loss": 3.6957,
1249
+ "step": 3540
1250
+ },
1251
+ {
1252
+ "epoch": 8.579010856453559,
1253
+ "grad_norm": 3.9912474155426025,
1254
+ "learning_rate": 7.55374528830289e-05,
1255
+ "loss": 3.7046,
1256
+ "step": 3560
1257
+ },
1258
+ {
1259
+ "epoch": 8.627261761158021,
1260
+ "grad_norm": 1.6887681484222412,
1261
+ "learning_rate": 7.548011432970211e-05,
1262
+ "loss": 3.7024,
1263
+ "step": 3580
1264
+ },
1265
+ {
1266
+ "epoch": 8.675512665862485,
1267
+ "grad_norm": 1.4177148342132568,
1268
+ "learning_rate": 7.5422433369643e-05,
1269
+ "loss": 3.692,
1270
+ "step": 3600
1271
+ },
1272
+ {
1273
+ "epoch": 8.723763570566948,
1274
+ "grad_norm": 1.4193158149719238,
1275
+ "learning_rate": 7.536441060170786e-05,
1276
+ "loss": 3.706,
1277
+ "step": 3620
1278
+ },
1279
+ {
1280
+ "epoch": 8.772014475271412,
1281
+ "grad_norm": 1.3049330711364746,
1282
+ "learning_rate": 7.53060466283017e-05,
1283
+ "loss": 3.6858,
1284
+ "step": 3640
1285
+ },
1286
+ {
1287
+ "epoch": 8.820265379975874,
1288
+ "grad_norm": 1.4670246839523315,
1289
+ "learning_rate": 7.5247342055372e-05,
1290
+ "loss": 3.6976,
1291
+ "step": 3660
1292
+ },
1293
+ {
1294
+ "epoch": 8.868516284680338,
1295
+ "grad_norm": 1.4112060070037842,
1296
+ "learning_rate": 7.518829749240247e-05,
1297
+ "loss": 3.6963,
1298
+ "step": 3680
1299
+ },
1300
+ {
1301
+ "epoch": 8.916767189384801,
1302
+ "grad_norm": 1.3692915439605713,
1303
+ "learning_rate": 7.512891355240656e-05,
1304
+ "loss": 3.6953,
1305
+ "step": 3700
1306
+ },
1307
+ {
1308
+ "epoch": 8.965018094089265,
1309
+ "grad_norm": 1.3691803216934204,
1310
+ "learning_rate": 7.506919085192135e-05,
1311
+ "loss": 3.6954,
1312
+ "step": 3720
1313
+ },
1314
+ {
1315
+ "epoch": 9.012062726176115,
1316
+ "grad_norm": 1.4931933879852295,
1317
+ "learning_rate": 7.500913001100085e-05,
1318
+ "loss": 3.6025,
1319
+ "step": 3740
1320
+ },
1321
+ {
1322
+ "epoch": 9.060313630880579,
1323
+ "grad_norm": 1.4402884244918823,
1324
+ "learning_rate": 7.494873165320985e-05,
1325
+ "loss": 3.6785,
1326
+ "step": 3760
1327
+ },
1328
+ {
1329
+ "epoch": 9.108564535585042,
1330
+ "grad_norm": 1.4091100692749023,
1331
+ "learning_rate": 7.488799640561724e-05,
1332
+ "loss": 3.6843,
1333
+ "step": 3780
1334
+ },
1335
+ {
1336
+ "epoch": 9.156815440289506,
1337
+ "grad_norm": 1.4743162393569946,
1338
+ "learning_rate": 7.48269248987896e-05,
1339
+ "loss": 3.6782,
1340
+ "step": 3800
1341
+ },
1342
+ {
1343
+ "epoch": 9.205066344993968,
1344
+ "grad_norm": 1.4238414764404297,
1345
+ "learning_rate": 7.476551776678461e-05,
1346
+ "loss": 3.6803,
1347
+ "step": 3820
1348
+ },
1349
+ {
1350
+ "epoch": 9.253317249698432,
1351
+ "grad_norm": 1.5211981534957886,
1352
+ "learning_rate": 7.47037756471445e-05,
1353
+ "loss": 3.6745,
1354
+ "step": 3840
1355
+ },
1356
+ {
1357
+ "epoch": 9.301568154402895,
1358
+ "grad_norm": 1.4191877841949463,
1359
+ "learning_rate": 7.464169918088939e-05,
1360
+ "loss": 3.6825,
1361
+ "step": 3860
1362
+ },
1363
+ {
1364
+ "epoch": 9.349819059107359,
1365
+ "grad_norm": 1.4716769456863403,
1366
+ "learning_rate": 7.457928901251072e-05,
1367
+ "loss": 3.6735,
1368
+ "step": 3880
1369
+ },
1370
+ {
1371
+ "epoch": 9.398069963811821,
1372
+ "grad_norm": 1.5062490701675415,
1373
+ "learning_rate": 7.45165457899644e-05,
1374
+ "loss": 3.6787,
1375
+ "step": 3900
1376
+ },
1377
+ {
1378
+ "epoch": 9.446320868516285,
1379
+ "grad_norm": 1.4394530057907104,
1380
+ "learning_rate": 7.445347016466428e-05,
1381
+ "loss": 3.6759,
1382
+ "step": 3920
1383
+ },
1384
+ {
1385
+ "epoch": 9.494571773220748,
1386
+ "grad_norm": 1.4211843013763428,
1387
+ "learning_rate": 7.439006279147524e-05,
1388
+ "loss": 3.6786,
1389
+ "step": 3940
1390
+ },
1391
+ {
1392
+ "epoch": 9.54282267792521,
1393
+ "grad_norm": 1.4235788583755493,
1394
+ "learning_rate": 7.432632432870641e-05,
1395
+ "loss": 3.6706,
1396
+ "step": 3960
1397
+ },
1398
+ {
1399
+ "epoch": 9.591073582629674,
1400
+ "grad_norm": 1.3978049755096436,
1401
+ "learning_rate": 7.426225543810444e-05,
1402
+ "loss": 3.6744,
1403
+ "step": 3980
1404
+ },
1405
+ {
1406
+ "epoch": 9.639324487334138,
1407
+ "grad_norm": 1.3657376766204834,
1408
+ "learning_rate": 7.419785678484646e-05,
1409
+ "loss": 3.6772,
1410
+ "step": 4000
1411
+ }
1412
+ ],
1413
+ "logging_steps": 20,
1414
+ "max_steps": 20000,
1415
+ "num_input_tokens_seen": 0,
1416
+ "num_train_epochs": 49,
1417
+ "save_steps": 4000,
1418
+ "stateful_callbacks": {
1419
+ "TrainerControl": {
1420
+ "args": {
1421
+ "should_epoch_stop": false,
1422
+ "should_evaluate": false,
1423
+ "should_log": false,
1424
+ "should_save": true,
1425
+ "should_training_stop": false
1426
+ },
1427
+ "attributes": {}
1428
+ }
1429
+ },
1430
+ "total_flos": 5.697034237348571e+19,
1431
+ "train_batch_size": 16,
1432
+ "trial_name": null,
1433
+ "trial_params": null
1434
+ }
logs/UNIVLA_SIMPLERENV_BRIDGE_VIDEO_BS128_20k/checkpoint-4000/zero_to_fp32.py ADDED
@@ -0,0 +1,760 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ #!/usr/bin/env python
2
+
3
+ # Copyright (c) Microsoft Corporation.
4
+ # SPDX-License-Identifier: Apache-2.0
5
+
6
+ # DeepSpeed Team
7
+
8
+ # This script extracts fp32 consolidated weights from a zero 1, 2 and 3 DeepSpeed checkpoints. It gets
9
+ # copied into the top level checkpoint dir, so the user can easily do the conversion at any point in
10
+ # the future. Once extracted, the weights don't require DeepSpeed and can be used in any
11
+ # application.
12
+ #
13
+ # example:
14
+ # python zero_to_fp32.py . output_dir/
15
+ # or
16
+ # python zero_to_fp32.py . output_dir/ --safe_serialization
17
+
18
+ import argparse
19
+ import torch
20
+ import glob
21
+ import math
22
+ import os
23
+ import re
24
+ import gc
25
+ import json
26
+ import numpy as np
27
+ from tqdm import tqdm
28
+ from collections import OrderedDict
29
+ from dataclasses import dataclass
30
+
31
+ # while this script doesn't use deepspeed to recover data, since the checkpoints are pickled with
32
+ # DeepSpeed data structures it has to be available in the current python environment.
33
+ from deepspeed.utils import logger
34
+ from deepspeed.checkpoint.constants import (DS_VERSION, OPTIMIZER_STATE_DICT, SINGLE_PARTITION_OF_FP32_GROUPS,
35
+ FP32_FLAT_GROUPS, ZERO_STAGE, PARTITION_COUNT, PARAM_SHAPES, BUFFER_NAMES,
36
+ FROZEN_PARAM_SHAPES, FROZEN_PARAM_FRAGMENTS)
37
+
38
+
39
+ @dataclass
40
+ class zero_model_state:
41
+ buffers: dict()
42
+ param_shapes: dict()
43
+ shared_params: list
44
+ ds_version: int
45
+ frozen_param_shapes: dict()
46
+ frozen_param_fragments: dict()
47
+
48
+
49
+ debug = 0
50
+
51
+ # load to cpu
52
+ device = torch.device('cpu')
53
+
54
+
55
+ def atoi(text):
56
+ return int(text) if text.isdigit() else text
57
+
58
+
59
+ def natural_keys(text):
60
+ '''
61
+ alist.sort(key=natural_keys) sorts in human order
62
+ http://nedbatchelder.com/blog/200712/human_sorting.html
63
+ (See Toothy's implementation in the comments)
64
+ '''
65
+ return [atoi(c) for c in re.split(r'(\d+)', text)]
66
+
67
+
68
+ def get_model_state_file(checkpoint_dir, zero_stage):
69
+ if not os.path.isdir(checkpoint_dir):
70
+ raise FileNotFoundError(f"Directory '{checkpoint_dir}' doesn't exist")
71
+
72
+ # there should be only one file
73
+ if zero_stage <= 2:
74
+ file = os.path.join(checkpoint_dir, "mp_rank_00_model_states.pt")
75
+ elif zero_stage == 3:
76
+ file = os.path.join(checkpoint_dir, "zero_pp_rank_0_mp_rank_00_model_states.pt")
77
+
78
+ if not os.path.exists(file):
79
+ raise FileNotFoundError(f"can't find model states file at '{file}'")
80
+
81
+ return file
82
+
83
+
84
+ def get_checkpoint_files(checkpoint_dir, glob_pattern):
85
+ # XXX: need to test that this simple glob rule works for multi-node setup too
86
+ ckpt_files = sorted(glob.glob(os.path.join(checkpoint_dir, glob_pattern)), key=natural_keys)
87
+
88
+ if len(ckpt_files) == 0:
89
+ raise FileNotFoundError(f"can't find {glob_pattern} files in directory '{checkpoint_dir}'")
90
+
91
+ return ckpt_files
92
+
93
+
94
+ def get_optim_files(checkpoint_dir):
95
+ return get_checkpoint_files(checkpoint_dir, "*_optim_states.pt")
96
+
97
+
98
+ def get_model_state_files(checkpoint_dir):
99
+ return get_checkpoint_files(checkpoint_dir, "*_model_states.pt")
100
+
101
+
102
+ def parse_model_states(files):
103
+ zero_model_states = []
104
+ for file in files:
105
+ state_dict = torch.load(file, map_location=device, weights_only=False)
106
+
107
+ if BUFFER_NAMES not in state_dict:
108
+ raise ValueError(f"{file} is not a model state checkpoint")
109
+ buffer_names = state_dict[BUFFER_NAMES]
110
+ if debug:
111
+ print("Found buffers:", buffer_names)
112
+
113
+ # recover just the buffers while restoring them to fp32 if they were saved in fp16
114
+ buffers = {k: v.float() for k, v in state_dict["module"].items() if k in buffer_names}
115
+ param_shapes = state_dict[PARAM_SHAPES]
116
+
117
+ # collect parameters that are included in param_shapes
118
+ param_names = []
119
+ for s in param_shapes:
120
+ for name in s.keys():
121
+ param_names.append(name)
122
+
123
+ # update with frozen parameters
124
+ frozen_param_shapes = state_dict.get(FROZEN_PARAM_SHAPES, None)
125
+ if frozen_param_shapes is not None:
126
+ if debug:
127
+ print(f"Found frozen_param_shapes: {frozen_param_shapes}")
128
+ param_names += list(frozen_param_shapes.keys())
129
+
130
+ # handle shared params
131
+ shared_params = [[k, v] for k, v in state_dict["shared_params"].items()]
132
+
133
+ ds_version = state_dict.get(DS_VERSION, None)
134
+
135
+ frozen_param_fragments = state_dict.get(FROZEN_PARAM_FRAGMENTS, None)
136
+
137
+ z_model_state = zero_model_state(buffers=buffers,
138
+ param_shapes=param_shapes,
139
+ shared_params=shared_params,
140
+ ds_version=ds_version,
141
+ frozen_param_shapes=frozen_param_shapes,
142
+ frozen_param_fragments=frozen_param_fragments)
143
+ zero_model_states.append(z_model_state)
144
+
145
+ return zero_model_states
146
+
147
+
148
+ def parse_optim_states(files, ds_checkpoint_dir):
149
+ total_files = len(files)
150
+ state_dicts = []
151
+ for f in tqdm(files, desc='Loading checkpoint shards'):
152
+ state_dict = torch.load(f, map_location=device, mmap=True, weights_only=False)
153
+ # immediately discard the potentially huge 2 optimizer states as we only care for fp32 master weights
154
+ # and also handle the case where it was already removed by another helper script
155
+ state_dict["optimizer_state_dict"].pop("optimizer_state_dict", None)
156
+ state_dicts.append(state_dict)
157
+
158
+ if ZERO_STAGE not in state_dicts[0][OPTIMIZER_STATE_DICT]:
159
+ raise ValueError(f"{files[0]} is not a zero checkpoint")
160
+ zero_stage = state_dicts[0][OPTIMIZER_STATE_DICT][ZERO_STAGE]
161
+ world_size = state_dicts[0][OPTIMIZER_STATE_DICT][PARTITION_COUNT]
162
+
163
+ # For ZeRO-2 each param group can have different partition_count as data parallelism for expert
164
+ # parameters can be different from data parallelism for non-expert parameters. So we can just
165
+ # use the max of the partition_count to get the dp world_size.
166
+
167
+ if type(world_size) is list:
168
+ world_size = max(world_size)
169
+
170
+ if world_size != total_files:
171
+ raise ValueError(
172
+ f"Expected {world_size} of '*_optim_states.pt' under '{ds_checkpoint_dir}' but found {total_files} files. "
173
+ "Possibly due to an overwrite of an old checkpoint, or a checkpoint didn't get saved by one or more processes."
174
+ )
175
+
176
+ # the groups are named differently in each stage
177
+ if zero_stage <= 2:
178
+ fp32_groups_key = SINGLE_PARTITION_OF_FP32_GROUPS
179
+ elif zero_stage == 3:
180
+ fp32_groups_key = FP32_FLAT_GROUPS
181
+ else:
182
+ raise ValueError(f"unknown zero stage {zero_stage}")
183
+
184
+ fp32_flat_groups = [state_dicts[i][OPTIMIZER_STATE_DICT][fp32_groups_key] for i in range(len(state_dicts))]
185
+ return zero_stage, world_size, fp32_flat_groups
186
+
187
+
188
+ def _get_fp32_state_dict_from_zero_checkpoint(ds_checkpoint_dir, exclude_frozen_parameters):
189
+ """
190
+ Returns fp32 state_dict reconstructed from ds checkpoint
191
+
192
+ Args:
193
+ - ``ds_checkpoint_dir``: path to the deepspeed checkpoint folder (where the optimizer files are)
194
+
195
+ """
196
+ print(f"Processing zero checkpoint '{ds_checkpoint_dir}'")
197
+
198
+ optim_files = get_optim_files(ds_checkpoint_dir)
199
+ zero_stage, world_size, fp32_flat_groups = parse_optim_states(optim_files, ds_checkpoint_dir)
200
+ print(f"Detected checkpoint of type zero stage {zero_stage}, world_size: {world_size}")
201
+
202
+ model_files = get_model_state_files(ds_checkpoint_dir)
203
+
204
+ zero_model_states = parse_model_states(model_files)
205
+ print(f'Parsing checkpoint created by deepspeed=={zero_model_states[0].ds_version}')
206
+
207
+ if zero_stage <= 2:
208
+ return _get_fp32_state_dict_from_zero2_checkpoint(world_size, fp32_flat_groups, zero_model_states,
209
+ exclude_frozen_parameters)
210
+ elif zero_stage == 3:
211
+ return _get_fp32_state_dict_from_zero3_checkpoint(world_size, fp32_flat_groups, zero_model_states,
212
+ exclude_frozen_parameters)
213
+
214
+
215
+ def _zero2_merge_frozen_params(state_dict, zero_model_states):
216
+ if zero_model_states[0].frozen_param_shapes is None or len(zero_model_states[0].frozen_param_shapes) == 0:
217
+ return
218
+
219
+ frozen_param_shapes = zero_model_states[0].frozen_param_shapes
220
+ frozen_param_fragments = zero_model_states[0].frozen_param_fragments
221
+
222
+ if debug:
223
+ num_elem = sum(s.numel() for s in frozen_param_shapes.values())
224
+ print(f'rank 0: {FROZEN_PARAM_SHAPES}.numel = {num_elem}')
225
+
226
+ wanted_params = len(frozen_param_shapes)
227
+ wanted_numel = sum(s.numel() for s in frozen_param_shapes.values())
228
+ avail_numel = sum([p.numel() for p in frozen_param_fragments.values()])
229
+ print(f'Frozen params: Have {avail_numel} numels to process.')
230
+ print(f'Frozen params: Need {wanted_numel} numels in {wanted_params} params')
231
+
232
+ total_params = 0
233
+ total_numel = 0
234
+ for name, shape in frozen_param_shapes.items():
235
+ total_params += 1
236
+ unpartitioned_numel = shape.numel()
237
+ total_numel += unpartitioned_numel
238
+
239
+ state_dict[name] = frozen_param_fragments[name]
240
+
241
+ if debug:
242
+ print(f"{name} full shape: {shape} unpartitioned numel {unpartitioned_numel} ")
243
+
244
+ print(f"Reconstructed Frozen fp32 state dict with {total_params} params {total_numel} elements")
245
+
246
+
247
+ def _has_callable(obj, fn):
248
+ attr = getattr(obj, fn, None)
249
+ return callable(attr)
250
+
251
+
252
+ def _zero2_merge_trainable_params(state_dict, world_size, fp32_flat_groups, zero_model_states):
253
+ param_shapes = zero_model_states[0].param_shapes
254
+
255
+ # Reconstruction protocol:
256
+ #
257
+ # XXX: document this
258
+
259
+ if debug:
260
+ for i in range(world_size):
261
+ for j in range(len(fp32_flat_groups[0])):
262
+ print(f"{FP32_FLAT_GROUPS}[{i}][{j}].shape={fp32_flat_groups[i][j].shape}")
263
+
264
+ # XXX: memory usage doubles here (zero2)
265
+ num_param_groups = len(fp32_flat_groups[0])
266
+ merged_single_partition_of_fp32_groups = []
267
+ for i in range(num_param_groups):
268
+ merged_partitions = [sd[i] for sd in fp32_flat_groups]
269
+ full_single_fp32_vector = torch.cat(merged_partitions, 0)
270
+ merged_single_partition_of_fp32_groups.append(full_single_fp32_vector)
271
+ avail_numel = sum(
272
+ [full_single_fp32_vector.numel() for full_single_fp32_vector in merged_single_partition_of_fp32_groups])
273
+
274
+ if debug:
275
+ wanted_params = sum([len(shapes) for shapes in param_shapes])
276
+ wanted_numel = sum([sum(shape.numel() for shape in shapes.values()) for shapes in param_shapes])
277
+ # not asserting if there is a mismatch due to possible padding
278
+ print(f"Have {avail_numel} numels to process.")
279
+ print(f"Need {wanted_numel} numels in {wanted_params} params.")
280
+
281
+ # params
282
+ # XXX: for huge models that can't fit into the host's RAM we will have to recode this to support
283
+ # out-of-core computing solution
284
+ total_numel = 0
285
+ total_params = 0
286
+ for shapes, full_single_fp32_vector in zip(param_shapes, merged_single_partition_of_fp32_groups):
287
+ offset = 0
288
+ avail_numel = full_single_fp32_vector.numel()
289
+ for name, shape in shapes.items():
290
+
291
+ unpartitioned_numel = shape.numel() if _has_callable(shape, 'numel') else math.prod(shape)
292
+ total_numel += unpartitioned_numel
293
+ total_params += 1
294
+
295
+ if debug:
296
+ print(f"{name} full shape: {shape} unpartitioned numel {unpartitioned_numel} ")
297
+ state_dict[name] = full_single_fp32_vector.narrow(0, offset, unpartitioned_numel).view(shape)
298
+ offset += unpartitioned_numel
299
+
300
+ # Z2 started to align to 2*world_size to improve nccl performance. Therefore both offset and
301
+ # avail_numel can differ by anywhere between 0..2*world_size. Due to two unrelated complex
302
+ # paddings performed in the code it's almost impossible to predict the exact numbers w/o the
303
+ # live optimizer object, so we are checking that the numbers are within the right range
304
+ align_to = 2 * world_size
305
+
306
+ def zero2_align(x):
307
+ return align_to * math.ceil(x / align_to)
308
+
309
+ if debug:
310
+ print(f"original offset={offset}, avail_numel={avail_numel}")
311
+
312
+ offset = zero2_align(offset)
313
+ avail_numel = zero2_align(avail_numel)
314
+
315
+ if debug:
316
+ print(f"aligned offset={offset}, avail_numel={avail_numel}")
317
+
318
+ # Sanity check
319
+ if offset != avail_numel:
320
+ raise ValueError(f"consumed {offset} numels out of {avail_numel} - something is wrong")
321
+
322
+ print(f"Reconstructed fp32 state dict with {total_params} params {total_numel} elements")
323
+
324
+
325
+ def _get_fp32_state_dict_from_zero2_checkpoint(world_size, fp32_flat_groups, zero_model_states,
326
+ exclude_frozen_parameters):
327
+ state_dict = OrderedDict()
328
+
329
+ # buffers
330
+ buffers = zero_model_states[0].buffers
331
+ state_dict.update(buffers)
332
+ if debug:
333
+ print(f"added {len(buffers)} buffers")
334
+
335
+ if not exclude_frozen_parameters:
336
+ _zero2_merge_frozen_params(state_dict, zero_model_states)
337
+
338
+ _zero2_merge_trainable_params(state_dict, world_size, fp32_flat_groups, zero_model_states)
339
+
340
+ # recover shared parameters
341
+ for pair in zero_model_states[0].shared_params:
342
+ if pair[1] in state_dict:
343
+ state_dict[pair[0]] = state_dict[pair[1]]
344
+
345
+ return state_dict
346
+
347
+
348
+ def zero3_partitioned_param_info(unpartitioned_numel, world_size):
349
+ remainder = unpartitioned_numel % world_size
350
+ padding_numel = (world_size - remainder) if remainder else 0
351
+ partitioned_numel = math.ceil(unpartitioned_numel / world_size)
352
+ return partitioned_numel, padding_numel
353
+
354
+
355
+ def _zero3_merge_frozen_params(state_dict, world_size, zero_model_states):
356
+ if zero_model_states[0].frozen_param_shapes is None or len(zero_model_states[0].frozen_param_shapes) == 0:
357
+ return
358
+
359
+ if debug:
360
+ for i in range(world_size):
361
+ num_elem = sum(s.numel() for s in zero_model_states[i].frozen_param_fragments.values())
362
+ print(f'rank {i}: {FROZEN_PARAM_SHAPES}.numel = {num_elem}')
363
+
364
+ frozen_param_shapes = zero_model_states[0].frozen_param_shapes
365
+ wanted_params = len(frozen_param_shapes)
366
+ wanted_numel = sum(s.numel() for s in frozen_param_shapes.values())
367
+ avail_numel = sum([p.numel() for p in zero_model_states[0].frozen_param_fragments.values()]) * world_size
368
+ print(f'Frozen params: Have {avail_numel} numels to process.')
369
+ print(f'Frozen params: Need {wanted_numel} numels in {wanted_params} params')
370
+
371
+ total_params = 0
372
+ total_numel = 0
373
+ for name, shape in zero_model_states[0].frozen_param_shapes.items():
374
+ total_params += 1
375
+ unpartitioned_numel = shape.numel()
376
+ total_numel += unpartitioned_numel
377
+
378
+ param_frags = tuple(model_state.frozen_param_fragments[name] for model_state in zero_model_states)
379
+ state_dict[name] = torch.cat(param_frags, 0).narrow(0, 0, unpartitioned_numel).view(shape)
380
+
381
+ partitioned_numel, partitioned_padding_numel = zero3_partitioned_param_info(unpartitioned_numel, world_size)
382
+
383
+ if debug:
384
+ print(
385
+ f"Frozen params: {total_params} {name} full shape: {shape} partition0 numel={partitioned_numel} partitioned_padding_numel={partitioned_padding_numel}"
386
+ )
387
+
388
+ print(f"Reconstructed Frozen fp32 state dict with {total_params} params {total_numel} elements")
389
+
390
+
391
+ class GatheredTensor:
392
+ """
393
+ A pseudo tensor that collects partitioned weights.
394
+ It is more memory efficient when there are multiple groups.
395
+ """
396
+
397
+ def __init__(self, flat_groups, flat_groups_offset, offset, partitioned_numel, shape):
398
+ self.flat_groups = flat_groups
399
+ self.flat_groups_offset = flat_groups_offset
400
+ self.offset = offset
401
+ self.partitioned_numel = partitioned_numel
402
+ self.shape = shape
403
+ self.dtype = self.flat_groups[0][0].dtype
404
+
405
+ def contiguous(self):
406
+ """
407
+ Merge partitioned weights from flat_groups into a single tensor.
408
+ """
409
+ end_idx = self.offset + self.partitioned_numel
410
+ world_size = len(self.flat_groups)
411
+ pad_flat_param_chunks = []
412
+
413
+ for rank_i in range(world_size):
414
+ # for each rank, we need to collect weights from related group/groups
415
+ flat_groups_at_rank_i = self.flat_groups[rank_i]
416
+ start_group_id = None
417
+ end_group_id = None
418
+ for group_id in range(len(self.flat_groups_offset)):
419
+ if self.flat_groups_offset[group_id] <= self.offset < self.flat_groups_offset[group_id + 1]:
420
+ start_group_id = group_id
421
+ if self.flat_groups_offset[group_id] < end_idx <= self.flat_groups_offset[group_id + 1]:
422
+ end_group_id = group_id
423
+ break
424
+ # collect weights from related group/groups
425
+ for group_id in range(start_group_id, end_group_id + 1):
426
+ flat_tensor = flat_groups_at_rank_i[group_id]
427
+ start_offset = self.offset - self.flat_groups_offset[group_id]
428
+ end_offset = min(end_idx, self.flat_groups_offset[group_id + 1]) - self.flat_groups_offset[group_id]
429
+ pad_flat_param_chunks.append(flat_tensor[start_offset:end_offset])
430
+
431
+ # collect weights from all ranks
432
+ pad_flat_param = torch.cat(pad_flat_param_chunks, dim=0)
433
+ param = pad_flat_param[:self.shape.numel()].view(self.shape).contiguous()
434
+ return param
435
+
436
+
437
+ def _zero3_merge_trainable_params(state_dict, world_size, fp32_flat_groups, zero_model_states):
438
+ param_shapes = zero_model_states[0].param_shapes
439
+ avail_numel = sum([flat_group.numel() for flat_group in fp32_flat_groups[0]]) * world_size
440
+
441
+ # Reconstruction protocol: For zero3 we need to zip the partitions together at boundary of each
442
+ # param, re-consolidating each param, while dealing with padding if any
443
+
444
+ # merge list of dicts, preserving order
445
+ param_shapes = {k: v for d in param_shapes for k, v in d.items()}
446
+
447
+ if debug:
448
+ for i in range(world_size):
449
+ print(f"{FP32_FLAT_GROUPS}[{i}].shape={fp32_flat_groups[i].shape}")
450
+
451
+ wanted_params = len(param_shapes)
452
+ wanted_numel = sum(shape.numel() for shape in param_shapes.values())
453
+ # not asserting if there is a mismatch due to possible padding
454
+ avail_numel = fp32_flat_groups[0].numel() * world_size
455
+ print(f"Trainable params: Have {avail_numel} numels to process.")
456
+ print(f"Trainable params: Need {wanted_numel} numels in {wanted_params} params.")
457
+
458
+ # params
459
+ # XXX: for huge models that can't fit into the host's RAM we will have to recode this to support
460
+ # out-of-core computing solution
461
+ offset = 0
462
+ total_numel = 0
463
+ total_params = 0
464
+ flat_groups_offset = [0] + list(np.cumsum([flat_tensor.numel() for flat_tensor in fp32_flat_groups[0]]))
465
+ for name, shape in tqdm(param_shapes.items(), desc='Gathering sharded weights'):
466
+ unpartitioned_numel = shape.numel()
467
+ total_numel += unpartitioned_numel
468
+ total_params += 1
469
+ partitioned_numel, partitioned_padding_numel = zero3_partitioned_param_info(unpartitioned_numel, world_size)
470
+
471
+ if debug:
472
+ print(
473
+ f"Trainable params: {total_params} {name} full shape: {shape} partition0 numel={partitioned_numel} partitioned_padding_numel={partitioned_padding_numel}"
474
+ )
475
+
476
+ # memory efficient tensor
477
+ tensor = GatheredTensor(fp32_flat_groups, flat_groups_offset, offset, partitioned_numel, shape)
478
+ state_dict[name] = tensor
479
+ offset += partitioned_numel
480
+
481
+ offset *= world_size
482
+
483
+ # Sanity check
484
+ if offset != avail_numel:
485
+ raise ValueError(f"consumed {offset} numels out of {avail_numel} - something is wrong")
486
+
487
+ print(f"Reconstructed Trainable fp32 state dict with {total_params} params {total_numel} elements")
488
+
489
+
490
+ def _get_fp32_state_dict_from_zero3_checkpoint(world_size, fp32_flat_groups, zero_model_states,
491
+ exclude_frozen_parameters):
492
+ state_dict = OrderedDict()
493
+
494
+ # buffers
495
+ buffers = zero_model_states[0].buffers
496
+ state_dict.update(buffers)
497
+ if debug:
498
+ print(f"added {len(buffers)} buffers")
499
+
500
+ if not exclude_frozen_parameters:
501
+ _zero3_merge_frozen_params(state_dict, world_size, zero_model_states)
502
+
503
+ _zero3_merge_trainable_params(state_dict, world_size, fp32_flat_groups, zero_model_states)
504
+
505
+ # recover shared parameters
506
+ for pair in zero_model_states[0].shared_params:
507
+ if pair[1] in state_dict:
508
+ state_dict[pair[0]] = state_dict[pair[1]]
509
+
510
+ return state_dict
511
+
512
+
513
+ def to_torch_tensor(state_dict, return_empty_tensor=False):
514
+ """
515
+ Convert state_dict of GatheredTensor to torch tensor
516
+ """
517
+ torch_state_dict = {}
518
+ converted_tensors = {}
519
+ for name, tensor in state_dict.items():
520
+ tensor_id = id(tensor)
521
+ if tensor_id in converted_tensors: # shared tensors
522
+ shared_tensor = torch_state_dict[converted_tensors[tensor_id]]
523
+ torch_state_dict[name] = shared_tensor
524
+ else:
525
+ converted_tensors[tensor_id] = name
526
+ if return_empty_tensor:
527
+ torch_state_dict[name] = torch.empty(tensor.shape, dtype=tensor.dtype)
528
+ else:
529
+ torch_state_dict[name] = tensor.contiguous()
530
+ return torch_state_dict
531
+
532
+
533
+ def get_fp32_state_dict_from_zero_checkpoint(checkpoint_dir,
534
+ tag=None,
535
+ exclude_frozen_parameters=False,
536
+ lazy_mode=False):
537
+ """
538
+ Convert ZeRO 2 or 3 checkpoint into a single fp32 consolidated state_dict that can be loaded with
539
+ ``load_state_dict()`` and used for training without DeepSpeed or shared with others, for example
540
+ via a model hub.
541
+
542
+ Args:
543
+ - ``checkpoint_dir``: path to the desired checkpoint folder
544
+ - ``tag``: checkpoint tag used as a unique identifier for checkpoint. If not provided will attempt to load tag in 'latest' file. e.g., ``global_step14``
545
+ - ``exclude_frozen_parameters``: exclude frozen parameters
546
+ - ``lazy_mode``: get state_dict in lazy mode. It returns a dict of pesduo tensor instead of torch tensor, which is more memory efficient.
547
+ Convert the pesduo tensor to torch tensor by ``.contiguous()``
548
+
549
+ Returns:
550
+ - pytorch ``state_dict``
551
+
552
+ A typical usage might be ::
553
+
554
+ from deepspeed.utils.zero_to_fp32 import get_fp32_state_dict_from_zero_checkpoint
555
+ # do the training and checkpoint saving
556
+ state_dict = get_fp32_state_dict_from_zero_checkpoint(checkpoint_dir) # already on cpu
557
+ model = model.cpu() # move to cpu
558
+ model.load_state_dict(state_dict)
559
+ # submit to model hub or save the model to share with others
560
+
561
+ In this example the ``model`` will no longer be usable in the deepspeed context of the same
562
+ application. i.e. you will need to re-initialize the deepspeed engine, since
563
+ ``model.load_state_dict(state_dict)`` will remove all the deepspeed magic from it.
564
+
565
+ If you want it all done for you, use ``load_state_dict_from_zero_checkpoint`` instead.
566
+
567
+ Note: the above usage may not work if your application doesn't have sufficient free CPU memory.
568
+ You may need to use the offline approach using the ``zero_to_fp32.py`` script that is saved with
569
+ the checkpoint. Or you can load state_dict in lazy mode ::
570
+
571
+ from deepspeed.utils.zero_to_fp32 import get_fp32_state_dict_from_zero_checkpoint
572
+ state_dict = get_fp32_state_dict_from_zero_checkpoint(checkpoint_dir, lazy_mode=True) # not on cpu
573
+ for name, lazy_tensor in state_dict.item():
574
+ tensor = lazy_tensor.contiguous() # to cpu
575
+ print(name, tensor)
576
+ # del tensor to release memory if it no longer in use
577
+ """
578
+ if tag is None:
579
+ latest_path = os.path.join(checkpoint_dir, 'latest')
580
+ if os.path.isfile(latest_path):
581
+ with open(latest_path, 'r') as fd:
582
+ tag = fd.read().strip()
583
+ else:
584
+ raise ValueError(f"Unable to find 'latest' file at {latest_path}")
585
+
586
+ ds_checkpoint_dir = os.path.join(checkpoint_dir, tag)
587
+
588
+ if not os.path.isdir(ds_checkpoint_dir):
589
+ raise FileNotFoundError(f"Directory '{ds_checkpoint_dir}' doesn't exist")
590
+
591
+ state_dict = _get_fp32_state_dict_from_zero_checkpoint(ds_checkpoint_dir, exclude_frozen_parameters)
592
+ if lazy_mode:
593
+ return state_dict
594
+ else:
595
+ return to_torch_tensor(state_dict)
596
+
597
+
598
+ def convert_zero_checkpoint_to_fp32_state_dict(checkpoint_dir,
599
+ output_dir,
600
+ max_shard_size="5GB",
601
+ safe_serialization=False,
602
+ tag=None,
603
+ exclude_frozen_parameters=False):
604
+ """
605
+ Convert ZeRO 2 or 3 checkpoint into a single fp32 consolidated ``state_dict`` file that can be
606
+ loaded with ``torch.load(file)`` + ``load_state_dict()`` and used for training without DeepSpeed.
607
+
608
+ Args:
609
+ - ``checkpoint_dir``: path to the desired checkpoint folder. (one that contains the tag-folder, like ``global_step14``)
610
+ - ``output_dir``: directory to the pytorch fp32 state_dict output files
611
+ - ``max_shard_size``: the maximum size for a checkpoint before being sharded, default value is 5GB
612
+ - ``safe_serialization``: whether to save the model using `safetensors` or the traditional PyTorch way (that uses `pickle`).
613
+ - ``tag``: checkpoint tag used as a unique identifier for checkpoint. If not provided will attempt to load tag in the file named ``latest`` in the checkpoint folder, e.g., ``global_step14``
614
+ - ``exclude_frozen_parameters``: exclude frozen parameters
615
+ """
616
+
617
+ # Dependency pre-check
618
+ if safe_serialization:
619
+ try:
620
+ from safetensors.torch import save_file
621
+ except ImportError:
622
+ print('If you want to use `safe_serialization`, please `pip install safetensors`')
623
+ raise
624
+ if max_shard_size is not None:
625
+ try:
626
+ from huggingface_hub import split_torch_state_dict_into_shards
627
+ except ImportError:
628
+ print('If you want to use `max_shard_size`, please `pip install huggingface_hub`')
629
+ raise
630
+
631
+ # Convert zero checkpoint to state_dict
632
+ state_dict = get_fp32_state_dict_from_zero_checkpoint(checkpoint_dir,
633
+ tag,
634
+ exclude_frozen_parameters,
635
+ lazy_mode=True)
636
+
637
+ # Shard the model if it is too big.
638
+ weights_name = "model.safetensors" if safe_serialization else "pytorch_model.bin"
639
+ if max_shard_size is not None:
640
+ filename_pattern = weights_name.replace(".bin", "{suffix}.bin").replace(".safetensors", "{suffix}.safetensors")
641
+ # an memory-efficient approach for sharding
642
+ empty_state_dict = to_torch_tensor(state_dict, return_empty_tensor=True)
643
+ state_dict_split = split_torch_state_dict_into_shards(empty_state_dict,
644
+ filename_pattern=filename_pattern,
645
+ max_shard_size=max_shard_size)
646
+ else:
647
+ from collections import namedtuple
648
+ StateDictSplit = namedtuple("StateDictSplit", ["is_sharded", "filename_to_tensors"])
649
+ state_dict_split = StateDictSplit(is_sharded=False,
650
+ filename_to_tensors={weights_name: list(state_dict.keys())})
651
+
652
+ # Save the model by shard
653
+ os.makedirs(output_dir, exist_ok=True)
654
+ filename_to_tensors = state_dict_split.filename_to_tensors.items()
655
+ for shard_file, tensors in tqdm(filename_to_tensors, desc="Saving checkpoint shards"):
656
+ shard_state_dict = {tensor_name: state_dict[tensor_name] for tensor_name in tensors}
657
+ shard_state_dict = to_torch_tensor(shard_state_dict)
658
+ output_path = os.path.join(output_dir, shard_file)
659
+ if safe_serialization:
660
+ save_file(shard_state_dict, output_path, metadata={"format": "pt"})
661
+ else:
662
+ torch.save(shard_state_dict, output_path)
663
+ # release the memory of current shard
664
+ for tensor_name in list(shard_state_dict.keys()):
665
+ del state_dict[tensor_name]
666
+ del shard_state_dict[tensor_name]
667
+ del shard_state_dict
668
+ gc.collect()
669
+
670
+ # Save index if sharded
671
+ if state_dict_split.is_sharded:
672
+ index = {
673
+ "metadata": state_dict_split.metadata,
674
+ "weight_map": state_dict_split.tensor_to_filename,
675
+ }
676
+ save_index_file = "model.safetensors.index.json" if safe_serialization else "pytorch_model.bin.index.json"
677
+ save_index_file = os.path.join(output_dir, save_index_file)
678
+ with open(save_index_file, "w", encoding="utf-8") as f:
679
+ content = json.dumps(index, indent=2, sort_keys=True) + "\n"
680
+ f.write(content)
681
+
682
+
683
+ def load_state_dict_from_zero_checkpoint(model, checkpoint_dir, tag=None):
684
+ """
685
+ 1. Put the provided model to cpu
686
+ 2. Convert ZeRO 2 or 3 checkpoint into a single fp32 consolidated ``state_dict``
687
+ 3. Load it into the provided model
688
+
689
+ Args:
690
+ - ``model``: the model object to update
691
+ - ``checkpoint_dir``: path to the desired checkpoint folder. (one that contains the tag-folder, like ``global_step14``)
692
+ - ``tag``: checkpoint tag used as a unique identifier for checkpoint. If not provided will attempt to load tag in the file named ``latest`` in the checkpoint folder, e.g., ``global_step14``
693
+
694
+ Returns:
695
+ - ``model`: modified model
696
+
697
+ Make sure you have plenty of CPU memory available before you call this function. If you don't
698
+ have enough use the ``zero_to_fp32.py`` utility to do the conversion. You will find it
699
+ conveniently placed for you in the checkpoint folder.
700
+
701
+ A typical usage might be ::
702
+
703
+ from deepspeed.utils.zero_to_fp32 import load_state_dict_from_zero_checkpoint
704
+ model = load_state_dict_from_zero_checkpoint(trainer.model, checkpoint_dir)
705
+ # submit to model hub or save the model to share with others
706
+
707
+ Note, that once this was run, the ``model`` will no longer be usable in the deepspeed context
708
+ of the same application. i.e. you will need to re-initialize the deepspeed engine, since
709
+ ``model.load_state_dict(state_dict)`` will remove all the deepspeed magic from it.
710
+
711
+ """
712
+ logger.info("Extracting fp32 weights")
713
+ state_dict = get_fp32_state_dict_from_zero_checkpoint(checkpoint_dir, tag)
714
+
715
+ logger.info("Overwriting model with fp32 weights")
716
+ model = model.cpu()
717
+ model.load_state_dict(state_dict, strict=False)
718
+
719
+ return model
720
+
721
+
722
+ if __name__ == "__main__":
723
+ parser = argparse.ArgumentParser()
724
+ parser.add_argument("checkpoint_dir",
725
+ type=str,
726
+ help="path to the desired checkpoint folder, e.g., path/checkpoint-12")
727
+ parser.add_argument("output_dir",
728
+ type=str,
729
+ help="directory to the pytorch fp32 state_dict output files"
730
+ "(e.g. path/checkpoint-12-output/)")
731
+ parser.add_argument(
732
+ "--max_shard_size",
733
+ type=str,
734
+ default="5GB",
735
+ help="The maximum size for a checkpoint before being sharded. Checkpoints shard will then be each of size"
736
+ "lower than this size. If expressed as a string, needs to be digits followed by a unit (like `5MB`"
737
+ "We default it to 5GB in order for models to be able to run easily on free-tier google colab instances"
738
+ "without CPU OOM issues.")
739
+ parser.add_argument(
740
+ "--safe_serialization",
741
+ default=False,
742
+ action='store_true',
743
+ help="Whether to save the model using `safetensors` or the traditional PyTorch way (that uses `pickle`).")
744
+ parser.add_argument("-t",
745
+ "--tag",
746
+ type=str,
747
+ default=None,
748
+ help="checkpoint tag used as a unique identifier for checkpoint. e.g., global_step1")
749
+ parser.add_argument("--exclude_frozen_parameters", action='store_true', help="exclude frozen parameters")
750
+ parser.add_argument("-d", "--debug", action='store_true', help="enable debug")
751
+ args = parser.parse_args()
752
+
753
+ debug = args.debug
754
+
755
+ convert_zero_checkpoint_to_fp32_state_dict(args.checkpoint_dir,
756
+ args.output_dir,
757
+ max_shard_size=args.max_shard_size,
758
+ safe_serialization=args.safe_serialization,
759
+ tag=args.tag,
760
+ exclude_frozen_parameters=args.exclude_frozen_parameters)
logs/UNIVLA_SIMPLERENV_BRIDGE_VIDEO_BS128_20k/checkpoint-8000/config.json ADDED
@@ -0,0 +1,61 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ {
2
+ "action_config": {
3
+ "_attn_implementation": "sdpa",
4
+ "action_dim": 7,
5
+ "attention_dropout": 0.0,
6
+ "hidden_act": "silu",
7
+ "hidden_size": 4096,
8
+ "initializer_range": 0.02,
9
+ "intermediate_size": 2048,
10
+ "max_position_embeddings": 5120,
11
+ "num_attention_heads": 32,
12
+ "num_hidden_layers": 2,
13
+ "num_key_value_heads": 8,
14
+ "pad_token_id": 151643,
15
+ "pretraining_tp": 1,
16
+ "rms_norm_eps": 1e-05,
17
+ "rope_scaling": null,
18
+ "rope_theta": 10000.0,
19
+ "tie_word_embeddings": false,
20
+ "use_cache": true,
21
+ "vision_loss_weight": 5.0
22
+ },
23
+ "action_dim": 7,
24
+ "action_experts": false,
25
+ "architectures": [
26
+ "Emu3MoE"
27
+ ],
28
+ "attention_dropout": 0.1,
29
+ "boa_token_id": 151844,
30
+ "boi_token_id": 151852,
31
+ "bos_token_id": 151849,
32
+ "bov_token_id": 151854,
33
+ "eof_token_id": 151847,
34
+ "eoi_token_id": 151853,
35
+ "eol_token_id": 151846,
36
+ "eos_token_id": 151850,
37
+ "eov_token_id": 184621,
38
+ "hidden_act": "silu",
39
+ "hidden_size": 4096,
40
+ "image_area": 262144,
41
+ "img_token_id": 151851,
42
+ "initializer_range": 0.02,
43
+ "intermediate_size": 14336,
44
+ "max_position_embeddings": 2400,
45
+ "model_type": "Emu3",
46
+ "num_attention_heads": 32,
47
+ "num_hidden_layers": 32,
48
+ "num_key_value_heads": 8,
49
+ "pad_token_id": 151643,
50
+ "pretraining_tp": 1,
51
+ "qkv_bias": false,
52
+ "rms_norm_eps": 1e-05,
53
+ "rope_scaling": null,
54
+ "rope_theta": 1000000.0,
55
+ "tie_word_embeddings": false,
56
+ "torch_dtype": "bfloat16",
57
+ "transformers_version": "4.51.0",
58
+ "use_cache": true,
59
+ "vision_loss_weight": 0.5,
60
+ "vocab_size": 184622
61
+ }
logs/UNIVLA_SIMPLERENV_BRIDGE_VIDEO_BS128_20k/checkpoint-8000/emu3.tiktoken ADDED
The diff for this file is too large to render. See raw diff
 
logs/UNIVLA_SIMPLERENV_BRIDGE_VIDEO_BS128_20k/checkpoint-8000/emu3_vision_tokens.txt ADDED
The diff for this file is too large to render. See raw diff
 
logs/UNIVLA_SIMPLERENV_BRIDGE_VIDEO_BS128_20k/checkpoint-8000/generation_config.json ADDED
@@ -0,0 +1,7 @@
 
 
 
 
 
 
 
 
1
+ {
2
+ "_from_model_config": true,
3
+ "bos_token_id": 151849,
4
+ "eos_token_id": 151850,
5
+ "pad_token_id": 151643,
6
+ "transformers_version": "4.51.0"
7
+ }
logs/UNIVLA_SIMPLERENV_BRIDGE_VIDEO_BS128_20k/checkpoint-8000/latest ADDED
@@ -0,0 +1 @@
 
 
1
+ global_step8000
logs/UNIVLA_SIMPLERENV_BRIDGE_VIDEO_BS128_20k/checkpoint-8000/model.safetensors.index.json ADDED
@@ -0,0 +1,298 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ {
2
+ "metadata": {
3
+ "total_size": 16984023040
4
+ },
5
+ "weight_map": {
6
+ "lm_head.weight": "model-00004-of-00004.safetensors",
7
+ "model.embed_tokens.weight": "model-00001-of-00004.safetensors",
8
+ "model.layers.0.input_layernorm.weight": "model-00001-of-00004.safetensors",
9
+ "model.layers.0.mlp.down_proj.weight": "model-00001-of-00004.safetensors",
10
+ "model.layers.0.mlp.gate_proj.weight": "model-00001-of-00004.safetensors",
11
+ "model.layers.0.mlp.up_proj.weight": "model-00001-of-00004.safetensors",
12
+ "model.layers.0.post_attention_layernorm.weight": "model-00001-of-00004.safetensors",
13
+ "model.layers.0.self_attn.k_proj.weight": "model-00001-of-00004.safetensors",
14
+ "model.layers.0.self_attn.o_proj.weight": "model-00001-of-00004.safetensors",
15
+ "model.layers.0.self_attn.q_proj.weight": "model-00001-of-00004.safetensors",
16
+ "model.layers.0.self_attn.v_proj.weight": "model-00001-of-00004.safetensors",
17
+ "model.layers.1.input_layernorm.weight": "model-00001-of-00004.safetensors",
18
+ "model.layers.1.mlp.down_proj.weight": "model-00001-of-00004.safetensors",
19
+ "model.layers.1.mlp.gate_proj.weight": "model-00001-of-00004.safetensors",
20
+ "model.layers.1.mlp.up_proj.weight": "model-00001-of-00004.safetensors",
21
+ "model.layers.1.post_attention_layernorm.weight": "model-00001-of-00004.safetensors",
22
+ "model.layers.1.self_attn.k_proj.weight": "model-00001-of-00004.safetensors",
23
+ "model.layers.1.self_attn.o_proj.weight": "model-00001-of-00004.safetensors",
24
+ "model.layers.1.self_attn.q_proj.weight": "model-00001-of-00004.safetensors",
25
+ "model.layers.1.self_attn.v_proj.weight": "model-00001-of-00004.safetensors",
26
+ "model.layers.10.input_layernorm.weight": "model-00002-of-00004.safetensors",
27
+ "model.layers.10.mlp.down_proj.weight": "model-00002-of-00004.safetensors",
28
+ "model.layers.10.mlp.gate_proj.weight": "model-00002-of-00004.safetensors",
29
+ "model.layers.10.mlp.up_proj.weight": "model-00002-of-00004.safetensors",
30
+ "model.layers.10.post_attention_layernorm.weight": "model-00002-of-00004.safetensors",
31
+ "model.layers.10.self_attn.k_proj.weight": "model-00002-of-00004.safetensors",
32
+ "model.layers.10.self_attn.o_proj.weight": "model-00002-of-00004.safetensors",
33
+ "model.layers.10.self_attn.q_proj.weight": "model-00002-of-00004.safetensors",
34
+ "model.layers.10.self_attn.v_proj.weight": "model-00002-of-00004.safetensors",
35
+ "model.layers.11.input_layernorm.weight": "model-00002-of-00004.safetensors",
36
+ "model.layers.11.mlp.down_proj.weight": "model-00002-of-00004.safetensors",
37
+ "model.layers.11.mlp.gate_proj.weight": "model-00002-of-00004.safetensors",
38
+ "model.layers.11.mlp.up_proj.weight": "model-00002-of-00004.safetensors",
39
+ "model.layers.11.post_attention_layernorm.weight": "model-00002-of-00004.safetensors",
40
+ "model.layers.11.self_attn.k_proj.weight": "model-00002-of-00004.safetensors",
41
+ "model.layers.11.self_attn.o_proj.weight": "model-00002-of-00004.safetensors",
42
+ "model.layers.11.self_attn.q_proj.weight": "model-00002-of-00004.safetensors",
43
+ "model.layers.11.self_attn.v_proj.weight": "model-00002-of-00004.safetensors",
44
+ "model.layers.12.input_layernorm.weight": "model-00002-of-00004.safetensors",
45
+ "model.layers.12.mlp.down_proj.weight": "model-00002-of-00004.safetensors",
46
+ "model.layers.12.mlp.gate_proj.weight": "model-00002-of-00004.safetensors",
47
+ "model.layers.12.mlp.up_proj.weight": "model-00002-of-00004.safetensors",
48
+ "model.layers.12.post_attention_layernorm.weight": "model-00002-of-00004.safetensors",
49
+ "model.layers.12.self_attn.k_proj.weight": "model-00002-of-00004.safetensors",
50
+ "model.layers.12.self_attn.o_proj.weight": "model-00002-of-00004.safetensors",
51
+ "model.layers.12.self_attn.q_proj.weight": "model-00002-of-00004.safetensors",
52
+ "model.layers.12.self_attn.v_proj.weight": "model-00002-of-00004.safetensors",
53
+ "model.layers.13.input_layernorm.weight": "model-00002-of-00004.safetensors",
54
+ "model.layers.13.mlp.down_proj.weight": "model-00002-of-00004.safetensors",
55
+ "model.layers.13.mlp.gate_proj.weight": "model-00002-of-00004.safetensors",
56
+ "model.layers.13.mlp.up_proj.weight": "model-00002-of-00004.safetensors",
57
+ "model.layers.13.post_attention_layernorm.weight": "model-00002-of-00004.safetensors",
58
+ "model.layers.13.self_attn.k_proj.weight": "model-00002-of-00004.safetensors",
59
+ "model.layers.13.self_attn.o_proj.weight": "model-00002-of-00004.safetensors",
60
+ "model.layers.13.self_attn.q_proj.weight": "model-00002-of-00004.safetensors",
61
+ "model.layers.13.self_attn.v_proj.weight": "model-00002-of-00004.safetensors",
62
+ "model.layers.14.input_layernorm.weight": "model-00002-of-00004.safetensors",
63
+ "model.layers.14.mlp.down_proj.weight": "model-00002-of-00004.safetensors",
64
+ "model.layers.14.mlp.gate_proj.weight": "model-00002-of-00004.safetensors",
65
+ "model.layers.14.mlp.up_proj.weight": "model-00002-of-00004.safetensors",
66
+ "model.layers.14.post_attention_layernorm.weight": "model-00002-of-00004.safetensors",
67
+ "model.layers.14.self_attn.k_proj.weight": "model-00002-of-00004.safetensors",
68
+ "model.layers.14.self_attn.o_proj.weight": "model-00002-of-00004.safetensors",
69
+ "model.layers.14.self_attn.q_proj.weight": "model-00002-of-00004.safetensors",
70
+ "model.layers.14.self_attn.v_proj.weight": "model-00002-of-00004.safetensors",
71
+ "model.layers.15.input_layernorm.weight": "model-00002-of-00004.safetensors",
72
+ "model.layers.15.mlp.down_proj.weight": "model-00002-of-00004.safetensors",
73
+ "model.layers.15.mlp.gate_proj.weight": "model-00002-of-00004.safetensors",
74
+ "model.layers.15.mlp.up_proj.weight": "model-00002-of-00004.safetensors",
75
+ "model.layers.15.post_attention_layernorm.weight": "model-00002-of-00004.safetensors",
76
+ "model.layers.15.self_attn.k_proj.weight": "model-00002-of-00004.safetensors",
77
+ "model.layers.15.self_attn.o_proj.weight": "model-00002-of-00004.safetensors",
78
+ "model.layers.15.self_attn.q_proj.weight": "model-00002-of-00004.safetensors",
79
+ "model.layers.15.self_attn.v_proj.weight": "model-00002-of-00004.safetensors",
80
+ "model.layers.16.input_layernorm.weight": "model-00002-of-00004.safetensors",
81
+ "model.layers.16.mlp.down_proj.weight": "model-00002-of-00004.safetensors",
82
+ "model.layers.16.mlp.gate_proj.weight": "model-00002-of-00004.safetensors",
83
+ "model.layers.16.mlp.up_proj.weight": "model-00002-of-00004.safetensors",
84
+ "model.layers.16.post_attention_layernorm.weight": "model-00002-of-00004.safetensors",
85
+ "model.layers.16.self_attn.k_proj.weight": "model-00002-of-00004.safetensors",
86
+ "model.layers.16.self_attn.o_proj.weight": "model-00002-of-00004.safetensors",
87
+ "model.layers.16.self_attn.q_proj.weight": "model-00002-of-00004.safetensors",
88
+ "model.layers.16.self_attn.v_proj.weight": "model-00002-of-00004.safetensors",
89
+ "model.layers.17.input_layernorm.weight": "model-00002-of-00004.safetensors",
90
+ "model.layers.17.mlp.down_proj.weight": "model-00002-of-00004.safetensors",
91
+ "model.layers.17.mlp.gate_proj.weight": "model-00002-of-00004.safetensors",
92
+ "model.layers.17.mlp.up_proj.weight": "model-00002-of-00004.safetensors",
93
+ "model.layers.17.post_attention_layernorm.weight": "model-00002-of-00004.safetensors",
94
+ "model.layers.17.self_attn.k_proj.weight": "model-00002-of-00004.safetensors",
95
+ "model.layers.17.self_attn.o_proj.weight": "model-00002-of-00004.safetensors",
96
+ "model.layers.17.self_attn.q_proj.weight": "model-00002-of-00004.safetensors",
97
+ "model.layers.17.self_attn.v_proj.weight": "model-00002-of-00004.safetensors",
98
+ "model.layers.18.input_layernorm.weight": "model-00002-of-00004.safetensors",
99
+ "model.layers.18.mlp.down_proj.weight": "model-00002-of-00004.safetensors",
100
+ "model.layers.18.mlp.gate_proj.weight": "model-00002-of-00004.safetensors",
101
+ "model.layers.18.mlp.up_proj.weight": "model-00002-of-00004.safetensors",
102
+ "model.layers.18.post_attention_layernorm.weight": "model-00002-of-00004.safetensors",
103
+ "model.layers.18.self_attn.k_proj.weight": "model-00002-of-00004.safetensors",
104
+ "model.layers.18.self_attn.o_proj.weight": "model-00002-of-00004.safetensors",
105
+ "model.layers.18.self_attn.q_proj.weight": "model-00002-of-00004.safetensors",
106
+ "model.layers.18.self_attn.v_proj.weight": "model-00002-of-00004.safetensors",
107
+ "model.layers.19.input_layernorm.weight": "model-00003-of-00004.safetensors",
108
+ "model.layers.19.mlp.down_proj.weight": "model-00003-of-00004.safetensors",
109
+ "model.layers.19.mlp.gate_proj.weight": "model-00003-of-00004.safetensors",
110
+ "model.layers.19.mlp.up_proj.weight": "model-00003-of-00004.safetensors",
111
+ "model.layers.19.post_attention_layernorm.weight": "model-00003-of-00004.safetensors",
112
+ "model.layers.19.self_attn.k_proj.weight": "model-00002-of-00004.safetensors",
113
+ "model.layers.19.self_attn.o_proj.weight": "model-00002-of-00004.safetensors",
114
+ "model.layers.19.self_attn.q_proj.weight": "model-00002-of-00004.safetensors",
115
+ "model.layers.19.self_attn.v_proj.weight": "model-00002-of-00004.safetensors",
116
+ "model.layers.2.input_layernorm.weight": "model-00001-of-00004.safetensors",
117
+ "model.layers.2.mlp.down_proj.weight": "model-00001-of-00004.safetensors",
118
+ "model.layers.2.mlp.gate_proj.weight": "model-00001-of-00004.safetensors",
119
+ "model.layers.2.mlp.up_proj.weight": "model-00001-of-00004.safetensors",
120
+ "model.layers.2.post_attention_layernorm.weight": "model-00001-of-00004.safetensors",
121
+ "model.layers.2.self_attn.k_proj.weight": "model-00001-of-00004.safetensors",
122
+ "model.layers.2.self_attn.o_proj.weight": "model-00001-of-00004.safetensors",
123
+ "model.layers.2.self_attn.q_proj.weight": "model-00001-of-00004.safetensors",
124
+ "model.layers.2.self_attn.v_proj.weight": "model-00001-of-00004.safetensors",
125
+ "model.layers.20.input_layernorm.weight": "model-00003-of-00004.safetensors",
126
+ "model.layers.20.mlp.down_proj.weight": "model-00003-of-00004.safetensors",
127
+ "model.layers.20.mlp.gate_proj.weight": "model-00003-of-00004.safetensors",
128
+ "model.layers.20.mlp.up_proj.weight": "model-00003-of-00004.safetensors",
129
+ "model.layers.20.post_attention_layernorm.weight": "model-00003-of-00004.safetensors",
130
+ "model.layers.20.self_attn.k_proj.weight": "model-00003-of-00004.safetensors",
131
+ "model.layers.20.self_attn.o_proj.weight": "model-00003-of-00004.safetensors",
132
+ "model.layers.20.self_attn.q_proj.weight": "model-00003-of-00004.safetensors",
133
+ "model.layers.20.self_attn.v_proj.weight": "model-00003-of-00004.safetensors",
134
+ "model.layers.21.input_layernorm.weight": "model-00003-of-00004.safetensors",
135
+ "model.layers.21.mlp.down_proj.weight": "model-00003-of-00004.safetensors",
136
+ "model.layers.21.mlp.gate_proj.weight": "model-00003-of-00004.safetensors",
137
+ "model.layers.21.mlp.up_proj.weight": "model-00003-of-00004.safetensors",
138
+ "model.layers.21.post_attention_layernorm.weight": "model-00003-of-00004.safetensors",
139
+ "model.layers.21.self_attn.k_proj.weight": "model-00003-of-00004.safetensors",
140
+ "model.layers.21.self_attn.o_proj.weight": "model-00003-of-00004.safetensors",
141
+ "model.layers.21.self_attn.q_proj.weight": "model-00003-of-00004.safetensors",
142
+ "model.layers.21.self_attn.v_proj.weight": "model-00003-of-00004.safetensors",
143
+ "model.layers.22.input_layernorm.weight": "model-00003-of-00004.safetensors",
144
+ "model.layers.22.mlp.down_proj.weight": "model-00003-of-00004.safetensors",
145
+ "model.layers.22.mlp.gate_proj.weight": "model-00003-of-00004.safetensors",
146
+ "model.layers.22.mlp.up_proj.weight": "model-00003-of-00004.safetensors",
147
+ "model.layers.22.post_attention_layernorm.weight": "model-00003-of-00004.safetensors",
148
+ "model.layers.22.self_attn.k_proj.weight": "model-00003-of-00004.safetensors",
149
+ "model.layers.22.self_attn.o_proj.weight": "model-00003-of-00004.safetensors",
150
+ "model.layers.22.self_attn.q_proj.weight": "model-00003-of-00004.safetensors",
151
+ "model.layers.22.self_attn.v_proj.weight": "model-00003-of-00004.safetensors",
152
+ "model.layers.23.input_layernorm.weight": "model-00003-of-00004.safetensors",
153
+ "model.layers.23.mlp.down_proj.weight": "model-00003-of-00004.safetensors",
154
+ "model.layers.23.mlp.gate_proj.weight": "model-00003-of-00004.safetensors",
155
+ "model.layers.23.mlp.up_proj.weight": "model-00003-of-00004.safetensors",
156
+ "model.layers.23.post_attention_layernorm.weight": "model-00003-of-00004.safetensors",
157
+ "model.layers.23.self_attn.k_proj.weight": "model-00003-of-00004.safetensors",
158
+ "model.layers.23.self_attn.o_proj.weight": "model-00003-of-00004.safetensors",
159
+ "model.layers.23.self_attn.q_proj.weight": "model-00003-of-00004.safetensors",
160
+ "model.layers.23.self_attn.v_proj.weight": "model-00003-of-00004.safetensors",
161
+ "model.layers.24.input_layernorm.weight": "model-00003-of-00004.safetensors",
162
+ "model.layers.24.mlp.down_proj.weight": "model-00003-of-00004.safetensors",
163
+ "model.layers.24.mlp.gate_proj.weight": "model-00003-of-00004.safetensors",
164
+ "model.layers.24.mlp.up_proj.weight": "model-00003-of-00004.safetensors",
165
+ "model.layers.24.post_attention_layernorm.weight": "model-00003-of-00004.safetensors",
166
+ "model.layers.24.self_attn.k_proj.weight": "model-00003-of-00004.safetensors",
167
+ "model.layers.24.self_attn.o_proj.weight": "model-00003-of-00004.safetensors",
168
+ "model.layers.24.self_attn.q_proj.weight": "model-00003-of-00004.safetensors",
169
+ "model.layers.24.self_attn.v_proj.weight": "model-00003-of-00004.safetensors",
170
+ "model.layers.25.input_layernorm.weight": "model-00003-of-00004.safetensors",
171
+ "model.layers.25.mlp.down_proj.weight": "model-00003-of-00004.safetensors",
172
+ "model.layers.25.mlp.gate_proj.weight": "model-00003-of-00004.safetensors",
173
+ "model.layers.25.mlp.up_proj.weight": "model-00003-of-00004.safetensors",
174
+ "model.layers.25.post_attention_layernorm.weight": "model-00003-of-00004.safetensors",
175
+ "model.layers.25.self_attn.k_proj.weight": "model-00003-of-00004.safetensors",
176
+ "model.layers.25.self_attn.o_proj.weight": "model-00003-of-00004.safetensors",
177
+ "model.layers.25.self_attn.q_proj.weight": "model-00003-of-00004.safetensors",
178
+ "model.layers.25.self_attn.v_proj.weight": "model-00003-of-00004.safetensors",
179
+ "model.layers.26.input_layernorm.weight": "model-00003-of-00004.safetensors",
180
+ "model.layers.26.mlp.down_proj.weight": "model-00003-of-00004.safetensors",
181
+ "model.layers.26.mlp.gate_proj.weight": "model-00003-of-00004.safetensors",
182
+ "model.layers.26.mlp.up_proj.weight": "model-00003-of-00004.safetensors",
183
+ "model.layers.26.post_attention_layernorm.weight": "model-00003-of-00004.safetensors",
184
+ "model.layers.26.self_attn.k_proj.weight": "model-00003-of-00004.safetensors",
185
+ "model.layers.26.self_attn.o_proj.weight": "model-00003-of-00004.safetensors",
186
+ "model.layers.26.self_attn.q_proj.weight": "model-00003-of-00004.safetensors",
187
+ "model.layers.26.self_attn.v_proj.weight": "model-00003-of-00004.safetensors",
188
+ "model.layers.27.input_layernorm.weight": "model-00003-of-00004.safetensors",
189
+ "model.layers.27.mlp.down_proj.weight": "model-00003-of-00004.safetensors",
190
+ "model.layers.27.mlp.gate_proj.weight": "model-00003-of-00004.safetensors",
191
+ "model.layers.27.mlp.up_proj.weight": "model-00003-of-00004.safetensors",
192
+ "model.layers.27.post_attention_layernorm.weight": "model-00003-of-00004.safetensors",
193
+ "model.layers.27.self_attn.k_proj.weight": "model-00003-of-00004.safetensors",
194
+ "model.layers.27.self_attn.o_proj.weight": "model-00003-of-00004.safetensors",
195
+ "model.layers.27.self_attn.q_proj.weight": "model-00003-of-00004.safetensors",
196
+ "model.layers.27.self_attn.v_proj.weight": "model-00003-of-00004.safetensors",
197
+ "model.layers.28.input_layernorm.weight": "model-00003-of-00004.safetensors",
198
+ "model.layers.28.mlp.down_proj.weight": "model-00003-of-00004.safetensors",
199
+ "model.layers.28.mlp.gate_proj.weight": "model-00003-of-00004.safetensors",
200
+ "model.layers.28.mlp.up_proj.weight": "model-00003-of-00004.safetensors",
201
+ "model.layers.28.post_attention_layernorm.weight": "model-00003-of-00004.safetensors",
202
+ "model.layers.28.self_attn.k_proj.weight": "model-00003-of-00004.safetensors",
203
+ "model.layers.28.self_attn.o_proj.weight": "model-00003-of-00004.safetensors",
204
+ "model.layers.28.self_attn.q_proj.weight": "model-00003-of-00004.safetensors",
205
+ "model.layers.28.self_attn.v_proj.weight": "model-00003-of-00004.safetensors",
206
+ "model.layers.29.input_layernorm.weight": "model-00003-of-00004.safetensors",
207
+ "model.layers.29.mlp.down_proj.weight": "model-00003-of-00004.safetensors",
208
+ "model.layers.29.mlp.gate_proj.weight": "model-00003-of-00004.safetensors",
209
+ "model.layers.29.mlp.up_proj.weight": "model-00003-of-00004.safetensors",
210
+ "model.layers.29.post_attention_layernorm.weight": "model-00003-of-00004.safetensors",
211
+ "model.layers.29.self_attn.k_proj.weight": "model-00003-of-00004.safetensors",
212
+ "model.layers.29.self_attn.o_proj.weight": "model-00003-of-00004.safetensors",
213
+ "model.layers.29.self_attn.q_proj.weight": "model-00003-of-00004.safetensors",
214
+ "model.layers.29.self_attn.v_proj.weight": "model-00003-of-00004.safetensors",
215
+ "model.layers.3.input_layernorm.weight": "model-00001-of-00004.safetensors",
216
+ "model.layers.3.mlp.down_proj.weight": "model-00001-of-00004.safetensors",
217
+ "model.layers.3.mlp.gate_proj.weight": "model-00001-of-00004.safetensors",
218
+ "model.layers.3.mlp.up_proj.weight": "model-00001-of-00004.safetensors",
219
+ "model.layers.3.post_attention_layernorm.weight": "model-00001-of-00004.safetensors",
220
+ "model.layers.3.self_attn.k_proj.weight": "model-00001-of-00004.safetensors",
221
+ "model.layers.3.self_attn.o_proj.weight": "model-00001-of-00004.safetensors",
222
+ "model.layers.3.self_attn.q_proj.weight": "model-00001-of-00004.safetensors",
223
+ "model.layers.3.self_attn.v_proj.weight": "model-00001-of-00004.safetensors",
224
+ "model.layers.30.input_layernorm.weight": "model-00004-of-00004.safetensors",
225
+ "model.layers.30.mlp.down_proj.weight": "model-00004-of-00004.safetensors",
226
+ "model.layers.30.mlp.gate_proj.weight": "model-00003-of-00004.safetensors",
227
+ "model.layers.30.mlp.up_proj.weight": "model-00004-of-00004.safetensors",
228
+ "model.layers.30.post_attention_layernorm.weight": "model-00004-of-00004.safetensors",
229
+ "model.layers.30.self_attn.k_proj.weight": "model-00003-of-00004.safetensors",
230
+ "model.layers.30.self_attn.o_proj.weight": "model-00003-of-00004.safetensors",
231
+ "model.layers.30.self_attn.q_proj.weight": "model-00003-of-00004.safetensors",
232
+ "model.layers.30.self_attn.v_proj.weight": "model-00003-of-00004.safetensors",
233
+ "model.layers.31.input_layernorm.weight": "model-00004-of-00004.safetensors",
234
+ "model.layers.31.mlp.down_proj.weight": "model-00004-of-00004.safetensors",
235
+ "model.layers.31.mlp.gate_proj.weight": "model-00004-of-00004.safetensors",
236
+ "model.layers.31.mlp.up_proj.weight": "model-00004-of-00004.safetensors",
237
+ "model.layers.31.post_attention_layernorm.weight": "model-00004-of-00004.safetensors",
238
+ "model.layers.31.self_attn.k_proj.weight": "model-00004-of-00004.safetensors",
239
+ "model.layers.31.self_attn.o_proj.weight": "model-00004-of-00004.safetensors",
240
+ "model.layers.31.self_attn.q_proj.weight": "model-00004-of-00004.safetensors",
241
+ "model.layers.31.self_attn.v_proj.weight": "model-00004-of-00004.safetensors",
242
+ "model.layers.4.input_layernorm.weight": "model-00001-of-00004.safetensors",
243
+ "model.layers.4.mlp.down_proj.weight": "model-00001-of-00004.safetensors",
244
+ "model.layers.4.mlp.gate_proj.weight": "model-00001-of-00004.safetensors",
245
+ "model.layers.4.mlp.up_proj.weight": "model-00001-of-00004.safetensors",
246
+ "model.layers.4.post_attention_layernorm.weight": "model-00001-of-00004.safetensors",
247
+ "model.layers.4.self_attn.k_proj.weight": "model-00001-of-00004.safetensors",
248
+ "model.layers.4.self_attn.o_proj.weight": "model-00001-of-00004.safetensors",
249
+ "model.layers.4.self_attn.q_proj.weight": "model-00001-of-00004.safetensors",
250
+ "model.layers.4.self_attn.v_proj.weight": "model-00001-of-00004.safetensors",
251
+ "model.layers.5.input_layernorm.weight": "model-00001-of-00004.safetensors",
252
+ "model.layers.5.mlp.down_proj.weight": "model-00001-of-00004.safetensors",
253
+ "model.layers.5.mlp.gate_proj.weight": "model-00001-of-00004.safetensors",
254
+ "model.layers.5.mlp.up_proj.weight": "model-00001-of-00004.safetensors",
255
+ "model.layers.5.post_attention_layernorm.weight": "model-00001-of-00004.safetensors",
256
+ "model.layers.5.self_attn.k_proj.weight": "model-00001-of-00004.safetensors",
257
+ "model.layers.5.self_attn.o_proj.weight": "model-00001-of-00004.safetensors",
258
+ "model.layers.5.self_attn.q_proj.weight": "model-00001-of-00004.safetensors",
259
+ "model.layers.5.self_attn.v_proj.weight": "model-00001-of-00004.safetensors",
260
+ "model.layers.6.input_layernorm.weight": "model-00001-of-00004.safetensors",
261
+ "model.layers.6.mlp.down_proj.weight": "model-00001-of-00004.safetensors",
262
+ "model.layers.6.mlp.gate_proj.weight": "model-00001-of-00004.safetensors",
263
+ "model.layers.6.mlp.up_proj.weight": "model-00001-of-00004.safetensors",
264
+ "model.layers.6.post_attention_layernorm.weight": "model-00001-of-00004.safetensors",
265
+ "model.layers.6.self_attn.k_proj.weight": "model-00001-of-00004.safetensors",
266
+ "model.layers.6.self_attn.o_proj.weight": "model-00001-of-00004.safetensors",
267
+ "model.layers.6.self_attn.q_proj.weight": "model-00001-of-00004.safetensors",
268
+ "model.layers.6.self_attn.v_proj.weight": "model-00001-of-00004.safetensors",
269
+ "model.layers.7.input_layernorm.weight": "model-00002-of-00004.safetensors",
270
+ "model.layers.7.mlp.down_proj.weight": "model-00002-of-00004.safetensors",
271
+ "model.layers.7.mlp.gate_proj.weight": "model-00001-of-00004.safetensors",
272
+ "model.layers.7.mlp.up_proj.weight": "model-00001-of-00004.safetensors",
273
+ "model.layers.7.post_attention_layernorm.weight": "model-00002-of-00004.safetensors",
274
+ "model.layers.7.self_attn.k_proj.weight": "model-00001-of-00004.safetensors",
275
+ "model.layers.7.self_attn.o_proj.weight": "model-00001-of-00004.safetensors",
276
+ "model.layers.7.self_attn.q_proj.weight": "model-00001-of-00004.safetensors",
277
+ "model.layers.7.self_attn.v_proj.weight": "model-00001-of-00004.safetensors",
278
+ "model.layers.8.input_layernorm.weight": "model-00002-of-00004.safetensors",
279
+ "model.layers.8.mlp.down_proj.weight": "model-00002-of-00004.safetensors",
280
+ "model.layers.8.mlp.gate_proj.weight": "model-00002-of-00004.safetensors",
281
+ "model.layers.8.mlp.up_proj.weight": "model-00002-of-00004.safetensors",
282
+ "model.layers.8.post_attention_layernorm.weight": "model-00002-of-00004.safetensors",
283
+ "model.layers.8.self_attn.k_proj.weight": "model-00002-of-00004.safetensors",
284
+ "model.layers.8.self_attn.o_proj.weight": "model-00002-of-00004.safetensors",
285
+ "model.layers.8.self_attn.q_proj.weight": "model-00002-of-00004.safetensors",
286
+ "model.layers.8.self_attn.v_proj.weight": "model-00002-of-00004.safetensors",
287
+ "model.layers.9.input_layernorm.weight": "model-00002-of-00004.safetensors",
288
+ "model.layers.9.mlp.down_proj.weight": "model-00002-of-00004.safetensors",
289
+ "model.layers.9.mlp.gate_proj.weight": "model-00002-of-00004.safetensors",
290
+ "model.layers.9.mlp.up_proj.weight": "model-00002-of-00004.safetensors",
291
+ "model.layers.9.post_attention_layernorm.weight": "model-00002-of-00004.safetensors",
292
+ "model.layers.9.self_attn.k_proj.weight": "model-00002-of-00004.safetensors",
293
+ "model.layers.9.self_attn.o_proj.weight": "model-00002-of-00004.safetensors",
294
+ "model.layers.9.self_attn.q_proj.weight": "model-00002-of-00004.safetensors",
295
+ "model.layers.9.self_attn.v_proj.weight": "model-00002-of-00004.safetensors",
296
+ "model.norm.weight": "model-00004-of-00004.safetensors"
297
+ }
298
+ }
logs/UNIVLA_SIMPLERENV_BRIDGE_VIDEO_BS128_20k/checkpoint-8000/special_tokens_map.json ADDED
@@ -0,0 +1,5 @@
 
 
 
 
 
 
1
+ {
2
+ "bos_token": "<|extra_203|>",
3
+ "eos_token": "<|extra_204|>",
4
+ "pad_token": "<|endoftext|>"
5
+ }
logs/UNIVLA_SIMPLERENV_BRIDGE_VIDEO_BS128_20k/checkpoint-8000/tokenizer_config.json ADDED
@@ -0,0 +1,18 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ {
2
+ "added_tokens_decoder": {},
3
+ "auto_map": {
4
+ "AutoTokenizer": [
5
+ "tokenization_emu3.Emu3Tokenizer",
6
+ null
7
+ ]
8
+ },
9
+ "bos_token": "<|extra_203|>",
10
+ "clean_up_tokenization_spaces": true,
11
+ "eos_token": "<|extra_204|>",
12
+ "extra_special_tokens": {},
13
+ "model_max_length": 2400,
14
+ "pad_token": "<|endoftext|>",
15
+ "padding_side": "right",
16
+ "tokenizer_class": "Emu3Tokenizer",
17
+ "use_fast": false
18
+ }
logs/UNIVLA_SIMPLERENV_BRIDGE_VIDEO_BS128_20k/checkpoint-8000/trainer_state.json ADDED
@@ -0,0 +1,2834 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ {
2
+ "best_global_step": null,
3
+ "best_metric": null,
4
+ "best_model_checkpoint": null,
5
+ "epoch": 19.277442702050664,
6
+ "eval_steps": 500,
7
+ "global_step": 8000,
8
+ "is_hyper_param_search": false,
9
+ "is_local_process_zero": true,
10
+ "is_world_process_zero": true,
11
+ "log_history": [
12
+ {
13
+ "epoch": 0.04825090470446321,
14
+ "grad_norm": 7.026416301727295,
15
+ "learning_rate": 3.04e-06,
16
+ "loss": 15.8023,
17
+ "step": 20
18
+ },
19
+ {
20
+ "epoch": 0.09650180940892641,
21
+ "grad_norm": 17.09996795654297,
22
+ "learning_rate": 6.24e-06,
23
+ "loss": 11.433,
24
+ "step": 40
25
+ },
26
+ {
27
+ "epoch": 0.14475271411338964,
28
+ "grad_norm": 14.741419792175293,
29
+ "learning_rate": 9.440000000000001e-06,
30
+ "loss": 7.7933,
31
+ "step": 60
32
+ },
33
+ {
34
+ "epoch": 0.19300361881785283,
35
+ "grad_norm": 7.174521446228027,
36
+ "learning_rate": 1.2640000000000001e-05,
37
+ "loss": 5.9488,
38
+ "step": 80
39
+ },
40
+ {
41
+ "epoch": 0.24125452352231605,
42
+ "grad_norm": 4.024604320526123,
43
+ "learning_rate": 1.584e-05,
44
+ "loss": 5.5711,
45
+ "step": 100
46
+ },
47
+ {
48
+ "epoch": 0.28950542822677927,
49
+ "grad_norm": 3.4492595195770264,
50
+ "learning_rate": 1.904e-05,
51
+ "loss": 5.4286,
52
+ "step": 120
53
+ },
54
+ {
55
+ "epoch": 0.33775633293124246,
56
+ "grad_norm": 4.258691310882568,
57
+ "learning_rate": 2.2240000000000004e-05,
58
+ "loss": 5.322,
59
+ "step": 140
60
+ },
61
+ {
62
+ "epoch": 0.38600723763570566,
63
+ "grad_norm": 4.085258960723877,
64
+ "learning_rate": 2.5440000000000004e-05,
65
+ "loss": 5.2516,
66
+ "step": 160
67
+ },
68
+ {
69
+ "epoch": 0.43425814234016885,
70
+ "grad_norm": 5.170401096343994,
71
+ "learning_rate": 2.864e-05,
72
+ "loss": 5.2052,
73
+ "step": 180
74
+ },
75
+ {
76
+ "epoch": 0.4825090470446321,
77
+ "grad_norm": 4.532702445983887,
78
+ "learning_rate": 3.184000000000001e-05,
79
+ "loss": 5.1218,
80
+ "step": 200
81
+ },
82
+ {
83
+ "epoch": 0.5307599517490953,
84
+ "grad_norm": 8.81904411315918,
85
+ "learning_rate": 3.504e-05,
86
+ "loss": 5.0278,
87
+ "step": 220
88
+ },
89
+ {
90
+ "epoch": 0.5790108564535585,
91
+ "grad_norm": 4.430545806884766,
92
+ "learning_rate": 3.824e-05,
93
+ "loss": 4.8554,
94
+ "step": 240
95
+ },
96
+ {
97
+ "epoch": 0.6272617611580217,
98
+ "grad_norm": 5.596275329589844,
99
+ "learning_rate": 4.144e-05,
100
+ "loss": 4.6775,
101
+ "step": 260
102
+ },
103
+ {
104
+ "epoch": 0.6755126658624849,
105
+ "grad_norm": 4.189767837524414,
106
+ "learning_rate": 4.4640000000000006e-05,
107
+ "loss": 4.5501,
108
+ "step": 280
109
+ },
110
+ {
111
+ "epoch": 0.7237635705669482,
112
+ "grad_norm": 3.8358776569366455,
113
+ "learning_rate": 4.784e-05,
114
+ "loss": 4.4746,
115
+ "step": 300
116
+ },
117
+ {
118
+ "epoch": 0.7720144752714113,
119
+ "grad_norm": 3.698655605316162,
120
+ "learning_rate": 5.1040000000000006e-05,
121
+ "loss": 4.4219,
122
+ "step": 320
123
+ },
124
+ {
125
+ "epoch": 0.8202653799758746,
126
+ "grad_norm": 3.8315744400024414,
127
+ "learning_rate": 5.424000000000001e-05,
128
+ "loss": 4.3652,
129
+ "step": 340
130
+ },
131
+ {
132
+ "epoch": 0.8685162846803377,
133
+ "grad_norm": 3.743601083755493,
134
+ "learning_rate": 5.7440000000000006e-05,
135
+ "loss": 4.3409,
136
+ "step": 360
137
+ },
138
+ {
139
+ "epoch": 0.916767189384801,
140
+ "grad_norm": 3.9214954376220703,
141
+ "learning_rate": 6.064e-05,
142
+ "loss": 4.3001,
143
+ "step": 380
144
+ },
145
+ {
146
+ "epoch": 0.9650180940892642,
147
+ "grad_norm": 3.364896774291992,
148
+ "learning_rate": 6.384000000000001e-05,
149
+ "loss": 4.2918,
150
+ "step": 400
151
+ },
152
+ {
153
+ "epoch": 1.0120627261761157,
154
+ "grad_norm": 3.315551280975342,
155
+ "learning_rate": 6.704000000000001e-05,
156
+ "loss": 4.1463,
157
+ "step": 420
158
+ },
159
+ {
160
+ "epoch": 1.060313630880579,
161
+ "grad_norm": 3.339918613433838,
162
+ "learning_rate": 7.024e-05,
163
+ "loss": 4.2308,
164
+ "step": 440
165
+ },
166
+ {
167
+ "epoch": 1.1085645355850422,
168
+ "grad_norm": 3.6609926223754883,
169
+ "learning_rate": 7.344000000000002e-05,
170
+ "loss": 4.2112,
171
+ "step": 460
172
+ },
173
+ {
174
+ "epoch": 1.1568154402895054,
175
+ "grad_norm": 9.371408462524414,
176
+ "learning_rate": 7.664e-05,
177
+ "loss": 4.2259,
178
+ "step": 480
179
+ },
180
+ {
181
+ "epoch": 1.2050663449939687,
182
+ "grad_norm": 3.045787811279297,
183
+ "learning_rate": 7.984000000000001e-05,
184
+ "loss": 4.1758,
185
+ "step": 500
186
+ },
187
+ {
188
+ "epoch": 1.2533172496984317,
189
+ "grad_norm": 3.7252113819122314,
190
+ "learning_rate": 7.999982431339218e-05,
191
+ "loss": 4.161,
192
+ "step": 520
193
+ },
194
+ {
195
+ "epoch": 1.301568154402895,
196
+ "grad_norm": 2.8388564586639404,
197
+ "learning_rate": 7.999925978210515e-05,
198
+ "loss": 4.1421,
199
+ "step": 540
200
+ },
201
+ {
202
+ "epoch": 1.3498190591073582,
203
+ "grad_norm": 2.337611675262451,
204
+ "learning_rate": 7.999830592533314e-05,
205
+ "loss": 4.1337,
206
+ "step": 560
207
+ },
208
+ {
209
+ "epoch": 1.3980699638118215,
210
+ "grad_norm": 2.355480670928955,
211
+ "learning_rate": 7.999696275297925e-05,
212
+ "loss": 4.0918,
213
+ "step": 580
214
+ },
215
+ {
216
+ "epoch": 1.4463208685162847,
217
+ "grad_norm": 2.469529628753662,
218
+ "learning_rate": 7.999523027898864e-05,
219
+ "loss": 4.1032,
220
+ "step": 600
221
+ },
222
+ {
223
+ "epoch": 1.494571773220748,
224
+ "grad_norm": 2.394348621368408,
225
+ "learning_rate": 7.99931085213482e-05,
226
+ "loss": 4.0767,
227
+ "step": 620
228
+ },
229
+ {
230
+ "epoch": 1.5428226779252112,
231
+ "grad_norm": 2.333629608154297,
232
+ "learning_rate": 7.999059750208649e-05,
233
+ "loss": 4.0757,
234
+ "step": 640
235
+ },
236
+ {
237
+ "epoch": 1.5910735826296745,
238
+ "grad_norm": 2.3257668018341064,
239
+ "learning_rate": 7.998769724727347e-05,
240
+ "loss": 4.0554,
241
+ "step": 660
242
+ },
243
+ {
244
+ "epoch": 1.6393244873341375,
245
+ "grad_norm": 3.5393128395080566,
246
+ "learning_rate": 7.998440778702023e-05,
247
+ "loss": 4.056,
248
+ "step": 680
249
+ },
250
+ {
251
+ "epoch": 1.6875753920386007,
252
+ "grad_norm": 2.257028579711914,
253
+ "learning_rate": 7.998072915547861e-05,
254
+ "loss": 4.0406,
255
+ "step": 700
256
+ },
257
+ {
258
+ "epoch": 1.7358262967430638,
259
+ "grad_norm": 2.359814167022705,
260
+ "learning_rate": 7.997666139084099e-05,
261
+ "loss": 4.0236,
262
+ "step": 720
263
+ },
264
+ {
265
+ "epoch": 1.784077201447527,
266
+ "grad_norm": 2.2051610946655273,
267
+ "learning_rate": 7.997220453533982e-05,
268
+ "loss": 4.0183,
269
+ "step": 740
270
+ },
271
+ {
272
+ "epoch": 1.8323281061519903,
273
+ "grad_norm": 2.2289440631866455,
274
+ "learning_rate": 7.99673586352471e-05,
275
+ "loss": 4.0074,
276
+ "step": 760
277
+ },
278
+ {
279
+ "epoch": 1.8805790108564535,
280
+ "grad_norm": 2.1607367992401123,
281
+ "learning_rate": 7.996212374087405e-05,
282
+ "loss": 4.0073,
283
+ "step": 780
284
+ },
285
+ {
286
+ "epoch": 1.9288299155609168,
287
+ "grad_norm": 2.108910083770752,
288
+ "learning_rate": 7.995649990657048e-05,
289
+ "loss": 4.0017,
290
+ "step": 800
291
+ },
292
+ {
293
+ "epoch": 1.97708082026538,
294
+ "grad_norm": 2.0602197647094727,
295
+ "learning_rate": 7.995048719072424e-05,
296
+ "loss": 3.995,
297
+ "step": 820
298
+ },
299
+ {
300
+ "epoch": 2.0241254523522314,
301
+ "grad_norm": 2.2706081867218018,
302
+ "learning_rate": 7.994408565576069e-05,
303
+ "loss": 3.8672,
304
+ "step": 840
305
+ },
306
+ {
307
+ "epoch": 2.0723763570566947,
308
+ "grad_norm": 1.935584545135498,
309
+ "learning_rate": 7.993729536814194e-05,
310
+ "loss": 3.9759,
311
+ "step": 860
312
+ },
313
+ {
314
+ "epoch": 2.120627261761158,
315
+ "grad_norm": 2.0553081035614014,
316
+ "learning_rate": 7.993011639836622e-05,
317
+ "loss": 3.9617,
318
+ "step": 880
319
+ },
320
+ {
321
+ "epoch": 2.168878166465621,
322
+ "grad_norm": 2.818523645401001,
323
+ "learning_rate": 7.99225488209672e-05,
324
+ "loss": 3.9478,
325
+ "step": 900
326
+ },
327
+ {
328
+ "epoch": 2.2171290711700844,
329
+ "grad_norm": 2.4333460330963135,
330
+ "learning_rate": 7.991459271451308e-05,
331
+ "loss": 3.9508,
332
+ "step": 920
333
+ },
334
+ {
335
+ "epoch": 2.2653799758745476,
336
+ "grad_norm": 2.0779833793640137,
337
+ "learning_rate": 7.99062481616059e-05,
338
+ "loss": 3.9538,
339
+ "step": 940
340
+ },
341
+ {
342
+ "epoch": 2.313630880579011,
343
+ "grad_norm": 1.9196547269821167,
344
+ "learning_rate": 7.989751524888064e-05,
345
+ "loss": 3.9449,
346
+ "step": 960
347
+ },
348
+ {
349
+ "epoch": 2.361881785283474,
350
+ "grad_norm": 2.0229032039642334,
351
+ "learning_rate": 7.98883940670043e-05,
352
+ "loss": 3.9416,
353
+ "step": 980
354
+ },
355
+ {
356
+ "epoch": 2.4101326899879374,
357
+ "grad_norm": 2.1589977741241455,
358
+ "learning_rate": 7.987888471067497e-05,
359
+ "loss": 3.9347,
360
+ "step": 1000
361
+ },
362
+ {
363
+ "epoch": 2.4583835946924006,
364
+ "grad_norm": 1.8306351900100708,
365
+ "learning_rate": 7.986898727862085e-05,
366
+ "loss": 3.9323,
367
+ "step": 1020
368
+ },
369
+ {
370
+ "epoch": 2.5066344993968634,
371
+ "grad_norm": 1.7854081392288208,
372
+ "learning_rate": 7.985870187359925e-05,
373
+ "loss": 3.9195,
374
+ "step": 1040
375
+ },
376
+ {
377
+ "epoch": 2.554885404101327,
378
+ "grad_norm": 1.9807684421539307,
379
+ "learning_rate": 7.984802860239549e-05,
380
+ "loss": 3.9222,
381
+ "step": 1060
382
+ },
383
+ {
384
+ "epoch": 2.60313630880579,
385
+ "grad_norm": 1.9324214458465576,
386
+ "learning_rate": 7.983696757582178e-05,
387
+ "loss": 3.9163,
388
+ "step": 1080
389
+ },
390
+ {
391
+ "epoch": 2.651387213510253,
392
+ "grad_norm": 1.7838809490203857,
393
+ "learning_rate": 7.982551890871613e-05,
394
+ "loss": 3.9061,
395
+ "step": 1100
396
+ },
397
+ {
398
+ "epoch": 2.6996381182147164,
399
+ "grad_norm": 1.9327741861343384,
400
+ "learning_rate": 7.981368271994106e-05,
401
+ "loss": 3.9123,
402
+ "step": 1120
403
+ },
404
+ {
405
+ "epoch": 2.7478890229191797,
406
+ "grad_norm": 1.903687596321106,
407
+ "learning_rate": 7.98014591323825e-05,
408
+ "loss": 3.8985,
409
+ "step": 1140
410
+ },
411
+ {
412
+ "epoch": 2.796139927623643,
413
+ "grad_norm": 1.8757381439208984,
414
+ "learning_rate": 7.978884827294839e-05,
415
+ "loss": 3.8921,
416
+ "step": 1160
417
+ },
418
+ {
419
+ "epoch": 2.844390832328106,
420
+ "grad_norm": 3.0233168601989746,
421
+ "learning_rate": 7.977585027256739e-05,
422
+ "loss": 3.9097,
423
+ "step": 1180
424
+ },
425
+ {
426
+ "epoch": 2.8926417370325694,
427
+ "grad_norm": 1.8911226987838745,
428
+ "learning_rate": 7.976246526618761e-05,
429
+ "loss": 3.8993,
430
+ "step": 1200
431
+ },
432
+ {
433
+ "epoch": 2.9408926417370327,
434
+ "grad_norm": 1.9184162616729736,
435
+ "learning_rate": 7.974869339277508e-05,
436
+ "loss": 3.8966,
437
+ "step": 1220
438
+ },
439
+ {
440
+ "epoch": 2.989143546441496,
441
+ "grad_norm": 1.8520585298538208,
442
+ "learning_rate": 7.973453479531241e-05,
443
+ "loss": 3.8926,
444
+ "step": 1240
445
+ },
446
+ {
447
+ "epoch": 3.0361881785283473,
448
+ "grad_norm": 1.9462171792984009,
449
+ "learning_rate": 7.971998962079723e-05,
450
+ "loss": 3.7848,
451
+ "step": 1260
452
+ },
453
+ {
454
+ "epoch": 3.0844390832328106,
455
+ "grad_norm": 1.8553789854049683,
456
+ "learning_rate": 7.970505802024071e-05,
457
+ "loss": 3.87,
458
+ "step": 1280
459
+ },
460
+ {
461
+ "epoch": 3.132689987937274,
462
+ "grad_norm": 1.8585801124572754,
463
+ "learning_rate": 7.968974014866596e-05,
464
+ "loss": 3.8671,
465
+ "step": 1300
466
+ },
467
+ {
468
+ "epoch": 3.180940892641737,
469
+ "grad_norm": 1.7380430698394775,
470
+ "learning_rate": 7.967403616510651e-05,
471
+ "loss": 3.8828,
472
+ "step": 1320
473
+ },
474
+ {
475
+ "epoch": 3.2291917973462003,
476
+ "grad_norm": 1.831164002418518,
477
+ "learning_rate": 7.965794623260449e-05,
478
+ "loss": 3.8591,
479
+ "step": 1340
480
+ },
481
+ {
482
+ "epoch": 3.2774427020506636,
483
+ "grad_norm": 1.7813743352890015,
484
+ "learning_rate": 7.964147051820912e-05,
485
+ "loss": 3.8628,
486
+ "step": 1360
487
+ },
488
+ {
489
+ "epoch": 3.325693606755127,
490
+ "grad_norm": 1.6703109741210938,
491
+ "learning_rate": 7.962460919297484e-05,
492
+ "loss": 3.852,
493
+ "step": 1380
494
+ },
495
+ {
496
+ "epoch": 3.37394451145959,
497
+ "grad_norm": 1.7385988235473633,
498
+ "learning_rate": 7.960736243195959e-05,
499
+ "loss": 3.857,
500
+ "step": 1400
501
+ },
502
+ {
503
+ "epoch": 3.422195416164053,
504
+ "grad_norm": 1.7363609075546265,
505
+ "learning_rate": 7.958973041422303e-05,
506
+ "loss": 3.8527,
507
+ "step": 1420
508
+ },
509
+ {
510
+ "epoch": 3.470446320868516,
511
+ "grad_norm": 1.8170480728149414,
512
+ "learning_rate": 7.957171332282458e-05,
513
+ "loss": 3.8618,
514
+ "step": 1440
515
+ },
516
+ {
517
+ "epoch": 3.5186972255729794,
518
+ "grad_norm": 1.7080026865005493,
519
+ "learning_rate": 7.955331134482164e-05,
520
+ "loss": 3.8434,
521
+ "step": 1460
522
+ },
523
+ {
524
+ "epoch": 3.5669481302774426,
525
+ "grad_norm": 1.778691291809082,
526
+ "learning_rate": 7.953452467126753e-05,
527
+ "loss": 3.8567,
528
+ "step": 1480
529
+ },
530
+ {
531
+ "epoch": 3.615199034981906,
532
+ "grad_norm": 1.7791765928268433,
533
+ "learning_rate": 7.95153534972096e-05,
534
+ "loss": 3.8573,
535
+ "step": 1500
536
+ },
537
+ {
538
+ "epoch": 3.663449939686369,
539
+ "grad_norm": 1.5399912595748901,
540
+ "learning_rate": 7.949579802168714e-05,
541
+ "loss": 3.8459,
542
+ "step": 1520
543
+ },
544
+ {
545
+ "epoch": 3.7117008443908324,
546
+ "grad_norm": 1.7315200567245483,
547
+ "learning_rate": 7.947585844772937e-05,
548
+ "loss": 3.8456,
549
+ "step": 1540
550
+ },
551
+ {
552
+ "epoch": 3.7599517490952956,
553
+ "grad_norm": 1.7714298963546753,
554
+ "learning_rate": 7.94555349823533e-05,
555
+ "loss": 3.8354,
556
+ "step": 1560
557
+ },
558
+ {
559
+ "epoch": 3.808202653799759,
560
+ "grad_norm": 1.5930746793746948,
561
+ "learning_rate": 7.943482783656155e-05,
562
+ "loss": 3.8376,
563
+ "step": 1580
564
+ },
565
+ {
566
+ "epoch": 3.856453558504222,
567
+ "grad_norm": 1.5679261684417725,
568
+ "learning_rate": 7.941373722534024e-05,
569
+ "loss": 3.8395,
570
+ "step": 1600
571
+ },
572
+ {
573
+ "epoch": 3.9047044632086854,
574
+ "grad_norm": 1.7415728569030762,
575
+ "learning_rate": 7.939226336765669e-05,
576
+ "loss": 3.835,
577
+ "step": 1620
578
+ },
579
+ {
580
+ "epoch": 3.952955367913148,
581
+ "grad_norm": 1.7399849891662598,
582
+ "learning_rate": 7.937040648645716e-05,
583
+ "loss": 3.8345,
584
+ "step": 1640
585
+ },
586
+ {
587
+ "epoch": 4.0,
588
+ "grad_norm": 1.0328266620635986,
589
+ "learning_rate": 7.934816680866455e-05,
590
+ "loss": 3.7426,
591
+ "step": 1660
592
+ },
593
+ {
594
+ "epoch": 4.048250904704463,
595
+ "grad_norm": 1.805564045906067,
596
+ "learning_rate": 7.932554456517605e-05,
597
+ "loss": 3.817,
598
+ "step": 1680
599
+ },
600
+ {
601
+ "epoch": 4.0965018094089265,
602
+ "grad_norm": 1.8367509841918945,
603
+ "learning_rate": 7.930253999086072e-05,
604
+ "loss": 3.819,
605
+ "step": 1700
606
+ },
607
+ {
608
+ "epoch": 4.144752714113389,
609
+ "grad_norm": 1.6704336404800415,
610
+ "learning_rate": 7.927915332455707e-05,
611
+ "loss": 3.8212,
612
+ "step": 1720
613
+ },
614
+ {
615
+ "epoch": 4.193003618817853,
616
+ "grad_norm": 1.7369648218154907,
617
+ "learning_rate": 7.925538480907053e-05,
618
+ "loss": 3.8087,
619
+ "step": 1740
620
+ },
621
+ {
622
+ "epoch": 4.241254523522316,
623
+ "grad_norm": 1.6179964542388916,
624
+ "learning_rate": 7.923123469117104e-05,
625
+ "loss": 3.8153,
626
+ "step": 1760
627
+ },
628
+ {
629
+ "epoch": 4.2895054282267795,
630
+ "grad_norm": 1.7713810205459595,
631
+ "learning_rate": 7.920670322159038e-05,
632
+ "loss": 3.8114,
633
+ "step": 1780
634
+ },
635
+ {
636
+ "epoch": 4.337756332931242,
637
+ "grad_norm": 1.7568902969360352,
638
+ "learning_rate": 7.918179065501962e-05,
639
+ "loss": 3.8094,
640
+ "step": 1800
641
+ },
642
+ {
643
+ "epoch": 4.386007237635706,
644
+ "grad_norm": 1.6609630584716797,
645
+ "learning_rate": 7.915649725010642e-05,
646
+ "loss": 3.8153,
647
+ "step": 1820
648
+ },
649
+ {
650
+ "epoch": 4.434258142340169,
651
+ "grad_norm": 1.6581547260284424,
652
+ "learning_rate": 7.913082326945244e-05,
653
+ "loss": 3.8079,
654
+ "step": 1840
655
+ },
656
+ {
657
+ "epoch": 4.4825090470446325,
658
+ "grad_norm": 1.7007122039794922,
659
+ "learning_rate": 7.910476897961056e-05,
660
+ "loss": 3.8027,
661
+ "step": 1860
662
+ },
663
+ {
664
+ "epoch": 4.530759951749095,
665
+ "grad_norm": 1.7588753700256348,
666
+ "learning_rate": 7.907833465108206e-05,
667
+ "loss": 3.8054,
668
+ "step": 1880
669
+ },
670
+ {
671
+ "epoch": 4.579010856453559,
672
+ "grad_norm": 1.5165013074874878,
673
+ "learning_rate": 7.905152055831392e-05,
674
+ "loss": 3.8046,
675
+ "step": 1900
676
+ },
677
+ {
678
+ "epoch": 4.627261761158022,
679
+ "grad_norm": 1.5636579990386963,
680
+ "learning_rate": 7.902432697969589e-05,
681
+ "loss": 3.7965,
682
+ "step": 1920
683
+ },
684
+ {
685
+ "epoch": 4.675512665862485,
686
+ "grad_norm": 1.51137375831604,
687
+ "learning_rate": 7.899675419755764e-05,
688
+ "loss": 3.8075,
689
+ "step": 1940
690
+ },
691
+ {
692
+ "epoch": 4.723763570566948,
693
+ "grad_norm": 1.569756269454956,
694
+ "learning_rate": 7.896880249816576e-05,
695
+ "loss": 3.794,
696
+ "step": 1960
697
+ },
698
+ {
699
+ "epoch": 4.772014475271411,
700
+ "grad_norm": 1.6083672046661377,
701
+ "learning_rate": 7.894047217172092e-05,
702
+ "loss": 3.7943,
703
+ "step": 1980
704
+ },
705
+ {
706
+ "epoch": 4.820265379975875,
707
+ "grad_norm": 1.6656383275985718,
708
+ "learning_rate": 7.891176351235474e-05,
709
+ "loss": 3.7976,
710
+ "step": 2000
711
+ },
712
+ {
713
+ "epoch": 4.868516284680338,
714
+ "grad_norm": 1.6950315237045288,
715
+ "learning_rate": 7.888267681812675e-05,
716
+ "loss": 3.7881,
717
+ "step": 2020
718
+ },
719
+ {
720
+ "epoch": 4.916767189384801,
721
+ "grad_norm": 1.676330327987671,
722
+ "learning_rate": 7.885321239102137e-05,
723
+ "loss": 3.7889,
724
+ "step": 2040
725
+ },
726
+ {
727
+ "epoch": 4.965018094089264,
728
+ "grad_norm": 1.6131972074508667,
729
+ "learning_rate": 7.88233705369447e-05,
730
+ "loss": 3.7899,
731
+ "step": 2060
732
+ },
733
+ {
734
+ "epoch": 5.012062726176116,
735
+ "grad_norm": 1.5944993495941162,
736
+ "learning_rate": 7.879315156572137e-05,
737
+ "loss": 3.6855,
738
+ "step": 2080
739
+ },
740
+ {
741
+ "epoch": 5.060313630880579,
742
+ "grad_norm": 1.6135458946228027,
743
+ "learning_rate": 7.876255579109132e-05,
744
+ "loss": 3.7781,
745
+ "step": 2100
746
+ },
747
+ {
748
+ "epoch": 5.108564535585042,
749
+ "grad_norm": 1.5969358682632446,
750
+ "learning_rate": 7.873158353070655e-05,
751
+ "loss": 3.7815,
752
+ "step": 2120
753
+ },
754
+ {
755
+ "epoch": 5.156815440289505,
756
+ "grad_norm": 1.6171342134475708,
757
+ "learning_rate": 7.87002351061278e-05,
758
+ "loss": 3.7825,
759
+ "step": 2140
760
+ },
761
+ {
762
+ "epoch": 5.205066344993969,
763
+ "grad_norm": 1.6955264806747437,
764
+ "learning_rate": 7.866851084282125e-05,
765
+ "loss": 3.7839,
766
+ "step": 2160
767
+ },
768
+ {
769
+ "epoch": 5.253317249698432,
770
+ "grad_norm": 1.5927579402923584,
771
+ "learning_rate": 7.863641107015515e-05,
772
+ "loss": 3.7768,
773
+ "step": 2180
774
+ },
775
+ {
776
+ "epoch": 5.301568154402895,
777
+ "grad_norm": 1.6691913604736328,
778
+ "learning_rate": 7.860393612139628e-05,
779
+ "loss": 3.7799,
780
+ "step": 2200
781
+ },
782
+ {
783
+ "epoch": 5.349819059107358,
784
+ "grad_norm": 1.4885603189468384,
785
+ "learning_rate": 7.857108633370665e-05,
786
+ "loss": 3.7751,
787
+ "step": 2220
788
+ },
789
+ {
790
+ "epoch": 5.398069963811821,
791
+ "grad_norm": 1.6115903854370117,
792
+ "learning_rate": 7.853786204813994e-05,
793
+ "loss": 3.7734,
794
+ "step": 2240
795
+ },
796
+ {
797
+ "epoch": 5.446320868516285,
798
+ "grad_norm": 1.5585155487060547,
799
+ "learning_rate": 7.85042636096379e-05,
800
+ "loss": 3.7676,
801
+ "step": 2260
802
+ },
803
+ {
804
+ "epoch": 5.4945717732207475,
805
+ "grad_norm": 1.5992586612701416,
806
+ "learning_rate": 7.847029136702682e-05,
807
+ "loss": 3.7782,
808
+ "step": 2280
809
+ },
810
+ {
811
+ "epoch": 5.542822677925211,
812
+ "grad_norm": 1.611501932144165,
813
+ "learning_rate": 7.843594567301397e-05,
814
+ "loss": 3.7587,
815
+ "step": 2300
816
+ },
817
+ {
818
+ "epoch": 5.591073582629674,
819
+ "grad_norm": 1.6179744005203247,
820
+ "learning_rate": 7.840122688418376e-05,
821
+ "loss": 3.7649,
822
+ "step": 2320
823
+ },
824
+ {
825
+ "epoch": 5.639324487334138,
826
+ "grad_norm": 1.519940733909607,
827
+ "learning_rate": 7.836613536099429e-05,
828
+ "loss": 3.7743,
829
+ "step": 2340
830
+ },
831
+ {
832
+ "epoch": 5.6875753920386005,
833
+ "grad_norm": 1.5957964658737183,
834
+ "learning_rate": 7.833067146777337e-05,
835
+ "loss": 3.7653,
836
+ "step": 2360
837
+ },
838
+ {
839
+ "epoch": 5.735826296743064,
840
+ "grad_norm": 1.5739672183990479,
841
+ "learning_rate": 7.829483557271487e-05,
842
+ "loss": 3.7624,
843
+ "step": 2380
844
+ },
845
+ {
846
+ "epoch": 5.784077201447527,
847
+ "grad_norm": 1.4757063388824463,
848
+ "learning_rate": 7.825862804787484e-05,
849
+ "loss": 3.7599,
850
+ "step": 2400
851
+ },
852
+ {
853
+ "epoch": 5.832328106151991,
854
+ "grad_norm": 1.569327473640442,
855
+ "learning_rate": 7.822204926916772e-05,
856
+ "loss": 3.7703,
857
+ "step": 2420
858
+ },
859
+ {
860
+ "epoch": 5.8805790108564535,
861
+ "grad_norm": 1.4343711137771606,
862
+ "learning_rate": 7.818509961636234e-05,
863
+ "loss": 3.7553,
864
+ "step": 2440
865
+ },
866
+ {
867
+ "epoch": 5.928829915560916,
868
+ "grad_norm": 1.577562928199768,
869
+ "learning_rate": 7.814777947307808e-05,
870
+ "loss": 3.7599,
871
+ "step": 2460
872
+ },
873
+ {
874
+ "epoch": 5.97708082026538,
875
+ "grad_norm": 1.5376607179641724,
876
+ "learning_rate": 7.811008922678073e-05,
877
+ "loss": 3.7653,
878
+ "step": 2480
879
+ },
880
+ {
881
+ "epoch": 6.024125452352232,
882
+ "grad_norm": 1.7855195999145508,
883
+ "learning_rate": 7.80720292687787e-05,
884
+ "loss": 3.6591,
885
+ "step": 2500
886
+ },
887
+ {
888
+ "epoch": 6.072376357056695,
889
+ "grad_norm": 1.5300453901290894,
890
+ "learning_rate": 7.803359999421875e-05,
891
+ "loss": 3.7451,
892
+ "step": 2520
893
+ },
894
+ {
895
+ "epoch": 6.120627261761158,
896
+ "grad_norm": 1.612203598022461,
897
+ "learning_rate": 7.799480180208199e-05,
898
+ "loss": 3.7398,
899
+ "step": 2540
900
+ },
901
+ {
902
+ "epoch": 6.168878166465621,
903
+ "grad_norm": 1.6074904203414917,
904
+ "learning_rate": 7.795563509517966e-05,
905
+ "loss": 3.7539,
906
+ "step": 2560
907
+ },
908
+ {
909
+ "epoch": 6.217129071170085,
910
+ "grad_norm": 1.725329041481018,
911
+ "learning_rate": 7.791610028014911e-05,
912
+ "loss": 3.7524,
913
+ "step": 2580
914
+ },
915
+ {
916
+ "epoch": 6.265379975874548,
917
+ "grad_norm": 1.8740324974060059,
918
+ "learning_rate": 7.787619776744935e-05,
919
+ "loss": 3.7444,
920
+ "step": 2600
921
+ },
922
+ {
923
+ "epoch": 6.3136308805790105,
924
+ "grad_norm": 1.6437512636184692,
925
+ "learning_rate": 7.783592797135697e-05,
926
+ "loss": 3.7382,
927
+ "step": 2620
928
+ },
929
+ {
930
+ "epoch": 6.361881785283474,
931
+ "grad_norm": 1.6491422653198242,
932
+ "learning_rate": 7.779529130996179e-05,
933
+ "loss": 3.7511,
934
+ "step": 2640
935
+ },
936
+ {
937
+ "epoch": 6.410132689987937,
938
+ "grad_norm": 1.6270194053649902,
939
+ "learning_rate": 7.775428820516247e-05,
940
+ "loss": 3.7585,
941
+ "step": 2660
942
+ },
943
+ {
944
+ "epoch": 6.458383594692401,
945
+ "grad_norm": 1.4886605739593506,
946
+ "learning_rate": 7.771291908266217e-05,
947
+ "loss": 3.7494,
948
+ "step": 2680
949
+ },
950
+ {
951
+ "epoch": 6.5066344993968634,
952
+ "grad_norm": 1.4751015901565552,
953
+ "learning_rate": 7.767118437196413e-05,
954
+ "loss": 3.7355,
955
+ "step": 2700
956
+ },
957
+ {
958
+ "epoch": 6.554885404101327,
959
+ "grad_norm": 1.5424976348876953,
960
+ "learning_rate": 7.762908450636722e-05,
961
+ "loss": 3.7377,
962
+ "step": 2720
963
+ },
964
+ {
965
+ "epoch": 6.60313630880579,
966
+ "grad_norm": 1.52116060256958,
967
+ "learning_rate": 7.758661992296142e-05,
968
+ "loss": 3.7406,
969
+ "step": 2740
970
+ },
971
+ {
972
+ "epoch": 6.651387213510254,
973
+ "grad_norm": 1.449812889099121,
974
+ "learning_rate": 7.754379106262327e-05,
975
+ "loss": 3.7448,
976
+ "step": 2760
977
+ },
978
+ {
979
+ "epoch": 6.699638118214716,
980
+ "grad_norm": 1.650067687034607,
981
+ "learning_rate": 7.750059837001136e-05,
982
+ "loss": 3.7346,
983
+ "step": 2780
984
+ },
985
+ {
986
+ "epoch": 6.74788902291918,
987
+ "grad_norm": 1.5093579292297363,
988
+ "learning_rate": 7.74570422935616e-05,
989
+ "loss": 3.7328,
990
+ "step": 2800
991
+ },
992
+ {
993
+ "epoch": 6.796139927623643,
994
+ "grad_norm": 1.4587945938110352,
995
+ "learning_rate": 7.741312328548268e-05,
996
+ "loss": 3.7341,
997
+ "step": 2820
998
+ },
999
+ {
1000
+ "epoch": 6.844390832328106,
1001
+ "grad_norm": 1.4707450866699219,
1002
+ "learning_rate": 7.736884180175131e-05,
1003
+ "loss": 3.7375,
1004
+ "step": 2840
1005
+ },
1006
+ {
1007
+ "epoch": 6.892641737032569,
1008
+ "grad_norm": 1.5367634296417236,
1009
+ "learning_rate": 7.732419830210752e-05,
1010
+ "loss": 3.7361,
1011
+ "step": 2860
1012
+ },
1013
+ {
1014
+ "epoch": 6.940892641737032,
1015
+ "grad_norm": 1.4443663358688354,
1016
+ "learning_rate": 7.727919325004981e-05,
1017
+ "loss": 3.7369,
1018
+ "step": 2880
1019
+ },
1020
+ {
1021
+ "epoch": 6.989143546441496,
1022
+ "grad_norm": 1.5327068567276,
1023
+ "learning_rate": 7.723382711283045e-05,
1024
+ "loss": 3.7379,
1025
+ "step": 2900
1026
+ },
1027
+ {
1028
+ "epoch": 7.036188178528348,
1029
+ "grad_norm": 1.4400986433029175,
1030
+ "learning_rate": 7.718810036145059e-05,
1031
+ "loss": 3.6374,
1032
+ "step": 2920
1033
+ },
1034
+ {
1035
+ "epoch": 7.084439083232811,
1036
+ "grad_norm": 1.4702413082122803,
1037
+ "learning_rate": 7.71420134706553e-05,
1038
+ "loss": 3.7096,
1039
+ "step": 2940
1040
+ },
1041
+ {
1042
+ "epoch": 7.132689987937274,
1043
+ "grad_norm": 1.576393961906433,
1044
+ "learning_rate": 7.709556691892873e-05,
1045
+ "loss": 3.7196,
1046
+ "step": 2960
1047
+ },
1048
+ {
1049
+ "epoch": 7.180940892641737,
1050
+ "grad_norm": 1.579249382019043,
1051
+ "learning_rate": 7.704876118848908e-05,
1052
+ "loss": 3.7264,
1053
+ "step": 2980
1054
+ },
1055
+ {
1056
+ "epoch": 7.2291917973462,
1057
+ "grad_norm": 1.4190411567687988,
1058
+ "learning_rate": 7.700159676528366e-05,
1059
+ "loss": 3.7209,
1060
+ "step": 3000
1061
+ },
1062
+ {
1063
+ "epoch": 7.277442702050664,
1064
+ "grad_norm": 1.450442910194397,
1065
+ "learning_rate": 7.695407413898379e-05,
1066
+ "loss": 3.7369,
1067
+ "step": 3020
1068
+ },
1069
+ {
1070
+ "epoch": 7.325693606755126,
1071
+ "grad_norm": 1.4771963357925415,
1072
+ "learning_rate": 7.69061938029797e-05,
1073
+ "loss": 3.7216,
1074
+ "step": 3040
1075
+ },
1076
+ {
1077
+ "epoch": 7.37394451145959,
1078
+ "grad_norm": 1.4357682466506958,
1079
+ "learning_rate": 7.685795625437552e-05,
1080
+ "loss": 3.7191,
1081
+ "step": 3060
1082
+ },
1083
+ {
1084
+ "epoch": 7.422195416164053,
1085
+ "grad_norm": 1.537807583808899,
1086
+ "learning_rate": 7.680936199398394e-05,
1087
+ "loss": 3.725,
1088
+ "step": 3080
1089
+ },
1090
+ {
1091
+ "epoch": 7.470446320868517,
1092
+ "grad_norm": 1.5135725736618042,
1093
+ "learning_rate": 7.676041152632119e-05,
1094
+ "loss": 3.7247,
1095
+ "step": 3100
1096
+ },
1097
+ {
1098
+ "epoch": 7.518697225572979,
1099
+ "grad_norm": 1.5503147840499878,
1100
+ "learning_rate": 7.671110535960168e-05,
1101
+ "loss": 3.726,
1102
+ "step": 3120
1103
+ },
1104
+ {
1105
+ "epoch": 7.566948130277443,
1106
+ "grad_norm": 1.6059578657150269,
1107
+ "learning_rate": 7.666144400573278e-05,
1108
+ "loss": 3.7159,
1109
+ "step": 3140
1110
+ },
1111
+ {
1112
+ "epoch": 7.615199034981906,
1113
+ "grad_norm": 1.493248462677002,
1114
+ "learning_rate": 7.661142798030947e-05,
1115
+ "loss": 3.7209,
1116
+ "step": 3160
1117
+ },
1118
+ {
1119
+ "epoch": 7.66344993968637,
1120
+ "grad_norm": 1.4386259317398071,
1121
+ "learning_rate": 7.656105780260904e-05,
1122
+ "loss": 3.7242,
1123
+ "step": 3180
1124
+ },
1125
+ {
1126
+ "epoch": 7.711700844390832,
1127
+ "grad_norm": 1.5307894945144653,
1128
+ "learning_rate": 7.651033399558563e-05,
1129
+ "loss": 3.7278,
1130
+ "step": 3200
1131
+ },
1132
+ {
1133
+ "epoch": 7.759951749095295,
1134
+ "grad_norm": 8.02717399597168,
1135
+ "learning_rate": 7.645925708586489e-05,
1136
+ "loss": 3.7229,
1137
+ "step": 3220
1138
+ },
1139
+ {
1140
+ "epoch": 7.808202653799759,
1141
+ "grad_norm": 2.1728477478027344,
1142
+ "learning_rate": 7.640782760373839e-05,
1143
+ "loss": 3.7176,
1144
+ "step": 3240
1145
+ },
1146
+ {
1147
+ "epoch": 7.856453558504222,
1148
+ "grad_norm": 1.483292818069458,
1149
+ "learning_rate": 7.635604608315824e-05,
1150
+ "loss": 3.7256,
1151
+ "step": 3260
1152
+ },
1153
+ {
1154
+ "epoch": 7.904704463208685,
1155
+ "grad_norm": 1.4443011283874512,
1156
+ "learning_rate": 7.630391306173145e-05,
1157
+ "loss": 3.6971,
1158
+ "step": 3280
1159
+ },
1160
+ {
1161
+ "epoch": 7.952955367913148,
1162
+ "grad_norm": 1.4782264232635498,
1163
+ "learning_rate": 7.625142908071443e-05,
1164
+ "loss": 3.7192,
1165
+ "step": 3300
1166
+ },
1167
+ {
1168
+ "epoch": 8.0,
1169
+ "grad_norm": 1.0295357704162598,
1170
+ "learning_rate": 7.619859468500727e-05,
1171
+ "loss": 3.6172,
1172
+ "step": 3320
1173
+ },
1174
+ {
1175
+ "epoch": 8.048250904704464,
1176
+ "grad_norm": 1.495681643486023,
1177
+ "learning_rate": 7.614541042314822e-05,
1178
+ "loss": 3.6962,
1179
+ "step": 3340
1180
+ },
1181
+ {
1182
+ "epoch": 8.096501809408926,
1183
+ "grad_norm": 1.3702726364135742,
1184
+ "learning_rate": 7.609187684730784e-05,
1185
+ "loss": 3.7001,
1186
+ "step": 3360
1187
+ },
1188
+ {
1189
+ "epoch": 8.14475271411339,
1190
+ "grad_norm": 1.4463536739349365,
1191
+ "learning_rate": 7.60379945132834e-05,
1192
+ "loss": 3.6969,
1193
+ "step": 3380
1194
+ },
1195
+ {
1196
+ "epoch": 8.193003618817853,
1197
+ "grad_norm": 1.5541642904281616,
1198
+ "learning_rate": 7.598376398049301e-05,
1199
+ "loss": 3.699,
1200
+ "step": 3400
1201
+ },
1202
+ {
1203
+ "epoch": 8.241254523522317,
1204
+ "grad_norm": 1.5190789699554443,
1205
+ "learning_rate": 7.59291858119699e-05,
1206
+ "loss": 3.7044,
1207
+ "step": 3420
1208
+ },
1209
+ {
1210
+ "epoch": 8.289505428226779,
1211
+ "grad_norm": 1.4489225149154663,
1212
+ "learning_rate": 7.58742605743565e-05,
1213
+ "loss": 3.69,
1214
+ "step": 3440
1215
+ },
1216
+ {
1217
+ "epoch": 8.337756332931242,
1218
+ "grad_norm": 1.506798267364502,
1219
+ "learning_rate": 7.581898883789857e-05,
1220
+ "loss": 3.7024,
1221
+ "step": 3460
1222
+ },
1223
+ {
1224
+ "epoch": 8.386007237635706,
1225
+ "grad_norm": 1.4284615516662598,
1226
+ "learning_rate": 7.576337117643934e-05,
1227
+ "loss": 3.7032,
1228
+ "step": 3480
1229
+ },
1230
+ {
1231
+ "epoch": 8.43425814234017,
1232
+ "grad_norm": 1.4764567613601685,
1233
+ "learning_rate": 7.570740816741351e-05,
1234
+ "loss": 3.6948,
1235
+ "step": 3500
1236
+ },
1237
+ {
1238
+ "epoch": 8.482509047044632,
1239
+ "grad_norm": 1.420469880104065,
1240
+ "learning_rate": 7.56511003918412e-05,
1241
+ "loss": 3.7051,
1242
+ "step": 3520
1243
+ },
1244
+ {
1245
+ "epoch": 8.530759951749095,
1246
+ "grad_norm": 1.5950831174850464,
1247
+ "learning_rate": 7.559444843432199e-05,
1248
+ "loss": 3.6957,
1249
+ "step": 3540
1250
+ },
1251
+ {
1252
+ "epoch": 8.579010856453559,
1253
+ "grad_norm": 3.9912474155426025,
1254
+ "learning_rate": 7.55374528830289e-05,
1255
+ "loss": 3.7046,
1256
+ "step": 3560
1257
+ },
1258
+ {
1259
+ "epoch": 8.627261761158021,
1260
+ "grad_norm": 1.6887681484222412,
1261
+ "learning_rate": 7.548011432970211e-05,
1262
+ "loss": 3.7024,
1263
+ "step": 3580
1264
+ },
1265
+ {
1266
+ "epoch": 8.675512665862485,
1267
+ "grad_norm": 1.4177148342132568,
1268
+ "learning_rate": 7.5422433369643e-05,
1269
+ "loss": 3.692,
1270
+ "step": 3600
1271
+ },
1272
+ {
1273
+ "epoch": 8.723763570566948,
1274
+ "grad_norm": 1.4193158149719238,
1275
+ "learning_rate": 7.536441060170786e-05,
1276
+ "loss": 3.706,
1277
+ "step": 3620
1278
+ },
1279
+ {
1280
+ "epoch": 8.772014475271412,
1281
+ "grad_norm": 1.3049330711364746,
1282
+ "learning_rate": 7.53060466283017e-05,
1283
+ "loss": 3.6858,
1284
+ "step": 3640
1285
+ },
1286
+ {
1287
+ "epoch": 8.820265379975874,
1288
+ "grad_norm": 1.4670246839523315,
1289
+ "learning_rate": 7.5247342055372e-05,
1290
+ "loss": 3.6976,
1291
+ "step": 3660
1292
+ },
1293
+ {
1294
+ "epoch": 8.868516284680338,
1295
+ "grad_norm": 1.4112060070037842,
1296
+ "learning_rate": 7.518829749240247e-05,
1297
+ "loss": 3.6963,
1298
+ "step": 3680
1299
+ },
1300
+ {
1301
+ "epoch": 8.916767189384801,
1302
+ "grad_norm": 1.3692915439605713,
1303
+ "learning_rate": 7.512891355240656e-05,
1304
+ "loss": 3.6953,
1305
+ "step": 3700
1306
+ },
1307
+ {
1308
+ "epoch": 8.965018094089265,
1309
+ "grad_norm": 1.3691803216934204,
1310
+ "learning_rate": 7.506919085192135e-05,
1311
+ "loss": 3.6954,
1312
+ "step": 3720
1313
+ },
1314
+ {
1315
+ "epoch": 9.012062726176115,
1316
+ "grad_norm": 1.4931933879852295,
1317
+ "learning_rate": 7.500913001100085e-05,
1318
+ "loss": 3.6025,
1319
+ "step": 3740
1320
+ },
1321
+ {
1322
+ "epoch": 9.060313630880579,
1323
+ "grad_norm": 1.4402884244918823,
1324
+ "learning_rate": 7.494873165320985e-05,
1325
+ "loss": 3.6785,
1326
+ "step": 3760
1327
+ },
1328
+ {
1329
+ "epoch": 9.108564535585042,
1330
+ "grad_norm": 1.4091100692749023,
1331
+ "learning_rate": 7.488799640561724e-05,
1332
+ "loss": 3.6843,
1333
+ "step": 3780
1334
+ },
1335
+ {
1336
+ "epoch": 9.156815440289506,
1337
+ "grad_norm": 1.4743162393569946,
1338
+ "learning_rate": 7.48269248987896e-05,
1339
+ "loss": 3.6782,
1340
+ "step": 3800
1341
+ },
1342
+ {
1343
+ "epoch": 9.205066344993968,
1344
+ "grad_norm": 1.4238414764404297,
1345
+ "learning_rate": 7.476551776678461e-05,
1346
+ "loss": 3.6803,
1347
+ "step": 3820
1348
+ },
1349
+ {
1350
+ "epoch": 9.253317249698432,
1351
+ "grad_norm": 1.5211981534957886,
1352
+ "learning_rate": 7.47037756471445e-05,
1353
+ "loss": 3.6745,
1354
+ "step": 3840
1355
+ },
1356
+ {
1357
+ "epoch": 9.301568154402895,
1358
+ "grad_norm": 1.4191877841949463,
1359
+ "learning_rate": 7.464169918088939e-05,
1360
+ "loss": 3.6825,
1361
+ "step": 3860
1362
+ },
1363
+ {
1364
+ "epoch": 9.349819059107359,
1365
+ "grad_norm": 1.4716769456863403,
1366
+ "learning_rate": 7.457928901251072e-05,
1367
+ "loss": 3.6735,
1368
+ "step": 3880
1369
+ },
1370
+ {
1371
+ "epoch": 9.398069963811821,
1372
+ "grad_norm": 1.5062490701675415,
1373
+ "learning_rate": 7.45165457899644e-05,
1374
+ "loss": 3.6787,
1375
+ "step": 3900
1376
+ },
1377
+ {
1378
+ "epoch": 9.446320868516285,
1379
+ "grad_norm": 1.4394530057907104,
1380
+ "learning_rate": 7.445347016466428e-05,
1381
+ "loss": 3.6759,
1382
+ "step": 3920
1383
+ },
1384
+ {
1385
+ "epoch": 9.494571773220748,
1386
+ "grad_norm": 1.4211843013763428,
1387
+ "learning_rate": 7.439006279147524e-05,
1388
+ "loss": 3.6786,
1389
+ "step": 3940
1390
+ },
1391
+ {
1392
+ "epoch": 9.54282267792521,
1393
+ "grad_norm": 1.4235788583755493,
1394
+ "learning_rate": 7.432632432870641e-05,
1395
+ "loss": 3.6706,
1396
+ "step": 3960
1397
+ },
1398
+ {
1399
+ "epoch": 9.591073582629674,
1400
+ "grad_norm": 1.3978049755096436,
1401
+ "learning_rate": 7.426225543810444e-05,
1402
+ "loss": 3.6744,
1403
+ "step": 3980
1404
+ },
1405
+ {
1406
+ "epoch": 9.639324487334138,
1407
+ "grad_norm": 1.3657376766204834,
1408
+ "learning_rate": 7.419785678484646e-05,
1409
+ "loss": 3.6772,
1410
+ "step": 4000
1411
+ },
1412
+ {
1413
+ "epoch": 9.687575392038601,
1414
+ "grad_norm": 1.404558777809143,
1415
+ "learning_rate": 7.413312903753337e-05,
1416
+ "loss": 3.6716,
1417
+ "step": 4020
1418
+ },
1419
+ {
1420
+ "epoch": 9.735826296743063,
1421
+ "grad_norm": 1.3729737997055054,
1422
+ "learning_rate": 7.406807286818272e-05,
1423
+ "loss": 3.6823,
1424
+ "step": 4040
1425
+ },
1426
+ {
1427
+ "epoch": 9.784077201447527,
1428
+ "grad_norm": 1.3888156414031982,
1429
+ "learning_rate": 7.400268895222184e-05,
1430
+ "loss": 3.6801,
1431
+ "step": 4060
1432
+ },
1433
+ {
1434
+ "epoch": 9.83232810615199,
1435
+ "grad_norm": 1.3629757165908813,
1436
+ "learning_rate": 7.393697796848078e-05,
1437
+ "loss": 3.6708,
1438
+ "step": 4080
1439
+ },
1440
+ {
1441
+ "epoch": 9.880579010856454,
1442
+ "grad_norm": 1.3621810674667358,
1443
+ "learning_rate": 7.38709405991853e-05,
1444
+ "loss": 3.6732,
1445
+ "step": 4100
1446
+ },
1447
+ {
1448
+ "epoch": 9.928829915560916,
1449
+ "grad_norm": 1.3696084022521973,
1450
+ "learning_rate": 7.380457752994974e-05,
1451
+ "loss": 3.6727,
1452
+ "step": 4120
1453
+ },
1454
+ {
1455
+ "epoch": 9.97708082026538,
1456
+ "grad_norm": 1.484961986541748,
1457
+ "learning_rate": 7.373788944976998e-05,
1458
+ "loss": 3.6769,
1459
+ "step": 4140
1460
+ },
1461
+ {
1462
+ "epoch": 10.024125452352232,
1463
+ "grad_norm": 1.351414680480957,
1464
+ "learning_rate": 7.367087705101617e-05,
1465
+ "loss": 3.5664,
1466
+ "step": 4160
1467
+ },
1468
+ {
1469
+ "epoch": 10.072376357056696,
1470
+ "grad_norm": 1.4139217138290405,
1471
+ "learning_rate": 7.360354102942563e-05,
1472
+ "loss": 3.6504,
1473
+ "step": 4180
1474
+ },
1475
+ {
1476
+ "epoch": 10.120627261761157,
1477
+ "grad_norm": 1.5124530792236328,
1478
+ "learning_rate": 7.353588208409559e-05,
1479
+ "loss": 3.6583,
1480
+ "step": 4200
1481
+ },
1482
+ {
1483
+ "epoch": 10.168878166465621,
1484
+ "grad_norm": 1.4514442682266235,
1485
+ "learning_rate": 7.346790091747603e-05,
1486
+ "loss": 3.6571,
1487
+ "step": 4220
1488
+ },
1489
+ {
1490
+ "epoch": 10.217129071170085,
1491
+ "grad_norm": 1.454332709312439,
1492
+ "learning_rate": 7.339959823536216e-05,
1493
+ "loss": 3.6617,
1494
+ "step": 4240
1495
+ },
1496
+ {
1497
+ "epoch": 10.265379975874549,
1498
+ "grad_norm": 2.98549747467041,
1499
+ "learning_rate": 7.333097474688735e-05,
1500
+ "loss": 3.6636,
1501
+ "step": 4260
1502
+ },
1503
+ {
1504
+ "epoch": 10.31363088057901,
1505
+ "grad_norm": 1.36289644241333,
1506
+ "learning_rate": 7.326203116451558e-05,
1507
+ "loss": 3.6628,
1508
+ "step": 4280
1509
+ },
1510
+ {
1511
+ "epoch": 10.361881785283474,
1512
+ "grad_norm": 1.3813707828521729,
1513
+ "learning_rate": 7.319276820403416e-05,
1514
+ "loss": 3.6671,
1515
+ "step": 4300
1516
+ },
1517
+ {
1518
+ "epoch": 10.410132689987938,
1519
+ "grad_norm": 1.3092026710510254,
1520
+ "learning_rate": 7.312318658454625e-05,
1521
+ "loss": 3.6692,
1522
+ "step": 4320
1523
+ },
1524
+ {
1525
+ "epoch": 10.4583835946924,
1526
+ "grad_norm": 1.3872017860412598,
1527
+ "learning_rate": 7.305328702846334e-05,
1528
+ "loss": 3.6623,
1529
+ "step": 4340
1530
+ },
1531
+ {
1532
+ "epoch": 10.506634499396863,
1533
+ "grad_norm": 1.402245044708252,
1534
+ "learning_rate": 7.298307026149788e-05,
1535
+ "loss": 3.6606,
1536
+ "step": 4360
1537
+ },
1538
+ {
1539
+ "epoch": 10.554885404101327,
1540
+ "grad_norm": 1.5341289043426514,
1541
+ "learning_rate": 7.291253701265565e-05,
1542
+ "loss": 3.6529,
1543
+ "step": 4380
1544
+ },
1545
+ {
1546
+ "epoch": 10.60313630880579,
1547
+ "grad_norm": 1.4089699983596802,
1548
+ "learning_rate": 7.284168801422819e-05,
1549
+ "loss": 3.6552,
1550
+ "step": 4400
1551
+ },
1552
+ {
1553
+ "epoch": 10.651387213510253,
1554
+ "grad_norm": 1.9549734592437744,
1555
+ "learning_rate": 7.277052400178524e-05,
1556
+ "loss": 3.6528,
1557
+ "step": 4420
1558
+ },
1559
+ {
1560
+ "epoch": 10.699638118214716,
1561
+ "grad_norm": 1.468812108039856,
1562
+ "learning_rate": 7.269904571416707e-05,
1563
+ "loss": 3.6622,
1564
+ "step": 4440
1565
+ },
1566
+ {
1567
+ "epoch": 10.74788902291918,
1568
+ "grad_norm": 1.4087417125701904,
1569
+ "learning_rate": 7.262725389347687e-05,
1570
+ "loss": 3.6646,
1571
+ "step": 4460
1572
+ },
1573
+ {
1574
+ "epoch": 10.796139927623642,
1575
+ "grad_norm": 1.403031587600708,
1576
+ "learning_rate": 7.255514928507294e-05,
1577
+ "loss": 3.6626,
1578
+ "step": 4480
1579
+ },
1580
+ {
1581
+ "epoch": 10.844390832328106,
1582
+ "grad_norm": 1.5940220355987549,
1583
+ "learning_rate": 7.248273263756103e-05,
1584
+ "loss": 3.6736,
1585
+ "step": 4500
1586
+ },
1587
+ {
1588
+ "epoch": 10.89264173703257,
1589
+ "grad_norm": 1.3505603075027466,
1590
+ "learning_rate": 7.241000470278657e-05,
1591
+ "loss": 3.655,
1592
+ "step": 4520
1593
+ },
1594
+ {
1595
+ "epoch": 10.940892641737033,
1596
+ "grad_norm": 1.4338419437408447,
1597
+ "learning_rate": 7.233696623582679e-05,
1598
+ "loss": 3.6536,
1599
+ "step": 4540
1600
+ },
1601
+ {
1602
+ "epoch": 10.989143546441495,
1603
+ "grad_norm": 1.4541348218917847,
1604
+ "learning_rate": 7.226361799498301e-05,
1605
+ "loss": 3.6438,
1606
+ "step": 4560
1607
+ },
1608
+ {
1609
+ "epoch": 11.036188178528347,
1610
+ "grad_norm": 1.2936383485794067,
1611
+ "learning_rate": 7.21899607417726e-05,
1612
+ "loss": 3.5581,
1613
+ "step": 4580
1614
+ },
1615
+ {
1616
+ "epoch": 11.08443908323281,
1617
+ "grad_norm": 1.3107142448425293,
1618
+ "learning_rate": 7.211599524092127e-05,
1619
+ "loss": 3.6341,
1620
+ "step": 4600
1621
+ },
1622
+ {
1623
+ "epoch": 11.132689987937274,
1624
+ "grad_norm": 1.4428937435150146,
1625
+ "learning_rate": 7.204172226035491e-05,
1626
+ "loss": 3.6434,
1627
+ "step": 4620
1628
+ },
1629
+ {
1630
+ "epoch": 11.180940892641736,
1631
+ "grad_norm": 1.34903883934021,
1632
+ "learning_rate": 7.196714257119183e-05,
1633
+ "loss": 3.6441,
1634
+ "step": 4640
1635
+ },
1636
+ {
1637
+ "epoch": 11.2291917973462,
1638
+ "grad_norm": 1.3988282680511475,
1639
+ "learning_rate": 7.189225694773457e-05,
1640
+ "loss": 3.6416,
1641
+ "step": 4660
1642
+ },
1643
+ {
1644
+ "epoch": 11.277442702050664,
1645
+ "grad_norm": 1.4414646625518799,
1646
+ "learning_rate": 7.1817066167462e-05,
1647
+ "loss": 3.6449,
1648
+ "step": 4680
1649
+ },
1650
+ {
1651
+ "epoch": 11.325693606755127,
1652
+ "grad_norm": 1.4272130727767944,
1653
+ "learning_rate": 7.17415710110212e-05,
1654
+ "loss": 3.6408,
1655
+ "step": 4700
1656
+ },
1657
+ {
1658
+ "epoch": 11.37394451145959,
1659
+ "grad_norm": 1.3356852531433105,
1660
+ "learning_rate": 7.166577226221933e-05,
1661
+ "loss": 3.6449,
1662
+ "step": 4720
1663
+ },
1664
+ {
1665
+ "epoch": 11.422195416164053,
1666
+ "grad_norm": 1.3972327709197998,
1667
+ "learning_rate": 7.158967070801549e-05,
1668
+ "loss": 3.6431,
1669
+ "step": 4740
1670
+ },
1671
+ {
1672
+ "epoch": 11.470446320868517,
1673
+ "grad_norm": 1.379400372505188,
1674
+ "learning_rate": 7.151326713851261e-05,
1675
+ "loss": 3.6433,
1676
+ "step": 4760
1677
+ },
1678
+ {
1679
+ "epoch": 11.51869722557298,
1680
+ "grad_norm": 1.3746397495269775,
1681
+ "learning_rate": 7.14365623469492e-05,
1682
+ "loss": 3.654,
1683
+ "step": 4780
1684
+ },
1685
+ {
1686
+ "epoch": 11.566948130277442,
1687
+ "grad_norm": 1.251205325126648,
1688
+ "learning_rate": 7.135955712969113e-05,
1689
+ "loss": 3.6478,
1690
+ "step": 4800
1691
+ },
1692
+ {
1693
+ "epoch": 11.615199034981906,
1694
+ "grad_norm": 1.3687127828598022,
1695
+ "learning_rate": 7.128225228622331e-05,
1696
+ "loss": 3.6325,
1697
+ "step": 4820
1698
+ },
1699
+ {
1700
+ "epoch": 11.66344993968637,
1701
+ "grad_norm": 1.3201661109924316,
1702
+ "learning_rate": 7.120464861914147e-05,
1703
+ "loss": 3.6429,
1704
+ "step": 4840
1705
+ },
1706
+ {
1707
+ "epoch": 11.711700844390833,
1708
+ "grad_norm": 1.4083571434020996,
1709
+ "learning_rate": 7.112674693414383e-05,
1710
+ "loss": 3.6504,
1711
+ "step": 4860
1712
+ },
1713
+ {
1714
+ "epoch": 11.759951749095295,
1715
+ "grad_norm": 1.3547676801681519,
1716
+ "learning_rate": 7.104854804002263e-05,
1717
+ "loss": 3.6422,
1718
+ "step": 4880
1719
+ },
1720
+ {
1721
+ "epoch": 11.808202653799759,
1722
+ "grad_norm": 1.3846855163574219,
1723
+ "learning_rate": 7.09700527486558e-05,
1724
+ "loss": 3.6465,
1725
+ "step": 4900
1726
+ },
1727
+ {
1728
+ "epoch": 11.856453558504223,
1729
+ "grad_norm": 1.32351815700531,
1730
+ "learning_rate": 7.08912618749986e-05,
1731
+ "loss": 3.6447,
1732
+ "step": 4920
1733
+ },
1734
+ {
1735
+ "epoch": 11.904704463208684,
1736
+ "grad_norm": 1.4390246868133545,
1737
+ "learning_rate": 7.081217623707502e-05,
1738
+ "loss": 3.6397,
1739
+ "step": 4940
1740
+ },
1741
+ {
1742
+ "epoch": 11.952955367913148,
1743
+ "grad_norm": 1.3247145414352417,
1744
+ "learning_rate": 7.07327966559694e-05,
1745
+ "loss": 3.6444,
1746
+ "step": 4960
1747
+ },
1748
+ {
1749
+ "epoch": 12.0,
1750
+ "grad_norm": 0.9591923356056213,
1751
+ "learning_rate": 7.065312395581784e-05,
1752
+ "loss": 3.5558,
1753
+ "step": 4980
1754
+ },
1755
+ {
1756
+ "epoch": 12.048250904704464,
1757
+ "grad_norm": 1.3593121767044067,
1758
+ "learning_rate": 7.057315896379966e-05,
1759
+ "loss": 3.6187,
1760
+ "step": 5000
1761
+ },
1762
+ {
1763
+ "epoch": 12.096501809408926,
1764
+ "grad_norm": 1.4138004779815674,
1765
+ "learning_rate": 7.049290251012882e-05,
1766
+ "loss": 3.6176,
1767
+ "step": 5020
1768
+ },
1769
+ {
1770
+ "epoch": 12.14475271411339,
1771
+ "grad_norm": 1.7654756307601929,
1772
+ "learning_rate": 7.041235542804534e-05,
1773
+ "loss": 3.6249,
1774
+ "step": 5040
1775
+ },
1776
+ {
1777
+ "epoch": 12.193003618817853,
1778
+ "grad_norm": 1.4034428596496582,
1779
+ "learning_rate": 7.033151855380656e-05,
1780
+ "loss": 3.6312,
1781
+ "step": 5060
1782
+ },
1783
+ {
1784
+ "epoch": 12.241254523522317,
1785
+ "grad_norm": 1.3244304656982422,
1786
+ "learning_rate": 7.025039272667853e-05,
1787
+ "loss": 3.6294,
1788
+ "step": 5080
1789
+ },
1790
+ {
1791
+ "epoch": 12.289505428226779,
1792
+ "grad_norm": 1.4898945093154907,
1793
+ "learning_rate": 7.016897878892724e-05,
1794
+ "loss": 3.6128,
1795
+ "step": 5100
1796
+ },
1797
+ {
1798
+ "epoch": 12.337756332931242,
1799
+ "grad_norm": 1.3293966054916382,
1800
+ "learning_rate": 7.008727758580994e-05,
1801
+ "loss": 3.6188,
1802
+ "step": 5120
1803
+ },
1804
+ {
1805
+ "epoch": 12.386007237635706,
1806
+ "grad_norm": 1.424784779548645,
1807
+ "learning_rate": 7.000528996556632e-05,
1808
+ "loss": 3.6253,
1809
+ "step": 5140
1810
+ },
1811
+ {
1812
+ "epoch": 12.43425814234017,
1813
+ "grad_norm": 1.5203818082809448,
1814
+ "learning_rate": 6.992301677940972e-05,
1815
+ "loss": 3.6255,
1816
+ "step": 5160
1817
+ },
1818
+ {
1819
+ "epoch": 12.482509047044632,
1820
+ "grad_norm": 1.3067829608917236,
1821
+ "learning_rate": 6.984045888151827e-05,
1822
+ "loss": 3.6296,
1823
+ "step": 5180
1824
+ },
1825
+ {
1826
+ "epoch": 12.530759951749095,
1827
+ "grad_norm": 1.3243008852005005,
1828
+ "learning_rate": 6.975761712902608e-05,
1829
+ "loss": 3.6243,
1830
+ "step": 5200
1831
+ },
1832
+ {
1833
+ "epoch": 12.579010856453559,
1834
+ "grad_norm": 1.4180747270584106,
1835
+ "learning_rate": 6.967449238201425e-05,
1836
+ "loss": 3.613,
1837
+ "step": 5220
1838
+ },
1839
+ {
1840
+ "epoch": 12.627261761158021,
1841
+ "grad_norm": 1.4066087007522583,
1842
+ "learning_rate": 6.959108550350203e-05,
1843
+ "loss": 3.6285,
1844
+ "step": 5240
1845
+ },
1846
+ {
1847
+ "epoch": 12.675512665862485,
1848
+ "grad_norm": 1.3775495290756226,
1849
+ "learning_rate": 6.950739735943779e-05,
1850
+ "loss": 3.6319,
1851
+ "step": 5260
1852
+ },
1853
+ {
1854
+ "epoch": 12.723763570566948,
1855
+ "grad_norm": 1.3764328956604004,
1856
+ "learning_rate": 6.942342881869009e-05,
1857
+ "loss": 3.6319,
1858
+ "step": 5280
1859
+ },
1860
+ {
1861
+ "epoch": 12.772014475271412,
1862
+ "grad_norm": 1.3530385494232178,
1863
+ "learning_rate": 6.933918075303858e-05,
1864
+ "loss": 3.6272,
1865
+ "step": 5300
1866
+ },
1867
+ {
1868
+ "epoch": 12.820265379975874,
1869
+ "grad_norm": 1.3066322803497314,
1870
+ "learning_rate": 6.925465403716508e-05,
1871
+ "loss": 3.6179,
1872
+ "step": 5320
1873
+ },
1874
+ {
1875
+ "epoch": 12.868516284680338,
1876
+ "grad_norm": 1.3790825605392456,
1877
+ "learning_rate": 6.916984954864434e-05,
1878
+ "loss": 3.6279,
1879
+ "step": 5340
1880
+ },
1881
+ {
1882
+ "epoch": 12.916767189384801,
1883
+ "grad_norm": 1.3888719081878662,
1884
+ "learning_rate": 6.908476816793503e-05,
1885
+ "loss": 3.6375,
1886
+ "step": 5360
1887
+ },
1888
+ {
1889
+ "epoch": 12.965018094089265,
1890
+ "grad_norm": 1.3850982189178467,
1891
+ "learning_rate": 6.89994107783706e-05,
1892
+ "loss": 3.6364,
1893
+ "step": 5380
1894
+ },
1895
+ {
1896
+ "epoch": 13.012062726176115,
1897
+ "grad_norm": 1.3598768711090088,
1898
+ "learning_rate": 6.891377826615008e-05,
1899
+ "loss": 3.5258,
1900
+ "step": 5400
1901
+ },
1902
+ {
1903
+ "epoch": 13.060313630880579,
1904
+ "grad_norm": 1.4009425640106201,
1905
+ "learning_rate": 6.882787152032883e-05,
1906
+ "loss": 3.6079,
1907
+ "step": 5420
1908
+ },
1909
+ {
1910
+ "epoch": 13.108564535585042,
1911
+ "grad_norm": 1.3839892148971558,
1912
+ "learning_rate": 6.87416914328094e-05,
1913
+ "loss": 3.6041,
1914
+ "step": 5440
1915
+ },
1916
+ {
1917
+ "epoch": 13.156815440289506,
1918
+ "grad_norm": 1.3453115224838257,
1919
+ "learning_rate": 6.865523889833228e-05,
1920
+ "loss": 3.6097,
1921
+ "step": 5460
1922
+ },
1923
+ {
1924
+ "epoch": 13.205066344993968,
1925
+ "grad_norm": 1.4429824352264404,
1926
+ "learning_rate": 6.85685148144665e-05,
1927
+ "loss": 3.614,
1928
+ "step": 5480
1929
+ },
1930
+ {
1931
+ "epoch": 13.253317249698432,
1932
+ "grad_norm": 1.3701107501983643,
1933
+ "learning_rate": 6.848152008160037e-05,
1934
+ "loss": 3.6064,
1935
+ "step": 5500
1936
+ },
1937
+ {
1938
+ "epoch": 13.301568154402895,
1939
+ "grad_norm": 1.2284281253814697,
1940
+ "learning_rate": 6.839425560293218e-05,
1941
+ "loss": 3.5978,
1942
+ "step": 5520
1943
+ },
1944
+ {
1945
+ "epoch": 13.349819059107359,
1946
+ "grad_norm": 1.2895541191101074,
1947
+ "learning_rate": 6.830672228446076e-05,
1948
+ "loss": 3.6099,
1949
+ "step": 5540
1950
+ },
1951
+ {
1952
+ "epoch": 13.398069963811821,
1953
+ "grad_norm": 1.4081617593765259,
1954
+ "learning_rate": 6.821892103497609e-05,
1955
+ "loss": 3.6118,
1956
+ "step": 5560
1957
+ },
1958
+ {
1959
+ "epoch": 13.446320868516285,
1960
+ "grad_norm": 1.3992178440093994,
1961
+ "learning_rate": 6.813085276604987e-05,
1962
+ "loss": 3.6091,
1963
+ "step": 5580
1964
+ },
1965
+ {
1966
+ "epoch": 13.494571773220748,
1967
+ "grad_norm": 1.3669551610946655,
1968
+ "learning_rate": 6.804251839202604e-05,
1969
+ "loss": 3.6034,
1970
+ "step": 5600
1971
+ },
1972
+ {
1973
+ "epoch": 13.54282267792521,
1974
+ "grad_norm": 2.91831636428833,
1975
+ "learning_rate": 6.795391883001135e-05,
1976
+ "loss": 3.6196,
1977
+ "step": 5620
1978
+ },
1979
+ {
1980
+ "epoch": 13.591073582629674,
1981
+ "grad_norm": 1.2964154481887817,
1982
+ "learning_rate": 6.786505499986573e-05,
1983
+ "loss": 3.6058,
1984
+ "step": 5640
1985
+ },
1986
+ {
1987
+ "epoch": 13.639324487334138,
1988
+ "grad_norm": 1.3830260038375854,
1989
+ "learning_rate": 6.777592782419284e-05,
1990
+ "loss": 3.6032,
1991
+ "step": 5660
1992
+ },
1993
+ {
1994
+ "epoch": 13.687575392038601,
1995
+ "grad_norm": 1.4418996572494507,
1996
+ "learning_rate": 6.768653822833042e-05,
1997
+ "loss": 3.5995,
1998
+ "step": 5680
1999
+ },
2000
+ {
2001
+ "epoch": 13.735826296743063,
2002
+ "grad_norm": 1.4376180171966553,
2003
+ "learning_rate": 6.759688714034074e-05,
2004
+ "loss": 3.6142,
2005
+ "step": 5700
2006
+ },
2007
+ {
2008
+ "epoch": 13.784077201447527,
2009
+ "grad_norm": 1.446057677268982,
2010
+ "learning_rate": 6.750697549100092e-05,
2011
+ "loss": 3.615,
2012
+ "step": 5720
2013
+ },
2014
+ {
2015
+ "epoch": 13.83232810615199,
2016
+ "grad_norm": 1.395560383796692,
2017
+ "learning_rate": 6.741680421379332e-05,
2018
+ "loss": 3.6031,
2019
+ "step": 5740
2020
+ },
2021
+ {
2022
+ "epoch": 13.880579010856454,
2023
+ "grad_norm": 1.2831710577011108,
2024
+ "learning_rate": 6.732637424489575e-05,
2025
+ "loss": 3.6119,
2026
+ "step": 5760
2027
+ },
2028
+ {
2029
+ "epoch": 13.928829915560916,
2030
+ "grad_norm": 1.365699052810669,
2031
+ "learning_rate": 6.723568652317186e-05,
2032
+ "loss": 3.6121,
2033
+ "step": 5780
2034
+ },
2035
+ {
2036
+ "epoch": 13.97708082026538,
2037
+ "grad_norm": 1.4029818773269653,
2038
+ "learning_rate": 6.714474199016135e-05,
2039
+ "loss": 3.6125,
2040
+ "step": 5800
2041
+ },
2042
+ {
2043
+ "epoch": 14.024125452352232,
2044
+ "grad_norm": 1.3709124326705933,
2045
+ "learning_rate": 6.705354159007016e-05,
2046
+ "loss": 3.5112,
2047
+ "step": 5820
2048
+ },
2049
+ {
2050
+ "epoch": 14.072376357056696,
2051
+ "grad_norm": 1.3001530170440674,
2052
+ "learning_rate": 6.696208626976072e-05,
2053
+ "loss": 3.5881,
2054
+ "step": 5840
2055
+ },
2056
+ {
2057
+ "epoch": 14.120627261761157,
2058
+ "grad_norm": 1.32352876663208,
2059
+ "learning_rate": 6.687037697874207e-05,
2060
+ "loss": 3.5946,
2061
+ "step": 5860
2062
+ },
2063
+ {
2064
+ "epoch": 14.168878166465621,
2065
+ "grad_norm": 1.3400332927703857,
2066
+ "learning_rate": 6.67784146691601e-05,
2067
+ "loss": 3.5828,
2068
+ "step": 5880
2069
+ },
2070
+ {
2071
+ "epoch": 14.217129071170085,
2072
+ "grad_norm": 1.3362751007080078,
2073
+ "learning_rate": 6.668620029578749e-05,
2074
+ "loss": 3.5965,
2075
+ "step": 5900
2076
+ },
2077
+ {
2078
+ "epoch": 14.265379975874549,
2079
+ "grad_norm": 1.4170061349868774,
2080
+ "learning_rate": 6.659373481601398e-05,
2081
+ "loss": 3.5962,
2082
+ "step": 5920
2083
+ },
2084
+ {
2085
+ "epoch": 14.31363088057901,
2086
+ "grad_norm": 1.4357331991195679,
2087
+ "learning_rate": 6.650101918983632e-05,
2088
+ "loss": 3.5847,
2089
+ "step": 5940
2090
+ },
2091
+ {
2092
+ "epoch": 14.361881785283474,
2093
+ "grad_norm": 1.2876794338226318,
2094
+ "learning_rate": 6.640805437984835e-05,
2095
+ "loss": 3.6105,
2096
+ "step": 5960
2097
+ },
2098
+ {
2099
+ "epoch": 14.410132689987938,
2100
+ "grad_norm": 1.3907504081726074,
2101
+ "learning_rate": 6.631484135123098e-05,
2102
+ "loss": 3.5893,
2103
+ "step": 5980
2104
+ },
2105
+ {
2106
+ "epoch": 14.4583835946924,
2107
+ "grad_norm": 1.3204799890518188,
2108
+ "learning_rate": 6.622138107174217e-05,
2109
+ "loss": 3.5953,
2110
+ "step": 6000
2111
+ },
2112
+ {
2113
+ "epoch": 14.506634499396863,
2114
+ "grad_norm": 1.3508288860321045,
2115
+ "learning_rate": 6.612767451170692e-05,
2116
+ "loss": 3.5938,
2117
+ "step": 6020
2118
+ },
2119
+ {
2120
+ "epoch": 14.554885404101327,
2121
+ "grad_norm": 1.40458345413208,
2122
+ "learning_rate": 6.603372264400713e-05,
2123
+ "loss": 3.5851,
2124
+ "step": 6040
2125
+ },
2126
+ {
2127
+ "epoch": 14.60313630880579,
2128
+ "grad_norm": 1.3633918762207031,
2129
+ "learning_rate": 6.593952644407158e-05,
2130
+ "loss": 3.6117,
2131
+ "step": 6060
2132
+ },
2133
+ {
2134
+ "epoch": 14.651387213510253,
2135
+ "grad_norm": 1.4325553178787231,
2136
+ "learning_rate": 6.584508688986575e-05,
2137
+ "loss": 3.5917,
2138
+ "step": 6080
2139
+ },
2140
+ {
2141
+ "epoch": 14.699638118214716,
2142
+ "grad_norm": 1.260093331336975,
2143
+ "learning_rate": 6.575040496188163e-05,
2144
+ "loss": 3.5851,
2145
+ "step": 6100
2146
+ },
2147
+ {
2148
+ "epoch": 14.74788902291918,
2149
+ "grad_norm": 1.743901252746582,
2150
+ "learning_rate": 6.565548164312765e-05,
2151
+ "loss": 3.6033,
2152
+ "step": 6120
2153
+ },
2154
+ {
2155
+ "epoch": 14.796139927623642,
2156
+ "grad_norm": 1.3253059387207031,
2157
+ "learning_rate": 6.556031791911839e-05,
2158
+ "loss": 3.5928,
2159
+ "step": 6140
2160
+ },
2161
+ {
2162
+ "epoch": 14.844390832328106,
2163
+ "grad_norm": 1.2875933647155762,
2164
+ "learning_rate": 6.546491477786435e-05,
2165
+ "loss": 3.607,
2166
+ "step": 6160
2167
+ },
2168
+ {
2169
+ "epoch": 14.89264173703257,
2170
+ "grad_norm": 1.2697594165802002,
2171
+ "learning_rate": 6.536927320986173e-05,
2172
+ "loss": 3.5927,
2173
+ "step": 6180
2174
+ },
2175
+ {
2176
+ "epoch": 14.940892641737033,
2177
+ "grad_norm": 1.3151894807815552,
2178
+ "learning_rate": 6.527339420808212e-05,
2179
+ "loss": 3.5879,
2180
+ "step": 6200
2181
+ },
2182
+ {
2183
+ "epoch": 14.989143546441495,
2184
+ "grad_norm": 1.3866534233093262,
2185
+ "learning_rate": 6.517727876796225e-05,
2186
+ "loss": 3.5928,
2187
+ "step": 6220
2188
+ },
2189
+ {
2190
+ "epoch": 15.036188178528347,
2191
+ "grad_norm": 1.3768857717514038,
2192
+ "learning_rate": 6.50809278873935e-05,
2193
+ "loss": 3.4879,
2194
+ "step": 6240
2195
+ },
2196
+ {
2197
+ "epoch": 15.08443908323281,
2198
+ "grad_norm": 1.3796144723892212,
2199
+ "learning_rate": 6.498434256671175e-05,
2200
+ "loss": 3.5718,
2201
+ "step": 6260
2202
+ },
2203
+ {
2204
+ "epoch": 15.132689987937274,
2205
+ "grad_norm": 1.4163405895233154,
2206
+ "learning_rate": 6.48875238086868e-05,
2207
+ "loss": 3.5679,
2208
+ "step": 6280
2209
+ },
2210
+ {
2211
+ "epoch": 15.180940892641736,
2212
+ "grad_norm": 1.3309345245361328,
2213
+ "learning_rate": 6.479047261851215e-05,
2214
+ "loss": 3.5643,
2215
+ "step": 6300
2216
+ },
2217
+ {
2218
+ "epoch": 15.2291917973462,
2219
+ "grad_norm": 1.40165114402771,
2220
+ "learning_rate": 6.469319000379433e-05,
2221
+ "loss": 3.5655,
2222
+ "step": 6320
2223
+ },
2224
+ {
2225
+ "epoch": 15.277442702050664,
2226
+ "grad_norm": 1.4025110006332397,
2227
+ "learning_rate": 6.459567697454268e-05,
2228
+ "loss": 3.5742,
2229
+ "step": 6340
2230
+ },
2231
+ {
2232
+ "epoch": 15.325693606755127,
2233
+ "grad_norm": 1.3048629760742188,
2234
+ "learning_rate": 6.449793454315872e-05,
2235
+ "loss": 3.5774,
2236
+ "step": 6360
2237
+ },
2238
+ {
2239
+ "epoch": 15.37394451145959,
2240
+ "grad_norm": 1.310195803642273,
2241
+ "learning_rate": 6.439996372442565e-05,
2242
+ "loss": 3.574,
2243
+ "step": 6380
2244
+ },
2245
+ {
2246
+ "epoch": 15.422195416164053,
2247
+ "grad_norm": 1.309246301651001,
2248
+ "learning_rate": 6.430176553549786e-05,
2249
+ "loss": 3.5787,
2250
+ "step": 6400
2251
+ },
2252
+ {
2253
+ "epoch": 15.470446320868517,
2254
+ "grad_norm": 1.3606518507003784,
2255
+ "learning_rate": 6.420334099589035e-05,
2256
+ "loss": 3.5779,
2257
+ "step": 6420
2258
+ },
2259
+ {
2260
+ "epoch": 15.51869722557298,
2261
+ "grad_norm": 1.409399151802063,
2262
+ "learning_rate": 6.410469112746813e-05,
2263
+ "loss": 3.5814,
2264
+ "step": 6440
2265
+ },
2266
+ {
2267
+ "epoch": 15.566948130277442,
2268
+ "grad_norm": 1.3965177536010742,
2269
+ "learning_rate": 6.400581695443561e-05,
2270
+ "loss": 3.5734,
2271
+ "step": 6460
2272
+ },
2273
+ {
2274
+ "epoch": 15.615199034981906,
2275
+ "grad_norm": 1.2852089405059814,
2276
+ "learning_rate": 6.390671950332601e-05,
2277
+ "loss": 3.5807,
2278
+ "step": 6480
2279
+ },
2280
+ {
2281
+ "epoch": 15.66344993968637,
2282
+ "grad_norm": 1.3534977436065674,
2283
+ "learning_rate": 6.380739980299069e-05,
2284
+ "loss": 3.5706,
2285
+ "step": 6500
2286
+ },
2287
+ {
2288
+ "epoch": 15.711700844390833,
2289
+ "grad_norm": 1.4299014806747437,
2290
+ "learning_rate": 6.370785888458836e-05,
2291
+ "loss": 3.5768,
2292
+ "step": 6520
2293
+ },
2294
+ {
2295
+ "epoch": 15.759951749095295,
2296
+ "grad_norm": 1.4451535940170288,
2297
+ "learning_rate": 6.360809778157455e-05,
2298
+ "loss": 3.5797,
2299
+ "step": 6540
2300
+ },
2301
+ {
2302
+ "epoch": 15.808202653799759,
2303
+ "grad_norm": 1.4238754510879517,
2304
+ "learning_rate": 6.350811752969078e-05,
2305
+ "loss": 3.5723,
2306
+ "step": 6560
2307
+ },
2308
+ {
2309
+ "epoch": 15.856453558504223,
2310
+ "grad_norm": 1.3943068981170654,
2311
+ "learning_rate": 6.340791916695377e-05,
2312
+ "loss": 3.5757,
2313
+ "step": 6580
2314
+ },
2315
+ {
2316
+ "epoch": 15.904704463208684,
2317
+ "grad_norm": 1.35558021068573,
2318
+ "learning_rate": 6.330750373364479e-05,
2319
+ "loss": 3.5837,
2320
+ "step": 6600
2321
+ },
2322
+ {
2323
+ "epoch": 15.952955367913148,
2324
+ "grad_norm": 1.3846176862716675,
2325
+ "learning_rate": 6.320687227229872e-05,
2326
+ "loss": 3.5802,
2327
+ "step": 6620
2328
+ },
2329
+ {
2330
+ "epoch": 16.0,
2331
+ "grad_norm": 0.8724824786186218,
2332
+ "learning_rate": 6.310602582769333e-05,
2333
+ "loss": 3.4885,
2334
+ "step": 6640
2335
+ },
2336
+ {
2337
+ "epoch": 16.048250904704464,
2338
+ "grad_norm": 1.4109805822372437,
2339
+ "learning_rate": 6.300496544683837e-05,
2340
+ "loss": 3.5573,
2341
+ "step": 6660
2342
+ },
2343
+ {
2344
+ "epoch": 16.096501809408927,
2345
+ "grad_norm": 1.4589406251907349,
2346
+ "learning_rate": 6.290369217896474e-05,
2347
+ "loss": 3.5555,
2348
+ "step": 6680
2349
+ },
2350
+ {
2351
+ "epoch": 16.14475271411339,
2352
+ "grad_norm": 1.4921449422836304,
2353
+ "learning_rate": 6.280220707551357e-05,
2354
+ "loss": 3.5622,
2355
+ "step": 6700
2356
+ },
2357
+ {
2358
+ "epoch": 16.19300361881785,
2359
+ "grad_norm": 1.3188154697418213,
2360
+ "learning_rate": 6.270051119012531e-05,
2361
+ "loss": 3.5639,
2362
+ "step": 6720
2363
+ },
2364
+ {
2365
+ "epoch": 16.241254523522315,
2366
+ "grad_norm": 1.3799383640289307,
2367
+ "learning_rate": 6.259860557862881e-05,
2368
+ "loss": 3.5612,
2369
+ "step": 6740
2370
+ },
2371
+ {
2372
+ "epoch": 16.28950542822678,
2373
+ "grad_norm": 1.3829104900360107,
2374
+ "learning_rate": 6.249649129903031e-05,
2375
+ "loss": 3.5535,
2376
+ "step": 6760
2377
+ },
2378
+ {
2379
+ "epoch": 16.337756332931242,
2380
+ "grad_norm": 1.3523606061935425,
2381
+ "learning_rate": 6.239416941150254e-05,
2382
+ "loss": 3.5576,
2383
+ "step": 6780
2384
+ },
2385
+ {
2386
+ "epoch": 16.386007237635706,
2387
+ "grad_norm": 1.4078025817871094,
2388
+ "learning_rate": 6.229164097837359e-05,
2389
+ "loss": 3.5574,
2390
+ "step": 6800
2391
+ },
2392
+ {
2393
+ "epoch": 16.43425814234017,
2394
+ "grad_norm": 1.3979679346084595,
2395
+ "learning_rate": 6.218890706411603e-05,
2396
+ "loss": 3.5553,
2397
+ "step": 6820
2398
+ },
2399
+ {
2400
+ "epoch": 16.482509047044633,
2401
+ "grad_norm": 1.26967453956604,
2402
+ "learning_rate": 6.20859687353357e-05,
2403
+ "loss": 3.5651,
2404
+ "step": 6840
2405
+ },
2406
+ {
2407
+ "epoch": 16.530759951749097,
2408
+ "grad_norm": 1.4097477197647095,
2409
+ "learning_rate": 6.198282706076078e-05,
2410
+ "loss": 3.5619,
2411
+ "step": 6860
2412
+ },
2413
+ {
2414
+ "epoch": 16.579010856453557,
2415
+ "grad_norm": 1.2989916801452637,
2416
+ "learning_rate": 6.187948311123062e-05,
2417
+ "loss": 3.5484,
2418
+ "step": 6880
2419
+ },
2420
+ {
2421
+ "epoch": 16.62726176115802,
2422
+ "grad_norm": 1.350377082824707,
2423
+ "learning_rate": 6.177593795968461e-05,
2424
+ "loss": 3.5572,
2425
+ "step": 6900
2426
+ },
2427
+ {
2428
+ "epoch": 16.675512665862485,
2429
+ "grad_norm": 1.4440314769744873,
2430
+ "learning_rate": 6.167219268115104e-05,
2431
+ "loss": 3.564,
2432
+ "step": 6920
2433
+ },
2434
+ {
2435
+ "epoch": 16.72376357056695,
2436
+ "grad_norm": 1.3149666786193848,
2437
+ "learning_rate": 6.156824835273603e-05,
2438
+ "loss": 3.555,
2439
+ "step": 6940
2440
+ },
2441
+ {
2442
+ "epoch": 16.772014475271412,
2443
+ "grad_norm": 1.3383102416992188,
2444
+ "learning_rate": 6.146410605361223e-05,
2445
+ "loss": 3.5576,
2446
+ "step": 6960
2447
+ },
2448
+ {
2449
+ "epoch": 16.820265379975876,
2450
+ "grad_norm": 1.42216157913208,
2451
+ "learning_rate": 6.13597668650077e-05,
2452
+ "loss": 3.5634,
2453
+ "step": 6980
2454
+ },
2455
+ {
2456
+ "epoch": 16.86851628468034,
2457
+ "grad_norm": 1.35435950756073,
2458
+ "learning_rate": 6.12552318701946e-05,
2459
+ "loss": 3.5587,
2460
+ "step": 7000
2461
+ },
2462
+ {
2463
+ "epoch": 16.9167671893848,
2464
+ "grad_norm": 1.289486050605774,
2465
+ "learning_rate": 6.115050215447806e-05,
2466
+ "loss": 3.5536,
2467
+ "step": 7020
2468
+ },
2469
+ {
2470
+ "epoch": 16.965018094089263,
2471
+ "grad_norm": 1.4501683712005615,
2472
+ "learning_rate": 6.104557880518474e-05,
2473
+ "loss": 3.559,
2474
+ "step": 7040
2475
+ },
2476
+ {
2477
+ "epoch": 17.012062726176115,
2478
+ "grad_norm": 1.373119592666626,
2479
+ "learning_rate": 6.094046291165176e-05,
2480
+ "loss": 3.4664,
2481
+ "step": 7060
2482
+ },
2483
+ {
2484
+ "epoch": 17.06031363088058,
2485
+ "grad_norm": 1.6421103477478027,
2486
+ "learning_rate": 6.083515556521524e-05,
2487
+ "loss": 3.5325,
2488
+ "step": 7080
2489
+ },
2490
+ {
2491
+ "epoch": 17.108564535585042,
2492
+ "grad_norm": 1.4322391748428345,
2493
+ "learning_rate": 6.072965785919897e-05,
2494
+ "loss": 3.5407,
2495
+ "step": 7100
2496
+ },
2497
+ {
2498
+ "epoch": 17.156815440289506,
2499
+ "grad_norm": 1.4210823774337769,
2500
+ "learning_rate": 6.0623970888903106e-05,
2501
+ "loss": 3.5373,
2502
+ "step": 7120
2503
+ },
2504
+ {
2505
+ "epoch": 17.20506634499397,
2506
+ "grad_norm": 1.5886317491531372,
2507
+ "learning_rate": 6.051809575159281e-05,
2508
+ "loss": 3.5331,
2509
+ "step": 7140
2510
+ },
2511
+ {
2512
+ "epoch": 17.253317249698433,
2513
+ "grad_norm": 1.288278341293335,
2514
+ "learning_rate": 6.0412033546486854e-05,
2515
+ "loss": 3.5386,
2516
+ "step": 7160
2517
+ },
2518
+ {
2519
+ "epoch": 17.301568154402894,
2520
+ "grad_norm": 1.4078155755996704,
2521
+ "learning_rate": 6.030578537474612e-05,
2522
+ "loss": 3.5414,
2523
+ "step": 7180
2524
+ },
2525
+ {
2526
+ "epoch": 17.349819059107357,
2527
+ "grad_norm": 1.3686829805374146,
2528
+ "learning_rate": 6.0199352339462305e-05,
2529
+ "loss": 3.55,
2530
+ "step": 7200
2531
+ },
2532
+ {
2533
+ "epoch": 17.39806996381182,
2534
+ "grad_norm": 1.3316738605499268,
2535
+ "learning_rate": 6.009273554564633e-05,
2536
+ "loss": 3.5456,
2537
+ "step": 7220
2538
+ },
2539
+ {
2540
+ "epoch": 17.446320868516285,
2541
+ "grad_norm": 1.3037840127944946,
2542
+ "learning_rate": 5.9985936100217025e-05,
2543
+ "loss": 3.5488,
2544
+ "step": 7240
2545
+ },
2546
+ {
2547
+ "epoch": 17.49457177322075,
2548
+ "grad_norm": 1.366502285003662,
2549
+ "learning_rate": 5.9878955111989476e-05,
2550
+ "loss": 3.5425,
2551
+ "step": 7260
2552
+ },
2553
+ {
2554
+ "epoch": 17.542822677925212,
2555
+ "grad_norm": 1.3863860368728638,
2556
+ "learning_rate": 5.9771793691663595e-05,
2557
+ "loss": 3.5475,
2558
+ "step": 7280
2559
+ },
2560
+ {
2561
+ "epoch": 17.591073582629676,
2562
+ "grad_norm": 1.3409532308578491,
2563
+ "learning_rate": 5.966445295181263e-05,
2564
+ "loss": 3.5434,
2565
+ "step": 7300
2566
+ },
2567
+ {
2568
+ "epoch": 17.639324487334136,
2569
+ "grad_norm": 1.3476046323776245,
2570
+ "learning_rate": 5.955693400687151e-05,
2571
+ "loss": 3.5325,
2572
+ "step": 7320
2573
+ },
2574
+ {
2575
+ "epoch": 17.6875753920386,
2576
+ "grad_norm": 1.3985397815704346,
2577
+ "learning_rate": 5.944923797312534e-05,
2578
+ "loss": 3.5361,
2579
+ "step": 7340
2580
+ },
2581
+ {
2582
+ "epoch": 17.735826296743063,
2583
+ "grad_norm": 1.3832253217697144,
2584
+ "learning_rate": 5.9341365968697824e-05,
2585
+ "loss": 3.5501,
2586
+ "step": 7360
2587
+ },
2588
+ {
2589
+ "epoch": 17.784077201447527,
2590
+ "grad_norm": 1.393438696861267,
2591
+ "learning_rate": 5.923331911353959e-05,
2592
+ "loss": 3.5441,
2593
+ "step": 7380
2594
+ },
2595
+ {
2596
+ "epoch": 17.83232810615199,
2597
+ "grad_norm": 1.393574595451355,
2598
+ "learning_rate": 5.912509852941665e-05,
2599
+ "loss": 3.5496,
2600
+ "step": 7400
2601
+ },
2602
+ {
2603
+ "epoch": 17.880579010856454,
2604
+ "grad_norm": 1.3118666410446167,
2605
+ "learning_rate": 5.901670533989868e-05,
2606
+ "loss": 3.5426,
2607
+ "step": 7420
2608
+ },
2609
+ {
2610
+ "epoch": 17.928829915560918,
2611
+ "grad_norm": 1.3365389108657837,
2612
+ "learning_rate": 5.890814067034738e-05,
2613
+ "loss": 3.5488,
2614
+ "step": 7440
2615
+ },
2616
+ {
2617
+ "epoch": 17.97708082026538,
2618
+ "grad_norm": 1.3257397413253784,
2619
+ "learning_rate": 5.879940564790481e-05,
2620
+ "loss": 3.5443,
2621
+ "step": 7460
2622
+ },
2623
+ {
2624
+ "epoch": 18.02412545235223,
2625
+ "grad_norm": 1.395566701889038,
2626
+ "learning_rate": 5.869050140148167e-05,
2627
+ "loss": 3.4322,
2628
+ "step": 7480
2629
+ },
2630
+ {
2631
+ "epoch": 18.072376357056694,
2632
+ "grad_norm": 1.4218413829803467,
2633
+ "learning_rate": 5.858142906174555e-05,
2634
+ "loss": 3.5145,
2635
+ "step": 7500
2636
+ },
2637
+ {
2638
+ "epoch": 18.120627261761157,
2639
+ "grad_norm": 1.4167686700820923,
2640
+ "learning_rate": 5.8472189761109284e-05,
2641
+ "loss": 3.5163,
2642
+ "step": 7520
2643
+ },
2644
+ {
2645
+ "epoch": 18.16887816646562,
2646
+ "grad_norm": 1.3514355421066284,
2647
+ "learning_rate": 5.836278463371905e-05,
2648
+ "loss": 3.5241,
2649
+ "step": 7540
2650
+ },
2651
+ {
2652
+ "epoch": 18.217129071170085,
2653
+ "grad_norm": 1.3722171783447266,
2654
+ "learning_rate": 5.825321481544275e-05,
2655
+ "loss": 3.5104,
2656
+ "step": 7560
2657
+ },
2658
+ {
2659
+ "epoch": 18.26537997587455,
2660
+ "grad_norm": 1.3387175798416138,
2661
+ "learning_rate": 5.8143481443858076e-05,
2662
+ "loss": 3.5205,
2663
+ "step": 7580
2664
+ },
2665
+ {
2666
+ "epoch": 18.313630880579012,
2667
+ "grad_norm": 1.3885008096694946,
2668
+ "learning_rate": 5.803358565824083e-05,
2669
+ "loss": 3.5208,
2670
+ "step": 7600
2671
+ },
2672
+ {
2673
+ "epoch": 18.361881785283472,
2674
+ "grad_norm": 1.3844337463378906,
2675
+ "learning_rate": 5.792352859955297e-05,
2676
+ "loss": 3.5277,
2677
+ "step": 7620
2678
+ },
2679
+ {
2680
+ "epoch": 18.410132689987936,
2681
+ "grad_norm": 1.3035504817962646,
2682
+ "learning_rate": 5.7813311410430886e-05,
2683
+ "loss": 3.5153,
2684
+ "step": 7640
2685
+ },
2686
+ {
2687
+ "epoch": 18.4583835946924,
2688
+ "grad_norm": 1.3567057847976685,
2689
+ "learning_rate": 5.770293523517344e-05,
2690
+ "loss": 3.528,
2691
+ "step": 7660
2692
+ },
2693
+ {
2694
+ "epoch": 18.506634499396863,
2695
+ "grad_norm": 1.4493130445480347,
2696
+ "learning_rate": 5.759240121973013e-05,
2697
+ "loss": 3.5343,
2698
+ "step": 7680
2699
+ },
2700
+ {
2701
+ "epoch": 18.554885404101327,
2702
+ "grad_norm": 1.5308748483657837,
2703
+ "learning_rate": 5.748171051168918e-05,
2704
+ "loss": 3.5371,
2705
+ "step": 7700
2706
+ },
2707
+ {
2708
+ "epoch": 18.60313630880579,
2709
+ "grad_norm": 1.3473739624023438,
2710
+ "learning_rate": 5.737086426026564e-05,
2711
+ "loss": 3.5279,
2712
+ "step": 7720
2713
+ },
2714
+ {
2715
+ "epoch": 18.651387213510255,
2716
+ "grad_norm": 1.3217538595199585,
2717
+ "learning_rate": 5.7259863616289445e-05,
2718
+ "loss": 3.5252,
2719
+ "step": 7740
2720
+ },
2721
+ {
2722
+ "epoch": 18.699638118214718,
2723
+ "grad_norm": 1.4121325016021729,
2724
+ "learning_rate": 5.7148709732193476e-05,
2725
+ "loss": 3.5263,
2726
+ "step": 7760
2727
+ },
2728
+ {
2729
+ "epoch": 18.74788902291918,
2730
+ "grad_norm": 1.3479198217391968,
2731
+ "learning_rate": 5.703740376200155e-05,
2732
+ "loss": 3.5279,
2733
+ "step": 7780
2734
+ },
2735
+ {
2736
+ "epoch": 18.796139927623642,
2737
+ "grad_norm": 1.4055489301681519,
2738
+ "learning_rate": 5.692594686131652e-05,
2739
+ "loss": 3.5325,
2740
+ "step": 7800
2741
+ },
2742
+ {
2743
+ "epoch": 18.844390832328106,
2744
+ "grad_norm": 1.3184000253677368,
2745
+ "learning_rate": 5.6814340187308196e-05,
2746
+ "loss": 3.5216,
2747
+ "step": 7820
2748
+ },
2749
+ {
2750
+ "epoch": 18.89264173703257,
2751
+ "grad_norm": 1.3946672677993774,
2752
+ "learning_rate": 5.67025848987014e-05,
2753
+ "loss": 3.5228,
2754
+ "step": 7840
2755
+ },
2756
+ {
2757
+ "epoch": 18.940892641737033,
2758
+ "grad_norm": 1.3775883913040161,
2759
+ "learning_rate": 5.659068215576387e-05,
2760
+ "loss": 3.5286,
2761
+ "step": 7860
2762
+ },
2763
+ {
2764
+ "epoch": 18.989143546441497,
2765
+ "grad_norm": 1.3173959255218506,
2766
+ "learning_rate": 5.6478633120294286e-05,
2767
+ "loss": 3.5346,
2768
+ "step": 7880
2769
+ },
2770
+ {
2771
+ "epoch": 19.03618817852835,
2772
+ "grad_norm": 1.4057427644729614,
2773
+ "learning_rate": 5.636643895561011e-05,
2774
+ "loss": 3.4236,
2775
+ "step": 7900
2776
+ },
2777
+ {
2778
+ "epoch": 19.084439083232812,
2779
+ "grad_norm": 1.3350149393081665,
2780
+ "learning_rate": 5.625410082653563e-05,
2781
+ "loss": 3.5004,
2782
+ "step": 7920
2783
+ },
2784
+ {
2785
+ "epoch": 19.132689987937272,
2786
+ "grad_norm": 1.379685878753662,
2787
+ "learning_rate": 5.614161989938978e-05,
2788
+ "loss": 3.5056,
2789
+ "step": 7940
2790
+ },
2791
+ {
2792
+ "epoch": 19.180940892641736,
2793
+ "grad_norm": 1.4622100591659546,
2794
+ "learning_rate": 5.602899734197404e-05,
2795
+ "loss": 3.4999,
2796
+ "step": 7960
2797
+ },
2798
+ {
2799
+ "epoch": 19.2291917973462,
2800
+ "grad_norm": 1.4866379499435425,
2801
+ "learning_rate": 5.5916234323560336e-05,
2802
+ "loss": 3.5043,
2803
+ "step": 7980
2804
+ },
2805
+ {
2806
+ "epoch": 19.277442702050664,
2807
+ "grad_norm": 1.3342175483703613,
2808
+ "learning_rate": 5.58033320148789e-05,
2809
+ "loss": 3.4965,
2810
+ "step": 8000
2811
+ }
2812
+ ],
2813
+ "logging_steps": 20,
2814
+ "max_steps": 20000,
2815
+ "num_input_tokens_seen": 0,
2816
+ "num_train_epochs": 49,
2817
+ "save_steps": 4000,
2818
+ "stateful_callbacks": {
2819
+ "TrainerControl": {
2820
+ "args": {
2821
+ "should_epoch_stop": false,
2822
+ "should_evaluate": false,
2823
+ "should_log": false,
2824
+ "should_save": true,
2825
+ "should_training_stop": false
2826
+ },
2827
+ "attributes": {}
2828
+ }
2829
+ },
2830
+ "total_flos": 1.1393355542767757e+20,
2831
+ "train_batch_size": 16,
2832
+ "trial_name": null,
2833
+ "trial_params": null
2834
+ }
logs/UNIVLA_SIMPLERENV_BRIDGE_VIDEO_BS128_20k/checkpoint-8000/zero_to_fp32.py ADDED
@@ -0,0 +1,760 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ #!/usr/bin/env python
2
+
3
+ # Copyright (c) Microsoft Corporation.
4
+ # SPDX-License-Identifier: Apache-2.0
5
+
6
+ # DeepSpeed Team
7
+
8
+ # This script extracts fp32 consolidated weights from a zero 1, 2 and 3 DeepSpeed checkpoints. It gets
9
+ # copied into the top level checkpoint dir, so the user can easily do the conversion at any point in
10
+ # the future. Once extracted, the weights don't require DeepSpeed and can be used in any
11
+ # application.
12
+ #
13
+ # example:
14
+ # python zero_to_fp32.py . output_dir/
15
+ # or
16
+ # python zero_to_fp32.py . output_dir/ --safe_serialization
17
+
18
+ import argparse
19
+ import torch
20
+ import glob
21
+ import math
22
+ import os
23
+ import re
24
+ import gc
25
+ import json
26
+ import numpy as np
27
+ from tqdm import tqdm
28
+ from collections import OrderedDict
29
+ from dataclasses import dataclass
30
+
31
+ # while this script doesn't use deepspeed to recover data, since the checkpoints are pickled with
32
+ # DeepSpeed data structures it has to be available in the current python environment.
33
+ from deepspeed.utils import logger
34
+ from deepspeed.checkpoint.constants import (DS_VERSION, OPTIMIZER_STATE_DICT, SINGLE_PARTITION_OF_FP32_GROUPS,
35
+ FP32_FLAT_GROUPS, ZERO_STAGE, PARTITION_COUNT, PARAM_SHAPES, BUFFER_NAMES,
36
+ FROZEN_PARAM_SHAPES, FROZEN_PARAM_FRAGMENTS)
37
+
38
+
39
+ @dataclass
40
+ class zero_model_state:
41
+ buffers: dict()
42
+ param_shapes: dict()
43
+ shared_params: list
44
+ ds_version: int
45
+ frozen_param_shapes: dict()
46
+ frozen_param_fragments: dict()
47
+
48
+
49
+ debug = 0
50
+
51
+ # load to cpu
52
+ device = torch.device('cpu')
53
+
54
+
55
+ def atoi(text):
56
+ return int(text) if text.isdigit() else text
57
+
58
+
59
+ def natural_keys(text):
60
+ '''
61
+ alist.sort(key=natural_keys) sorts in human order
62
+ http://nedbatchelder.com/blog/200712/human_sorting.html
63
+ (See Toothy's implementation in the comments)
64
+ '''
65
+ return [atoi(c) for c in re.split(r'(\d+)', text)]
66
+
67
+
68
+ def get_model_state_file(checkpoint_dir, zero_stage):
69
+ if not os.path.isdir(checkpoint_dir):
70
+ raise FileNotFoundError(f"Directory '{checkpoint_dir}' doesn't exist")
71
+
72
+ # there should be only one file
73
+ if zero_stage <= 2:
74
+ file = os.path.join(checkpoint_dir, "mp_rank_00_model_states.pt")
75
+ elif zero_stage == 3:
76
+ file = os.path.join(checkpoint_dir, "zero_pp_rank_0_mp_rank_00_model_states.pt")
77
+
78
+ if not os.path.exists(file):
79
+ raise FileNotFoundError(f"can't find model states file at '{file}'")
80
+
81
+ return file
82
+
83
+
84
+ def get_checkpoint_files(checkpoint_dir, glob_pattern):
85
+ # XXX: need to test that this simple glob rule works for multi-node setup too
86
+ ckpt_files = sorted(glob.glob(os.path.join(checkpoint_dir, glob_pattern)), key=natural_keys)
87
+
88
+ if len(ckpt_files) == 0:
89
+ raise FileNotFoundError(f"can't find {glob_pattern} files in directory '{checkpoint_dir}'")
90
+
91
+ return ckpt_files
92
+
93
+
94
+ def get_optim_files(checkpoint_dir):
95
+ return get_checkpoint_files(checkpoint_dir, "*_optim_states.pt")
96
+
97
+
98
+ def get_model_state_files(checkpoint_dir):
99
+ return get_checkpoint_files(checkpoint_dir, "*_model_states.pt")
100
+
101
+
102
+ def parse_model_states(files):
103
+ zero_model_states = []
104
+ for file in files:
105
+ state_dict = torch.load(file, map_location=device, weights_only=False)
106
+
107
+ if BUFFER_NAMES not in state_dict:
108
+ raise ValueError(f"{file} is not a model state checkpoint")
109
+ buffer_names = state_dict[BUFFER_NAMES]
110
+ if debug:
111
+ print("Found buffers:", buffer_names)
112
+
113
+ # recover just the buffers while restoring them to fp32 if they were saved in fp16
114
+ buffers = {k: v.float() for k, v in state_dict["module"].items() if k in buffer_names}
115
+ param_shapes = state_dict[PARAM_SHAPES]
116
+
117
+ # collect parameters that are included in param_shapes
118
+ param_names = []
119
+ for s in param_shapes:
120
+ for name in s.keys():
121
+ param_names.append(name)
122
+
123
+ # update with frozen parameters
124
+ frozen_param_shapes = state_dict.get(FROZEN_PARAM_SHAPES, None)
125
+ if frozen_param_shapes is not None:
126
+ if debug:
127
+ print(f"Found frozen_param_shapes: {frozen_param_shapes}")
128
+ param_names += list(frozen_param_shapes.keys())
129
+
130
+ # handle shared params
131
+ shared_params = [[k, v] for k, v in state_dict["shared_params"].items()]
132
+
133
+ ds_version = state_dict.get(DS_VERSION, None)
134
+
135
+ frozen_param_fragments = state_dict.get(FROZEN_PARAM_FRAGMENTS, None)
136
+
137
+ z_model_state = zero_model_state(buffers=buffers,
138
+ param_shapes=param_shapes,
139
+ shared_params=shared_params,
140
+ ds_version=ds_version,
141
+ frozen_param_shapes=frozen_param_shapes,
142
+ frozen_param_fragments=frozen_param_fragments)
143
+ zero_model_states.append(z_model_state)
144
+
145
+ return zero_model_states
146
+
147
+
148
+ def parse_optim_states(files, ds_checkpoint_dir):
149
+ total_files = len(files)
150
+ state_dicts = []
151
+ for f in tqdm(files, desc='Loading checkpoint shards'):
152
+ state_dict = torch.load(f, map_location=device, mmap=True, weights_only=False)
153
+ # immediately discard the potentially huge 2 optimizer states as we only care for fp32 master weights
154
+ # and also handle the case where it was already removed by another helper script
155
+ state_dict["optimizer_state_dict"].pop("optimizer_state_dict", None)
156
+ state_dicts.append(state_dict)
157
+
158
+ if ZERO_STAGE not in state_dicts[0][OPTIMIZER_STATE_DICT]:
159
+ raise ValueError(f"{files[0]} is not a zero checkpoint")
160
+ zero_stage = state_dicts[0][OPTIMIZER_STATE_DICT][ZERO_STAGE]
161
+ world_size = state_dicts[0][OPTIMIZER_STATE_DICT][PARTITION_COUNT]
162
+
163
+ # For ZeRO-2 each param group can have different partition_count as data parallelism for expert
164
+ # parameters can be different from data parallelism for non-expert parameters. So we can just
165
+ # use the max of the partition_count to get the dp world_size.
166
+
167
+ if type(world_size) is list:
168
+ world_size = max(world_size)
169
+
170
+ if world_size != total_files:
171
+ raise ValueError(
172
+ f"Expected {world_size} of '*_optim_states.pt' under '{ds_checkpoint_dir}' but found {total_files} files. "
173
+ "Possibly due to an overwrite of an old checkpoint, or a checkpoint didn't get saved by one or more processes."
174
+ )
175
+
176
+ # the groups are named differently in each stage
177
+ if zero_stage <= 2:
178
+ fp32_groups_key = SINGLE_PARTITION_OF_FP32_GROUPS
179
+ elif zero_stage == 3:
180
+ fp32_groups_key = FP32_FLAT_GROUPS
181
+ else:
182
+ raise ValueError(f"unknown zero stage {zero_stage}")
183
+
184
+ fp32_flat_groups = [state_dicts[i][OPTIMIZER_STATE_DICT][fp32_groups_key] for i in range(len(state_dicts))]
185
+ return zero_stage, world_size, fp32_flat_groups
186
+
187
+
188
+ def _get_fp32_state_dict_from_zero_checkpoint(ds_checkpoint_dir, exclude_frozen_parameters):
189
+ """
190
+ Returns fp32 state_dict reconstructed from ds checkpoint
191
+
192
+ Args:
193
+ - ``ds_checkpoint_dir``: path to the deepspeed checkpoint folder (where the optimizer files are)
194
+
195
+ """
196
+ print(f"Processing zero checkpoint '{ds_checkpoint_dir}'")
197
+
198
+ optim_files = get_optim_files(ds_checkpoint_dir)
199
+ zero_stage, world_size, fp32_flat_groups = parse_optim_states(optim_files, ds_checkpoint_dir)
200
+ print(f"Detected checkpoint of type zero stage {zero_stage}, world_size: {world_size}")
201
+
202
+ model_files = get_model_state_files(ds_checkpoint_dir)
203
+
204
+ zero_model_states = parse_model_states(model_files)
205
+ print(f'Parsing checkpoint created by deepspeed=={zero_model_states[0].ds_version}')
206
+
207
+ if zero_stage <= 2:
208
+ return _get_fp32_state_dict_from_zero2_checkpoint(world_size, fp32_flat_groups, zero_model_states,
209
+ exclude_frozen_parameters)
210
+ elif zero_stage == 3:
211
+ return _get_fp32_state_dict_from_zero3_checkpoint(world_size, fp32_flat_groups, zero_model_states,
212
+ exclude_frozen_parameters)
213
+
214
+
215
+ def _zero2_merge_frozen_params(state_dict, zero_model_states):
216
+ if zero_model_states[0].frozen_param_shapes is None or len(zero_model_states[0].frozen_param_shapes) == 0:
217
+ return
218
+
219
+ frozen_param_shapes = zero_model_states[0].frozen_param_shapes
220
+ frozen_param_fragments = zero_model_states[0].frozen_param_fragments
221
+
222
+ if debug:
223
+ num_elem = sum(s.numel() for s in frozen_param_shapes.values())
224
+ print(f'rank 0: {FROZEN_PARAM_SHAPES}.numel = {num_elem}')
225
+
226
+ wanted_params = len(frozen_param_shapes)
227
+ wanted_numel = sum(s.numel() for s in frozen_param_shapes.values())
228
+ avail_numel = sum([p.numel() for p in frozen_param_fragments.values()])
229
+ print(f'Frozen params: Have {avail_numel} numels to process.')
230
+ print(f'Frozen params: Need {wanted_numel} numels in {wanted_params} params')
231
+
232
+ total_params = 0
233
+ total_numel = 0
234
+ for name, shape in frozen_param_shapes.items():
235
+ total_params += 1
236
+ unpartitioned_numel = shape.numel()
237
+ total_numel += unpartitioned_numel
238
+
239
+ state_dict[name] = frozen_param_fragments[name]
240
+
241
+ if debug:
242
+ print(f"{name} full shape: {shape} unpartitioned numel {unpartitioned_numel} ")
243
+
244
+ print(f"Reconstructed Frozen fp32 state dict with {total_params} params {total_numel} elements")
245
+
246
+
247
+ def _has_callable(obj, fn):
248
+ attr = getattr(obj, fn, None)
249
+ return callable(attr)
250
+
251
+
252
+ def _zero2_merge_trainable_params(state_dict, world_size, fp32_flat_groups, zero_model_states):
253
+ param_shapes = zero_model_states[0].param_shapes
254
+
255
+ # Reconstruction protocol:
256
+ #
257
+ # XXX: document this
258
+
259
+ if debug:
260
+ for i in range(world_size):
261
+ for j in range(len(fp32_flat_groups[0])):
262
+ print(f"{FP32_FLAT_GROUPS}[{i}][{j}].shape={fp32_flat_groups[i][j].shape}")
263
+
264
+ # XXX: memory usage doubles here (zero2)
265
+ num_param_groups = len(fp32_flat_groups[0])
266
+ merged_single_partition_of_fp32_groups = []
267
+ for i in range(num_param_groups):
268
+ merged_partitions = [sd[i] for sd in fp32_flat_groups]
269
+ full_single_fp32_vector = torch.cat(merged_partitions, 0)
270
+ merged_single_partition_of_fp32_groups.append(full_single_fp32_vector)
271
+ avail_numel = sum(
272
+ [full_single_fp32_vector.numel() for full_single_fp32_vector in merged_single_partition_of_fp32_groups])
273
+
274
+ if debug:
275
+ wanted_params = sum([len(shapes) for shapes in param_shapes])
276
+ wanted_numel = sum([sum(shape.numel() for shape in shapes.values()) for shapes in param_shapes])
277
+ # not asserting if there is a mismatch due to possible padding
278
+ print(f"Have {avail_numel} numels to process.")
279
+ print(f"Need {wanted_numel} numels in {wanted_params} params.")
280
+
281
+ # params
282
+ # XXX: for huge models that can't fit into the host's RAM we will have to recode this to support
283
+ # out-of-core computing solution
284
+ total_numel = 0
285
+ total_params = 0
286
+ for shapes, full_single_fp32_vector in zip(param_shapes, merged_single_partition_of_fp32_groups):
287
+ offset = 0
288
+ avail_numel = full_single_fp32_vector.numel()
289
+ for name, shape in shapes.items():
290
+
291
+ unpartitioned_numel = shape.numel() if _has_callable(shape, 'numel') else math.prod(shape)
292
+ total_numel += unpartitioned_numel
293
+ total_params += 1
294
+
295
+ if debug:
296
+ print(f"{name} full shape: {shape} unpartitioned numel {unpartitioned_numel} ")
297
+ state_dict[name] = full_single_fp32_vector.narrow(0, offset, unpartitioned_numel).view(shape)
298
+ offset += unpartitioned_numel
299
+
300
+ # Z2 started to align to 2*world_size to improve nccl performance. Therefore both offset and
301
+ # avail_numel can differ by anywhere between 0..2*world_size. Due to two unrelated complex
302
+ # paddings performed in the code it's almost impossible to predict the exact numbers w/o the
303
+ # live optimizer object, so we are checking that the numbers are within the right range
304
+ align_to = 2 * world_size
305
+
306
+ def zero2_align(x):
307
+ return align_to * math.ceil(x / align_to)
308
+
309
+ if debug:
310
+ print(f"original offset={offset}, avail_numel={avail_numel}")
311
+
312
+ offset = zero2_align(offset)
313
+ avail_numel = zero2_align(avail_numel)
314
+
315
+ if debug:
316
+ print(f"aligned offset={offset}, avail_numel={avail_numel}")
317
+
318
+ # Sanity check
319
+ if offset != avail_numel:
320
+ raise ValueError(f"consumed {offset} numels out of {avail_numel} - something is wrong")
321
+
322
+ print(f"Reconstructed fp32 state dict with {total_params} params {total_numel} elements")
323
+
324
+
325
+ def _get_fp32_state_dict_from_zero2_checkpoint(world_size, fp32_flat_groups, zero_model_states,
326
+ exclude_frozen_parameters):
327
+ state_dict = OrderedDict()
328
+
329
+ # buffers
330
+ buffers = zero_model_states[0].buffers
331
+ state_dict.update(buffers)
332
+ if debug:
333
+ print(f"added {len(buffers)} buffers")
334
+
335
+ if not exclude_frozen_parameters:
336
+ _zero2_merge_frozen_params(state_dict, zero_model_states)
337
+
338
+ _zero2_merge_trainable_params(state_dict, world_size, fp32_flat_groups, zero_model_states)
339
+
340
+ # recover shared parameters
341
+ for pair in zero_model_states[0].shared_params:
342
+ if pair[1] in state_dict:
343
+ state_dict[pair[0]] = state_dict[pair[1]]
344
+
345
+ return state_dict
346
+
347
+
348
+ def zero3_partitioned_param_info(unpartitioned_numel, world_size):
349
+ remainder = unpartitioned_numel % world_size
350
+ padding_numel = (world_size - remainder) if remainder else 0
351
+ partitioned_numel = math.ceil(unpartitioned_numel / world_size)
352
+ return partitioned_numel, padding_numel
353
+
354
+
355
+ def _zero3_merge_frozen_params(state_dict, world_size, zero_model_states):
356
+ if zero_model_states[0].frozen_param_shapes is None or len(zero_model_states[0].frozen_param_shapes) == 0:
357
+ return
358
+
359
+ if debug:
360
+ for i in range(world_size):
361
+ num_elem = sum(s.numel() for s in zero_model_states[i].frozen_param_fragments.values())
362
+ print(f'rank {i}: {FROZEN_PARAM_SHAPES}.numel = {num_elem}')
363
+
364
+ frozen_param_shapes = zero_model_states[0].frozen_param_shapes
365
+ wanted_params = len(frozen_param_shapes)
366
+ wanted_numel = sum(s.numel() for s in frozen_param_shapes.values())
367
+ avail_numel = sum([p.numel() for p in zero_model_states[0].frozen_param_fragments.values()]) * world_size
368
+ print(f'Frozen params: Have {avail_numel} numels to process.')
369
+ print(f'Frozen params: Need {wanted_numel} numels in {wanted_params} params')
370
+
371
+ total_params = 0
372
+ total_numel = 0
373
+ for name, shape in zero_model_states[0].frozen_param_shapes.items():
374
+ total_params += 1
375
+ unpartitioned_numel = shape.numel()
376
+ total_numel += unpartitioned_numel
377
+
378
+ param_frags = tuple(model_state.frozen_param_fragments[name] for model_state in zero_model_states)
379
+ state_dict[name] = torch.cat(param_frags, 0).narrow(0, 0, unpartitioned_numel).view(shape)
380
+
381
+ partitioned_numel, partitioned_padding_numel = zero3_partitioned_param_info(unpartitioned_numel, world_size)
382
+
383
+ if debug:
384
+ print(
385
+ f"Frozen params: {total_params} {name} full shape: {shape} partition0 numel={partitioned_numel} partitioned_padding_numel={partitioned_padding_numel}"
386
+ )
387
+
388
+ print(f"Reconstructed Frozen fp32 state dict with {total_params} params {total_numel} elements")
389
+
390
+
391
+ class GatheredTensor:
392
+ """
393
+ A pseudo tensor that collects partitioned weights.
394
+ It is more memory efficient when there are multiple groups.
395
+ """
396
+
397
+ def __init__(self, flat_groups, flat_groups_offset, offset, partitioned_numel, shape):
398
+ self.flat_groups = flat_groups
399
+ self.flat_groups_offset = flat_groups_offset
400
+ self.offset = offset
401
+ self.partitioned_numel = partitioned_numel
402
+ self.shape = shape
403
+ self.dtype = self.flat_groups[0][0].dtype
404
+
405
+ def contiguous(self):
406
+ """
407
+ Merge partitioned weights from flat_groups into a single tensor.
408
+ """
409
+ end_idx = self.offset + self.partitioned_numel
410
+ world_size = len(self.flat_groups)
411
+ pad_flat_param_chunks = []
412
+
413
+ for rank_i in range(world_size):
414
+ # for each rank, we need to collect weights from related group/groups
415
+ flat_groups_at_rank_i = self.flat_groups[rank_i]
416
+ start_group_id = None
417
+ end_group_id = None
418
+ for group_id in range(len(self.flat_groups_offset)):
419
+ if self.flat_groups_offset[group_id] <= self.offset < self.flat_groups_offset[group_id + 1]:
420
+ start_group_id = group_id
421
+ if self.flat_groups_offset[group_id] < end_idx <= self.flat_groups_offset[group_id + 1]:
422
+ end_group_id = group_id
423
+ break
424
+ # collect weights from related group/groups
425
+ for group_id in range(start_group_id, end_group_id + 1):
426
+ flat_tensor = flat_groups_at_rank_i[group_id]
427
+ start_offset = self.offset - self.flat_groups_offset[group_id]
428
+ end_offset = min(end_idx, self.flat_groups_offset[group_id + 1]) - self.flat_groups_offset[group_id]
429
+ pad_flat_param_chunks.append(flat_tensor[start_offset:end_offset])
430
+
431
+ # collect weights from all ranks
432
+ pad_flat_param = torch.cat(pad_flat_param_chunks, dim=0)
433
+ param = pad_flat_param[:self.shape.numel()].view(self.shape).contiguous()
434
+ return param
435
+
436
+
437
+ def _zero3_merge_trainable_params(state_dict, world_size, fp32_flat_groups, zero_model_states):
438
+ param_shapes = zero_model_states[0].param_shapes
439
+ avail_numel = sum([flat_group.numel() for flat_group in fp32_flat_groups[0]]) * world_size
440
+
441
+ # Reconstruction protocol: For zero3 we need to zip the partitions together at boundary of each
442
+ # param, re-consolidating each param, while dealing with padding if any
443
+
444
+ # merge list of dicts, preserving order
445
+ param_shapes = {k: v for d in param_shapes for k, v in d.items()}
446
+
447
+ if debug:
448
+ for i in range(world_size):
449
+ print(f"{FP32_FLAT_GROUPS}[{i}].shape={fp32_flat_groups[i].shape}")
450
+
451
+ wanted_params = len(param_shapes)
452
+ wanted_numel = sum(shape.numel() for shape in param_shapes.values())
453
+ # not asserting if there is a mismatch due to possible padding
454
+ avail_numel = fp32_flat_groups[0].numel() * world_size
455
+ print(f"Trainable params: Have {avail_numel} numels to process.")
456
+ print(f"Trainable params: Need {wanted_numel} numels in {wanted_params} params.")
457
+
458
+ # params
459
+ # XXX: for huge models that can't fit into the host's RAM we will have to recode this to support
460
+ # out-of-core computing solution
461
+ offset = 0
462
+ total_numel = 0
463
+ total_params = 0
464
+ flat_groups_offset = [0] + list(np.cumsum([flat_tensor.numel() for flat_tensor in fp32_flat_groups[0]]))
465
+ for name, shape in tqdm(param_shapes.items(), desc='Gathering sharded weights'):
466
+ unpartitioned_numel = shape.numel()
467
+ total_numel += unpartitioned_numel
468
+ total_params += 1
469
+ partitioned_numel, partitioned_padding_numel = zero3_partitioned_param_info(unpartitioned_numel, world_size)
470
+
471
+ if debug:
472
+ print(
473
+ f"Trainable params: {total_params} {name} full shape: {shape} partition0 numel={partitioned_numel} partitioned_padding_numel={partitioned_padding_numel}"
474
+ )
475
+
476
+ # memory efficient tensor
477
+ tensor = GatheredTensor(fp32_flat_groups, flat_groups_offset, offset, partitioned_numel, shape)
478
+ state_dict[name] = tensor
479
+ offset += partitioned_numel
480
+
481
+ offset *= world_size
482
+
483
+ # Sanity check
484
+ if offset != avail_numel:
485
+ raise ValueError(f"consumed {offset} numels out of {avail_numel} - something is wrong")
486
+
487
+ print(f"Reconstructed Trainable fp32 state dict with {total_params} params {total_numel} elements")
488
+
489
+
490
+ def _get_fp32_state_dict_from_zero3_checkpoint(world_size, fp32_flat_groups, zero_model_states,
491
+ exclude_frozen_parameters):
492
+ state_dict = OrderedDict()
493
+
494
+ # buffers
495
+ buffers = zero_model_states[0].buffers
496
+ state_dict.update(buffers)
497
+ if debug:
498
+ print(f"added {len(buffers)} buffers")
499
+
500
+ if not exclude_frozen_parameters:
501
+ _zero3_merge_frozen_params(state_dict, world_size, zero_model_states)
502
+
503
+ _zero3_merge_trainable_params(state_dict, world_size, fp32_flat_groups, zero_model_states)
504
+
505
+ # recover shared parameters
506
+ for pair in zero_model_states[0].shared_params:
507
+ if pair[1] in state_dict:
508
+ state_dict[pair[0]] = state_dict[pair[1]]
509
+
510
+ return state_dict
511
+
512
+
513
+ def to_torch_tensor(state_dict, return_empty_tensor=False):
514
+ """
515
+ Convert state_dict of GatheredTensor to torch tensor
516
+ """
517
+ torch_state_dict = {}
518
+ converted_tensors = {}
519
+ for name, tensor in state_dict.items():
520
+ tensor_id = id(tensor)
521
+ if tensor_id in converted_tensors: # shared tensors
522
+ shared_tensor = torch_state_dict[converted_tensors[tensor_id]]
523
+ torch_state_dict[name] = shared_tensor
524
+ else:
525
+ converted_tensors[tensor_id] = name
526
+ if return_empty_tensor:
527
+ torch_state_dict[name] = torch.empty(tensor.shape, dtype=tensor.dtype)
528
+ else:
529
+ torch_state_dict[name] = tensor.contiguous()
530
+ return torch_state_dict
531
+
532
+
533
+ def get_fp32_state_dict_from_zero_checkpoint(checkpoint_dir,
534
+ tag=None,
535
+ exclude_frozen_parameters=False,
536
+ lazy_mode=False):
537
+ """
538
+ Convert ZeRO 2 or 3 checkpoint into a single fp32 consolidated state_dict that can be loaded with
539
+ ``load_state_dict()`` and used for training without DeepSpeed or shared with others, for example
540
+ via a model hub.
541
+
542
+ Args:
543
+ - ``checkpoint_dir``: path to the desired checkpoint folder
544
+ - ``tag``: checkpoint tag used as a unique identifier for checkpoint. If not provided will attempt to load tag in 'latest' file. e.g., ``global_step14``
545
+ - ``exclude_frozen_parameters``: exclude frozen parameters
546
+ - ``lazy_mode``: get state_dict in lazy mode. It returns a dict of pesduo tensor instead of torch tensor, which is more memory efficient.
547
+ Convert the pesduo tensor to torch tensor by ``.contiguous()``
548
+
549
+ Returns:
550
+ - pytorch ``state_dict``
551
+
552
+ A typical usage might be ::
553
+
554
+ from deepspeed.utils.zero_to_fp32 import get_fp32_state_dict_from_zero_checkpoint
555
+ # do the training and checkpoint saving
556
+ state_dict = get_fp32_state_dict_from_zero_checkpoint(checkpoint_dir) # already on cpu
557
+ model = model.cpu() # move to cpu
558
+ model.load_state_dict(state_dict)
559
+ # submit to model hub or save the model to share with others
560
+
561
+ In this example the ``model`` will no longer be usable in the deepspeed context of the same
562
+ application. i.e. you will need to re-initialize the deepspeed engine, since
563
+ ``model.load_state_dict(state_dict)`` will remove all the deepspeed magic from it.
564
+
565
+ If you want it all done for you, use ``load_state_dict_from_zero_checkpoint`` instead.
566
+
567
+ Note: the above usage may not work if your application doesn't have sufficient free CPU memory.
568
+ You may need to use the offline approach using the ``zero_to_fp32.py`` script that is saved with
569
+ the checkpoint. Or you can load state_dict in lazy mode ::
570
+
571
+ from deepspeed.utils.zero_to_fp32 import get_fp32_state_dict_from_zero_checkpoint
572
+ state_dict = get_fp32_state_dict_from_zero_checkpoint(checkpoint_dir, lazy_mode=True) # not on cpu
573
+ for name, lazy_tensor in state_dict.item():
574
+ tensor = lazy_tensor.contiguous() # to cpu
575
+ print(name, tensor)
576
+ # del tensor to release memory if it no longer in use
577
+ """
578
+ if tag is None:
579
+ latest_path = os.path.join(checkpoint_dir, 'latest')
580
+ if os.path.isfile(latest_path):
581
+ with open(latest_path, 'r') as fd:
582
+ tag = fd.read().strip()
583
+ else:
584
+ raise ValueError(f"Unable to find 'latest' file at {latest_path}")
585
+
586
+ ds_checkpoint_dir = os.path.join(checkpoint_dir, tag)
587
+
588
+ if not os.path.isdir(ds_checkpoint_dir):
589
+ raise FileNotFoundError(f"Directory '{ds_checkpoint_dir}' doesn't exist")
590
+
591
+ state_dict = _get_fp32_state_dict_from_zero_checkpoint(ds_checkpoint_dir, exclude_frozen_parameters)
592
+ if lazy_mode:
593
+ return state_dict
594
+ else:
595
+ return to_torch_tensor(state_dict)
596
+
597
+
598
+ def convert_zero_checkpoint_to_fp32_state_dict(checkpoint_dir,
599
+ output_dir,
600
+ max_shard_size="5GB",
601
+ safe_serialization=False,
602
+ tag=None,
603
+ exclude_frozen_parameters=False):
604
+ """
605
+ Convert ZeRO 2 or 3 checkpoint into a single fp32 consolidated ``state_dict`` file that can be
606
+ loaded with ``torch.load(file)`` + ``load_state_dict()`` and used for training without DeepSpeed.
607
+
608
+ Args:
609
+ - ``checkpoint_dir``: path to the desired checkpoint folder. (one that contains the tag-folder, like ``global_step14``)
610
+ - ``output_dir``: directory to the pytorch fp32 state_dict output files
611
+ - ``max_shard_size``: the maximum size for a checkpoint before being sharded, default value is 5GB
612
+ - ``safe_serialization``: whether to save the model using `safetensors` or the traditional PyTorch way (that uses `pickle`).
613
+ - ``tag``: checkpoint tag used as a unique identifier for checkpoint. If not provided will attempt to load tag in the file named ``latest`` in the checkpoint folder, e.g., ``global_step14``
614
+ - ``exclude_frozen_parameters``: exclude frozen parameters
615
+ """
616
+
617
+ # Dependency pre-check
618
+ if safe_serialization:
619
+ try:
620
+ from safetensors.torch import save_file
621
+ except ImportError:
622
+ print('If you want to use `safe_serialization`, please `pip install safetensors`')
623
+ raise
624
+ if max_shard_size is not None:
625
+ try:
626
+ from huggingface_hub import split_torch_state_dict_into_shards
627
+ except ImportError:
628
+ print('If you want to use `max_shard_size`, please `pip install huggingface_hub`')
629
+ raise
630
+
631
+ # Convert zero checkpoint to state_dict
632
+ state_dict = get_fp32_state_dict_from_zero_checkpoint(checkpoint_dir,
633
+ tag,
634
+ exclude_frozen_parameters,
635
+ lazy_mode=True)
636
+
637
+ # Shard the model if it is too big.
638
+ weights_name = "model.safetensors" if safe_serialization else "pytorch_model.bin"
639
+ if max_shard_size is not None:
640
+ filename_pattern = weights_name.replace(".bin", "{suffix}.bin").replace(".safetensors", "{suffix}.safetensors")
641
+ # an memory-efficient approach for sharding
642
+ empty_state_dict = to_torch_tensor(state_dict, return_empty_tensor=True)
643
+ state_dict_split = split_torch_state_dict_into_shards(empty_state_dict,
644
+ filename_pattern=filename_pattern,
645
+ max_shard_size=max_shard_size)
646
+ else:
647
+ from collections import namedtuple
648
+ StateDictSplit = namedtuple("StateDictSplit", ["is_sharded", "filename_to_tensors"])
649
+ state_dict_split = StateDictSplit(is_sharded=False,
650
+ filename_to_tensors={weights_name: list(state_dict.keys())})
651
+
652
+ # Save the model by shard
653
+ os.makedirs(output_dir, exist_ok=True)
654
+ filename_to_tensors = state_dict_split.filename_to_tensors.items()
655
+ for shard_file, tensors in tqdm(filename_to_tensors, desc="Saving checkpoint shards"):
656
+ shard_state_dict = {tensor_name: state_dict[tensor_name] for tensor_name in tensors}
657
+ shard_state_dict = to_torch_tensor(shard_state_dict)
658
+ output_path = os.path.join(output_dir, shard_file)
659
+ if safe_serialization:
660
+ save_file(shard_state_dict, output_path, metadata={"format": "pt"})
661
+ else:
662
+ torch.save(shard_state_dict, output_path)
663
+ # release the memory of current shard
664
+ for tensor_name in list(shard_state_dict.keys()):
665
+ del state_dict[tensor_name]
666
+ del shard_state_dict[tensor_name]
667
+ del shard_state_dict
668
+ gc.collect()
669
+
670
+ # Save index if sharded
671
+ if state_dict_split.is_sharded:
672
+ index = {
673
+ "metadata": state_dict_split.metadata,
674
+ "weight_map": state_dict_split.tensor_to_filename,
675
+ }
676
+ save_index_file = "model.safetensors.index.json" if safe_serialization else "pytorch_model.bin.index.json"
677
+ save_index_file = os.path.join(output_dir, save_index_file)
678
+ with open(save_index_file, "w", encoding="utf-8") as f:
679
+ content = json.dumps(index, indent=2, sort_keys=True) + "\n"
680
+ f.write(content)
681
+
682
+
683
+ def load_state_dict_from_zero_checkpoint(model, checkpoint_dir, tag=None):
684
+ """
685
+ 1. Put the provided model to cpu
686
+ 2. Convert ZeRO 2 or 3 checkpoint into a single fp32 consolidated ``state_dict``
687
+ 3. Load it into the provided model
688
+
689
+ Args:
690
+ - ``model``: the model object to update
691
+ - ``checkpoint_dir``: path to the desired checkpoint folder. (one that contains the tag-folder, like ``global_step14``)
692
+ - ``tag``: checkpoint tag used as a unique identifier for checkpoint. If not provided will attempt to load tag in the file named ``latest`` in the checkpoint folder, e.g., ``global_step14``
693
+
694
+ Returns:
695
+ - ``model`: modified model
696
+
697
+ Make sure you have plenty of CPU memory available before you call this function. If you don't
698
+ have enough use the ``zero_to_fp32.py`` utility to do the conversion. You will find it
699
+ conveniently placed for you in the checkpoint folder.
700
+
701
+ A typical usage might be ::
702
+
703
+ from deepspeed.utils.zero_to_fp32 import load_state_dict_from_zero_checkpoint
704
+ model = load_state_dict_from_zero_checkpoint(trainer.model, checkpoint_dir)
705
+ # submit to model hub or save the model to share with others
706
+
707
+ Note, that once this was run, the ``model`` will no longer be usable in the deepspeed context
708
+ of the same application. i.e. you will need to re-initialize the deepspeed engine, since
709
+ ``model.load_state_dict(state_dict)`` will remove all the deepspeed magic from it.
710
+
711
+ """
712
+ logger.info("Extracting fp32 weights")
713
+ state_dict = get_fp32_state_dict_from_zero_checkpoint(checkpoint_dir, tag)
714
+
715
+ logger.info("Overwriting model with fp32 weights")
716
+ model = model.cpu()
717
+ model.load_state_dict(state_dict, strict=False)
718
+
719
+ return model
720
+
721
+
722
+ if __name__ == "__main__":
723
+ parser = argparse.ArgumentParser()
724
+ parser.add_argument("checkpoint_dir",
725
+ type=str,
726
+ help="path to the desired checkpoint folder, e.g., path/checkpoint-12")
727
+ parser.add_argument("output_dir",
728
+ type=str,
729
+ help="directory to the pytorch fp32 state_dict output files"
730
+ "(e.g. path/checkpoint-12-output/)")
731
+ parser.add_argument(
732
+ "--max_shard_size",
733
+ type=str,
734
+ default="5GB",
735
+ help="The maximum size for a checkpoint before being sharded. Checkpoints shard will then be each of size"
736
+ "lower than this size. If expressed as a string, needs to be digits followed by a unit (like `5MB`"
737
+ "We default it to 5GB in order for models to be able to run easily on free-tier google colab instances"
738
+ "without CPU OOM issues.")
739
+ parser.add_argument(
740
+ "--safe_serialization",
741
+ default=False,
742
+ action='store_true',
743
+ help="Whether to save the model using `safetensors` or the traditional PyTorch way (that uses `pickle`).")
744
+ parser.add_argument("-t",
745
+ "--tag",
746
+ type=str,
747
+ default=None,
748
+ help="checkpoint tag used as a unique identifier for checkpoint. e.g., global_step1")
749
+ parser.add_argument("--exclude_frozen_parameters", action='store_true', help="exclude frozen parameters")
750
+ parser.add_argument("-d", "--debug", action='store_true', help="enable debug")
751
+ args = parser.parse_args()
752
+
753
+ debug = args.debug
754
+
755
+ convert_zero_checkpoint_to_fp32_state_dict(args.checkpoint_dir,
756
+ args.output_dir,
757
+ max_shard_size=args.max_shard_size,
758
+ safe_serialization=args.safe_serialization,
759
+ tag=args.tag,
760
+ exclude_frozen_parameters=args.exclude_frozen_parameters)
logs/UNIVLA_SIMPLERENV_BRIDGE_VIDEO_BS128_20k/config.json ADDED
@@ -0,0 +1,61 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ {
2
+ "action_config": {
3
+ "_attn_implementation": "sdpa",
4
+ "action_dim": 7,
5
+ "attention_dropout": 0.0,
6
+ "hidden_act": "silu",
7
+ "hidden_size": 4096,
8
+ "initializer_range": 0.02,
9
+ "intermediate_size": 2048,
10
+ "max_position_embeddings": 5120,
11
+ "num_attention_heads": 32,
12
+ "num_hidden_layers": 2,
13
+ "num_key_value_heads": 8,
14
+ "pad_token_id": 151643,
15
+ "pretraining_tp": 1,
16
+ "rms_norm_eps": 1e-05,
17
+ "rope_scaling": null,
18
+ "rope_theta": 10000.0,
19
+ "tie_word_embeddings": false,
20
+ "use_cache": true,
21
+ "vision_loss_weight": 5.0
22
+ },
23
+ "action_dim": 7,
24
+ "action_experts": false,
25
+ "architectures": [
26
+ "Emu3MoE"
27
+ ],
28
+ "attention_dropout": 0.1,
29
+ "boa_token_id": 151844,
30
+ "boi_token_id": 151852,
31
+ "bos_token_id": 151849,
32
+ "bov_token_id": 151854,
33
+ "eof_token_id": 151847,
34
+ "eoi_token_id": 151853,
35
+ "eol_token_id": 151846,
36
+ "eos_token_id": 151850,
37
+ "eov_token_id": 184621,
38
+ "hidden_act": "silu",
39
+ "hidden_size": 4096,
40
+ "image_area": 262144,
41
+ "img_token_id": 151851,
42
+ "initializer_range": 0.02,
43
+ "intermediate_size": 14336,
44
+ "max_position_embeddings": 2400,
45
+ "model_type": "Emu3",
46
+ "num_attention_heads": 32,
47
+ "num_hidden_layers": 32,
48
+ "num_key_value_heads": 8,
49
+ "pad_token_id": 151643,
50
+ "pretraining_tp": 1,
51
+ "qkv_bias": false,
52
+ "rms_norm_eps": 1e-05,
53
+ "rope_scaling": null,
54
+ "rope_theta": 1000000.0,
55
+ "tie_word_embeddings": false,
56
+ "torch_dtype": "bfloat16",
57
+ "transformers_version": "4.51.0",
58
+ "use_cache": true,
59
+ "vision_loss_weight": 0.5,
60
+ "vocab_size": 184622
61
+ }
logs/UNIVLA_SIMPLERENV_BRIDGE_VIDEO_BS128_20k/emu3.tiktoken ADDED
The diff for this file is too large to render. See raw diff
 
logs/UNIVLA_SIMPLERENV_BRIDGE_VIDEO_BS128_20k/emu3_vision_tokens.txt ADDED
The diff for this file is too large to render. See raw diff
 
logs/UNIVLA_SIMPLERENV_BRIDGE_VIDEO_BS128_20k/generation_config.json ADDED
@@ -0,0 +1,7 @@
 
 
 
 
 
 
 
 
1
+ {
2
+ "_from_model_config": true,
3
+ "bos_token_id": 151849,
4
+ "eos_token_id": 151850,
5
+ "pad_token_id": 151643,
6
+ "transformers_version": "4.51.0"
7
+ }
logs/UNIVLA_SIMPLERENV_BRIDGE_VIDEO_BS128_20k/model.safetensors.index.json ADDED
@@ -0,0 +1,298 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ {
2
+ "metadata": {
3
+ "total_size": 16984023040
4
+ },
5
+ "weight_map": {
6
+ "lm_head.weight": "model-00004-of-00004.safetensors",
7
+ "model.embed_tokens.weight": "model-00001-of-00004.safetensors",
8
+ "model.layers.0.input_layernorm.weight": "model-00001-of-00004.safetensors",
9
+ "model.layers.0.mlp.down_proj.weight": "model-00001-of-00004.safetensors",
10
+ "model.layers.0.mlp.gate_proj.weight": "model-00001-of-00004.safetensors",
11
+ "model.layers.0.mlp.up_proj.weight": "model-00001-of-00004.safetensors",
12
+ "model.layers.0.post_attention_layernorm.weight": "model-00001-of-00004.safetensors",
13
+ "model.layers.0.self_attn.k_proj.weight": "model-00001-of-00004.safetensors",
14
+ "model.layers.0.self_attn.o_proj.weight": "model-00001-of-00004.safetensors",
15
+ "model.layers.0.self_attn.q_proj.weight": "model-00001-of-00004.safetensors",
16
+ "model.layers.0.self_attn.v_proj.weight": "model-00001-of-00004.safetensors",
17
+ "model.layers.1.input_layernorm.weight": "model-00001-of-00004.safetensors",
18
+ "model.layers.1.mlp.down_proj.weight": "model-00001-of-00004.safetensors",
19
+ "model.layers.1.mlp.gate_proj.weight": "model-00001-of-00004.safetensors",
20
+ "model.layers.1.mlp.up_proj.weight": "model-00001-of-00004.safetensors",
21
+ "model.layers.1.post_attention_layernorm.weight": "model-00001-of-00004.safetensors",
22
+ "model.layers.1.self_attn.k_proj.weight": "model-00001-of-00004.safetensors",
23
+ "model.layers.1.self_attn.o_proj.weight": "model-00001-of-00004.safetensors",
24
+ "model.layers.1.self_attn.q_proj.weight": "model-00001-of-00004.safetensors",
25
+ "model.layers.1.self_attn.v_proj.weight": "model-00001-of-00004.safetensors",
26
+ "model.layers.10.input_layernorm.weight": "model-00002-of-00004.safetensors",
27
+ "model.layers.10.mlp.down_proj.weight": "model-00002-of-00004.safetensors",
28
+ "model.layers.10.mlp.gate_proj.weight": "model-00002-of-00004.safetensors",
29
+ "model.layers.10.mlp.up_proj.weight": "model-00002-of-00004.safetensors",
30
+ "model.layers.10.post_attention_layernorm.weight": "model-00002-of-00004.safetensors",
31
+ "model.layers.10.self_attn.k_proj.weight": "model-00002-of-00004.safetensors",
32
+ "model.layers.10.self_attn.o_proj.weight": "model-00002-of-00004.safetensors",
33
+ "model.layers.10.self_attn.q_proj.weight": "model-00002-of-00004.safetensors",
34
+ "model.layers.10.self_attn.v_proj.weight": "model-00002-of-00004.safetensors",
35
+ "model.layers.11.input_layernorm.weight": "model-00002-of-00004.safetensors",
36
+ "model.layers.11.mlp.down_proj.weight": "model-00002-of-00004.safetensors",
37
+ "model.layers.11.mlp.gate_proj.weight": "model-00002-of-00004.safetensors",
38
+ "model.layers.11.mlp.up_proj.weight": "model-00002-of-00004.safetensors",
39
+ "model.layers.11.post_attention_layernorm.weight": "model-00002-of-00004.safetensors",
40
+ "model.layers.11.self_attn.k_proj.weight": "model-00002-of-00004.safetensors",
41
+ "model.layers.11.self_attn.o_proj.weight": "model-00002-of-00004.safetensors",
42
+ "model.layers.11.self_attn.q_proj.weight": "model-00002-of-00004.safetensors",
43
+ "model.layers.11.self_attn.v_proj.weight": "model-00002-of-00004.safetensors",
44
+ "model.layers.12.input_layernorm.weight": "model-00002-of-00004.safetensors",
45
+ "model.layers.12.mlp.down_proj.weight": "model-00002-of-00004.safetensors",
46
+ "model.layers.12.mlp.gate_proj.weight": "model-00002-of-00004.safetensors",
47
+ "model.layers.12.mlp.up_proj.weight": "model-00002-of-00004.safetensors",
48
+ "model.layers.12.post_attention_layernorm.weight": "model-00002-of-00004.safetensors",
49
+ "model.layers.12.self_attn.k_proj.weight": "model-00002-of-00004.safetensors",
50
+ "model.layers.12.self_attn.o_proj.weight": "model-00002-of-00004.safetensors",
51
+ "model.layers.12.self_attn.q_proj.weight": "model-00002-of-00004.safetensors",
52
+ "model.layers.12.self_attn.v_proj.weight": "model-00002-of-00004.safetensors",
53
+ "model.layers.13.input_layernorm.weight": "model-00002-of-00004.safetensors",
54
+ "model.layers.13.mlp.down_proj.weight": "model-00002-of-00004.safetensors",
55
+ "model.layers.13.mlp.gate_proj.weight": "model-00002-of-00004.safetensors",
56
+ "model.layers.13.mlp.up_proj.weight": "model-00002-of-00004.safetensors",
57
+ "model.layers.13.post_attention_layernorm.weight": "model-00002-of-00004.safetensors",
58
+ "model.layers.13.self_attn.k_proj.weight": "model-00002-of-00004.safetensors",
59
+ "model.layers.13.self_attn.o_proj.weight": "model-00002-of-00004.safetensors",
60
+ "model.layers.13.self_attn.q_proj.weight": "model-00002-of-00004.safetensors",
61
+ "model.layers.13.self_attn.v_proj.weight": "model-00002-of-00004.safetensors",
62
+ "model.layers.14.input_layernorm.weight": "model-00002-of-00004.safetensors",
63
+ "model.layers.14.mlp.down_proj.weight": "model-00002-of-00004.safetensors",
64
+ "model.layers.14.mlp.gate_proj.weight": "model-00002-of-00004.safetensors",
65
+ "model.layers.14.mlp.up_proj.weight": "model-00002-of-00004.safetensors",
66
+ "model.layers.14.post_attention_layernorm.weight": "model-00002-of-00004.safetensors",
67
+ "model.layers.14.self_attn.k_proj.weight": "model-00002-of-00004.safetensors",
68
+ "model.layers.14.self_attn.o_proj.weight": "model-00002-of-00004.safetensors",
69
+ "model.layers.14.self_attn.q_proj.weight": "model-00002-of-00004.safetensors",
70
+ "model.layers.14.self_attn.v_proj.weight": "model-00002-of-00004.safetensors",
71
+ "model.layers.15.input_layernorm.weight": "model-00002-of-00004.safetensors",
72
+ "model.layers.15.mlp.down_proj.weight": "model-00002-of-00004.safetensors",
73
+ "model.layers.15.mlp.gate_proj.weight": "model-00002-of-00004.safetensors",
74
+ "model.layers.15.mlp.up_proj.weight": "model-00002-of-00004.safetensors",
75
+ "model.layers.15.post_attention_layernorm.weight": "model-00002-of-00004.safetensors",
76
+ "model.layers.15.self_attn.k_proj.weight": "model-00002-of-00004.safetensors",
77
+ "model.layers.15.self_attn.o_proj.weight": "model-00002-of-00004.safetensors",
78
+ "model.layers.15.self_attn.q_proj.weight": "model-00002-of-00004.safetensors",
79
+ "model.layers.15.self_attn.v_proj.weight": "model-00002-of-00004.safetensors",
80
+ "model.layers.16.input_layernorm.weight": "model-00002-of-00004.safetensors",
81
+ "model.layers.16.mlp.down_proj.weight": "model-00002-of-00004.safetensors",
82
+ "model.layers.16.mlp.gate_proj.weight": "model-00002-of-00004.safetensors",
83
+ "model.layers.16.mlp.up_proj.weight": "model-00002-of-00004.safetensors",
84
+ "model.layers.16.post_attention_layernorm.weight": "model-00002-of-00004.safetensors",
85
+ "model.layers.16.self_attn.k_proj.weight": "model-00002-of-00004.safetensors",
86
+ "model.layers.16.self_attn.o_proj.weight": "model-00002-of-00004.safetensors",
87
+ "model.layers.16.self_attn.q_proj.weight": "model-00002-of-00004.safetensors",
88
+ "model.layers.16.self_attn.v_proj.weight": "model-00002-of-00004.safetensors",
89
+ "model.layers.17.input_layernorm.weight": "model-00002-of-00004.safetensors",
90
+ "model.layers.17.mlp.down_proj.weight": "model-00002-of-00004.safetensors",
91
+ "model.layers.17.mlp.gate_proj.weight": "model-00002-of-00004.safetensors",
92
+ "model.layers.17.mlp.up_proj.weight": "model-00002-of-00004.safetensors",
93
+ "model.layers.17.post_attention_layernorm.weight": "model-00002-of-00004.safetensors",
94
+ "model.layers.17.self_attn.k_proj.weight": "model-00002-of-00004.safetensors",
95
+ "model.layers.17.self_attn.o_proj.weight": "model-00002-of-00004.safetensors",
96
+ "model.layers.17.self_attn.q_proj.weight": "model-00002-of-00004.safetensors",
97
+ "model.layers.17.self_attn.v_proj.weight": "model-00002-of-00004.safetensors",
98
+ "model.layers.18.input_layernorm.weight": "model-00002-of-00004.safetensors",
99
+ "model.layers.18.mlp.down_proj.weight": "model-00002-of-00004.safetensors",
100
+ "model.layers.18.mlp.gate_proj.weight": "model-00002-of-00004.safetensors",
101
+ "model.layers.18.mlp.up_proj.weight": "model-00002-of-00004.safetensors",
102
+ "model.layers.18.post_attention_layernorm.weight": "model-00002-of-00004.safetensors",
103
+ "model.layers.18.self_attn.k_proj.weight": "model-00002-of-00004.safetensors",
104
+ "model.layers.18.self_attn.o_proj.weight": "model-00002-of-00004.safetensors",
105
+ "model.layers.18.self_attn.q_proj.weight": "model-00002-of-00004.safetensors",
106
+ "model.layers.18.self_attn.v_proj.weight": "model-00002-of-00004.safetensors",
107
+ "model.layers.19.input_layernorm.weight": "model-00003-of-00004.safetensors",
108
+ "model.layers.19.mlp.down_proj.weight": "model-00003-of-00004.safetensors",
109
+ "model.layers.19.mlp.gate_proj.weight": "model-00003-of-00004.safetensors",
110
+ "model.layers.19.mlp.up_proj.weight": "model-00003-of-00004.safetensors",
111
+ "model.layers.19.post_attention_layernorm.weight": "model-00003-of-00004.safetensors",
112
+ "model.layers.19.self_attn.k_proj.weight": "model-00002-of-00004.safetensors",
113
+ "model.layers.19.self_attn.o_proj.weight": "model-00002-of-00004.safetensors",
114
+ "model.layers.19.self_attn.q_proj.weight": "model-00002-of-00004.safetensors",
115
+ "model.layers.19.self_attn.v_proj.weight": "model-00002-of-00004.safetensors",
116
+ "model.layers.2.input_layernorm.weight": "model-00001-of-00004.safetensors",
117
+ "model.layers.2.mlp.down_proj.weight": "model-00001-of-00004.safetensors",
118
+ "model.layers.2.mlp.gate_proj.weight": "model-00001-of-00004.safetensors",
119
+ "model.layers.2.mlp.up_proj.weight": "model-00001-of-00004.safetensors",
120
+ "model.layers.2.post_attention_layernorm.weight": "model-00001-of-00004.safetensors",
121
+ "model.layers.2.self_attn.k_proj.weight": "model-00001-of-00004.safetensors",
122
+ "model.layers.2.self_attn.o_proj.weight": "model-00001-of-00004.safetensors",
123
+ "model.layers.2.self_attn.q_proj.weight": "model-00001-of-00004.safetensors",
124
+ "model.layers.2.self_attn.v_proj.weight": "model-00001-of-00004.safetensors",
125
+ "model.layers.20.input_layernorm.weight": "model-00003-of-00004.safetensors",
126
+ "model.layers.20.mlp.down_proj.weight": "model-00003-of-00004.safetensors",
127
+ "model.layers.20.mlp.gate_proj.weight": "model-00003-of-00004.safetensors",
128
+ "model.layers.20.mlp.up_proj.weight": "model-00003-of-00004.safetensors",
129
+ "model.layers.20.post_attention_layernorm.weight": "model-00003-of-00004.safetensors",
130
+ "model.layers.20.self_attn.k_proj.weight": "model-00003-of-00004.safetensors",
131
+ "model.layers.20.self_attn.o_proj.weight": "model-00003-of-00004.safetensors",
132
+ "model.layers.20.self_attn.q_proj.weight": "model-00003-of-00004.safetensors",
133
+ "model.layers.20.self_attn.v_proj.weight": "model-00003-of-00004.safetensors",
134
+ "model.layers.21.input_layernorm.weight": "model-00003-of-00004.safetensors",
135
+ "model.layers.21.mlp.down_proj.weight": "model-00003-of-00004.safetensors",
136
+ "model.layers.21.mlp.gate_proj.weight": "model-00003-of-00004.safetensors",
137
+ "model.layers.21.mlp.up_proj.weight": "model-00003-of-00004.safetensors",
138
+ "model.layers.21.post_attention_layernorm.weight": "model-00003-of-00004.safetensors",
139
+ "model.layers.21.self_attn.k_proj.weight": "model-00003-of-00004.safetensors",
140
+ "model.layers.21.self_attn.o_proj.weight": "model-00003-of-00004.safetensors",
141
+ "model.layers.21.self_attn.q_proj.weight": "model-00003-of-00004.safetensors",
142
+ "model.layers.21.self_attn.v_proj.weight": "model-00003-of-00004.safetensors",
143
+ "model.layers.22.input_layernorm.weight": "model-00003-of-00004.safetensors",
144
+ "model.layers.22.mlp.down_proj.weight": "model-00003-of-00004.safetensors",
145
+ "model.layers.22.mlp.gate_proj.weight": "model-00003-of-00004.safetensors",
146
+ "model.layers.22.mlp.up_proj.weight": "model-00003-of-00004.safetensors",
147
+ "model.layers.22.post_attention_layernorm.weight": "model-00003-of-00004.safetensors",
148
+ "model.layers.22.self_attn.k_proj.weight": "model-00003-of-00004.safetensors",
149
+ "model.layers.22.self_attn.o_proj.weight": "model-00003-of-00004.safetensors",
150
+ "model.layers.22.self_attn.q_proj.weight": "model-00003-of-00004.safetensors",
151
+ "model.layers.22.self_attn.v_proj.weight": "model-00003-of-00004.safetensors",
152
+ "model.layers.23.input_layernorm.weight": "model-00003-of-00004.safetensors",
153
+ "model.layers.23.mlp.down_proj.weight": "model-00003-of-00004.safetensors",
154
+ "model.layers.23.mlp.gate_proj.weight": "model-00003-of-00004.safetensors",
155
+ "model.layers.23.mlp.up_proj.weight": "model-00003-of-00004.safetensors",
156
+ "model.layers.23.post_attention_layernorm.weight": "model-00003-of-00004.safetensors",
157
+ "model.layers.23.self_attn.k_proj.weight": "model-00003-of-00004.safetensors",
158
+ "model.layers.23.self_attn.o_proj.weight": "model-00003-of-00004.safetensors",
159
+ "model.layers.23.self_attn.q_proj.weight": "model-00003-of-00004.safetensors",
160
+ "model.layers.23.self_attn.v_proj.weight": "model-00003-of-00004.safetensors",
161
+ "model.layers.24.input_layernorm.weight": "model-00003-of-00004.safetensors",
162
+ "model.layers.24.mlp.down_proj.weight": "model-00003-of-00004.safetensors",
163
+ "model.layers.24.mlp.gate_proj.weight": "model-00003-of-00004.safetensors",
164
+ "model.layers.24.mlp.up_proj.weight": "model-00003-of-00004.safetensors",
165
+ "model.layers.24.post_attention_layernorm.weight": "model-00003-of-00004.safetensors",
166
+ "model.layers.24.self_attn.k_proj.weight": "model-00003-of-00004.safetensors",
167
+ "model.layers.24.self_attn.o_proj.weight": "model-00003-of-00004.safetensors",
168
+ "model.layers.24.self_attn.q_proj.weight": "model-00003-of-00004.safetensors",
169
+ "model.layers.24.self_attn.v_proj.weight": "model-00003-of-00004.safetensors",
170
+ "model.layers.25.input_layernorm.weight": "model-00003-of-00004.safetensors",
171
+ "model.layers.25.mlp.down_proj.weight": "model-00003-of-00004.safetensors",
172
+ "model.layers.25.mlp.gate_proj.weight": "model-00003-of-00004.safetensors",
173
+ "model.layers.25.mlp.up_proj.weight": "model-00003-of-00004.safetensors",
174
+ "model.layers.25.post_attention_layernorm.weight": "model-00003-of-00004.safetensors",
175
+ "model.layers.25.self_attn.k_proj.weight": "model-00003-of-00004.safetensors",
176
+ "model.layers.25.self_attn.o_proj.weight": "model-00003-of-00004.safetensors",
177
+ "model.layers.25.self_attn.q_proj.weight": "model-00003-of-00004.safetensors",
178
+ "model.layers.25.self_attn.v_proj.weight": "model-00003-of-00004.safetensors",
179
+ "model.layers.26.input_layernorm.weight": "model-00003-of-00004.safetensors",
180
+ "model.layers.26.mlp.down_proj.weight": "model-00003-of-00004.safetensors",
181
+ "model.layers.26.mlp.gate_proj.weight": "model-00003-of-00004.safetensors",
182
+ "model.layers.26.mlp.up_proj.weight": "model-00003-of-00004.safetensors",
183
+ "model.layers.26.post_attention_layernorm.weight": "model-00003-of-00004.safetensors",
184
+ "model.layers.26.self_attn.k_proj.weight": "model-00003-of-00004.safetensors",
185
+ "model.layers.26.self_attn.o_proj.weight": "model-00003-of-00004.safetensors",
186
+ "model.layers.26.self_attn.q_proj.weight": "model-00003-of-00004.safetensors",
187
+ "model.layers.26.self_attn.v_proj.weight": "model-00003-of-00004.safetensors",
188
+ "model.layers.27.input_layernorm.weight": "model-00003-of-00004.safetensors",
189
+ "model.layers.27.mlp.down_proj.weight": "model-00003-of-00004.safetensors",
190
+ "model.layers.27.mlp.gate_proj.weight": "model-00003-of-00004.safetensors",
191
+ "model.layers.27.mlp.up_proj.weight": "model-00003-of-00004.safetensors",
192
+ "model.layers.27.post_attention_layernorm.weight": "model-00003-of-00004.safetensors",
193
+ "model.layers.27.self_attn.k_proj.weight": "model-00003-of-00004.safetensors",
194
+ "model.layers.27.self_attn.o_proj.weight": "model-00003-of-00004.safetensors",
195
+ "model.layers.27.self_attn.q_proj.weight": "model-00003-of-00004.safetensors",
196
+ "model.layers.27.self_attn.v_proj.weight": "model-00003-of-00004.safetensors",
197
+ "model.layers.28.input_layernorm.weight": "model-00003-of-00004.safetensors",
198
+ "model.layers.28.mlp.down_proj.weight": "model-00003-of-00004.safetensors",
199
+ "model.layers.28.mlp.gate_proj.weight": "model-00003-of-00004.safetensors",
200
+ "model.layers.28.mlp.up_proj.weight": "model-00003-of-00004.safetensors",
201
+ "model.layers.28.post_attention_layernorm.weight": "model-00003-of-00004.safetensors",
202
+ "model.layers.28.self_attn.k_proj.weight": "model-00003-of-00004.safetensors",
203
+ "model.layers.28.self_attn.o_proj.weight": "model-00003-of-00004.safetensors",
204
+ "model.layers.28.self_attn.q_proj.weight": "model-00003-of-00004.safetensors",
205
+ "model.layers.28.self_attn.v_proj.weight": "model-00003-of-00004.safetensors",
206
+ "model.layers.29.input_layernorm.weight": "model-00003-of-00004.safetensors",
207
+ "model.layers.29.mlp.down_proj.weight": "model-00003-of-00004.safetensors",
208
+ "model.layers.29.mlp.gate_proj.weight": "model-00003-of-00004.safetensors",
209
+ "model.layers.29.mlp.up_proj.weight": "model-00003-of-00004.safetensors",
210
+ "model.layers.29.post_attention_layernorm.weight": "model-00003-of-00004.safetensors",
211
+ "model.layers.29.self_attn.k_proj.weight": "model-00003-of-00004.safetensors",
212
+ "model.layers.29.self_attn.o_proj.weight": "model-00003-of-00004.safetensors",
213
+ "model.layers.29.self_attn.q_proj.weight": "model-00003-of-00004.safetensors",
214
+ "model.layers.29.self_attn.v_proj.weight": "model-00003-of-00004.safetensors",
215
+ "model.layers.3.input_layernorm.weight": "model-00001-of-00004.safetensors",
216
+ "model.layers.3.mlp.down_proj.weight": "model-00001-of-00004.safetensors",
217
+ "model.layers.3.mlp.gate_proj.weight": "model-00001-of-00004.safetensors",
218
+ "model.layers.3.mlp.up_proj.weight": "model-00001-of-00004.safetensors",
219
+ "model.layers.3.post_attention_layernorm.weight": "model-00001-of-00004.safetensors",
220
+ "model.layers.3.self_attn.k_proj.weight": "model-00001-of-00004.safetensors",
221
+ "model.layers.3.self_attn.o_proj.weight": "model-00001-of-00004.safetensors",
222
+ "model.layers.3.self_attn.q_proj.weight": "model-00001-of-00004.safetensors",
223
+ "model.layers.3.self_attn.v_proj.weight": "model-00001-of-00004.safetensors",
224
+ "model.layers.30.input_layernorm.weight": "model-00004-of-00004.safetensors",
225
+ "model.layers.30.mlp.down_proj.weight": "model-00004-of-00004.safetensors",
226
+ "model.layers.30.mlp.gate_proj.weight": "model-00003-of-00004.safetensors",
227
+ "model.layers.30.mlp.up_proj.weight": "model-00004-of-00004.safetensors",
228
+ "model.layers.30.post_attention_layernorm.weight": "model-00004-of-00004.safetensors",
229
+ "model.layers.30.self_attn.k_proj.weight": "model-00003-of-00004.safetensors",
230
+ "model.layers.30.self_attn.o_proj.weight": "model-00003-of-00004.safetensors",
231
+ "model.layers.30.self_attn.q_proj.weight": "model-00003-of-00004.safetensors",
232
+ "model.layers.30.self_attn.v_proj.weight": "model-00003-of-00004.safetensors",
233
+ "model.layers.31.input_layernorm.weight": "model-00004-of-00004.safetensors",
234
+ "model.layers.31.mlp.down_proj.weight": "model-00004-of-00004.safetensors",
235
+ "model.layers.31.mlp.gate_proj.weight": "model-00004-of-00004.safetensors",
236
+ "model.layers.31.mlp.up_proj.weight": "model-00004-of-00004.safetensors",
237
+ "model.layers.31.post_attention_layernorm.weight": "model-00004-of-00004.safetensors",
238
+ "model.layers.31.self_attn.k_proj.weight": "model-00004-of-00004.safetensors",
239
+ "model.layers.31.self_attn.o_proj.weight": "model-00004-of-00004.safetensors",
240
+ "model.layers.31.self_attn.q_proj.weight": "model-00004-of-00004.safetensors",
241
+ "model.layers.31.self_attn.v_proj.weight": "model-00004-of-00004.safetensors",
242
+ "model.layers.4.input_layernorm.weight": "model-00001-of-00004.safetensors",
243
+ "model.layers.4.mlp.down_proj.weight": "model-00001-of-00004.safetensors",
244
+ "model.layers.4.mlp.gate_proj.weight": "model-00001-of-00004.safetensors",
245
+ "model.layers.4.mlp.up_proj.weight": "model-00001-of-00004.safetensors",
246
+ "model.layers.4.post_attention_layernorm.weight": "model-00001-of-00004.safetensors",
247
+ "model.layers.4.self_attn.k_proj.weight": "model-00001-of-00004.safetensors",
248
+ "model.layers.4.self_attn.o_proj.weight": "model-00001-of-00004.safetensors",
249
+ "model.layers.4.self_attn.q_proj.weight": "model-00001-of-00004.safetensors",
250
+ "model.layers.4.self_attn.v_proj.weight": "model-00001-of-00004.safetensors",
251
+ "model.layers.5.input_layernorm.weight": "model-00001-of-00004.safetensors",
252
+ "model.layers.5.mlp.down_proj.weight": "model-00001-of-00004.safetensors",
253
+ "model.layers.5.mlp.gate_proj.weight": "model-00001-of-00004.safetensors",
254
+ "model.layers.5.mlp.up_proj.weight": "model-00001-of-00004.safetensors",
255
+ "model.layers.5.post_attention_layernorm.weight": "model-00001-of-00004.safetensors",
256
+ "model.layers.5.self_attn.k_proj.weight": "model-00001-of-00004.safetensors",
257
+ "model.layers.5.self_attn.o_proj.weight": "model-00001-of-00004.safetensors",
258
+ "model.layers.5.self_attn.q_proj.weight": "model-00001-of-00004.safetensors",
259
+ "model.layers.5.self_attn.v_proj.weight": "model-00001-of-00004.safetensors",
260
+ "model.layers.6.input_layernorm.weight": "model-00001-of-00004.safetensors",
261
+ "model.layers.6.mlp.down_proj.weight": "model-00001-of-00004.safetensors",
262
+ "model.layers.6.mlp.gate_proj.weight": "model-00001-of-00004.safetensors",
263
+ "model.layers.6.mlp.up_proj.weight": "model-00001-of-00004.safetensors",
264
+ "model.layers.6.post_attention_layernorm.weight": "model-00001-of-00004.safetensors",
265
+ "model.layers.6.self_attn.k_proj.weight": "model-00001-of-00004.safetensors",
266
+ "model.layers.6.self_attn.o_proj.weight": "model-00001-of-00004.safetensors",
267
+ "model.layers.6.self_attn.q_proj.weight": "model-00001-of-00004.safetensors",
268
+ "model.layers.6.self_attn.v_proj.weight": "model-00001-of-00004.safetensors",
269
+ "model.layers.7.input_layernorm.weight": "model-00002-of-00004.safetensors",
270
+ "model.layers.7.mlp.down_proj.weight": "model-00002-of-00004.safetensors",
271
+ "model.layers.7.mlp.gate_proj.weight": "model-00001-of-00004.safetensors",
272
+ "model.layers.7.mlp.up_proj.weight": "model-00001-of-00004.safetensors",
273
+ "model.layers.7.post_attention_layernorm.weight": "model-00002-of-00004.safetensors",
274
+ "model.layers.7.self_attn.k_proj.weight": "model-00001-of-00004.safetensors",
275
+ "model.layers.7.self_attn.o_proj.weight": "model-00001-of-00004.safetensors",
276
+ "model.layers.7.self_attn.q_proj.weight": "model-00001-of-00004.safetensors",
277
+ "model.layers.7.self_attn.v_proj.weight": "model-00001-of-00004.safetensors",
278
+ "model.layers.8.input_layernorm.weight": "model-00002-of-00004.safetensors",
279
+ "model.layers.8.mlp.down_proj.weight": "model-00002-of-00004.safetensors",
280
+ "model.layers.8.mlp.gate_proj.weight": "model-00002-of-00004.safetensors",
281
+ "model.layers.8.mlp.up_proj.weight": "model-00002-of-00004.safetensors",
282
+ "model.layers.8.post_attention_layernorm.weight": "model-00002-of-00004.safetensors",
283
+ "model.layers.8.self_attn.k_proj.weight": "model-00002-of-00004.safetensors",
284
+ "model.layers.8.self_attn.o_proj.weight": "model-00002-of-00004.safetensors",
285
+ "model.layers.8.self_attn.q_proj.weight": "model-00002-of-00004.safetensors",
286
+ "model.layers.8.self_attn.v_proj.weight": "model-00002-of-00004.safetensors",
287
+ "model.layers.9.input_layernorm.weight": "model-00002-of-00004.safetensors",
288
+ "model.layers.9.mlp.down_proj.weight": "model-00002-of-00004.safetensors",
289
+ "model.layers.9.mlp.gate_proj.weight": "model-00002-of-00004.safetensors",
290
+ "model.layers.9.mlp.up_proj.weight": "model-00002-of-00004.safetensors",
291
+ "model.layers.9.post_attention_layernorm.weight": "model-00002-of-00004.safetensors",
292
+ "model.layers.9.self_attn.k_proj.weight": "model-00002-of-00004.safetensors",
293
+ "model.layers.9.self_attn.o_proj.weight": "model-00002-of-00004.safetensors",
294
+ "model.layers.9.self_attn.q_proj.weight": "model-00002-of-00004.safetensors",
295
+ "model.layers.9.self_attn.v_proj.weight": "model-00002-of-00004.safetensors",
296
+ "model.norm.weight": "model-00004-of-00004.safetensors"
297
+ }
298
+ }
logs/UNIVLA_SIMPLERENV_BRIDGE_VIDEO_BS128_20k/special_tokens_map.json ADDED
@@ -0,0 +1,5 @@
 
 
 
 
 
 
1
+ {
2
+ "bos_token": "<|extra_203|>",
3
+ "eos_token": "<|extra_204|>",
4
+ "pad_token": "<|endoftext|>"
5
+ }
logs/UNIVLA_SIMPLERENV_BRIDGE_VIDEO_BS128_20k/tokenizer_config.json ADDED
@@ -0,0 +1,18 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ {
2
+ "added_tokens_decoder": {},
3
+ "auto_map": {
4
+ "AutoTokenizer": [
5
+ "tokenization_emu3.Emu3Tokenizer",
6
+ null
7
+ ]
8
+ },
9
+ "bos_token": "<|extra_203|>",
10
+ "clean_up_tokenization_spaces": true,
11
+ "eos_token": "<|extra_204|>",
12
+ "extra_special_tokens": {},
13
+ "model_max_length": 2400,
14
+ "pad_token": "<|endoftext|>",
15
+ "padding_side": "right",
16
+ "tokenizer_class": "Emu3Tokenizer",
17
+ "use_fast": false
18
+ }
logs/UNIVLA_SIMPLERENV_BRIDGE_VIDEO_BS128_20k/trainer_state.json ADDED
The diff for this file is too large to render. See raw diff