S2R-data commited on
Commit
97c357b
·
verified ·
1 Parent(s): 0cc55fa

Upload folder using huggingface_hub

Browse files
added_tokens.json ADDED
@@ -0,0 +1,6 @@
 
 
 
 
 
 
 
1
+ {
2
+ "<pad>": 151646,
3
+ "<|endoftext|>": 151643,
4
+ "<|im_end|>": 151645,
5
+ "<|im_start|>": 151644
6
+ }
config.json ADDED
@@ -0,0 +1,29 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ {
2
+ "_name_or_path": "/apdcephfs/share_300000800/user/ruotianma/self-correction/saved_models/pre_sft_models/Qwen2-7B-Instruct_sft_qwen2_7B_0123_new_veri_4.5k_20250123_025733/checkpoint-264",
3
+ "architectures": [
4
+ "Qwen2ForCausalLM"
5
+ ],
6
+ "attention_dropout": 0.0,
7
+ "bos_token_id": 128245,
8
+ "eos_token_id": 151645,
9
+ "hidden_act": "silu",
10
+ "hidden_size": 3584,
11
+ "initializer_range": 0.02,
12
+ "intermediate_size": 18944,
13
+ "max_position_embeddings": 32768,
14
+ "max_window_layers": 28,
15
+ "model_type": "qwen2",
16
+ "num_attention_heads": 28,
17
+ "num_hidden_layers": 28,
18
+ "num_key_value_heads": 4,
19
+ "pad_token_id": 151646,
20
+ "rms_norm_eps": 1e-06,
21
+ "rope_theta": 1000000.0,
22
+ "sliding_window": null,
23
+ "tie_word_embeddings": false,
24
+ "torch_dtype": "bfloat16",
25
+ "transformers_version": "4.39.3",
26
+ "use_cache": false,
27
+ "use_sliding_window": false,
28
+ "vocab_size": 151647
29
+ }
generation_config.json ADDED
@@ -0,0 +1,14 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ {
2
+ "bos_token_id": 151643,
3
+ "do_sample": true,
4
+ "eos_token_id": [
5
+ 151645,
6
+ 151643
7
+ ],
8
+ "pad_token_id": 151643,
9
+ "repetition_penalty": 1.05,
10
+ "temperature": 0.7,
11
+ "top_k": 20,
12
+ "top_p": 0.8,
13
+ "transformers_version": "4.39.3"
14
+ }
latest ADDED
@@ -0,0 +1 @@
 
 
1
+ global_step152
merges.txt ADDED
The diff for this file is too large to render. See raw diff
 
model-00001-of-00004.safetensors ADDED
@@ -0,0 +1,3 @@
 
 
 
 
1
+ version https://git-lfs.github.com/spec/v1
2
+ oid sha256:8ea3d8de4c328cf4e25ef100b43b1c87c76ed03183df80d952700553dff15678
3
+ size 4874671720
model-00002-of-00004.safetensors ADDED
@@ -0,0 +1,3 @@
 
 
 
 
1
+ version https://git-lfs.github.com/spec/v1
2
+ oid sha256:de9fbede83895e5cb720b56849d0911b6d40e03373387aabd17a81ecacdf051c
3
+ size 4932751008
model-00003-of-00004.safetensors ADDED
@@ -0,0 +1,3 @@
 
 
 
 
1
+ version https://git-lfs.github.com/spec/v1
2
+ oid sha256:0522ff876e2a55110c0430dcaa256b2443a4b9588c80b808109f82918fe04f3c
3
+ size 4330865200
model-00004-of-00004.safetensors ADDED
@@ -0,0 +1,3 @@
 
 
 
 
1
+ version https://git-lfs.github.com/spec/v1
2
+ oid sha256:010dc5343dc0cb94401382153575231c4d4a592a2c716e394de8c9241976dadf
3
+ size 1087005824
model.safetensors.index.json ADDED
@@ -0,0 +1,346 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ {
2
+ "metadata": {
3
+ "total_size": 15225254912
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.bias": "model-00001-of-00004.safetensors",
14
+ "model.layers.0.self_attn.k_proj.weight": "model-00001-of-00004.safetensors",
15
+ "model.layers.0.self_attn.o_proj.weight": "model-00001-of-00004.safetensors",
16
+ "model.layers.0.self_attn.q_proj.bias": "model-00001-of-00004.safetensors",
17
+ "model.layers.0.self_attn.q_proj.weight": "model-00001-of-00004.safetensors",
18
+ "model.layers.0.self_attn.v_proj.bias": "model-00001-of-00004.safetensors",
19
+ "model.layers.0.self_attn.v_proj.weight": "model-00001-of-00004.safetensors",
20
+ "model.layers.1.input_layernorm.weight": "model-00001-of-00004.safetensors",
21
+ "model.layers.1.mlp.down_proj.weight": "model-00001-of-00004.safetensors",
22
+ "model.layers.1.mlp.gate_proj.weight": "model-00001-of-00004.safetensors",
23
+ "model.layers.1.mlp.up_proj.weight": "model-00001-of-00004.safetensors",
24
+ "model.layers.1.post_attention_layernorm.weight": "model-00001-of-00004.safetensors",
25
+ "model.layers.1.self_attn.k_proj.bias": "model-00001-of-00004.safetensors",
26
+ "model.layers.1.self_attn.k_proj.weight": "model-00001-of-00004.safetensors",
27
+ "model.layers.1.self_attn.o_proj.weight": "model-00001-of-00004.safetensors",
28
+ "model.layers.1.self_attn.q_proj.bias": "model-00001-of-00004.safetensors",
29
+ "model.layers.1.self_attn.q_proj.weight": "model-00001-of-00004.safetensors",
30
+ "model.layers.1.self_attn.v_proj.bias": "model-00001-of-00004.safetensors",
31
+ "model.layers.1.self_attn.v_proj.weight": "model-00001-of-00004.safetensors",
32
+ "model.layers.10.input_layernorm.weight": "model-00002-of-00004.safetensors",
33
+ "model.layers.10.mlp.down_proj.weight": "model-00002-of-00004.safetensors",
34
+ "model.layers.10.mlp.gate_proj.weight": "model-00002-of-00004.safetensors",
35
+ "model.layers.10.mlp.up_proj.weight": "model-00002-of-00004.safetensors",
36
+ "model.layers.10.post_attention_layernorm.weight": "model-00002-of-00004.safetensors",
37
+ "model.layers.10.self_attn.k_proj.bias": "model-00002-of-00004.safetensors",
38
+ "model.layers.10.self_attn.k_proj.weight": "model-00002-of-00004.safetensors",
39
+ "model.layers.10.self_attn.o_proj.weight": "model-00002-of-00004.safetensors",
40
+ "model.layers.10.self_attn.q_proj.bias": "model-00002-of-00004.safetensors",
41
+ "model.layers.10.self_attn.q_proj.weight": "model-00002-of-00004.safetensors",
42
+ "model.layers.10.self_attn.v_proj.bias": "model-00002-of-00004.safetensors",
43
+ "model.layers.10.self_attn.v_proj.weight": "model-00002-of-00004.safetensors",
44
+ "model.layers.11.input_layernorm.weight": "model-00002-of-00004.safetensors",
45
+ "model.layers.11.mlp.down_proj.weight": "model-00002-of-00004.safetensors",
46
+ "model.layers.11.mlp.gate_proj.weight": "model-00002-of-00004.safetensors",
47
+ "model.layers.11.mlp.up_proj.weight": "model-00002-of-00004.safetensors",
48
+ "model.layers.11.post_attention_layernorm.weight": "model-00002-of-00004.safetensors",
49
+ "model.layers.11.self_attn.k_proj.bias": "model-00002-of-00004.safetensors",
50
+ "model.layers.11.self_attn.k_proj.weight": "model-00002-of-00004.safetensors",
51
+ "model.layers.11.self_attn.o_proj.weight": "model-00002-of-00004.safetensors",
52
+ "model.layers.11.self_attn.q_proj.bias": "model-00002-of-00004.safetensors",
53
+ "model.layers.11.self_attn.q_proj.weight": "model-00002-of-00004.safetensors",
54
+ "model.layers.11.self_attn.v_proj.bias": "model-00002-of-00004.safetensors",
55
+ "model.layers.11.self_attn.v_proj.weight": "model-00002-of-00004.safetensors",
56
+ "model.layers.12.input_layernorm.weight": "model-00002-of-00004.safetensors",
57
+ "model.layers.12.mlp.down_proj.weight": "model-00002-of-00004.safetensors",
58
+ "model.layers.12.mlp.gate_proj.weight": "model-00002-of-00004.safetensors",
59
+ "model.layers.12.mlp.up_proj.weight": "model-00002-of-00004.safetensors",
60
+ "model.layers.12.post_attention_layernorm.weight": "model-00002-of-00004.safetensors",
61
+ "model.layers.12.self_attn.k_proj.bias": "model-00002-of-00004.safetensors",
62
+ "model.layers.12.self_attn.k_proj.weight": "model-00002-of-00004.safetensors",
63
+ "model.layers.12.self_attn.o_proj.weight": "model-00002-of-00004.safetensors",
64
+ "model.layers.12.self_attn.q_proj.bias": "model-00002-of-00004.safetensors",
65
+ "model.layers.12.self_attn.q_proj.weight": "model-00002-of-00004.safetensors",
66
+ "model.layers.12.self_attn.v_proj.bias": "model-00002-of-00004.safetensors",
67
+ "model.layers.12.self_attn.v_proj.weight": "model-00002-of-00004.safetensors",
68
+ "model.layers.13.input_layernorm.weight": "model-00002-of-00004.safetensors",
69
+ "model.layers.13.mlp.down_proj.weight": "model-00002-of-00004.safetensors",
70
+ "model.layers.13.mlp.gate_proj.weight": "model-00002-of-00004.safetensors",
71
+ "model.layers.13.mlp.up_proj.weight": "model-00002-of-00004.safetensors",
72
+ "model.layers.13.post_attention_layernorm.weight": "model-00002-of-00004.safetensors",
73
+ "model.layers.13.self_attn.k_proj.bias": "model-00002-of-00004.safetensors",
74
+ "model.layers.13.self_attn.k_proj.weight": "model-00002-of-00004.safetensors",
75
+ "model.layers.13.self_attn.o_proj.weight": "model-00002-of-00004.safetensors",
76
+ "model.layers.13.self_attn.q_proj.bias": "model-00002-of-00004.safetensors",
77
+ "model.layers.13.self_attn.q_proj.weight": "model-00002-of-00004.safetensors",
78
+ "model.layers.13.self_attn.v_proj.bias": "model-00002-of-00004.safetensors",
79
+ "model.layers.13.self_attn.v_proj.weight": "model-00002-of-00004.safetensors",
80
+ "model.layers.14.input_layernorm.weight": "model-00002-of-00004.safetensors",
81
+ "model.layers.14.mlp.down_proj.weight": "model-00002-of-00004.safetensors",
82
+ "model.layers.14.mlp.gate_proj.weight": "model-00002-of-00004.safetensors",
83
+ "model.layers.14.mlp.up_proj.weight": "model-00002-of-00004.safetensors",
84
+ "model.layers.14.post_attention_layernorm.weight": "model-00002-of-00004.safetensors",
85
+ "model.layers.14.self_attn.k_proj.bias": "model-00002-of-00004.safetensors",
86
+ "model.layers.14.self_attn.k_proj.weight": "model-00002-of-00004.safetensors",
87
+ "model.layers.14.self_attn.o_proj.weight": "model-00002-of-00004.safetensors",
88
+ "model.layers.14.self_attn.q_proj.bias": "model-00002-of-00004.safetensors",
89
+ "model.layers.14.self_attn.q_proj.weight": "model-00002-of-00004.safetensors",
90
+ "model.layers.14.self_attn.v_proj.bias": "model-00002-of-00004.safetensors",
91
+ "model.layers.14.self_attn.v_proj.weight": "model-00002-of-00004.safetensors",
92
+ "model.layers.15.input_layernorm.weight": "model-00002-of-00004.safetensors",
93
+ "model.layers.15.mlp.down_proj.weight": "model-00002-of-00004.safetensors",
94
+ "model.layers.15.mlp.gate_proj.weight": "model-00002-of-00004.safetensors",
95
+ "model.layers.15.mlp.up_proj.weight": "model-00002-of-00004.safetensors",
96
+ "model.layers.15.post_attention_layernorm.weight": "model-00002-of-00004.safetensors",
97
+ "model.layers.15.self_attn.k_proj.bias": "model-00002-of-00004.safetensors",
98
+ "model.layers.15.self_attn.k_proj.weight": "model-00002-of-00004.safetensors",
99
+ "model.layers.15.self_attn.o_proj.weight": "model-00002-of-00004.safetensors",
100
+ "model.layers.15.self_attn.q_proj.bias": "model-00002-of-00004.safetensors",
101
+ "model.layers.15.self_attn.q_proj.weight": "model-00002-of-00004.safetensors",
102
+ "model.layers.15.self_attn.v_proj.bias": "model-00002-of-00004.safetensors",
103
+ "model.layers.15.self_attn.v_proj.weight": "model-00002-of-00004.safetensors",
104
+ "model.layers.16.input_layernorm.weight": "model-00002-of-00004.safetensors",
105
+ "model.layers.16.mlp.down_proj.weight": "model-00002-of-00004.safetensors",
106
+ "model.layers.16.mlp.gate_proj.weight": "model-00002-of-00004.safetensors",
107
+ "model.layers.16.mlp.up_proj.weight": "model-00002-of-00004.safetensors",
108
+ "model.layers.16.post_attention_layernorm.weight": "model-00002-of-00004.safetensors",
109
+ "model.layers.16.self_attn.k_proj.bias": "model-00002-of-00004.safetensors",
110
+ "model.layers.16.self_attn.k_proj.weight": "model-00002-of-00004.safetensors",
111
+ "model.layers.16.self_attn.o_proj.weight": "model-00002-of-00004.safetensors",
112
+ "model.layers.16.self_attn.q_proj.bias": "model-00002-of-00004.safetensors",
113
+ "model.layers.16.self_attn.q_proj.weight": "model-00002-of-00004.safetensors",
114
+ "model.layers.16.self_attn.v_proj.bias": "model-00002-of-00004.safetensors",
115
+ "model.layers.16.self_attn.v_proj.weight": "model-00002-of-00004.safetensors",
116
+ "model.layers.17.input_layernorm.weight": "model-00002-of-00004.safetensors",
117
+ "model.layers.17.mlp.down_proj.weight": "model-00002-of-00004.safetensors",
118
+ "model.layers.17.mlp.gate_proj.weight": "model-00002-of-00004.safetensors",
119
+ "model.layers.17.mlp.up_proj.weight": "model-00002-of-00004.safetensors",
120
+ "model.layers.17.post_attention_layernorm.weight": "model-00002-of-00004.safetensors",
121
+ "model.layers.17.self_attn.k_proj.bias": "model-00002-of-00004.safetensors",
122
+ "model.layers.17.self_attn.k_proj.weight": "model-00002-of-00004.safetensors",
123
+ "model.layers.17.self_attn.o_proj.weight": "model-00002-of-00004.safetensors",
124
+ "model.layers.17.self_attn.q_proj.bias": "model-00002-of-00004.safetensors",
125
+ "model.layers.17.self_attn.q_proj.weight": "model-00002-of-00004.safetensors",
126
+ "model.layers.17.self_attn.v_proj.bias": "model-00002-of-00004.safetensors",
127
+ "model.layers.17.self_attn.v_proj.weight": "model-00002-of-00004.safetensors",
128
+ "model.layers.18.input_layernorm.weight": "model-00003-of-00004.safetensors",
129
+ "model.layers.18.mlp.down_proj.weight": "model-00003-of-00004.safetensors",
130
+ "model.layers.18.mlp.gate_proj.weight": "model-00002-of-00004.safetensors",
131
+ "model.layers.18.mlp.up_proj.weight": "model-00002-of-00004.safetensors",
132
+ "model.layers.18.post_attention_layernorm.weight": "model-00003-of-00004.safetensors",
133
+ "model.layers.18.self_attn.k_proj.bias": "model-00002-of-00004.safetensors",
134
+ "model.layers.18.self_attn.k_proj.weight": "model-00002-of-00004.safetensors",
135
+ "model.layers.18.self_attn.o_proj.weight": "model-00002-of-00004.safetensors",
136
+ "model.layers.18.self_attn.q_proj.bias": "model-00002-of-00004.safetensors",
137
+ "model.layers.18.self_attn.q_proj.weight": "model-00002-of-00004.safetensors",
138
+ "model.layers.18.self_attn.v_proj.bias": "model-00002-of-00004.safetensors",
139
+ "model.layers.18.self_attn.v_proj.weight": "model-00002-of-00004.safetensors",
140
+ "model.layers.19.input_layernorm.weight": "model-00003-of-00004.safetensors",
141
+ "model.layers.19.mlp.down_proj.weight": "model-00003-of-00004.safetensors",
142
+ "model.layers.19.mlp.gate_proj.weight": "model-00003-of-00004.safetensors",
143
+ "model.layers.19.mlp.up_proj.weight": "model-00003-of-00004.safetensors",
144
+ "model.layers.19.post_attention_layernorm.weight": "model-00003-of-00004.safetensors",
145
+ "model.layers.19.self_attn.k_proj.bias": "model-00003-of-00004.safetensors",
146
+ "model.layers.19.self_attn.k_proj.weight": "model-00003-of-00004.safetensors",
147
+ "model.layers.19.self_attn.o_proj.weight": "model-00003-of-00004.safetensors",
148
+ "model.layers.19.self_attn.q_proj.bias": "model-00003-of-00004.safetensors",
149
+ "model.layers.19.self_attn.q_proj.weight": "model-00003-of-00004.safetensors",
150
+ "model.layers.19.self_attn.v_proj.bias": "model-00003-of-00004.safetensors",
151
+ "model.layers.19.self_attn.v_proj.weight": "model-00003-of-00004.safetensors",
152
+ "model.layers.2.input_layernorm.weight": "model-00001-of-00004.safetensors",
153
+ "model.layers.2.mlp.down_proj.weight": "model-00001-of-00004.safetensors",
154
+ "model.layers.2.mlp.gate_proj.weight": "model-00001-of-00004.safetensors",
155
+ "model.layers.2.mlp.up_proj.weight": "model-00001-of-00004.safetensors",
156
+ "model.layers.2.post_attention_layernorm.weight": "model-00001-of-00004.safetensors",
157
+ "model.layers.2.self_attn.k_proj.bias": "model-00001-of-00004.safetensors",
158
+ "model.layers.2.self_attn.k_proj.weight": "model-00001-of-00004.safetensors",
159
+ "model.layers.2.self_attn.o_proj.weight": "model-00001-of-00004.safetensors",
160
+ "model.layers.2.self_attn.q_proj.bias": "model-00001-of-00004.safetensors",
161
+ "model.layers.2.self_attn.q_proj.weight": "model-00001-of-00004.safetensors",
162
+ "model.layers.2.self_attn.v_proj.bias": "model-00001-of-00004.safetensors",
163
+ "model.layers.2.self_attn.v_proj.weight": "model-00001-of-00004.safetensors",
164
+ "model.layers.20.input_layernorm.weight": "model-00003-of-00004.safetensors",
165
+ "model.layers.20.mlp.down_proj.weight": "model-00003-of-00004.safetensors",
166
+ "model.layers.20.mlp.gate_proj.weight": "model-00003-of-00004.safetensors",
167
+ "model.layers.20.mlp.up_proj.weight": "model-00003-of-00004.safetensors",
168
+ "model.layers.20.post_attention_layernorm.weight": "model-00003-of-00004.safetensors",
169
+ "model.layers.20.self_attn.k_proj.bias": "model-00003-of-00004.safetensors",
170
+ "model.layers.20.self_attn.k_proj.weight": "model-00003-of-00004.safetensors",
171
+ "model.layers.20.self_attn.o_proj.weight": "model-00003-of-00004.safetensors",
172
+ "model.layers.20.self_attn.q_proj.bias": "model-00003-of-00004.safetensors",
173
+ "model.layers.20.self_attn.q_proj.weight": "model-00003-of-00004.safetensors",
174
+ "model.layers.20.self_attn.v_proj.bias": "model-00003-of-00004.safetensors",
175
+ "model.layers.20.self_attn.v_proj.weight": "model-00003-of-00004.safetensors",
176
+ "model.layers.21.input_layernorm.weight": "model-00003-of-00004.safetensors",
177
+ "model.layers.21.mlp.down_proj.weight": "model-00003-of-00004.safetensors",
178
+ "model.layers.21.mlp.gate_proj.weight": "model-00003-of-00004.safetensors",
179
+ "model.layers.21.mlp.up_proj.weight": "model-00003-of-00004.safetensors",
180
+ "model.layers.21.post_attention_layernorm.weight": "model-00003-of-00004.safetensors",
181
+ "model.layers.21.self_attn.k_proj.bias": "model-00003-of-00004.safetensors",
182
+ "model.layers.21.self_attn.k_proj.weight": "model-00003-of-00004.safetensors",
183
+ "model.layers.21.self_attn.o_proj.weight": "model-00003-of-00004.safetensors",
184
+ "model.layers.21.self_attn.q_proj.bias": "model-00003-of-00004.safetensors",
185
+ "model.layers.21.self_attn.q_proj.weight": "model-00003-of-00004.safetensors",
186
+ "model.layers.21.self_attn.v_proj.bias": "model-00003-of-00004.safetensors",
187
+ "model.layers.21.self_attn.v_proj.weight": "model-00003-of-00004.safetensors",
188
+ "model.layers.22.input_layernorm.weight": "model-00003-of-00004.safetensors",
189
+ "model.layers.22.mlp.down_proj.weight": "model-00003-of-00004.safetensors",
190
+ "model.layers.22.mlp.gate_proj.weight": "model-00003-of-00004.safetensors",
191
+ "model.layers.22.mlp.up_proj.weight": "model-00003-of-00004.safetensors",
192
+ "model.layers.22.post_attention_layernorm.weight": "model-00003-of-00004.safetensors",
193
+ "model.layers.22.self_attn.k_proj.bias": "model-00003-of-00004.safetensors",
194
+ "model.layers.22.self_attn.k_proj.weight": "model-00003-of-00004.safetensors",
195
+ "model.layers.22.self_attn.o_proj.weight": "model-00003-of-00004.safetensors",
196
+ "model.layers.22.self_attn.q_proj.bias": "model-00003-of-00004.safetensors",
197
+ "model.layers.22.self_attn.q_proj.weight": "model-00003-of-00004.safetensors",
198
+ "model.layers.22.self_attn.v_proj.bias": "model-00003-of-00004.safetensors",
199
+ "model.layers.22.self_attn.v_proj.weight": "model-00003-of-00004.safetensors",
200
+ "model.layers.23.input_layernorm.weight": "model-00003-of-00004.safetensors",
201
+ "model.layers.23.mlp.down_proj.weight": "model-00003-of-00004.safetensors",
202
+ "model.layers.23.mlp.gate_proj.weight": "model-00003-of-00004.safetensors",
203
+ "model.layers.23.mlp.up_proj.weight": "model-00003-of-00004.safetensors",
204
+ "model.layers.23.post_attention_layernorm.weight": "model-00003-of-00004.safetensors",
205
+ "model.layers.23.self_attn.k_proj.bias": "model-00003-of-00004.safetensors",
206
+ "model.layers.23.self_attn.k_proj.weight": "model-00003-of-00004.safetensors",
207
+ "model.layers.23.self_attn.o_proj.weight": "model-00003-of-00004.safetensors",
208
+ "model.layers.23.self_attn.q_proj.bias": "model-00003-of-00004.safetensors",
209
+ "model.layers.23.self_attn.q_proj.weight": "model-00003-of-00004.safetensors",
210
+ "model.layers.23.self_attn.v_proj.bias": "model-00003-of-00004.safetensors",
211
+ "model.layers.23.self_attn.v_proj.weight": "model-00003-of-00004.safetensors",
212
+ "model.layers.24.input_layernorm.weight": "model-00003-of-00004.safetensors",
213
+ "model.layers.24.mlp.down_proj.weight": "model-00003-of-00004.safetensors",
214
+ "model.layers.24.mlp.gate_proj.weight": "model-00003-of-00004.safetensors",
215
+ "model.layers.24.mlp.up_proj.weight": "model-00003-of-00004.safetensors",
216
+ "model.layers.24.post_attention_layernorm.weight": "model-00003-of-00004.safetensors",
217
+ "model.layers.24.self_attn.k_proj.bias": "model-00003-of-00004.safetensors",
218
+ "model.layers.24.self_attn.k_proj.weight": "model-00003-of-00004.safetensors",
219
+ "model.layers.24.self_attn.o_proj.weight": "model-00003-of-00004.safetensors",
220
+ "model.layers.24.self_attn.q_proj.bias": "model-00003-of-00004.safetensors",
221
+ "model.layers.24.self_attn.q_proj.weight": "model-00003-of-00004.safetensors",
222
+ "model.layers.24.self_attn.v_proj.bias": "model-00003-of-00004.safetensors",
223
+ "model.layers.24.self_attn.v_proj.weight": "model-00003-of-00004.safetensors",
224
+ "model.layers.25.input_layernorm.weight": "model-00003-of-00004.safetensors",
225
+ "model.layers.25.mlp.down_proj.weight": "model-00003-of-00004.safetensors",
226
+ "model.layers.25.mlp.gate_proj.weight": "model-00003-of-00004.safetensors",
227
+ "model.layers.25.mlp.up_proj.weight": "model-00003-of-00004.safetensors",
228
+ "model.layers.25.post_attention_layernorm.weight": "model-00003-of-00004.safetensors",
229
+ "model.layers.25.self_attn.k_proj.bias": "model-00003-of-00004.safetensors",
230
+ "model.layers.25.self_attn.k_proj.weight": "model-00003-of-00004.safetensors",
231
+ "model.layers.25.self_attn.o_proj.weight": "model-00003-of-00004.safetensors",
232
+ "model.layers.25.self_attn.q_proj.bias": "model-00003-of-00004.safetensors",
233
+ "model.layers.25.self_attn.q_proj.weight": "model-00003-of-00004.safetensors",
234
+ "model.layers.25.self_attn.v_proj.bias": "model-00003-of-00004.safetensors",
235
+ "model.layers.25.self_attn.v_proj.weight": "model-00003-of-00004.safetensors",
236
+ "model.layers.26.input_layernorm.weight": "model-00003-of-00004.safetensors",
237
+ "model.layers.26.mlp.down_proj.weight": "model-00003-of-00004.safetensors",
238
+ "model.layers.26.mlp.gate_proj.weight": "model-00003-of-00004.safetensors",
239
+ "model.layers.26.mlp.up_proj.weight": "model-00003-of-00004.safetensors",
240
+ "model.layers.26.post_attention_layernorm.weight": "model-00003-of-00004.safetensors",
241
+ "model.layers.26.self_attn.k_proj.bias": "model-00003-of-00004.safetensors",
242
+ "model.layers.26.self_attn.k_proj.weight": "model-00003-of-00004.safetensors",
243
+ "model.layers.26.self_attn.o_proj.weight": "model-00003-of-00004.safetensors",
244
+ "model.layers.26.self_attn.q_proj.bias": "model-00003-of-00004.safetensors",
245
+ "model.layers.26.self_attn.q_proj.weight": "model-00003-of-00004.safetensors",
246
+ "model.layers.26.self_attn.v_proj.bias": "model-00003-of-00004.safetensors",
247
+ "model.layers.26.self_attn.v_proj.weight": "model-00003-of-00004.safetensors",
248
+ "model.layers.27.input_layernorm.weight": "model-00003-of-00004.safetensors",
249
+ "model.layers.27.mlp.down_proj.weight": "model-00003-of-00004.safetensors",
250
+ "model.layers.27.mlp.gate_proj.weight": "model-00003-of-00004.safetensors",
251
+ "model.layers.27.mlp.up_proj.weight": "model-00003-of-00004.safetensors",
252
+ "model.layers.27.post_attention_layernorm.weight": "model-00003-of-00004.safetensors",
253
+ "model.layers.27.self_attn.k_proj.bias": "model-00003-of-00004.safetensors",
254
+ "model.layers.27.self_attn.k_proj.weight": "model-00003-of-00004.safetensors",
255
+ "model.layers.27.self_attn.o_proj.weight": "model-00003-of-00004.safetensors",
256
+ "model.layers.27.self_attn.q_proj.bias": "model-00003-of-00004.safetensors",
257
+ "model.layers.27.self_attn.q_proj.weight": "model-00003-of-00004.safetensors",
258
+ "model.layers.27.self_attn.v_proj.bias": "model-00003-of-00004.safetensors",
259
+ "model.layers.27.self_attn.v_proj.weight": "model-00003-of-00004.safetensors",
260
+ "model.layers.3.input_layernorm.weight": "model-00001-of-00004.safetensors",
261
+ "model.layers.3.mlp.down_proj.weight": "model-00001-of-00004.safetensors",
262
+ "model.layers.3.mlp.gate_proj.weight": "model-00001-of-00004.safetensors",
263
+ "model.layers.3.mlp.up_proj.weight": "model-00001-of-00004.safetensors",
264
+ "model.layers.3.post_attention_layernorm.weight": "model-00001-of-00004.safetensors",
265
+ "model.layers.3.self_attn.k_proj.bias": "model-00001-of-00004.safetensors",
266
+ "model.layers.3.self_attn.k_proj.weight": "model-00001-of-00004.safetensors",
267
+ "model.layers.3.self_attn.o_proj.weight": "model-00001-of-00004.safetensors",
268
+ "model.layers.3.self_attn.q_proj.bias": "model-00001-of-00004.safetensors",
269
+ "model.layers.3.self_attn.q_proj.weight": "model-00001-of-00004.safetensors",
270
+ "model.layers.3.self_attn.v_proj.bias": "model-00001-of-00004.safetensors",
271
+ "model.layers.3.self_attn.v_proj.weight": "model-00001-of-00004.safetensors",
272
+ "model.layers.4.input_layernorm.weight": "model-00001-of-00004.safetensors",
273
+ "model.layers.4.mlp.down_proj.weight": "model-00001-of-00004.safetensors",
274
+ "model.layers.4.mlp.gate_proj.weight": "model-00001-of-00004.safetensors",
275
+ "model.layers.4.mlp.up_proj.weight": "model-00001-of-00004.safetensors",
276
+ "model.layers.4.post_attention_layernorm.weight": "model-00001-of-00004.safetensors",
277
+ "model.layers.4.self_attn.k_proj.bias": "model-00001-of-00004.safetensors",
278
+ "model.layers.4.self_attn.k_proj.weight": "model-00001-of-00004.safetensors",
279
+ "model.layers.4.self_attn.o_proj.weight": "model-00001-of-00004.safetensors",
280
+ "model.layers.4.self_attn.q_proj.bias": "model-00001-of-00004.safetensors",
281
+ "model.layers.4.self_attn.q_proj.weight": "model-00001-of-00004.safetensors",
282
+ "model.layers.4.self_attn.v_proj.bias": "model-00001-of-00004.safetensors",
283
+ "model.layers.4.self_attn.v_proj.weight": "model-00001-of-00004.safetensors",
284
+ "model.layers.5.input_layernorm.weight": "model-00001-of-00004.safetensors",
285
+ "model.layers.5.mlp.down_proj.weight": "model-00001-of-00004.safetensors",
286
+ "model.layers.5.mlp.gate_proj.weight": "model-00001-of-00004.safetensors",
287
+ "model.layers.5.mlp.up_proj.weight": "model-00001-of-00004.safetensors",
288
+ "model.layers.5.post_attention_layernorm.weight": "model-00001-of-00004.safetensors",
289
+ "model.layers.5.self_attn.k_proj.bias": "model-00001-of-00004.safetensors",
290
+ "model.layers.5.self_attn.k_proj.weight": "model-00001-of-00004.safetensors",
291
+ "model.layers.5.self_attn.o_proj.weight": "model-00001-of-00004.safetensors",
292
+ "model.layers.5.self_attn.q_proj.bias": "model-00001-of-00004.safetensors",
293
+ "model.layers.5.self_attn.q_proj.weight": "model-00001-of-00004.safetensors",
294
+ "model.layers.5.self_attn.v_proj.bias": "model-00001-of-00004.safetensors",
295
+ "model.layers.5.self_attn.v_proj.weight": "model-00001-of-00004.safetensors",
296
+ "model.layers.6.input_layernorm.weight": "model-00001-of-00004.safetensors",
297
+ "model.layers.6.mlp.down_proj.weight": "model-00001-of-00004.safetensors",
298
+ "model.layers.6.mlp.gate_proj.weight": "model-00001-of-00004.safetensors",
299
+ "model.layers.6.mlp.up_proj.weight": "model-00001-of-00004.safetensors",
300
+ "model.layers.6.post_attention_layernorm.weight": "model-00001-of-00004.safetensors",
301
+ "model.layers.6.self_attn.k_proj.bias": "model-00001-of-00004.safetensors",
302
+ "model.layers.6.self_attn.k_proj.weight": "model-00001-of-00004.safetensors",
303
+ "model.layers.6.self_attn.o_proj.weight": "model-00001-of-00004.safetensors",
304
+ "model.layers.6.self_attn.q_proj.bias": "model-00001-of-00004.safetensors",
305
+ "model.layers.6.self_attn.q_proj.weight": "model-00001-of-00004.safetensors",
306
+ "model.layers.6.self_attn.v_proj.bias": "model-00001-of-00004.safetensors",
307
+ "model.layers.6.self_attn.v_proj.weight": "model-00001-of-00004.safetensors",
308
+ "model.layers.7.input_layernorm.weight": "model-00001-of-00004.safetensors",
309
+ "model.layers.7.mlp.down_proj.weight": "model-00001-of-00004.safetensors",
310
+ "model.layers.7.mlp.gate_proj.weight": "model-00001-of-00004.safetensors",
311
+ "model.layers.7.mlp.up_proj.weight": "model-00001-of-00004.safetensors",
312
+ "model.layers.7.post_attention_layernorm.weight": "model-00001-of-00004.safetensors",
313
+ "model.layers.7.self_attn.k_proj.bias": "model-00001-of-00004.safetensors",
314
+ "model.layers.7.self_attn.k_proj.weight": "model-00001-of-00004.safetensors",
315
+ "model.layers.7.self_attn.o_proj.weight": "model-00001-of-00004.safetensors",
316
+ "model.layers.7.self_attn.q_proj.bias": "model-00001-of-00004.safetensors",
317
+ "model.layers.7.self_attn.q_proj.weight": "model-00001-of-00004.safetensors",
318
+ "model.layers.7.self_attn.v_proj.bias": "model-00001-of-00004.safetensors",
319
+ "model.layers.7.self_attn.v_proj.weight": "model-00001-of-00004.safetensors",
320
+ "model.layers.8.input_layernorm.weight": "model-00002-of-00004.safetensors",
321
+ "model.layers.8.mlp.down_proj.weight": "model-00002-of-00004.safetensors",
322
+ "model.layers.8.mlp.gate_proj.weight": "model-00002-of-00004.safetensors",
323
+ "model.layers.8.mlp.up_proj.weight": "model-00002-of-00004.safetensors",
324
+ "model.layers.8.post_attention_layernorm.weight": "model-00002-of-00004.safetensors",
325
+ "model.layers.8.self_attn.k_proj.bias": "model-00001-of-00004.safetensors",
326
+ "model.layers.8.self_attn.k_proj.weight": "model-00001-of-00004.safetensors",
327
+ "model.layers.8.self_attn.o_proj.weight": "model-00001-of-00004.safetensors",
328
+ "model.layers.8.self_attn.q_proj.bias": "model-00001-of-00004.safetensors",
329
+ "model.layers.8.self_attn.q_proj.weight": "model-00001-of-00004.safetensors",
330
+ "model.layers.8.self_attn.v_proj.bias": "model-00001-of-00004.safetensors",
331
+ "model.layers.8.self_attn.v_proj.weight": "model-00001-of-00004.safetensors",
332
+ "model.layers.9.input_layernorm.weight": "model-00002-of-00004.safetensors",
333
+ "model.layers.9.mlp.down_proj.weight": "model-00002-of-00004.safetensors",
334
+ "model.layers.9.mlp.gate_proj.weight": "model-00002-of-00004.safetensors",
335
+ "model.layers.9.mlp.up_proj.weight": "model-00002-of-00004.safetensors",
336
+ "model.layers.9.post_attention_layernorm.weight": "model-00002-of-00004.safetensors",
337
+ "model.layers.9.self_attn.k_proj.bias": "model-00002-of-00004.safetensors",
338
+ "model.layers.9.self_attn.k_proj.weight": "model-00002-of-00004.safetensors",
339
+ "model.layers.9.self_attn.o_proj.weight": "model-00002-of-00004.safetensors",
340
+ "model.layers.9.self_attn.q_proj.bias": "model-00002-of-00004.safetensors",
341
+ "model.layers.9.self_attn.q_proj.weight": "model-00002-of-00004.safetensors",
342
+ "model.layers.9.self_attn.v_proj.bias": "model-00002-of-00004.safetensors",
343
+ "model.layers.9.self_attn.v_proj.weight": "model-00002-of-00004.safetensors",
344
+ "model.norm.weight": "model-00003-of-00004.safetensors"
345
+ }
346
+ }
rng_state_0.pth ADDED
@@ -0,0 +1,3 @@
 
 
 
 
1
+ version https://git-lfs.github.com/spec/v1
2
+ oid sha256:460947adbbb267a1b4cf3d93aa5766a289cdc8f60876efe3c1b4f177d7f321dd
3
+ size 15984
rng_state_1.pth ADDED
@@ -0,0 +1,3 @@
 
 
 
 
1
+ version https://git-lfs.github.com/spec/v1
2
+ oid sha256:5993976e762f12e155b544790780086d8e52904534e8576ede356e2c6642b070
3
+ size 15984
rng_state_10.pth ADDED
@@ -0,0 +1,3 @@
 
 
 
 
1
+ version https://git-lfs.github.com/spec/v1
2
+ oid sha256:7f4212887973431f08ed375f9bfa366b7d01a965f573bfb82ee05394b7156a6a
3
+ size 15997
rng_state_11.pth ADDED
@@ -0,0 +1,3 @@
 
 
 
 
1
+ version https://git-lfs.github.com/spec/v1
2
+ oid sha256:0d5a26310439da234901a58091c2ddf51dd30f49b113858d6e263b434ea4cc24
3
+ size 15997
rng_state_12.pth ADDED
@@ -0,0 +1,3 @@
 
 
 
 
1
+ version https://git-lfs.github.com/spec/v1
2
+ oid sha256:9c4c69d69a8131c7f7a6cb00d3d5d90549176cbc87f2381e5252694b40acfe21
3
+ size 15997
rng_state_13.pth ADDED
@@ -0,0 +1,3 @@
 
 
 
 
1
+ version https://git-lfs.github.com/spec/v1
2
+ oid sha256:e69838ef5f3823a2404592bccdfe5a8c5be816f1011dbf5ae510d1169e27ea9e
3
+ size 15997
rng_state_14.pth ADDED
@@ -0,0 +1,3 @@
 
 
 
 
1
+ version https://git-lfs.github.com/spec/v1
2
+ oid sha256:266cfbe571a85dd7b8e794be43c738dbb694e3b541d62009450a7ebcfe35b843
3
+ size 15997
rng_state_15.pth ADDED
@@ -0,0 +1,3 @@
 
 
 
 
1
+ version https://git-lfs.github.com/spec/v1
2
+ oid sha256:74c8ec836fd02311db69aed820b895adca7be05a4da774cdbd6b772bc17e303f
3
+ size 15997
rng_state_16.pth ADDED
@@ -0,0 +1,3 @@
 
 
 
 
1
+ version https://git-lfs.github.com/spec/v1
2
+ oid sha256:5bba6034e2a5da3d7ac0b923f1be61d7ae11376a9d274a4fb922488e33633c25
3
+ size 15997
rng_state_17.pth ADDED
@@ -0,0 +1,3 @@
 
 
 
 
1
+ version https://git-lfs.github.com/spec/v1
2
+ oid sha256:96869f2101e2e2f6bafec3d64b5f73b2e55dd3262bfb3b4aaefe0469dd4e9f54
3
+ size 15997
rng_state_18.pth ADDED
@@ -0,0 +1,3 @@
 
 
 
 
1
+ version https://git-lfs.github.com/spec/v1
2
+ oid sha256:3c1b20cf4a64e4e4240abb5e9e64ac86bf77aeb6f66f7be622542a442c46a949
3
+ size 15997
rng_state_19.pth ADDED
@@ -0,0 +1,3 @@
 
 
 
 
1
+ version https://git-lfs.github.com/spec/v1
2
+ oid sha256:1ea6d99ffe421740269c5ecaa4e3ce2e610c29f27a394eb9c2daea14030c3186
3
+ size 15997
rng_state_2.pth ADDED
@@ -0,0 +1,3 @@
 
 
 
 
1
+ version https://git-lfs.github.com/spec/v1
2
+ oid sha256:c99c0a6a60b2b7235bf06e5ce692d74a7c029aaa273e162330933aa22cc911ff
3
+ size 15984
rng_state_20.pth ADDED
@@ -0,0 +1,3 @@
 
 
 
 
1
+ version https://git-lfs.github.com/spec/v1
2
+ oid sha256:800bb5171e269bb609bdec588de21ccb58c1a7b76dcb82eb96e0ec74681092ec
3
+ size 15997
rng_state_21.pth ADDED
@@ -0,0 +1,3 @@
 
 
 
 
1
+ version https://git-lfs.github.com/spec/v1
2
+ oid sha256:f6eee96f029f426cc97858b6a4543a66bca0c86e87a89744625cc620d8b10f74
3
+ size 15997
rng_state_22.pth ADDED
@@ -0,0 +1,3 @@
 
 
 
 
1
+ version https://git-lfs.github.com/spec/v1
2
+ oid sha256:c3039346607c18a918b5c0ba396b8f1ebae8a93acd773f108401f854de98e807
3
+ size 15997
rng_state_23.pth ADDED
@@ -0,0 +1,3 @@
 
 
 
 
1
+ version https://git-lfs.github.com/spec/v1
2
+ oid sha256:5d986b3b5952c69d50cc0980ac599d5967a4b6c7d56f0e7f1c0924a92ae2b3d6
3
+ size 15997
rng_state_24.pth ADDED
@@ -0,0 +1,3 @@
 
 
 
 
1
+ version https://git-lfs.github.com/spec/v1
2
+ oid sha256:6b8b4307d97259b833d72ecb078fde3b5c2daf633f483a1e49fd968d128481a6
3
+ size 15997
rng_state_25.pth ADDED
@@ -0,0 +1,3 @@
 
 
 
 
1
+ version https://git-lfs.github.com/spec/v1
2
+ oid sha256:27b1c49cdcbcc1d8bef61abb38e37d5aecb79b91262294faa2819f6dcba492ef
3
+ size 15997
rng_state_26.pth ADDED
@@ -0,0 +1,3 @@
 
 
 
 
1
+ version https://git-lfs.github.com/spec/v1
2
+ oid sha256:0b45c1590bf62bb88f41bc2d86b577146994d922e1e4a45510d3f2ac669b5520
3
+ size 15997
rng_state_27.pth ADDED
@@ -0,0 +1,3 @@
 
 
 
 
1
+ version https://git-lfs.github.com/spec/v1
2
+ oid sha256:2b63346ed51e57cc1e7ac0b03ce7fcfa13c3f2c0aea493a276456e7a28f12fc5
3
+ size 15997
rng_state_28.pth ADDED
@@ -0,0 +1,3 @@
 
 
 
 
1
+ version https://git-lfs.github.com/spec/v1
2
+ oid sha256:14efa258de61b387512281e5b904c67b5ac8ed1bc2dd401f3a2d7240900fb54f
3
+ size 15997
rng_state_29.pth ADDED
@@ -0,0 +1,3 @@
 
 
 
 
1
+ version https://git-lfs.github.com/spec/v1
2
+ oid sha256:c5ba7e1c86808ac3dc3e68c02d00e557b189daf5f54f7e3e07d8b1aa373cd35f
3
+ size 15997
rng_state_3.pth ADDED
@@ -0,0 +1,3 @@
 
 
 
 
1
+ version https://git-lfs.github.com/spec/v1
2
+ oid sha256:8131dfd4c66e2b15906309767b2bf919ad566648beb23f2471e229476bb256a2
3
+ size 15984
rng_state_30.pth ADDED
@@ -0,0 +1,3 @@
 
 
 
 
1
+ version https://git-lfs.github.com/spec/v1
2
+ oid sha256:b37d8d83b2db7759bb912b0af6fe5a8c4fc962ebf7a5f729c5e4ba09ff70f166
3
+ size 15997
rng_state_31.pth ADDED
@@ -0,0 +1,3 @@
 
 
 
 
1
+ version https://git-lfs.github.com/spec/v1
2
+ oid sha256:2127b537f71b64205f9043aa588a62bdc0f8bc18f9d847b2028c2b9537d6a3d2
3
+ size 15997
rng_state_4.pth ADDED
@@ -0,0 +1,3 @@
 
 
 
 
1
+ version https://git-lfs.github.com/spec/v1
2
+ oid sha256:600ed298ec689e55dd450e81e47b6ffa9cfc46adb7563f8abad7e605f27c52f5
3
+ size 15984
rng_state_5.pth ADDED
@@ -0,0 +1,3 @@
 
 
 
 
1
+ version https://git-lfs.github.com/spec/v1
2
+ oid sha256:23385f3e3154112166020322163ff3961f72957f9c1b0ab5c8b090e31ffda686
3
+ size 15984
rng_state_6.pth ADDED
@@ -0,0 +1,3 @@
 
 
 
 
1
+ version https://git-lfs.github.com/spec/v1
2
+ oid sha256:99e7ea329139919e8cbf230a7725b7bec620164a594aa40cb06960064a777aff
3
+ size 15984
rng_state_7.pth ADDED
@@ -0,0 +1,3 @@
 
 
 
 
1
+ version https://git-lfs.github.com/spec/v1
2
+ oid sha256:99d6ca3d66e35a4cb741af9332f2902dbda9a62a290be5b3c696752380f5eac2
3
+ size 15984
rng_state_8.pth ADDED
@@ -0,0 +1,3 @@
 
 
 
 
1
+ version https://git-lfs.github.com/spec/v1
2
+ oid sha256:a0f09b79bb157770680cbe8faf2e1b4d7160b91d9f1ea40b5da526be28958fba
3
+ size 15984
rng_state_9.pth ADDED
@@ -0,0 +1,3 @@
 
 
 
 
1
+ version https://git-lfs.github.com/spec/v1
2
+ oid sha256:5b212d8d9a712eeb90e2af9eaa86a7becc5750b16792987677a6afc433034ca9
3
+ size 15984
special_tokens_map.json ADDED
@@ -0,0 +1,28 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ {
2
+ "additional_special_tokens": [
3
+ "<|im_start|>",
4
+ "<|im_end|>"
5
+ ],
6
+ "bos_token": {
7
+ "content": "<s>",
8
+ "lstrip": false,
9
+ "normalized": false,
10
+ "rstrip": false,
11
+ "single_word": false
12
+ },
13
+ "eos_token": {
14
+ "content": "<|im_end|>",
15
+ "lstrip": false,
16
+ "normalized": false,
17
+ "rstrip": false,
18
+ "single_word": false
19
+ },
20
+ "pad_token": "<pad>",
21
+ "unk_token": {
22
+ "content": "<unk>",
23
+ "lstrip": false,
24
+ "normalized": false,
25
+ "rstrip": false,
26
+ "single_word": false
27
+ }
28
+ }
tokenizer_config.json ADDED
@@ -0,0 +1,69 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ {
2
+ "add_prefix_space": false,
3
+ "added_tokens_decoder": {
4
+ "128244": {
5
+ "content": "<unk>",
6
+ "lstrip": false,
7
+ "normalized": false,
8
+ "rstrip": false,
9
+ "single_word": false,
10
+ "special": true
11
+ },
12
+ "128245": {
13
+ "content": "<s>",
14
+ "lstrip": false,
15
+ "normalized": false,
16
+ "rstrip": false,
17
+ "single_word": false,
18
+ "special": true
19
+ },
20
+ "151643": {
21
+ "content": "<|endoftext|>",
22
+ "lstrip": false,
23
+ "normalized": false,
24
+ "rstrip": false,
25
+ "single_word": false,
26
+ "special": true
27
+ },
28
+ "151644": {
29
+ "content": "<|im_start|>",
30
+ "lstrip": false,
31
+ "normalized": false,
32
+ "rstrip": false,
33
+ "single_word": false,
34
+ "special": true
35
+ },
36
+ "151645": {
37
+ "content": "<|im_end|>",
38
+ "lstrip": false,
39
+ "normalized": false,
40
+ "rstrip": false,
41
+ "single_word": false,
42
+ "special": true
43
+ },
44
+ "151646": {
45
+ "content": "<pad>",
46
+ "lstrip": false,
47
+ "normalized": false,
48
+ "rstrip": false,
49
+ "single_word": false,
50
+ "special": true
51
+ }
52
+ },
53
+ "additional_special_tokens": [
54
+ "<|im_start|>",
55
+ "<|im_end|>"
56
+ ],
57
+ "bos_token": "<s>",
58
+ "chat_template": "{% for message in messages %}{% if loop.first and messages[0]['role'] != 'system' %}{{ '<|im_start|>system\nYou are a helpful assistant.<|im_end|>\n' }}{% endif %}{{'<|im_start|>' + message['role'] + '\n' + message['content'] + '<|im_end|>' + '\n'}}{% endfor %}{% if add_generation_prompt %}{{ '<|im_start|>assistant\n' }}{% endif %}",
59
+ "clean_up_tokenization_spaces": false,
60
+ "eos_token": "<|im_end|>",
61
+ "errors": "replace",
62
+ "model_max_length": 6000,
63
+ "pad_token": "<pad>",
64
+ "padding_side": "left",
65
+ "split_special_tokens": false,
66
+ "tokenizer_class": "Qwen2Tokenizer",
67
+ "truncation_side": "left",
68
+ "unk_token": "<unk>"
69
+ }
trainer_state.json ADDED
@@ -0,0 +1,1389 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ {
2
+ "best_metric": null,
3
+ "best_model_checkpoint": null,
4
+ "epoch": 0.3536425767049586,
5
+ "eval_steps": 500,
6
+ "global_step": 152,
7
+ "is_hyper_param_search": false,
8
+ "is_local_process_zero": true,
9
+ "is_world_process_zero": true,
10
+ "log_history": [
11
+ {
12
+ "epoch": 0.01,
13
+ "importance_ratio": 1.0001533031463623,
14
+ "kl_div_avg": 0.0022537275217473507,
15
+ "learning_rate": 0.0,
16
+ "loss_func": "stage2",
17
+ "step": 1,
18
+ "total_loss": 0.20475485920906067
19
+ },
20
+ {
21
+ "epoch": 0.01,
22
+ "importance_ratio": 1.0000330209732056,
23
+ "kl_div_avg": 0.0011816158657893538,
24
+ "learning_rate": 2.153382790366965e-07,
25
+ "loss_func": "stage2",
26
+ "step": 2,
27
+ "total_loss": 0.17304854094982147
28
+ },
29
+ {
30
+ "epoch": 0.01,
31
+ "importance_ratio": 0.9998020529747009,
32
+ "kl_div_avg": 0.0012814232613891363,
33
+ "learning_rate": 3.4130309724299266e-07,
34
+ "loss_func": "stage2",
35
+ "step": 3,
36
+ "total_loss": 0.39294394850730896
37
+ },
38
+ {
39
+ "epoch": 0.01,
40
+ "importance_ratio": 1.0002059936523438,
41
+ "kl_div_avg": 0.001280196476727724,
42
+ "learning_rate": 4.30676558073393e-07,
43
+ "loss_func": "stage2",
44
+ "step": 4,
45
+ "total_loss": 0.2844714820384979
46
+ },
47
+ {
48
+ "epoch": 0.02,
49
+ "importance_ratio": 1.0000617504119873,
50
+ "kl_div_avg": 0.0033944130409508944,
51
+ "learning_rate": 5e-07,
52
+ "loss_func": "stage2",
53
+ "step": 5,
54
+ "total_loss": 0.38719698786735535
55
+ },
56
+ {
57
+ "epoch": 0.02,
58
+ "importance_ratio": 1.0002291202545166,
59
+ "kl_div_avg": 0.0006711427122354507,
60
+ "learning_rate": 5e-07,
61
+ "loss_func": "stage2",
62
+ "step": 6,
63
+ "total_loss": -0.7354744672775269
64
+ },
65
+ {
66
+ "epoch": 0.02,
67
+ "importance_ratio": 1.0001697540283203,
68
+ "kl_div_avg": 0.0009293262264691293,
69
+ "learning_rate": 4.997668997668998e-07,
70
+ "loss_func": "stage2",
71
+ "step": 7,
72
+ "total_loss": 0.10072920471429825
73
+ },
74
+ {
75
+ "epoch": 0.02,
76
+ "importance_ratio": 1.0003812313079834,
77
+ "kl_div_avg": 0.0006424246821552515,
78
+ "learning_rate": 4.995337995337996e-07,
79
+ "loss_func": "stage2",
80
+ "step": 8,
81
+ "total_loss": -0.7356305122375488
82
+ },
83
+ {
84
+ "epoch": 0.03,
85
+ "importance_ratio": 1.0002334117889404,
86
+ "kl_div_avg": 0.001079258043318987,
87
+ "learning_rate": 4.993006993006993e-07,
88
+ "loss_func": "stage2",
89
+ "step": 9,
90
+ "total_loss": 0.1572389006614685
91
+ },
92
+ {
93
+ "epoch": 0.03,
94
+ "importance_ratio": 0.9999626874923706,
95
+ "kl_div_avg": 0.0012779454700648785,
96
+ "learning_rate": 4.990675990675991e-07,
97
+ "loss_func": "stage2",
98
+ "step": 10,
99
+ "total_loss": -0.2823958396911621
100
+ },
101
+ {
102
+ "epoch": 0.03,
103
+ "importance_ratio": 0.9999264478683472,
104
+ "kl_div_avg": 0.0010424605570733547,
105
+ "learning_rate": 4.988344988344988e-07,
106
+ "loss_func": "stage2",
107
+ "step": 11,
108
+ "total_loss": -0.4896008372306824
109
+ },
110
+ {
111
+ "epoch": 0.03,
112
+ "importance_ratio": 0.9999059438705444,
113
+ "kl_div_avg": 0.0011010458692908287,
114
+ "learning_rate": 4.986013986013987e-07,
115
+ "loss_func": "stage2",
116
+ "step": 12,
117
+ "total_loss": 0.4140966832637787
118
+ },
119
+ {
120
+ "epoch": 0.04,
121
+ "importance_ratio": 0.9999853372573853,
122
+ "kl_div_avg": 0.0014636358246207237,
123
+ "learning_rate": 4.983682983682983e-07,
124
+ "loss_func": "stage2",
125
+ "step": 13,
126
+ "total_loss": 0.4479982852935791
127
+ },
128
+ {
129
+ "epoch": 0.04,
130
+ "importance_ratio": 1.0001029968261719,
131
+ "kl_div_avg": 0.0010808318620547652,
132
+ "learning_rate": 4.981351981351981e-07,
133
+ "loss_func": "stage2",
134
+ "step": 14,
135
+ "total_loss": -0.8298860192298889
136
+ },
137
+ {
138
+ "epoch": 0.04,
139
+ "importance_ratio": 1.0000591278076172,
140
+ "kl_div_avg": 0.0012179139303043485,
141
+ "learning_rate": 4.979020979020978e-07,
142
+ "loss_func": "stage2",
143
+ "step": 15,
144
+ "total_loss": -0.8044635057449341
145
+ },
146
+ {
147
+ "epoch": 0.04,
148
+ "importance_ratio": 1.0000298023223877,
149
+ "kl_div_avg": 0.004863352049142122,
150
+ "learning_rate": 4.976689976689976e-07,
151
+ "loss_func": "stage2",
152
+ "step": 16,
153
+ "total_loss": 0.24484601616859436
154
+ },
155
+ {
156
+ "epoch": 0.05,
157
+ "importance_ratio": 1.0002245903015137,
158
+ "kl_div_avg": 0.0017589405179023743,
159
+ "learning_rate": 4.974358974358974e-07,
160
+ "loss_func": "stage2",
161
+ "step": 17,
162
+ "total_loss": -0.0013702064752578735
163
+ },
164
+ {
165
+ "epoch": 0.05,
166
+ "importance_ratio": 0.9999561309814453,
167
+ "kl_div_avg": 0.0018663634546101093,
168
+ "learning_rate": 4.972027972027972e-07,
169
+ "loss_func": "stage2",
170
+ "step": 18,
171
+ "total_loss": -0.10264579951763153
172
+ },
173
+ {
174
+ "epoch": 0.05,
175
+ "importance_ratio": 0.9998416900634766,
176
+ "kl_div_avg": 0.0018756331410259008,
177
+ "learning_rate": 4.969696969696969e-07,
178
+ "loss_func": "stage2",
179
+ "step": 19,
180
+ "total_loss": 0.48283857107162476
181
+ },
182
+ {
183
+ "epoch": 0.05,
184
+ "importance_ratio": 0.999815821647644,
185
+ "kl_div_avg": 0.0019035658333450556,
186
+ "learning_rate": 4.967365967365967e-07,
187
+ "loss_func": "stage2",
188
+ "step": 20,
189
+ "total_loss": -0.1848379671573639
190
+ },
191
+ {
192
+ "epoch": 0.06,
193
+ "importance_ratio": 0.999942421913147,
194
+ "kl_div_avg": 0.009937961585819721,
195
+ "learning_rate": 4.965034965034965e-07,
196
+ "loss_func": "stage2",
197
+ "step": 21,
198
+ "total_loss": 0.14985397458076477
199
+ },
200
+ {
201
+ "epoch": 0.06,
202
+ "importance_ratio": 0.9997897148132324,
203
+ "kl_div_avg": 0.00241913297213614,
204
+ "learning_rate": 4.962703962703962e-07,
205
+ "loss_func": "stage2",
206
+ "step": 22,
207
+ "total_loss": -0.29083502292633057
208
+ },
209
+ {
210
+ "epoch": 0.06,
211
+ "importance_ratio": 0.9998656511306763,
212
+ "kl_div_avg": 0.00263982149772346,
213
+ "learning_rate": 4.96037296037296e-07,
214
+ "loss_func": "stage2",
215
+ "step": 23,
216
+ "total_loss": -0.02688920497894287
217
+ },
218
+ {
219
+ "epoch": 0.06,
220
+ "importance_ratio": 1.0000394582748413,
221
+ "kl_div_avg": 0.0032202559523284435,
222
+ "learning_rate": 4.958041958041958e-07,
223
+ "loss_func": "stage2",
224
+ "step": 24,
225
+ "total_loss": 0.5130484104156494
226
+ },
227
+ {
228
+ "epoch": 0.07,
229
+ "importance_ratio": 1.0000278949737549,
230
+ "kl_div_avg": 0.00243174796923995,
231
+ "learning_rate": 4.955710955710956e-07,
232
+ "loss_func": "stage2",
233
+ "step": 25,
234
+ "total_loss": 0.309948205947876
235
+ },
236
+ {
237
+ "epoch": 0.07,
238
+ "importance_ratio": 0.9999406337738037,
239
+ "kl_div_avg": 0.003059545997530222,
240
+ "learning_rate": 4.953379953379953e-07,
241
+ "loss_func": "stage2",
242
+ "step": 26,
243
+ "total_loss": 0.11305176466703415
244
+ },
245
+ {
246
+ "epoch": 0.07,
247
+ "importance_ratio": 0.9999201893806458,
248
+ "kl_div_avg": 0.003822761122137308,
249
+ "learning_rate": 4.951048951048951e-07,
250
+ "loss_func": "stage2",
251
+ "step": 27,
252
+ "total_loss": 0.38959354162216187
253
+ },
254
+ {
255
+ "epoch": 0.07,
256
+ "importance_ratio": 0.9994360208511353,
257
+ "kl_div_avg": 0.0033927513286471367,
258
+ "learning_rate": 4.948717948717949e-07,
259
+ "loss_func": "stage2",
260
+ "step": 28,
261
+ "total_loss": 0.4653158485889435
262
+ },
263
+ {
264
+ "epoch": 0.07,
265
+ "importance_ratio": 0.9999792575836182,
266
+ "kl_div_avg": 0.0032504587434232235,
267
+ "learning_rate": 4.946386946386946e-07,
268
+ "loss_func": "stage2",
269
+ "step": 29,
270
+ "total_loss": 0.4534304141998291
271
+ },
272
+ {
273
+ "epoch": 0.07,
274
+ "importance_ratio": 1.0000840425491333,
275
+ "kl_div_avg": 0.002915366552770138,
276
+ "learning_rate": 4.944055944055944e-07,
277
+ "loss_func": "stage2",
278
+ "step": 30,
279
+ "total_loss": 0.46045419573783875
280
+ },
281
+ {
282
+ "epoch": 0.07,
283
+ "importance_ratio": 0.9996820688247681,
284
+ "kl_div_avg": 0.0030386601574718952,
285
+ "learning_rate": 4.941724941724942e-07,
286
+ "loss_func": "stage2",
287
+ "step": 31,
288
+ "total_loss": -0.8699095845222473
289
+ },
290
+ {
291
+ "epoch": 0.07,
292
+ "importance_ratio": 0.9997460842132568,
293
+ "kl_div_avg": 0.0037004691548645496,
294
+ "learning_rate": 4.93939393939394e-07,
295
+ "loss_func": "stage2",
296
+ "step": 32,
297
+ "total_loss": -0.23050172626972198
298
+ },
299
+ {
300
+ "epoch": 0.08,
301
+ "importance_ratio": 0.9999768137931824,
302
+ "kl_div_avg": 0.0046552978456020355,
303
+ "learning_rate": 4.937062937062936e-07,
304
+ "loss_func": "stage2",
305
+ "step": 33,
306
+ "total_loss": 0.3776797950267792
307
+ },
308
+ {
309
+ "epoch": 0.08,
310
+ "importance_ratio": 0.9999284148216248,
311
+ "kl_div_avg": 0.004839582834392786,
312
+ "learning_rate": 4.934731934731934e-07,
313
+ "loss_func": "stage2",
314
+ "step": 34,
315
+ "total_loss": 0.5804722309112549
316
+ },
317
+ {
318
+ "epoch": 0.08,
319
+ "importance_ratio": 0.999695897102356,
320
+ "kl_div_avg": 0.004378842655569315,
321
+ "learning_rate": 4.932400932400932e-07,
322
+ "loss_func": "stage2",
323
+ "step": 35,
324
+ "total_loss": 0.5690972805023193
325
+ },
326
+ {
327
+ "epoch": 0.08,
328
+ "importance_ratio": 0.9998815059661865,
329
+ "kl_div_avg": 0.0047516971826553345,
330
+ "learning_rate": 4.93006993006993e-07,
331
+ "loss_func": "stage2",
332
+ "step": 36,
333
+ "total_loss": 0.2298603653907776
334
+ },
335
+ {
336
+ "epoch": 0.09,
337
+ "importance_ratio": 0.9997518062591553,
338
+ "kl_div_avg": 0.004270514938980341,
339
+ "learning_rate": 4.927738927738927e-07,
340
+ "loss_func": "stage2",
341
+ "step": 37,
342
+ "total_loss": -0.20016932487487793
343
+ },
344
+ {
345
+ "epoch": 0.09,
346
+ "importance_ratio": 1.000083088874817,
347
+ "kl_div_avg": 0.004711843561381102,
348
+ "learning_rate": 4.925407925407925e-07,
349
+ "loss_func": "stage2",
350
+ "step": 38,
351
+ "total_loss": 0.25743457674980164
352
+ },
353
+ {
354
+ "epoch": 0.09,
355
+ "importance_ratio": 0.9999402761459351,
356
+ "kl_div_avg": 0.004922826308757067,
357
+ "learning_rate": 4.923076923076923e-07,
358
+ "loss_func": "stage2",
359
+ "step": 39,
360
+ "total_loss": -0.15881219506263733
361
+ },
362
+ {
363
+ "epoch": 0.09,
364
+ "importance_ratio": 0.999858021736145,
365
+ "kl_div_avg": 0.0039229318499565125,
366
+ "learning_rate": 4.92074592074592e-07,
367
+ "loss_func": "stage2",
368
+ "step": 40,
369
+ "total_loss": -0.23230578005313873
370
+ },
371
+ {
372
+ "epoch": 0.1,
373
+ "importance_ratio": 0.999944806098938,
374
+ "kl_div_avg": 0.00766429677605629,
375
+ "learning_rate": 4.918414918414918e-07,
376
+ "loss_func": "stage2",
377
+ "step": 41,
378
+ "total_loss": -0.03111131489276886
379
+ },
380
+ {
381
+ "epoch": 0.1,
382
+ "importance_ratio": 1.000047206878662,
383
+ "kl_div_avg": 0.005274048075079918,
384
+ "learning_rate": 4.916083916083916e-07,
385
+ "loss_func": "stage2",
386
+ "step": 42,
387
+ "total_loss": -0.033877044916152954
388
+ },
389
+ {
390
+ "epoch": 0.1,
391
+ "importance_ratio": 1.0002098083496094,
392
+ "kl_div_avg": 0.006382378749549389,
393
+ "learning_rate": 4.913752913752914e-07,
394
+ "loss_func": "stage2",
395
+ "step": 43,
396
+ "total_loss": 0.10409477353096008
397
+ },
398
+ {
399
+ "epoch": 0.1,
400
+ "importance_ratio": 0.9998437166213989,
401
+ "kl_div_avg": 0.006663881242275238,
402
+ "learning_rate": 4.911421911421911e-07,
403
+ "loss_func": "stage2",
404
+ "step": 44,
405
+ "total_loss": -0.9234535694122314
406
+ },
407
+ {
408
+ "epoch": 0.11,
409
+ "importance_ratio": 0.9999840259552002,
410
+ "kl_div_avg": 0.004546988755464554,
411
+ "learning_rate": 4.909090909090909e-07,
412
+ "loss_func": "stage2",
413
+ "step": 45,
414
+ "total_loss": 0.022589027881622314
415
+ },
416
+ {
417
+ "epoch": 0.11,
418
+ "importance_ratio": 1.0002349615097046,
419
+ "kl_div_avg": 0.0048853568732738495,
420
+ "learning_rate": 4.906759906759906e-07,
421
+ "loss_func": "stage2",
422
+ "step": 46,
423
+ "total_loss": 0.7868871688842773
424
+ },
425
+ {
426
+ "epoch": 0.11,
427
+ "importance_ratio": 1.0003743171691895,
428
+ "kl_div_avg": 0.005253675393760204,
429
+ "learning_rate": 4.904428904428905e-07,
430
+ "loss_func": "stage2",
431
+ "step": 47,
432
+ "total_loss": 0.7918493747711182
433
+ },
434
+ {
435
+ "epoch": 0.11,
436
+ "importance_ratio": 1.0001533031463623,
437
+ "kl_div_avg": 0.005680109839886427,
438
+ "learning_rate": 4.902097902097902e-07,
439
+ "loss_func": "stage2",
440
+ "step": 48,
441
+ "total_loss": -0.10262584686279297
442
+ },
443
+ {
444
+ "epoch": 0.12,
445
+ "importance_ratio": 0.999789834022522,
446
+ "kl_div_avg": 0.006105936132371426,
447
+ "learning_rate": 4.8997668997669e-07,
448
+ "loss_func": "stage2",
449
+ "step": 49,
450
+ "total_loss": -0.8303477168083191
451
+ },
452
+ {
453
+ "epoch": 0.12,
454
+ "importance_ratio": 0.9999826550483704,
455
+ "kl_div_avg": 0.005722599104046822,
456
+ "learning_rate": 4.897435897435897e-07,
457
+ "loss_func": "stage2",
458
+ "step": 50,
459
+ "total_loss": -0.8298835754394531
460
+ },
461
+ {
462
+ "epoch": 0.12,
463
+ "importance_ratio": 1.0003968477249146,
464
+ "kl_div_avg": 0.005780387669801712,
465
+ "learning_rate": 4.895104895104895e-07,
466
+ "loss_func": "stage2",
467
+ "step": 51,
468
+ "total_loss": -0.8298872709274292
469
+ },
470
+ {
471
+ "epoch": 0.12,
472
+ "importance_ratio": 1.001389741897583,
473
+ "kl_div_avg": 0.00528342742472887,
474
+ "learning_rate": 4.892773892773893e-07,
475
+ "loss_func": "stage2",
476
+ "step": 52,
477
+ "total_loss": -0.8320926427841187
478
+ },
479
+ {
480
+ "epoch": 0.13,
481
+ "importance_ratio": 1.0000613927841187,
482
+ "kl_div_avg": 0.005511891096830368,
483
+ "learning_rate": 4.890442890442891e-07,
484
+ "loss_func": "stage2",
485
+ "step": 53,
486
+ "total_loss": -0.8287703990936279
487
+ },
488
+ {
489
+ "epoch": 0.13,
490
+ "importance_ratio": 1.000309705734253,
491
+ "kl_div_avg": 0.00582331046462059,
492
+ "learning_rate": 4.888111888111888e-07,
493
+ "loss_func": "stage2",
494
+ "step": 54,
495
+ "total_loss": -0.007962286472320557
496
+ },
497
+ {
498
+ "epoch": 0.13,
499
+ "importance_ratio": 1.000248670578003,
500
+ "kl_div_avg": 0.005605565384030342,
501
+ "learning_rate": 4.885780885780885e-07,
502
+ "loss_func": "stage2",
503
+ "step": 55,
504
+ "total_loss": 0.30858537554740906
505
+ },
506
+ {
507
+ "epoch": 0.13,
508
+ "importance_ratio": 1.0001593828201294,
509
+ "kl_div_avg": 0.006694035604596138,
510
+ "learning_rate": 4.883449883449883e-07,
511
+ "loss_func": "stage2",
512
+ "step": 56,
513
+ "total_loss": 0.2841358482837677
514
+ },
515
+ {
516
+ "epoch": 0.14,
517
+ "importance_ratio": 0.9998378753662109,
518
+ "kl_div_avg": 0.0054409438744187355,
519
+ "learning_rate": 4.88111888111888e-07,
520
+ "loss_func": "stage2",
521
+ "step": 57,
522
+ "total_loss": 0.4940628409385681
523
+ },
524
+ {
525
+ "epoch": 0.14,
526
+ "importance_ratio": 1.0000338554382324,
527
+ "kl_div_avg": 0.00452791154384613,
528
+ "learning_rate": 4.878787878787878e-07,
529
+ "loss_func": "stage2",
530
+ "step": 58,
531
+ "total_loss": 0.25203195214271545
532
+ },
533
+ {
534
+ "epoch": 0.14,
535
+ "importance_ratio": 1.0000851154327393,
536
+ "kl_div_avg": 0.008046677336096764,
537
+ "learning_rate": 4.876456876456876e-07,
538
+ "loss_func": "stage2",
539
+ "step": 59,
540
+ "total_loss": 0.8340111970901489
541
+ },
542
+ {
543
+ "epoch": 0.14,
544
+ "importance_ratio": 1.0000518560409546,
545
+ "kl_div_avg": 0.0053115119226276875,
546
+ "learning_rate": 4.874125874125874e-07,
547
+ "loss_func": "stage2",
548
+ "step": 60,
549
+ "total_loss": -0.4959676265716553
550
+ },
551
+ {
552
+ "epoch": 0.15,
553
+ "importance_ratio": 1.0000547170639038,
554
+ "kl_div_avg": 0.009003904648125172,
555
+ "learning_rate": 4.871794871794871e-07,
556
+ "loss_func": "stage2",
557
+ "step": 61,
558
+ "total_loss": -0.7978946566581726
559
+ },
560
+ {
561
+ "epoch": 0.15,
562
+ "importance_ratio": 1.000227689743042,
563
+ "kl_div_avg": 0.007788301911205053,
564
+ "learning_rate": 4.869463869463869e-07,
565
+ "loss_func": "stage2",
566
+ "step": 62,
567
+ "total_loss": -0.801626443862915
568
+ },
569
+ {
570
+ "epoch": 0.15,
571
+ "importance_ratio": 1.0001925230026245,
572
+ "kl_div_avg": 0.009508013725280762,
573
+ "learning_rate": 4.867132867132867e-07,
574
+ "loss_func": "stage2",
575
+ "step": 63,
576
+ "total_loss": -0.8087908029556274
577
+ },
578
+ {
579
+ "epoch": 0.15,
580
+ "importance_ratio": 1.0004205703735352,
581
+ "kl_div_avg": 0.00948132760822773,
582
+ "learning_rate": 4.864801864801865e-07,
583
+ "loss_func": "stage2",
584
+ "step": 64,
585
+ "total_loss": -0.7977355718612671
586
+ },
587
+ {
588
+ "epoch": 0.16,
589
+ "importance_ratio": 0.9995088577270508,
590
+ "kl_div_avg": 0.013071361929178238,
591
+ "learning_rate": 4.862470862470862e-07,
592
+ "loss_func": "stage2",
593
+ "step": 65,
594
+ "total_loss": -0.7926455736160278
595
+ },
596
+ {
597
+ "epoch": 0.16,
598
+ "importance_ratio": 1.0000696182250977,
599
+ "kl_div_avg": 0.008261503651738167,
600
+ "learning_rate": 4.86013986013986e-07,
601
+ "loss_func": "stage2",
602
+ "step": 66,
603
+ "total_loss": 0.8929388523101807
604
+ },
605
+ {
606
+ "epoch": 0.16,
607
+ "importance_ratio": 0.9999169111251831,
608
+ "kl_div_avg": 0.0072638243436813354,
609
+ "learning_rate": 4.857808857808858e-07,
610
+ "loss_func": "stage2",
611
+ "step": 67,
612
+ "total_loss": 0.7651723623275757
613
+ },
614
+ {
615
+ "epoch": 0.16,
616
+ "importance_ratio": 1.0006506443023682,
617
+ "kl_div_avg": 0.014501883648335934,
618
+ "learning_rate": 4.855477855477855e-07,
619
+ "loss_func": "stage2",
620
+ "step": 68,
621
+ "total_loss": -0.7893998622894287
622
+ },
623
+ {
624
+ "epoch": 0.17,
625
+ "importance_ratio": 1.0001804828643799,
626
+ "kl_div_avg": 0.014889956451952457,
627
+ "learning_rate": 4.853146853146853e-07,
628
+ "loss_func": "stage2",
629
+ "step": 69,
630
+ "total_loss": -0.28294438123703003
631
+ },
632
+ {
633
+ "epoch": 0.17,
634
+ "importance_ratio": 1.0003015995025635,
635
+ "kl_div_avg": 0.012897053733468056,
636
+ "learning_rate": 4.850815850815851e-07,
637
+ "loss_func": "stage2",
638
+ "step": 70,
639
+ "total_loss": -0.29949530959129333
640
+ },
641
+ {
642
+ "epoch": 0.17,
643
+ "importance_ratio": 0.9999880194664001,
644
+ "kl_div_avg": 0.011545092798769474,
645
+ "learning_rate": 4.848484848484849e-07,
646
+ "loss_func": "stage2",
647
+ "step": 71,
648
+ "total_loss": -0.07207685708999634
649
+ },
650
+ {
651
+ "epoch": 0.17,
652
+ "importance_ratio": 1.0000548362731934,
653
+ "kl_div_avg": 0.011798446998000145,
654
+ "learning_rate": 4.846153846153846e-07,
655
+ "loss_func": "stage2",
656
+ "step": 72,
657
+ "total_loss": -0.030968129634857178
658
+ },
659
+ {
660
+ "epoch": 0.18,
661
+ "importance_ratio": 0.9998947381973267,
662
+ "kl_div_avg": 0.014826457016170025,
663
+ "learning_rate": 4.843822843822844e-07,
664
+ "loss_func": "stage2",
665
+ "step": 73,
666
+ "total_loss": -0.04581499099731445
667
+ },
668
+ {
669
+ "epoch": 0.18,
670
+ "importance_ratio": 0.9999833106994629,
671
+ "kl_div_avg": 0.01308258343487978,
672
+ "learning_rate": 4.841491841491842e-07,
673
+ "loss_func": "stage2",
674
+ "step": 74,
675
+ "total_loss": -0.2057284414768219
676
+ },
677
+ {
678
+ "epoch": 0.18,
679
+ "importance_ratio": 1.000425100326538,
680
+ "kl_div_avg": 0.014183840714395046,
681
+ "learning_rate": 4.839160839160839e-07,
682
+ "loss_func": "stage2",
683
+ "step": 75,
684
+ "total_loss": 0.6338366866111755
685
+ },
686
+ {
687
+ "epoch": 0.18,
688
+ "importance_ratio": 1.0001928806304932,
689
+ "kl_div_avg": 0.013401240110397339,
690
+ "learning_rate": 4.836829836829837e-07,
691
+ "loss_func": "stage2",
692
+ "step": 76,
693
+ "total_loss": 0.2874578833580017
694
+ },
695
+ {
696
+ "epoch": 0.19,
697
+ "importance_ratio": 0.9999673366546631,
698
+ "kl_div_avg": 0.012778308242559433,
699
+ "learning_rate": 4.834498834498834e-07,
700
+ "loss_func": "stage2",
701
+ "step": 77,
702
+ "total_loss": 0.8181835412979126
703
+ },
704
+ {
705
+ "epoch": 0.19,
706
+ "importance_ratio": 0.9999823570251465,
707
+ "kl_div_avg": 0.014732200652360916,
708
+ "learning_rate": 4.832167832167832e-07,
709
+ "loss_func": "stage2",
710
+ "step": 78,
711
+ "total_loss": 0.818813681602478
712
+ },
713
+ {
714
+ "epoch": 0.19,
715
+ "importance_ratio": 1.0003037452697754,
716
+ "kl_div_avg": 0.014829716645181179,
717
+ "learning_rate": 4.829836829836829e-07,
718
+ "loss_func": "stage2",
719
+ "step": 79,
720
+ "total_loss": 0.0298653244972229
721
+ },
722
+ {
723
+ "epoch": 0.19,
724
+ "importance_ratio": 1.0003316402435303,
725
+ "kl_div_avg": 0.01861473172903061,
726
+ "learning_rate": 4.827505827505827e-07,
727
+ "loss_func": "stage2",
728
+ "step": 80,
729
+ "total_loss": 0.47803181409835815
730
+ },
731
+ {
732
+ "epoch": 0.2,
733
+ "importance_ratio": 1.0000956058502197,
734
+ "kl_div_avg": 0.013490747660398483,
735
+ "learning_rate": 4.825174825174824e-07,
736
+ "loss_func": "stage2",
737
+ "step": 81,
738
+ "total_loss": 0.43567734956741333
739
+ },
740
+ {
741
+ "epoch": 0.2,
742
+ "importance_ratio": 1.0001178979873657,
743
+ "kl_div_avg": 0.014975698664784431,
744
+ "learning_rate": 4.822843822843823e-07,
745
+ "loss_func": "stage2",
746
+ "step": 82,
747
+ "total_loss": -0.27731338143348694
748
+ },
749
+ {
750
+ "epoch": 0.2,
751
+ "importance_ratio": 0.9999943971633911,
752
+ "kl_div_avg": 0.012739075347781181,
753
+ "learning_rate": 4.82051282051282e-07,
754
+ "loss_func": "stage2",
755
+ "step": 83,
756
+ "total_loss": 0.14717233180999756
757
+ },
758
+ {
759
+ "epoch": 0.2,
760
+ "importance_ratio": 1.000013828277588,
761
+ "kl_div_avg": 0.015260843560099602,
762
+ "learning_rate": 4.818181818181818e-07,
763
+ "loss_func": "stage2",
764
+ "step": 84,
765
+ "total_loss": -0.876125693321228
766
+ },
767
+ {
768
+ "epoch": 0.2,
769
+ "importance_ratio": 0.9999637603759766,
770
+ "kl_div_avg": 0.009859403595328331,
771
+ "learning_rate": 4.815850815850815e-07,
772
+ "loss_func": "stage2",
773
+ "step": 85,
774
+ "total_loss": -0.007574997842311859
775
+ },
776
+ {
777
+ "epoch": 0.2,
778
+ "importance_ratio": 0.9998883008956909,
779
+ "kl_div_avg": 0.012243506498634815,
780
+ "learning_rate": 4.813519813519813e-07,
781
+ "loss_func": "stage2",
782
+ "step": 86,
783
+ "total_loss": -0.8214981555938721
784
+ },
785
+ {
786
+ "epoch": 0.2,
787
+ "importance_ratio": 0.9997843503952026,
788
+ "kl_div_avg": 0.009431181475520134,
789
+ "learning_rate": 4.811188811188811e-07,
790
+ "loss_func": "stage2",
791
+ "step": 87,
792
+ "total_loss": 0.09674309194087982
793
+ },
794
+ {
795
+ "epoch": 0.2,
796
+ "importance_ratio": 0.9998980760574341,
797
+ "kl_div_avg": 0.012359343469142914,
798
+ "learning_rate": 4.808857808857809e-07,
799
+ "loss_func": "stage2",
800
+ "step": 88,
801
+ "total_loss": 0.13037657737731934
802
+ },
803
+ {
804
+ "epoch": 0.21,
805
+ "importance_ratio": 0.9999622702598572,
806
+ "kl_div_avg": 0.019689181819558144,
807
+ "learning_rate": 4.806526806526806e-07,
808
+ "loss_func": "stage2",
809
+ "step": 89,
810
+ "total_loss": -0.053394585847854614
811
+ },
812
+ {
813
+ "epoch": 0.21,
814
+ "importance_ratio": 1.0000618696212769,
815
+ "kl_div_avg": 0.013591418042778969,
816
+ "learning_rate": 4.804195804195804e-07,
817
+ "loss_func": "stage2",
818
+ "step": 90,
819
+ "total_loss": 0.7699258327484131
820
+ },
821
+ {
822
+ "epoch": 0.21,
823
+ "importance_ratio": 1.000166893005371,
824
+ "kl_div_avg": 0.016464080661535263,
825
+ "learning_rate": 4.801864801864802e-07,
826
+ "loss_func": "stage2",
827
+ "step": 91,
828
+ "total_loss": 0.16640010476112366
829
+ },
830
+ {
831
+ "epoch": 0.21,
832
+ "importance_ratio": 0.9997192621231079,
833
+ "kl_div_avg": 0.02152731642127037,
834
+ "learning_rate": 4.799533799533799e-07,
835
+ "loss_func": "stage2",
836
+ "step": 92,
837
+ "total_loss": -0.17338214814662933
838
+ },
839
+ {
840
+ "epoch": 0.22,
841
+ "importance_ratio": 1.000048279762268,
842
+ "kl_div_avg": 0.01632719114422798,
843
+ "learning_rate": 4.797202797202797e-07,
844
+ "loss_func": "stage2",
845
+ "step": 93,
846
+ "total_loss": -0.311355322599411
847
+ },
848
+ {
849
+ "epoch": 0.22,
850
+ "importance_ratio": 1.000006914138794,
851
+ "kl_div_avg": 0.02427072264254093,
852
+ "learning_rate": 4.794871794871795e-07,
853
+ "loss_func": "stage2",
854
+ "step": 94,
855
+ "total_loss": 0.6689386963844299
856
+ },
857
+ {
858
+ "epoch": 0.22,
859
+ "importance_ratio": 1.0001646280288696,
860
+ "kl_div_avg": 0.020599162206053734,
861
+ "learning_rate": 4.792540792540793e-07,
862
+ "loss_func": "stage2",
863
+ "step": 95,
864
+ "total_loss": -0.27341556549072266
865
+ },
866
+ {
867
+ "epoch": 0.22,
868
+ "importance_ratio": 1.0005509853363037,
869
+ "kl_div_avg": 0.01824137195944786,
870
+ "learning_rate": 4.79020979020979e-07,
871
+ "loss_func": "stage2",
872
+ "step": 96,
873
+ "total_loss": -0.7693477869033813
874
+ },
875
+ {
876
+ "epoch": 0.23,
877
+ "importance_ratio": 1.0000276565551758,
878
+ "kl_div_avg": 0.019494881853461266,
879
+ "learning_rate": 4.787878787878788e-07,
880
+ "loss_func": "stage2",
881
+ "step": 97,
882
+ "total_loss": 0.5362880229949951
883
+ },
884
+ {
885
+ "epoch": 0.23,
886
+ "importance_ratio": 1.0001310110092163,
887
+ "kl_div_avg": 0.018007826060056686,
888
+ "learning_rate": 4.785547785547786e-07,
889
+ "loss_func": "stage2",
890
+ "step": 98,
891
+ "total_loss": 0.13775774836540222
892
+ },
893
+ {
894
+ "epoch": 0.23,
895
+ "importance_ratio": 1.0001639127731323,
896
+ "kl_div_avg": 0.018012849614024162,
897
+ "learning_rate": 4.783216783216783e-07,
898
+ "loss_func": "stage2",
899
+ "step": 99,
900
+ "total_loss": 0.43274223804473877
901
+ },
902
+ {
903
+ "epoch": 0.23,
904
+ "importance_ratio": 1.0001168251037598,
905
+ "kl_div_avg": 0.016401609405875206,
906
+ "learning_rate": 4.78088578088578e-07,
907
+ "loss_func": "stage2",
908
+ "step": 100,
909
+ "total_loss": 0.024271167814731598
910
+ },
911
+ {
912
+ "epoch": 0.24,
913
+ "importance_ratio": 0.9998679161071777,
914
+ "kl_div_avg": 0.018232179805636406,
915
+ "learning_rate": 4.778554778554778e-07,
916
+ "loss_func": "stage2",
917
+ "step": 101,
918
+ "total_loss": -0.13439278304576874
919
+ },
920
+ {
921
+ "epoch": 0.24,
922
+ "importance_ratio": 0.9999688267707825,
923
+ "kl_div_avg": 0.01988252066075802,
924
+ "learning_rate": 4.776223776223776e-07,
925
+ "loss_func": "stage2",
926
+ "step": 102,
927
+ "total_loss": -0.5875260233879089
928
+ },
929
+ {
930
+ "epoch": 0.24,
931
+ "importance_ratio": 1.000270128250122,
932
+ "kl_div_avg": 0.024290431290864944,
933
+ "learning_rate": 4.773892773892773e-07,
934
+ "loss_func": "stage2",
935
+ "step": 103,
936
+ "total_loss": 0.43479496240615845
937
+ },
938
+ {
939
+ "epoch": 0.24,
940
+ "importance_ratio": 1.0000674724578857,
941
+ "kl_div_avg": 0.017674673348665237,
942
+ "learning_rate": 4.771561771561771e-07,
943
+ "loss_func": "stage2",
944
+ "step": 104,
945
+ "total_loss": -0.30525317788124084
946
+ },
947
+ {
948
+ "epoch": 0.25,
949
+ "importance_ratio": 0.9998775720596313,
950
+ "kl_div_avg": 0.015626681968569756,
951
+ "learning_rate": 4.769230769230769e-07,
952
+ "loss_func": "stage2",
953
+ "step": 105,
954
+ "total_loss": -0.4420226514339447
955
+ },
956
+ {
957
+ "epoch": 0.25,
958
+ "importance_ratio": 1.000077247619629,
959
+ "kl_div_avg": 0.011648900806903839,
960
+ "learning_rate": 4.7668997668997666e-07,
961
+ "loss_func": "stage2",
962
+ "step": 106,
963
+ "total_loss": -0.7798103094100952
964
+ },
965
+ {
966
+ "epoch": 0.25,
967
+ "importance_ratio": 0.9998931884765625,
968
+ "kl_div_avg": 0.02424587681889534,
969
+ "learning_rate": 4.7645687645687646e-07,
970
+ "loss_func": "stage2",
971
+ "step": 107,
972
+ "total_loss": 0.3463074564933777
973
+ },
974
+ {
975
+ "epoch": 0.25,
976
+ "importance_ratio": 1.0001239776611328,
977
+ "kl_div_avg": 0.019622065126895905,
978
+ "learning_rate": 4.762237762237762e-07,
979
+ "loss_func": "stage2",
980
+ "step": 108,
981
+ "total_loss": -0.7446590662002563
982
+ },
983
+ {
984
+ "epoch": 0.26,
985
+ "importance_ratio": 1.0000584125518799,
986
+ "kl_div_avg": 0.02028917521238327,
987
+ "learning_rate": 4.75990675990676e-07,
988
+ "loss_func": "stage2",
989
+ "step": 109,
990
+ "total_loss": -0.269249826669693
991
+ },
992
+ {
993
+ "epoch": 0.26,
994
+ "importance_ratio": 0.9998422861099243,
995
+ "kl_div_avg": 0.022249866276979446,
996
+ "learning_rate": 4.7575757575757574e-07,
997
+ "loss_func": "stage2",
998
+ "step": 110,
999
+ "total_loss": -0.6871204376220703
1000
+ },
1001
+ {
1002
+ "epoch": 0.26,
1003
+ "importance_ratio": 1.0001263618469238,
1004
+ "kl_div_avg": 0.01973864436149597,
1005
+ "learning_rate": 4.755244755244755e-07,
1006
+ "loss_func": "stage2",
1007
+ "step": 111,
1008
+ "total_loss": -0.6550001502037048
1009
+ },
1010
+ {
1011
+ "epoch": 0.26,
1012
+ "importance_ratio": 0.9996439218521118,
1013
+ "kl_div_avg": 0.02077101171016693,
1014
+ "learning_rate": 4.7529137529137523e-07,
1015
+ "loss_func": "stage2",
1016
+ "step": 112,
1017
+ "total_loss": 0.042905211448669434
1018
+ },
1019
+ {
1020
+ "epoch": 0.27,
1021
+ "importance_ratio": 1.000232219696045,
1022
+ "kl_div_avg": 0.036871857941150665,
1023
+ "learning_rate": 4.750582750582751e-07,
1024
+ "loss_func": "stage2",
1025
+ "step": 113,
1026
+ "total_loss": -0.6672766804695129
1027
+ },
1028
+ {
1029
+ "epoch": 0.27,
1030
+ "importance_ratio": 0.9999071359634399,
1031
+ "kl_div_avg": 0.023731358349323273,
1032
+ "learning_rate": 4.748251748251748e-07,
1033
+ "loss_func": "stage2",
1034
+ "step": 114,
1035
+ "total_loss": 0.22221048176288605
1036
+ },
1037
+ {
1038
+ "epoch": 0.27,
1039
+ "importance_ratio": 0.9998910427093506,
1040
+ "kl_div_avg": 0.02947179228067398,
1041
+ "learning_rate": 4.7459207459207457e-07,
1042
+ "loss_func": "stage2",
1043
+ "step": 115,
1044
+ "total_loss": 0.05969160795211792
1045
+ },
1046
+ {
1047
+ "epoch": 0.27,
1048
+ "importance_ratio": 0.9999151825904846,
1049
+ "kl_div_avg": 0.028714872896671295,
1050
+ "learning_rate": 4.743589743589743e-07,
1051
+ "loss_func": "stage2",
1052
+ "step": 116,
1053
+ "total_loss": 0.023228317499160767
1054
+ },
1055
+ {
1056
+ "epoch": 0.28,
1057
+ "importance_ratio": 0.9999186992645264,
1058
+ "kl_div_avg": 0.022106900811195374,
1059
+ "learning_rate": 4.741258741258741e-07,
1060
+ "loss_func": "stage2",
1061
+ "step": 117,
1062
+ "total_loss": -0.4819675087928772
1063
+ },
1064
+ {
1065
+ "epoch": 0.28,
1066
+ "importance_ratio": 0.9995689392089844,
1067
+ "kl_div_avg": 0.03649330139160156,
1068
+ "learning_rate": 4.7389277389277386e-07,
1069
+ "loss_func": "stage2",
1070
+ "step": 118,
1071
+ "total_loss": 0.3108961582183838
1072
+ },
1073
+ {
1074
+ "epoch": 0.28,
1075
+ "importance_ratio": 0.9996166825294495,
1076
+ "kl_div_avg": 0.03707721084356308,
1077
+ "learning_rate": 4.7365967365967365e-07,
1078
+ "loss_func": "stage2",
1079
+ "step": 119,
1080
+ "total_loss": 0.3411310315132141
1081
+ },
1082
+ {
1083
+ "epoch": 0.28,
1084
+ "importance_ratio": 0.9993818998336792,
1085
+ "kl_div_avg": 0.02660643495619297,
1086
+ "learning_rate": 4.734265734265734e-07,
1087
+ "loss_func": "stage2",
1088
+ "step": 120,
1089
+ "total_loss": -0.1782078891992569
1090
+ },
1091
+ {
1092
+ "epoch": 0.29,
1093
+ "importance_ratio": 1.0000483989715576,
1094
+ "kl_div_avg": 0.020809054374694824,
1095
+ "learning_rate": 4.731934731934732e-07,
1096
+ "loss_func": "stage2",
1097
+ "step": 121,
1098
+ "total_loss": 0.2691134810447693
1099
+ },
1100
+ {
1101
+ "epoch": 0.29,
1102
+ "importance_ratio": 0.9999549388885498,
1103
+ "kl_div_avg": 0.018363434821367264,
1104
+ "learning_rate": 4.7296037296037294e-07,
1105
+ "loss_func": "stage2",
1106
+ "step": 122,
1107
+ "total_loss": -0.11637084186077118
1108
+ },
1109
+ {
1110
+ "epoch": 0.29,
1111
+ "importance_ratio": 1.0000113248825073,
1112
+ "kl_div_avg": 0.01843072474002838,
1113
+ "learning_rate": 4.727272727272727e-07,
1114
+ "loss_func": "stage2",
1115
+ "step": 123,
1116
+ "total_loss": 0.41335129737854004
1117
+ },
1118
+ {
1119
+ "epoch": 0.29,
1120
+ "importance_ratio": 0.9993541836738586,
1121
+ "kl_div_avg": 0.023193594068288803,
1122
+ "learning_rate": 4.724941724941724e-07,
1123
+ "loss_func": "stage2",
1124
+ "step": 124,
1125
+ "total_loss": 0.3763417601585388
1126
+ },
1127
+ {
1128
+ "epoch": 0.3,
1129
+ "importance_ratio": 1.0000863075256348,
1130
+ "kl_div_avg": 0.02424781210720539,
1131
+ "learning_rate": 4.722610722610723e-07,
1132
+ "loss_func": "stage2",
1133
+ "step": 125,
1134
+ "total_loss": 0.8012444972991943
1135
+ },
1136
+ {
1137
+ "epoch": 0.3,
1138
+ "importance_ratio": 0.9997611045837402,
1139
+ "kl_div_avg": 0.019796304404735565,
1140
+ "learning_rate": 4.72027972027972e-07,
1141
+ "loss_func": "stage2",
1142
+ "step": 126,
1143
+ "total_loss": 0.2471800446510315
1144
+ },
1145
+ {
1146
+ "epoch": 0.3,
1147
+ "importance_ratio": 0.9994201064109802,
1148
+ "kl_div_avg": 0.03692193701863289,
1149
+ "learning_rate": 4.7179487179487176e-07,
1150
+ "loss_func": "stage2",
1151
+ "step": 127,
1152
+ "total_loss": 0.6575199961662292
1153
+ },
1154
+ {
1155
+ "epoch": 0.3,
1156
+ "importance_ratio": 0.9993878602981567,
1157
+ "kl_div_avg": 0.024065542966127396,
1158
+ "learning_rate": 4.715617715617715e-07,
1159
+ "loss_func": "stage2",
1160
+ "step": 128,
1161
+ "total_loss": 0.39468204975128174
1162
+ },
1163
+ {
1164
+ "epoch": 0.31,
1165
+ "importance_ratio": 1.0001311302185059,
1166
+ "kl_div_avg": 0.024539019912481308,
1167
+ "learning_rate": 4.713286713286713e-07,
1168
+ "loss_func": "stage2",
1169
+ "step": 129,
1170
+ "total_loss": 0.1832764893770218
1171
+ },
1172
+ {
1173
+ "epoch": 0.31,
1174
+ "importance_ratio": 0.9998582005500793,
1175
+ "kl_div_avg": 0.024634480476379395,
1176
+ "learning_rate": 4.710955710955711e-07,
1177
+ "loss_func": "stage2",
1178
+ "step": 130,
1179
+ "total_loss": 0.1833437830209732
1180
+ },
1181
+ {
1182
+ "epoch": 0.31,
1183
+ "importance_ratio": 0.9997899532318115,
1184
+ "kl_div_avg": 0.024798087775707245,
1185
+ "learning_rate": 4.7086247086247085e-07,
1186
+ "loss_func": "stage2",
1187
+ "step": 131,
1188
+ "total_loss": -0.029144808650016785
1189
+ },
1190
+ {
1191
+ "epoch": 0.31,
1192
+ "importance_ratio": 0.9991902112960815,
1193
+ "kl_div_avg": 0.022448930889368057,
1194
+ "learning_rate": 4.706293706293706e-07,
1195
+ "loss_func": "stage2",
1196
+ "step": 132,
1197
+ "total_loss": 0.5746316909790039
1198
+ },
1199
+ {
1200
+ "epoch": 0.32,
1201
+ "importance_ratio": 0.9999872446060181,
1202
+ "kl_div_avg": 0.030649660155177116,
1203
+ "learning_rate": 4.703962703962704e-07,
1204
+ "loss_func": "stage2",
1205
+ "step": 133,
1206
+ "total_loss": -0.27921533584594727
1207
+ },
1208
+ {
1209
+ "epoch": 0.32,
1210
+ "importance_ratio": 0.9999322891235352,
1211
+ "kl_div_avg": 0.028502434492111206,
1212
+ "learning_rate": 4.7016317016317013e-07,
1213
+ "loss_func": "stage2",
1214
+ "step": 134,
1215
+ "total_loss": -0.18240980803966522
1216
+ },
1217
+ {
1218
+ "epoch": 0.32,
1219
+ "importance_ratio": 0.9991711378097534,
1220
+ "kl_div_avg": 0.034727346152067184,
1221
+ "learning_rate": 4.699300699300699e-07,
1222
+ "loss_func": "stage2",
1223
+ "step": 135,
1224
+ "total_loss": 0.20225152373313904
1225
+ },
1226
+ {
1227
+ "epoch": 0.32,
1228
+ "importance_ratio": 1.000333547592163,
1229
+ "kl_div_avg": 0.02375342883169651,
1230
+ "learning_rate": 4.696969696969697e-07,
1231
+ "loss_func": "stage2",
1232
+ "step": 136,
1233
+ "total_loss": 0.19642743468284607
1234
+ },
1235
+ {
1236
+ "epoch": 0.33,
1237
+ "importance_ratio": 1.0000425577163696,
1238
+ "kl_div_avg": 0.02941157855093479,
1239
+ "learning_rate": 4.6946386946386947e-07,
1240
+ "loss_func": "stage2",
1241
+ "step": 137,
1242
+ "total_loss": -0.2832520604133606
1243
+ },
1244
+ {
1245
+ "epoch": 0.33,
1246
+ "importance_ratio": 0.9998887777328491,
1247
+ "kl_div_avg": 0.0380094014108181,
1248
+ "learning_rate": 4.692307692307692e-07,
1249
+ "loss_func": "stage2",
1250
+ "step": 138,
1251
+ "total_loss": 0.07638365030288696
1252
+ },
1253
+ {
1254
+ "epoch": 0.33,
1255
+ "importance_ratio": 1.0000771284103394,
1256
+ "kl_div_avg": 0.031544946134090424,
1257
+ "learning_rate": 4.6899766899766896e-07,
1258
+ "loss_func": "stage2",
1259
+ "step": 139,
1260
+ "total_loss": -0.29178526997566223
1261
+ },
1262
+ {
1263
+ "epoch": 0.33,
1264
+ "importance_ratio": 0.9999626278877258,
1265
+ "kl_div_avg": 0.03620228171348572,
1266
+ "learning_rate": 4.6876456876456875e-07,
1267
+ "loss_func": "stage2",
1268
+ "step": 140,
1269
+ "total_loss": 0.12343016266822815
1270
+ },
1271
+ {
1272
+ "epoch": 0.34,
1273
+ "importance_ratio": 0.9999535083770752,
1274
+ "kl_div_avg": 0.026813074946403503,
1275
+ "learning_rate": 4.685314685314685e-07,
1276
+ "loss_func": "stage2",
1277
+ "step": 141,
1278
+ "total_loss": 0.024522602558135986
1279
+ },
1280
+ {
1281
+ "epoch": 0.34,
1282
+ "importance_ratio": 0.9998844265937805,
1283
+ "kl_div_avg": 0.031967416405677795,
1284
+ "learning_rate": 4.682983682983683e-07,
1285
+ "loss_func": "stage2",
1286
+ "step": 142,
1287
+ "total_loss": 0.6268632411956787
1288
+ },
1289
+ {
1290
+ "epoch": 0.34,
1291
+ "importance_ratio": 0.9997915029525757,
1292
+ "kl_div_avg": 0.024857094511389732,
1293
+ "learning_rate": 4.6806526806526804e-07,
1294
+ "loss_func": "stage2",
1295
+ "step": 143,
1296
+ "total_loss": 0.13797396421432495
1297
+ },
1298
+ {
1299
+ "epoch": 0.34,
1300
+ "importance_ratio": 0.9998888969421387,
1301
+ "kl_div_avg": 0.04350988566875458,
1302
+ "learning_rate": 4.6783216783216784e-07,
1303
+ "loss_func": "stage2",
1304
+ "step": 144,
1305
+ "total_loss": 0.5312750935554504
1306
+ },
1307
+ {
1308
+ "epoch": 0.34,
1309
+ "importance_ratio": 0.9998694658279419,
1310
+ "kl_div_avg": 0.03627926483750343,
1311
+ "learning_rate": 4.675990675990676e-07,
1312
+ "loss_func": "stage2",
1313
+ "step": 145,
1314
+ "total_loss": 0.09028466045856476
1315
+ },
1316
+ {
1317
+ "epoch": 0.34,
1318
+ "importance_ratio": 0.9999563694000244,
1319
+ "kl_div_avg": 0.02497359737753868,
1320
+ "learning_rate": 4.673659673659673e-07,
1321
+ "loss_func": "stage2",
1322
+ "step": 146,
1323
+ "total_loss": 0.5303145051002502
1324
+ },
1325
+ {
1326
+ "epoch": 0.34,
1327
+ "importance_ratio": 0.9999274015426636,
1328
+ "kl_div_avg": 0.026778005063533783,
1329
+ "learning_rate": 4.6713286713286707e-07,
1330
+ "loss_func": "stage2",
1331
+ "step": 147,
1332
+ "total_loss": 0.1259535402059555
1333
+ },
1334
+ {
1335
+ "epoch": 0.34,
1336
+ "importance_ratio": 0.9997484683990479,
1337
+ "kl_div_avg": 0.02970227226614952,
1338
+ "learning_rate": 4.668997668997669e-07,
1339
+ "loss_func": "stage2",
1340
+ "step": 148,
1341
+ "total_loss": 0.5203793048858643
1342
+ },
1343
+ {
1344
+ "epoch": 0.35,
1345
+ "importance_ratio": 1.0000306367874146,
1346
+ "kl_div_avg": 0.03883244842290878,
1347
+ "learning_rate": 4.6666666666666666e-07,
1348
+ "loss_func": "stage2",
1349
+ "step": 149,
1350
+ "total_loss": 0.5459209680557251
1351
+ },
1352
+ {
1353
+ "epoch": 0.35,
1354
+ "importance_ratio": 0.9999977946281433,
1355
+ "kl_div_avg": 0.010376233607530594,
1356
+ "learning_rate": 4.664335664335664e-07,
1357
+ "loss_func": "stage2",
1358
+ "step": 150,
1359
+ "total_loss": 0.5408558249473572
1360
+ },
1361
+ {
1362
+ "epoch": 0.35,
1363
+ "importance_ratio": 1.0000672340393066,
1364
+ "kl_div_avg": 0.020404186099767685,
1365
+ "learning_rate": 4.6620046620046615e-07,
1366
+ "loss_func": "stage2",
1367
+ "step": 151,
1368
+ "total_loss": 0.5100921392440796
1369
+ },
1370
+ {
1371
+ "epoch": 0.35,
1372
+ "importance_ratio": 1.0013837814331055,
1373
+ "kl_div_avg": 0.032543182373046875,
1374
+ "learning_rate": 4.6596736596736595e-07,
1375
+ "loss_func": "stage2",
1376
+ "step": 152,
1377
+ "total_loss": -0.4812799394130707
1378
+ }
1379
+ ],
1380
+ "logging_steps": 1.0,
1381
+ "max_steps": 2150,
1382
+ "num_input_tokens_seen": 0,
1383
+ "num_train_epochs": 20.0,
1384
+ "save_steps": 50,
1385
+ "total_flos": 0,
1386
+ "train_batch_size": 1,
1387
+ "trial_name": null,
1388
+ "trial_params": null
1389
+ }
training_args.bin ADDED
@@ -0,0 +1,3 @@
 
 
 
 
1
+ version https://git-lfs.github.com/spec/v1
2
+ oid sha256:964bcf303f7d37b2140c9e65650e08c3d23d3c46e92f12eb9f174784ccdb4f38
3
+ size 11320
vocab.json ADDED
The diff for this file is too large to render. See raw diff
 
zero_to_fp32.py ADDED
@@ -0,0 +1,587 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
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: python zero_to_fp32.py . pytorch_model.bin
14
+
15
+ import argparse
16
+ import torch
17
+ import glob
18
+ import math
19
+ import os
20
+ import re
21
+ from collections import OrderedDict
22
+ from dataclasses import dataclass
23
+
24
+ # while this script doesn't use deepspeed to recover data, since the checkpoints are pickled with
25
+ # DeepSpeed data structures it has to be available in the current python environment.
26
+ from deepspeed.utils import logger
27
+ from deepspeed.checkpoint.constants import (DS_VERSION, OPTIMIZER_STATE_DICT, SINGLE_PARTITION_OF_FP32_GROUPS,
28
+ FP32_FLAT_GROUPS, ZERO_STAGE, PARTITION_COUNT, PARAM_SHAPES, BUFFER_NAMES,
29
+ FROZEN_PARAM_SHAPES, FROZEN_PARAM_FRAGMENTS)
30
+
31
+
32
+ @dataclass
33
+ class zero_model_state:
34
+ buffers: dict()
35
+ param_shapes: dict()
36
+ shared_params: list
37
+ ds_version: int
38
+ frozen_param_shapes: dict()
39
+ frozen_param_fragments: dict()
40
+
41
+
42
+ debug = 0
43
+
44
+ # load to cpu
45
+ device = torch.device('cpu')
46
+
47
+
48
+ def atoi(text):
49
+ return int(text) if text.isdigit() else text
50
+
51
+
52
+ def natural_keys(text):
53
+ '''
54
+ alist.sort(key=natural_keys) sorts in human order
55
+ http://nedbatchelder.com/blog/200712/human_sorting.html
56
+ (See Toothy's implementation in the comments)
57
+ '''
58
+ return [atoi(c) for c in re.split(r'(\d+)', text)]
59
+
60
+
61
+ def get_model_state_file(checkpoint_dir, zero_stage):
62
+ if not os.path.isdir(checkpoint_dir):
63
+ raise FileNotFoundError(f"Directory '{checkpoint_dir}' doesn't exist")
64
+
65
+ # there should be only one file
66
+ if zero_stage <= 2:
67
+ file = os.path.join(checkpoint_dir, "mp_rank_00_model_states.pt")
68
+ elif zero_stage == 3:
69
+ file = os.path.join(checkpoint_dir, "zero_pp_rank_0_mp_rank_00_model_states.pt")
70
+
71
+ if not os.path.exists(file):
72
+ raise FileNotFoundError(f"can't find model states file at '{file}'")
73
+
74
+ return file
75
+
76
+
77
+ def get_checkpoint_files(checkpoint_dir, glob_pattern):
78
+ # XXX: need to test that this simple glob rule works for multi-node setup too
79
+ ckpt_files = sorted(glob.glob(os.path.join(checkpoint_dir, glob_pattern)), key=natural_keys)
80
+
81
+ if len(ckpt_files) == 0:
82
+ raise FileNotFoundError(f"can't find {glob_pattern} files in directory '{checkpoint_dir}'")
83
+
84
+ return ckpt_files
85
+
86
+
87
+ def get_optim_files(checkpoint_dir):
88
+ return get_checkpoint_files(checkpoint_dir, "*_optim_states.pt")
89
+
90
+
91
+ def get_model_state_files(checkpoint_dir):
92
+ return get_checkpoint_files(checkpoint_dir, "*_model_states.pt")
93
+
94
+
95
+ def parse_model_states(files):
96
+ zero_model_states = []
97
+ for file in files:
98
+ state_dict = torch.load(file, map_location=device)
99
+
100
+ if BUFFER_NAMES not in state_dict:
101
+ raise ValueError(f"{file} is not a model state checkpoint")
102
+ buffer_names = state_dict[BUFFER_NAMES]
103
+ if debug:
104
+ print("Found buffers:", buffer_names)
105
+
106
+ # recover just the buffers while restoring them to fp32 if they were saved in fp16
107
+ buffers = {k: v.float() for k, v in state_dict["module"].items() if k in buffer_names}
108
+ param_shapes = state_dict[PARAM_SHAPES]
109
+
110
+ # collect parameters that are included in param_shapes
111
+ param_names = []
112
+ for s in param_shapes:
113
+ for name in s.keys():
114
+ param_names.append(name)
115
+
116
+ # update with frozen parameters
117
+ frozen_param_shapes = state_dict.get(FROZEN_PARAM_SHAPES, None)
118
+ if frozen_param_shapes is not None:
119
+ if debug:
120
+ print(f"Found frozen_param_shapes: {frozen_param_shapes}")
121
+ param_names += list(frozen_param_shapes.keys())
122
+
123
+ # handle shared params
124
+ shared_params = [[k, v] for k, v in state_dict["shared_params"].items()]
125
+
126
+ ds_version = state_dict.get(DS_VERSION, None)
127
+
128
+ frozen_param_fragments = state_dict.get(FROZEN_PARAM_FRAGMENTS, None)
129
+
130
+ z_model_state = zero_model_state(buffers=buffers,
131
+ param_shapes=param_shapes,
132
+ shared_params=shared_params,
133
+ ds_version=ds_version,
134
+ frozen_param_shapes=frozen_param_shapes,
135
+ frozen_param_fragments=frozen_param_fragments)
136
+ zero_model_states.append(z_model_state)
137
+
138
+ return zero_model_states
139
+
140
+
141
+ def parse_optim_states(files, ds_checkpoint_dir):
142
+
143
+ total_files = len(files)
144
+ state_dicts = []
145
+ for f in files:
146
+ state_dict = torch.load(f, map_location=device)
147
+ # immediately discard the potentially huge 2 optimizer states as we only care for fp32 master weights
148
+ # and also handle the case where it was already removed by another helper script
149
+ state_dict["optimizer_state_dict"].pop("optimizer_state_dict", None)
150
+ state_dicts.append(state_dict)
151
+
152
+ if not ZERO_STAGE in state_dicts[0][OPTIMIZER_STATE_DICT]:
153
+ raise ValueError(f"{files[0]} is not a zero checkpoint")
154
+ zero_stage = state_dicts[0][OPTIMIZER_STATE_DICT][ZERO_STAGE]
155
+ world_size = state_dicts[0][OPTIMIZER_STATE_DICT][PARTITION_COUNT]
156
+
157
+ # For ZeRO-2 each param group can have different partition_count as data parallelism for expert
158
+ # parameters can be different from data parallelism for non-expert parameters. So we can just
159
+ # use the max of the partition_count to get the dp world_size.
160
+
161
+ if type(world_size) is list:
162
+ world_size = max(world_size)
163
+
164
+ if world_size != total_files:
165
+ raise ValueError(
166
+ f"Expected {world_size} of '*_optim_states.pt' under '{ds_checkpoint_dir}' but found {total_files} files. "
167
+ "Possibly due to an overwrite of an old checkpoint, or a checkpoint didn't get saved by one or more processes."
168
+ )
169
+
170
+ # the groups are named differently in each stage
171
+ if zero_stage <= 2:
172
+ fp32_groups_key = SINGLE_PARTITION_OF_FP32_GROUPS
173
+ elif zero_stage == 3:
174
+ fp32_groups_key = FP32_FLAT_GROUPS
175
+ else:
176
+ raise ValueError(f"unknown zero stage {zero_stage}")
177
+
178
+ if zero_stage <= 2:
179
+ fp32_flat_groups = [state_dicts[i][OPTIMIZER_STATE_DICT][fp32_groups_key] for i in range(len(state_dicts))]
180
+ elif zero_stage == 3:
181
+ # if there is more than one param group, there will be multiple flattened tensors - one
182
+ # flattened tensor per group - for simplicity merge them into a single tensor
183
+ #
184
+ # XXX: could make the script more memory efficient for when there are multiple groups - it
185
+ # will require matching the sub-lists of param_shapes for each param group flattened tensor
186
+
187
+ fp32_flat_groups = [
188
+ torch.cat(state_dicts[i][OPTIMIZER_STATE_DICT][fp32_groups_key], 0) for i in range(len(state_dicts))
189
+ ]
190
+
191
+ return zero_stage, world_size, fp32_flat_groups
192
+
193
+
194
+ def _get_fp32_state_dict_from_zero_checkpoint(ds_checkpoint_dir):
195
+ """
196
+ Returns fp32 state_dict reconstructed from ds checkpoint
197
+
198
+ Args:
199
+ - ``ds_checkpoint_dir``: path to the deepspeed checkpoint folder (where the optimizer files are)
200
+
201
+ """
202
+ print(f"Processing zero checkpoint '{ds_checkpoint_dir}'")
203
+
204
+ optim_files = get_optim_files(ds_checkpoint_dir)
205
+ zero_stage, world_size, fp32_flat_groups = parse_optim_states(optim_files, ds_checkpoint_dir)
206
+ print(f"Detected checkpoint of type zero stage {zero_stage}, world_size: {world_size}")
207
+
208
+ model_files = get_model_state_files(ds_checkpoint_dir)
209
+
210
+ zero_model_states = parse_model_states(model_files)
211
+ print(f'Parsing checkpoint created by deepspeed=={zero_model_states[0].ds_version}')
212
+
213
+ if zero_stage <= 2:
214
+ return _get_fp32_state_dict_from_zero2_checkpoint(world_size, fp32_flat_groups, zero_model_states)
215
+ elif zero_stage == 3:
216
+ return _get_fp32_state_dict_from_zero3_checkpoint(world_size, fp32_flat_groups, zero_model_states)
217
+
218
+
219
+ def _zero2_merge_frozen_params(state_dict, zero_model_states):
220
+ if zero_model_states[0].frozen_param_shapes is None or len(zero_model_states[0].frozen_param_shapes) == 0:
221
+ return
222
+
223
+ frozen_param_shapes = zero_model_states[0].frozen_param_shapes
224
+ frozen_param_fragments = zero_model_states[0].frozen_param_fragments
225
+
226
+ if debug:
227
+ num_elem = sum(s.numel() for s in frozen_param_shapes.values())
228
+ print(f'rank 0: {FROZEN_PARAM_SHAPES}.numel = {num_elem}')
229
+
230
+ wanted_params = len(frozen_param_shapes)
231
+ wanted_numel = sum(s.numel() for s in frozen_param_shapes.values())
232
+ avail_numel = sum([p.numel() for p in frozen_param_fragments.values()])
233
+ print(f'Frozen params: Have {avail_numel} numels to process.')
234
+ print(f'Frozen params: Need {wanted_numel} numels in {wanted_params} params')
235
+
236
+ total_params = 0
237
+ total_numel = 0
238
+ for name, shape in frozen_param_shapes.items():
239
+ total_params += 1
240
+ unpartitioned_numel = shape.numel()
241
+ total_numel += unpartitioned_numel
242
+
243
+ state_dict[name] = frozen_param_fragments[name]
244
+
245
+ if debug:
246
+ print(f"{name} full shape: {shape} unpartitioned numel {unpartitioned_numel} ")
247
+
248
+ print(f"Reconstructed Frozen fp32 state dict with {total_params} params {total_numel} elements")
249
+
250
+
251
+ def _zero2_merge_trainable_params(state_dict, world_size, fp32_flat_groups, zero_model_states):
252
+ param_shapes = zero_model_states[0].param_shapes
253
+
254
+ # Reconstruction protocol:
255
+ #
256
+ # XXX: document this
257
+
258
+ if debug:
259
+ for i in range(world_size):
260
+ for j in range(len(fp32_flat_groups[0])):
261
+ print(f"{FP32_FLAT_GROUPS}[{i}][{j}].shape={fp32_flat_groups[i][j].shape}")
262
+
263
+ # XXX: memory usage doubles here (zero2)
264
+ num_param_groups = len(fp32_flat_groups[0])
265
+ merged_single_partition_of_fp32_groups = []
266
+ for i in range(num_param_groups):
267
+ merged_partitions = [sd[i] for sd in fp32_flat_groups]
268
+ full_single_fp32_vector = torch.cat(merged_partitions, 0)
269
+ merged_single_partition_of_fp32_groups.append(full_single_fp32_vector)
270
+ avail_numel = sum(
271
+ [full_single_fp32_vector.numel() for full_single_fp32_vector in merged_single_partition_of_fp32_groups])
272
+
273
+ if debug:
274
+ wanted_params = sum([len(shapes) for shapes in param_shapes])
275
+ wanted_numel = sum([sum(shape.numel() for shape in shapes.values()) for shapes in param_shapes])
276
+ # not asserting if there is a mismatch due to possible padding
277
+ print(f"Have {avail_numel} numels to process.")
278
+ print(f"Need {wanted_numel} numels in {wanted_params} params.")
279
+
280
+ # params
281
+ # XXX: for huge models that can't fit into the host's RAM we will have to recode this to support
282
+ # out-of-core computing solution
283
+ total_numel = 0
284
+ total_params = 0
285
+ for shapes, full_single_fp32_vector in zip(param_shapes, merged_single_partition_of_fp32_groups):
286
+ offset = 0
287
+ avail_numel = full_single_fp32_vector.numel()
288
+ for name, shape in shapes.items():
289
+
290
+ unpartitioned_numel = shape.numel()
291
+ total_numel += unpartitioned_numel
292
+ total_params += 1
293
+
294
+ if debug:
295
+ print(f"{name} full shape: {shape} unpartitioned numel {unpartitioned_numel} ")
296
+ state_dict[name] = full_single_fp32_vector.narrow(0, offset, unpartitioned_numel).view(shape)
297
+ offset += unpartitioned_numel
298
+
299
+ # Z2 started to align to 2*world_size to improve nccl performance. Therefore both offset and
300
+ # avail_numel can differ by anywhere between 0..2*world_size. Due to two unrelated complex
301
+ # paddings performed in the code it's almost impossible to predict the exact numbers w/o the
302
+ # live optimizer object, so we are checking that the numbers are within the right range
303
+ align_to = 2 * world_size
304
+
305
+ def zero2_align(x):
306
+ return align_to * math.ceil(x / align_to)
307
+
308
+ if debug:
309
+ print(f"original offset={offset}, avail_numel={avail_numel}")
310
+
311
+ offset = zero2_align(offset)
312
+ avail_numel = zero2_align(avail_numel)
313
+
314
+ if debug:
315
+ print(f"aligned offset={offset}, avail_numel={avail_numel}")
316
+
317
+ # Sanity check
318
+ if offset != avail_numel:
319
+ raise ValueError(f"consumed {offset} numels out of {avail_numel} - something is wrong")
320
+
321
+ print(f"Reconstructed fp32 state dict with {total_params} params {total_numel} elements")
322
+
323
+
324
+ def _get_fp32_state_dict_from_zero2_checkpoint(world_size, fp32_flat_groups, zero_model_states):
325
+ state_dict = OrderedDict()
326
+
327
+ # buffers
328
+ buffers = zero_model_states[0].buffers
329
+ state_dict.update(buffers)
330
+ if debug:
331
+ print(f"added {len(buffers)} buffers")
332
+
333
+ _zero2_merge_frozen_params(state_dict, zero_model_states)
334
+
335
+ _zero2_merge_trainable_params(state_dict, world_size, fp32_flat_groups, zero_model_states)
336
+
337
+ # recover shared parameters
338
+ for pair in zero_model_states[0].shared_params:
339
+ if pair[1] in state_dict:
340
+ state_dict[pair[0]] = state_dict[pair[1]]
341
+
342
+ return state_dict
343
+
344
+
345
+ def zero3_partitioned_param_info(unpartitioned_numel, world_size):
346
+ remainder = unpartitioned_numel % world_size
347
+ padding_numel = (world_size - remainder) if remainder else 0
348
+ partitioned_numel = math.ceil(unpartitioned_numel / world_size)
349
+ return partitioned_numel, padding_numel
350
+
351
+
352
+ def _zero3_merge_frozen_params(state_dict, world_size, zero_model_states):
353
+ if zero_model_states[0].frozen_param_shapes is None or len(zero_model_states[0].frozen_param_shapes) == 0:
354
+ return
355
+
356
+ if debug:
357
+ for i in range(world_size):
358
+ num_elem = sum(s.numel() for s in zero_model_states[i].frozen_param_fragments.values())
359
+ print(f'rank {i}: {FROZEN_PARAM_SHAPES}.numel = {num_elem}')
360
+
361
+ frozen_param_shapes = zero_model_states[0].frozen_param_shapes
362
+ wanted_params = len(frozen_param_shapes)
363
+ wanted_numel = sum(s.numel() for s in frozen_param_shapes.values())
364
+ avail_numel = sum([p.numel() for p in zero_model_states[0].frozen_param_fragments.values()]) * world_size
365
+ print(f'Frozen params: Have {avail_numel} numels to process.')
366
+ print(f'Frozen params: Need {wanted_numel} numels in {wanted_params} params')
367
+
368
+ total_params = 0
369
+ total_numel = 0
370
+ for name, shape in zero_model_states[0].frozen_param_shapes.items():
371
+ total_params += 1
372
+ unpartitioned_numel = shape.numel()
373
+ total_numel += unpartitioned_numel
374
+
375
+ param_frags = tuple(model_state.frozen_param_fragments[name] for model_state in zero_model_states)
376
+ state_dict[name] = torch.cat(param_frags, 0).narrow(0, 0, unpartitioned_numel).view(shape)
377
+
378
+ partitioned_numel, partitioned_padding_numel = zero3_partitioned_param_info(unpartitioned_numel, world_size)
379
+
380
+ if debug:
381
+ print(
382
+ f"Frozen params: {total_params} {name} full shape: {shape} partition0 numel={partitioned_numel} partitioned_padding_numel={partitioned_padding_numel}"
383
+ )
384
+
385
+ print(f"Reconstructed Frozen fp32 state dict with {total_params} params {total_numel} elements")
386
+
387
+
388
+ def _zero3_merge_trainable_params(state_dict, world_size, fp32_flat_groups, zero_model_states):
389
+ param_shapes = zero_model_states[0].param_shapes
390
+ avail_numel = fp32_flat_groups[0].numel() * world_size
391
+ # Reconstruction protocol: For zero3 we need to zip the partitions together at boundary of each
392
+ # param, re-consolidating each param, while dealing with padding if any
393
+
394
+ # merge list of dicts, preserving order
395
+ param_shapes = {k: v for d in param_shapes for k, v in d.items()}
396
+
397
+ if debug:
398
+ for i in range(world_size):
399
+ print(f"{FP32_FLAT_GROUPS}[{i}].shape={fp32_flat_groups[i].shape}")
400
+
401
+ wanted_params = len(param_shapes)
402
+ wanted_numel = sum(shape.numel() for shape in param_shapes.values())
403
+ # not asserting if there is a mismatch due to possible padding
404
+ avail_numel = fp32_flat_groups[0].numel() * world_size
405
+ print(f"Trainable params: Have {avail_numel} numels to process.")
406
+ print(f"Trainable params: Need {wanted_numel} numels in {wanted_params} params.")
407
+
408
+ # params
409
+ # XXX: for huge models that can't fit into the host's RAM we will have to recode this to support
410
+ # out-of-core computing solution
411
+ offset = 0
412
+ total_numel = 0
413
+ total_params = 0
414
+ for name, shape in param_shapes.items():
415
+
416
+ unpartitioned_numel = shape.numel()
417
+ total_numel += unpartitioned_numel
418
+ total_params += 1
419
+
420
+ partitioned_numel, partitioned_padding_numel = zero3_partitioned_param_info(unpartitioned_numel, world_size)
421
+
422
+ if debug:
423
+ print(
424
+ f"Trainable params: {total_params} {name} full shape: {shape} partition0 numel={partitioned_numel} partitioned_padding_numel={partitioned_padding_numel}"
425
+ )
426
+
427
+ # XXX: memory usage doubles here
428
+ state_dict[name] = torch.cat(
429
+ tuple(fp32_flat_groups[i].narrow(0, offset, partitioned_numel) for i in range(world_size)),
430
+ 0).narrow(0, 0, unpartitioned_numel).view(shape)
431
+ offset += partitioned_numel
432
+
433
+ offset *= world_size
434
+
435
+ # Sanity check
436
+ if offset != avail_numel:
437
+ raise ValueError(f"consumed {offset} numels out of {avail_numel} - something is wrong")
438
+
439
+ print(f"Reconstructed Trainable fp32 state dict with {total_params} params {total_numel} elements")
440
+
441
+
442
+ def _get_fp32_state_dict_from_zero3_checkpoint(world_size, fp32_flat_groups, zero_model_states):
443
+ state_dict = OrderedDict()
444
+
445
+ # buffers
446
+ buffers = zero_model_states[0].buffers
447
+ state_dict.update(buffers)
448
+ if debug:
449
+ print(f"added {len(buffers)} buffers")
450
+
451
+ _zero3_merge_frozen_params(state_dict, world_size, zero_model_states)
452
+
453
+ _zero3_merge_trainable_params(state_dict, world_size, fp32_flat_groups, zero_model_states)
454
+
455
+ # recover shared parameters
456
+ for pair in zero_model_states[0].shared_params:
457
+ if pair[1] in state_dict:
458
+ state_dict[pair[0]] = state_dict[pair[1]]
459
+
460
+ return state_dict
461
+
462
+
463
+ def get_fp32_state_dict_from_zero_checkpoint(checkpoint_dir, tag=None):
464
+ """
465
+ Convert ZeRO 2 or 3 checkpoint into a single fp32 consolidated state_dict that can be loaded with
466
+ ``load_state_dict()`` and used for training without DeepSpeed or shared with others, for example
467
+ via a model hub.
468
+
469
+ Args:
470
+ - ``checkpoint_dir``: path to the desired checkpoint folder
471
+ - ``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``
472
+
473
+ Returns:
474
+ - pytorch ``state_dict``
475
+
476
+ Note: this approach may not work if your application doesn't have sufficient free CPU memory and
477
+ you may need to use the offline approach using the ``zero_to_fp32.py`` script that is saved with
478
+ the checkpoint.
479
+
480
+ A typical usage might be ::
481
+
482
+ from deepspeed.utils.zero_to_fp32 import get_fp32_state_dict_from_zero_checkpoint
483
+ # do the training and checkpoint saving
484
+ state_dict = get_fp32_state_dict_from_zero_checkpoint(checkpoint_dir) # already on cpu
485
+ model = model.cpu() # move to cpu
486
+ model.load_state_dict(state_dict)
487
+ # submit to model hub or save the model to share with others
488
+
489
+ In this example the ``model`` will no longer be usable in the deepspeed context of the same
490
+ application. i.e. you will need to re-initialize the deepspeed engine, since
491
+ ``model.load_state_dict(state_dict)`` will remove all the deepspeed magic from it.
492
+
493
+ If you want it all done for you, use ``load_state_dict_from_zero_checkpoint`` instead.
494
+
495
+ """
496
+ if tag is None:
497
+ latest_path = os.path.join(checkpoint_dir, 'latest')
498
+ if os.path.isfile(latest_path):
499
+ with open(latest_path, 'r') as fd:
500
+ tag = fd.read().strip()
501
+ else:
502
+ raise ValueError(f"Unable to find 'latest' file at {latest_path}")
503
+
504
+ ds_checkpoint_dir = os.path.join(checkpoint_dir, tag)
505
+
506
+ if not os.path.isdir(ds_checkpoint_dir):
507
+ raise FileNotFoundError(f"Directory '{ds_checkpoint_dir}' doesn't exist")
508
+
509
+ return _get_fp32_state_dict_from_zero_checkpoint(ds_checkpoint_dir)
510
+
511
+
512
+ def convert_zero_checkpoint_to_fp32_state_dict(checkpoint_dir, output_file, tag=None):
513
+ """
514
+ Convert ZeRO 2 or 3 checkpoint into a single fp32 consolidated ``state_dict`` file that can be
515
+ loaded with ``torch.load(file)`` + ``load_state_dict()`` and used for training without DeepSpeed.
516
+
517
+ Args:
518
+ - ``checkpoint_dir``: path to the desired checkpoint folder. (one that contains the tag-folder, like ``global_step14``)
519
+ - ``output_file``: path to the pytorch fp32 state_dict output file (e.g. path/pytorch_model.bin)
520
+ - ``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``
521
+ """
522
+
523
+ state_dict = get_fp32_state_dict_from_zero_checkpoint(checkpoint_dir, tag)
524
+ print(f"Saving fp32 state dict to {output_file}")
525
+ torch.save(state_dict, output_file)
526
+
527
+
528
+ def load_state_dict_from_zero_checkpoint(model, checkpoint_dir, tag=None):
529
+ """
530
+ 1. Put the provided model to cpu
531
+ 2. Convert ZeRO 2 or 3 checkpoint into a single fp32 consolidated ``state_dict``
532
+ 3. Load it into the provided model
533
+
534
+ Args:
535
+ - ``model``: the model object to update
536
+ - ``checkpoint_dir``: path to the desired checkpoint folder. (one that contains the tag-folder, like ``global_step14``)
537
+ - ``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``
538
+
539
+ Returns:
540
+ - ``model`: modified model
541
+
542
+ Make sure you have plenty of CPU memory available before you call this function. If you don't
543
+ have enough use the ``zero_to_fp32.py`` utility to do the conversion. You will find it
544
+ conveniently placed for you in the checkpoint folder.
545
+
546
+ A typical usage might be ::
547
+
548
+ from deepspeed.utils.zero_to_fp32 import load_state_dict_from_zero_checkpoint
549
+ model = load_state_dict_from_zero_checkpoint(trainer.model, checkpoint_dir)
550
+ # submit to model hub or save the model to share with others
551
+
552
+ Note, that once this was run, the ``model`` will no longer be usable in the deepspeed context
553
+ of the same application. i.e. you will need to re-initialize the deepspeed engine, since
554
+ ``model.load_state_dict(state_dict)`` will remove all the deepspeed magic from it.
555
+
556
+ """
557
+ logger.info(f"Extracting fp32 weights")
558
+ state_dict = get_fp32_state_dict_from_zero_checkpoint(checkpoint_dir, tag)
559
+
560
+ logger.info(f"Overwriting model with fp32 weights")
561
+ model = model.cpu()
562
+ model.load_state_dict(state_dict, strict=False)
563
+
564
+ return model
565
+
566
+
567
+ if __name__ == "__main__":
568
+
569
+ parser = argparse.ArgumentParser()
570
+ parser.add_argument("checkpoint_dir",
571
+ type=str,
572
+ help="path to the desired checkpoint folder, e.g., path/checkpoint-12")
573
+ parser.add_argument(
574
+ "output_file",
575
+ type=str,
576
+ help="path to the pytorch fp32 state_dict output file (e.g. path/checkpoint-12/pytorch_model.bin)")
577
+ parser.add_argument("-t",
578
+ "--tag",
579
+ type=str,
580
+ default=None,
581
+ help="checkpoint tag used as a unique identifier for checkpoint. e.g., global_step1")
582
+ parser.add_argument("-d", "--debug", action='store_true', help="enable debug")
583
+ args = parser.parse_args()
584
+
585
+ debug = args.debug
586
+
587
+ convert_zero_checkpoint_to_fp32_state_dict(args.checkpoint_dir, args.output_file, tag=args.tag)