ToastyPigeon commited on
Commit
095f384
·
verified ·
1 Parent(s): 31daf19

Training in progress, step 169, checkpoint

Browse files
checkpoint-169/README.md ADDED
@@ -0,0 +1,202 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ ---
2
+ base_model: mistralai/Mistral-Small-24B-Instruct-2501
3
+ library_name: peft
4
+ ---
5
+
6
+ # Model Card for Model ID
7
+
8
+ <!-- Provide a quick summary of what the model is/does. -->
9
+
10
+
11
+
12
+ ## Model Details
13
+
14
+ ### Model Description
15
+
16
+ <!-- Provide a longer summary of what this model is. -->
17
+
18
+
19
+
20
+ - **Developed by:** [More Information Needed]
21
+ - **Funded by [optional]:** [More Information Needed]
22
+ - **Shared by [optional]:** [More Information Needed]
23
+ - **Model type:** [More Information Needed]
24
+ - **Language(s) (NLP):** [More Information Needed]
25
+ - **License:** [More Information Needed]
26
+ - **Finetuned from model [optional]:** [More Information Needed]
27
+
28
+ ### Model Sources [optional]
29
+
30
+ <!-- Provide the basic links for the model. -->
31
+
32
+ - **Repository:** [More Information Needed]
33
+ - **Paper [optional]:** [More Information Needed]
34
+ - **Demo [optional]:** [More Information Needed]
35
+
36
+ ## Uses
37
+
38
+ <!-- Address questions around how the model is intended to be used, including the foreseeable users of the model and those affected by the model. -->
39
+
40
+ ### Direct Use
41
+
42
+ <!-- This section is for the model use without fine-tuning or plugging into a larger ecosystem/app. -->
43
+
44
+ [More Information Needed]
45
+
46
+ ### Downstream Use [optional]
47
+
48
+ <!-- This section is for the model use when fine-tuned for a task, or when plugged into a larger ecosystem/app -->
49
+
50
+ [More Information Needed]
51
+
52
+ ### Out-of-Scope Use
53
+
54
+ <!-- This section addresses misuse, malicious use, and uses that the model will not work well for. -->
55
+
56
+ [More Information Needed]
57
+
58
+ ## Bias, Risks, and Limitations
59
+
60
+ <!-- This section is meant to convey both technical and sociotechnical limitations. -->
61
+
62
+ [More Information Needed]
63
+
64
+ ### Recommendations
65
+
66
+ <!-- This section is meant to convey recommendations with respect to the bias, risk, and technical limitations. -->
67
+
68
+ Users (both direct and downstream) should be made aware of the risks, biases and limitations of the model. More information needed for further recommendations.
69
+
70
+ ## How to Get Started with the Model
71
+
72
+ Use the code below to get started with the model.
73
+
74
+ [More Information Needed]
75
+
76
+ ## Training Details
77
+
78
+ ### Training Data
79
+
80
+ <!-- This should link to a Dataset Card, perhaps with a short stub of information on what the training data is all about as well as documentation related to data pre-processing or additional filtering. -->
81
+
82
+ [More Information Needed]
83
+
84
+ ### Training Procedure
85
+
86
+ <!-- This relates heavily to the Technical Specifications. Content here should link to that section when it is relevant to the training procedure. -->
87
+
88
+ #### Preprocessing [optional]
89
+
90
+ [More Information Needed]
91
+
92
+
93
+ #### Training Hyperparameters
94
+
95
+ - **Training regime:** [More Information Needed] <!--fp32, fp16 mixed precision, bf16 mixed precision, bf16 non-mixed precision, fp16 non-mixed precision, fp8 mixed precision -->
96
+
97
+ #### Speeds, Sizes, Times [optional]
98
+
99
+ <!-- This section provides information about throughput, start/end time, checkpoint size if relevant, etc. -->
100
+
101
+ [More Information Needed]
102
+
103
+ ## Evaluation
104
+
105
+ <!-- This section describes the evaluation protocols and provides the results. -->
106
+
107
+ ### Testing Data, Factors & Metrics
108
+
109
+ #### Testing Data
110
+
111
+ <!-- This should link to a Dataset Card if possible. -->
112
+
113
+ [More Information Needed]
114
+
115
+ #### Factors
116
+
117
+ <!-- These are the things the evaluation is disaggregating by, e.g., subpopulations or domains. -->
118
+
119
+ [More Information Needed]
120
+
121
+ #### Metrics
122
+
123
+ <!-- These are the evaluation metrics being used, ideally with a description of why. -->
124
+
125
+ [More Information Needed]
126
+
127
+ ### Results
128
+
129
+ [More Information Needed]
130
+
131
+ #### Summary
132
+
133
+
134
+
135
+ ## Model Examination [optional]
136
+
137
+ <!-- Relevant interpretability work for the model goes here -->
138
+
139
+ [More Information Needed]
140
+
141
+ ## Environmental Impact
142
+
143
+ <!-- Total emissions (in grams of CO2eq) and additional considerations, such as electricity usage, go here. Edit the suggested text below accordingly -->
144
+
145
+ Carbon emissions can be estimated using the [Machine Learning Impact calculator](https://mlco2.github.io/impact#compute) presented in [Lacoste et al. (2019)](https://arxiv.org/abs/1910.09700).
146
+
147
+ - **Hardware Type:** [More Information Needed]
148
+ - **Hours used:** [More Information Needed]
149
+ - **Cloud Provider:** [More Information Needed]
150
+ - **Compute Region:** [More Information Needed]
151
+ - **Carbon Emitted:** [More Information Needed]
152
+
153
+ ## Technical Specifications [optional]
154
+
155
+ ### Model Architecture and Objective
156
+
157
+ [More Information Needed]
158
+
159
+ ### Compute Infrastructure
160
+
161
+ [More Information Needed]
162
+
163
+ #### Hardware
164
+
165
+ [More Information Needed]
166
+
167
+ #### Software
168
+
169
+ [More Information Needed]
170
+
171
+ ## Citation [optional]
172
+
173
+ <!-- If there is a paper or blog post introducing the model, the APA and Bibtex information for that should go in this section. -->
174
+
175
+ **BibTeX:**
176
+
177
+ [More Information Needed]
178
+
179
+ **APA:**
180
+
181
+ [More Information Needed]
182
+
183
+ ## Glossary [optional]
184
+
185
+ <!-- If relevant, include terms and calculations in this section that can help readers understand the model or model card. -->
186
+
187
+ [More Information Needed]
188
+
189
+ ## More Information [optional]
190
+
191
+ [More Information Needed]
192
+
193
+ ## Model Card Authors [optional]
194
+
195
+ [More Information Needed]
196
+
197
+ ## Model Card Contact
198
+
199
+ [More Information Needed]
200
+ ### Framework versions
201
+
202
+ - PEFT 0.14.0
checkpoint-169/adapter_config.json ADDED
@@ -0,0 +1,37 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ {
2
+ "alpha_pattern": {},
3
+ "auto_mapping": null,
4
+ "base_model_name_or_path": "mistralai/Mistral-Small-24B-Instruct-2501",
5
+ "bias": "none",
6
+ "eva_config": null,
7
+ "exclude_modules": null,
8
+ "fan_in_fan_out": null,
9
+ "inference_mode": true,
10
+ "init_lora_weights": true,
11
+ "layer_replication": null,
12
+ "layers_pattern": null,
13
+ "layers_to_transform": null,
14
+ "loftq_config": {},
15
+ "lora_alpha": 128,
16
+ "lora_bias": false,
17
+ "lora_dropout": 0.5,
18
+ "megatron_config": null,
19
+ "megatron_core": "megatron.core",
20
+ "modules_to_save": null,
21
+ "peft_type": "LORA",
22
+ "r": 128,
23
+ "rank_pattern": {},
24
+ "revision": null,
25
+ "target_modules": [
26
+ "gate_proj",
27
+ "down_proj",
28
+ "k_proj",
29
+ "q_proj",
30
+ "o_proj",
31
+ "up_proj",
32
+ "v_proj"
33
+ ],
34
+ "task_type": "CAUSAL_LM",
35
+ "use_dora": false,
36
+ "use_rslora": false
37
+ }
checkpoint-169/adapter_model.safetensors ADDED
@@ -0,0 +1,3 @@
 
 
 
 
1
+ version https://git-lfs.github.com/spec/v1
2
+ oid sha256:4add5030ae0e80827be9f59cd190ff187e36df846215413f8d76d04bb86eb2d3
3
+ size 1478569432
checkpoint-169/global_step169/bf16_zero_pp_rank_0_mp_rank_00_optim_states.pt ADDED
@@ -0,0 +1,3 @@
 
 
 
 
1
+ version https://git-lfs.github.com/spec/v1
2
+ oid sha256:1e78a5caffa72406c49d4fdfc98c5e5801970101ac885eb5e3057ef899d0ef0e
3
+ size 1303295536
checkpoint-169/global_step169/bf16_zero_pp_rank_1_mp_rank_00_optim_states.pt ADDED
@@ -0,0 +1,3 @@
 
 
 
 
1
+ version https://git-lfs.github.com/spec/v1
2
+ oid sha256:82807aa72b907b70acc318fa49d2e747df1591dd53b5779f1da5796bf85756c7
3
+ size 1303295536
checkpoint-169/global_step169/bf16_zero_pp_rank_2_mp_rank_00_optim_states.pt ADDED
@@ -0,0 +1,3 @@
 
 
 
 
1
+ version https://git-lfs.github.com/spec/v1
2
+ oid sha256:ea2e73ad23e806dbf63d10a6004cf35ae1fbb818b0f109435c746ccf639fb2b4
3
+ size 1303295536
checkpoint-169/global_step169/bf16_zero_pp_rank_3_mp_rank_00_optim_states.pt ADDED
@@ -0,0 +1,3 @@
 
 
 
 
1
+ version https://git-lfs.github.com/spec/v1
2
+ oid sha256:b7b25f9b3325a45f38ea60e72f9e84a3dbf16b76e43034aa53a69f5cfac94531
3
+ size 1303295536
checkpoint-169/global_step169/zero_pp_rank_0_mp_rank_00_model_states.pt ADDED
@@ -0,0 +1,3 @@
 
 
 
 
1
+ version https://git-lfs.github.com/spec/v1
2
+ oid sha256:1469e42fb0c2f4affbe6184cb92d7555d10b1257a682e8dacb828f2c337925fe
3
+ size 354241078
checkpoint-169/global_step169/zero_pp_rank_1_mp_rank_00_model_states.pt ADDED
@@ -0,0 +1,3 @@
 
 
 
 
1
+ version https://git-lfs.github.com/spec/v1
2
+ oid sha256:2b2bc8791eeeaef9e3abb544a85c2b2098645bc9dec28767185cc8a5ac12abca
3
+ size 354241078
checkpoint-169/global_step169/zero_pp_rank_2_mp_rank_00_model_states.pt ADDED
@@ -0,0 +1,3 @@
 
 
 
 
1
+ version https://git-lfs.github.com/spec/v1
2
+ oid sha256:2cfd0d9b6d53a6a447d7d66661c732c8998443bbf8fd39847dc0a5e89fcb450a
3
+ size 354241078
checkpoint-169/global_step169/zero_pp_rank_3_mp_rank_00_model_states.pt ADDED
@@ -0,0 +1,3 @@
 
 
 
 
1
+ version https://git-lfs.github.com/spec/v1
2
+ oid sha256:df848a814eceffb024fa5f4d28bfa13d2c1291bd46bac145388cc003702d3e84
3
+ size 354241078
checkpoint-169/latest ADDED
@@ -0,0 +1 @@
 
 
1
+ global_step169
checkpoint-169/rng_state_0.pth ADDED
@@ -0,0 +1,3 @@
 
 
 
 
1
+ version https://git-lfs.github.com/spec/v1
2
+ oid sha256:6dc761d7143c63661bba58605395cdb8af7f39abb6c12e3a0fecf68e7387db14
3
+ size 14960
checkpoint-169/rng_state_1.pth ADDED
@@ -0,0 +1,3 @@
 
 
 
 
1
+ version https://git-lfs.github.com/spec/v1
2
+ oid sha256:e0f3c98d07fafcc0c02eb819a8c654d2754d60018b71241fdbebde3853f28504
3
+ size 14960
checkpoint-169/rng_state_2.pth ADDED
@@ -0,0 +1,3 @@
 
 
 
 
1
+ version https://git-lfs.github.com/spec/v1
2
+ oid sha256:8e1b90ac4bf3168dfe4d455d7593ca8ea91c5e507eb5447cf8e4c9bfd7ae2338
3
+ size 14960
checkpoint-169/rng_state_3.pth ADDED
@@ -0,0 +1,3 @@
 
 
 
 
1
+ version https://git-lfs.github.com/spec/v1
2
+ oid sha256:f74bbed0708977476c325febc2d4ab39d1bc2d3e182e541b82efefbf4699cc63
3
+ size 14960
checkpoint-169/scheduler.pt ADDED
@@ -0,0 +1,3 @@
 
 
 
 
1
+ version https://git-lfs.github.com/spec/v1
2
+ oid sha256:e74f591470498343f28f179cf87cb4204fe4b5719af33aa6eb65eddaac23ae1f
3
+ size 1064
checkpoint-169/special_tokens_map.json ADDED
@@ -0,0 +1,1026 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ {
2
+ "additional_special_tokens": [
3
+ "<unk>",
4
+ "<s>",
5
+ "</s>",
6
+ "[INST]",
7
+ "[/INST]",
8
+ "[AVAILABLE_TOOLS]",
9
+ "[/AVAILABLE_TOOLS]",
10
+ "[TOOL_RESULTS]",
11
+ "[/TOOL_RESULTS]",
12
+ "[TOOL_CALLS]",
13
+ "[IMG]",
14
+ "<pad>",
15
+ "[IMG_BREAK]",
16
+ "[IMG_END]",
17
+ "[PREFIX]",
18
+ "[MIDDLE]",
19
+ "[SUFFIX]",
20
+ "[SYSTEM_PROMPT]",
21
+ "[/SYSTEM_PROMPT]",
22
+ "[TOOL_CONTENT]",
23
+ "<SPECIAL_20>",
24
+ "<SPECIAL_21>",
25
+ "<SPECIAL_22>",
26
+ "<SPECIAL_23>",
27
+ "<SPECIAL_24>",
28
+ "<SPECIAL_25>",
29
+ "<SPECIAL_26>",
30
+ "<SPECIAL_27>",
31
+ "<SPECIAL_28>",
32
+ "<SPECIAL_29>",
33
+ "<SPECIAL_30>",
34
+ "<SPECIAL_31>",
35
+ "<SPECIAL_32>",
36
+ "<SPECIAL_33>",
37
+ "<SPECIAL_34>",
38
+ "<SPECIAL_35>",
39
+ "<SPECIAL_36>",
40
+ "<SPECIAL_37>",
41
+ "<SPECIAL_38>",
42
+ "<SPECIAL_39>",
43
+ "<SPECIAL_40>",
44
+ "<SPECIAL_41>",
45
+ "<SPECIAL_42>",
46
+ "<SPECIAL_43>",
47
+ "<SPECIAL_44>",
48
+ "<SPECIAL_45>",
49
+ "<SPECIAL_46>",
50
+ "<SPECIAL_47>",
51
+ "<SPECIAL_48>",
52
+ "<SPECIAL_49>",
53
+ "<SPECIAL_50>",
54
+ "<SPECIAL_51>",
55
+ "<SPECIAL_52>",
56
+ "<SPECIAL_53>",
57
+ "<SPECIAL_54>",
58
+ "<SPECIAL_55>",
59
+ "<SPECIAL_56>",
60
+ "<SPECIAL_57>",
61
+ "<SPECIAL_58>",
62
+ "<SPECIAL_59>",
63
+ "<SPECIAL_60>",
64
+ "<SPECIAL_61>",
65
+ "<SPECIAL_62>",
66
+ "<SPECIAL_63>",
67
+ "<SPECIAL_64>",
68
+ "<SPECIAL_65>",
69
+ "<SPECIAL_66>",
70
+ "<SPECIAL_67>",
71
+ "<SPECIAL_68>",
72
+ "<SPECIAL_69>",
73
+ "<SPECIAL_70>",
74
+ "<SPECIAL_71>",
75
+ "<SPECIAL_72>",
76
+ "<SPECIAL_73>",
77
+ "<SPECIAL_74>",
78
+ "<SPECIAL_75>",
79
+ "<SPECIAL_76>",
80
+ "<SPECIAL_77>",
81
+ "<SPECIAL_78>",
82
+ "<SPECIAL_79>",
83
+ "<SPECIAL_80>",
84
+ "<SPECIAL_81>",
85
+ "<SPECIAL_82>",
86
+ "<SPECIAL_83>",
87
+ "<SPECIAL_84>",
88
+ "<SPECIAL_85>",
89
+ "<SPECIAL_86>",
90
+ "<SPECIAL_87>",
91
+ "<SPECIAL_88>",
92
+ "<SPECIAL_89>",
93
+ "<SPECIAL_90>",
94
+ "<SPECIAL_91>",
95
+ "<SPECIAL_92>",
96
+ "<SPECIAL_93>",
97
+ "<SPECIAL_94>",
98
+ "<SPECIAL_95>",
99
+ "<SPECIAL_96>",
100
+ "<SPECIAL_97>",
101
+ "<SPECIAL_98>",
102
+ "<SPECIAL_99>",
103
+ "<SPECIAL_100>",
104
+ "<SPECIAL_101>",
105
+ "<SPECIAL_102>",
106
+ "<SPECIAL_103>",
107
+ "<SPECIAL_104>",
108
+ "<SPECIAL_105>",
109
+ "<SPECIAL_106>",
110
+ "<SPECIAL_107>",
111
+ "<SPECIAL_108>",
112
+ "<SPECIAL_109>",
113
+ "<SPECIAL_110>",
114
+ "<SPECIAL_111>",
115
+ "<SPECIAL_112>",
116
+ "<SPECIAL_113>",
117
+ "<SPECIAL_114>",
118
+ "<SPECIAL_115>",
119
+ "<SPECIAL_116>",
120
+ "<SPECIAL_117>",
121
+ "<SPECIAL_118>",
122
+ "<SPECIAL_119>",
123
+ "<SPECIAL_120>",
124
+ "<SPECIAL_121>",
125
+ "<SPECIAL_122>",
126
+ "<SPECIAL_123>",
127
+ "<SPECIAL_124>",
128
+ "<SPECIAL_125>",
129
+ "<SPECIAL_126>",
130
+ "<SPECIAL_127>",
131
+ "<SPECIAL_128>",
132
+ "<SPECIAL_129>",
133
+ "<SPECIAL_130>",
134
+ "<SPECIAL_131>",
135
+ "<SPECIAL_132>",
136
+ "<SPECIAL_133>",
137
+ "<SPECIAL_134>",
138
+ "<SPECIAL_135>",
139
+ "<SPECIAL_136>",
140
+ "<SPECIAL_137>",
141
+ "<SPECIAL_138>",
142
+ "<SPECIAL_139>",
143
+ "<SPECIAL_140>",
144
+ "<SPECIAL_141>",
145
+ "<SPECIAL_142>",
146
+ "<SPECIAL_143>",
147
+ "<SPECIAL_144>",
148
+ "<SPECIAL_145>",
149
+ "<SPECIAL_146>",
150
+ "<SPECIAL_147>",
151
+ "<SPECIAL_148>",
152
+ "<SPECIAL_149>",
153
+ "<SPECIAL_150>",
154
+ "<SPECIAL_151>",
155
+ "<SPECIAL_152>",
156
+ "<SPECIAL_153>",
157
+ "<SPECIAL_154>",
158
+ "<SPECIAL_155>",
159
+ "<SPECIAL_156>",
160
+ "<SPECIAL_157>",
161
+ "<SPECIAL_158>",
162
+ "<SPECIAL_159>",
163
+ "<SPECIAL_160>",
164
+ "<SPECIAL_161>",
165
+ "<SPECIAL_162>",
166
+ "<SPECIAL_163>",
167
+ "<SPECIAL_164>",
168
+ "<SPECIAL_165>",
169
+ "<SPECIAL_166>",
170
+ "<SPECIAL_167>",
171
+ "<SPECIAL_168>",
172
+ "<SPECIAL_169>",
173
+ "<SPECIAL_170>",
174
+ "<SPECIAL_171>",
175
+ "<SPECIAL_172>",
176
+ "<SPECIAL_173>",
177
+ "<SPECIAL_174>",
178
+ "<SPECIAL_175>",
179
+ "<SPECIAL_176>",
180
+ "<SPECIAL_177>",
181
+ "<SPECIAL_178>",
182
+ "<SPECIAL_179>",
183
+ "<SPECIAL_180>",
184
+ "<SPECIAL_181>",
185
+ "<SPECIAL_182>",
186
+ "<SPECIAL_183>",
187
+ "<SPECIAL_184>",
188
+ "<SPECIAL_185>",
189
+ "<SPECIAL_186>",
190
+ "<SPECIAL_187>",
191
+ "<SPECIAL_188>",
192
+ "<SPECIAL_189>",
193
+ "<SPECIAL_190>",
194
+ "<SPECIAL_191>",
195
+ "<SPECIAL_192>",
196
+ "<SPECIAL_193>",
197
+ "<SPECIAL_194>",
198
+ "<SPECIAL_195>",
199
+ "<SPECIAL_196>",
200
+ "<SPECIAL_197>",
201
+ "<SPECIAL_198>",
202
+ "<SPECIAL_199>",
203
+ "<SPECIAL_200>",
204
+ "<SPECIAL_201>",
205
+ "<SPECIAL_202>",
206
+ "<SPECIAL_203>",
207
+ "<SPECIAL_204>",
208
+ "<SPECIAL_205>",
209
+ "<SPECIAL_206>",
210
+ "<SPECIAL_207>",
211
+ "<SPECIAL_208>",
212
+ "<SPECIAL_209>",
213
+ "<SPECIAL_210>",
214
+ "<SPECIAL_211>",
215
+ "<SPECIAL_212>",
216
+ "<SPECIAL_213>",
217
+ "<SPECIAL_214>",
218
+ "<SPECIAL_215>",
219
+ "<SPECIAL_216>",
220
+ "<SPECIAL_217>",
221
+ "<SPECIAL_218>",
222
+ "<SPECIAL_219>",
223
+ "<SPECIAL_220>",
224
+ "<SPECIAL_221>",
225
+ "<SPECIAL_222>",
226
+ "<SPECIAL_223>",
227
+ "<SPECIAL_224>",
228
+ "<SPECIAL_225>",
229
+ "<SPECIAL_226>",
230
+ "<SPECIAL_227>",
231
+ "<SPECIAL_228>",
232
+ "<SPECIAL_229>",
233
+ "<SPECIAL_230>",
234
+ "<SPECIAL_231>",
235
+ "<SPECIAL_232>",
236
+ "<SPECIAL_233>",
237
+ "<SPECIAL_234>",
238
+ "<SPECIAL_235>",
239
+ "<SPECIAL_236>",
240
+ "<SPECIAL_237>",
241
+ "<SPECIAL_238>",
242
+ "<SPECIAL_239>",
243
+ "<SPECIAL_240>",
244
+ "<SPECIAL_241>",
245
+ "<SPECIAL_242>",
246
+ "<SPECIAL_243>",
247
+ "<SPECIAL_244>",
248
+ "<SPECIAL_245>",
249
+ "<SPECIAL_246>",
250
+ "<SPECIAL_247>",
251
+ "<SPECIAL_248>",
252
+ "<SPECIAL_249>",
253
+ "<SPECIAL_250>",
254
+ "<SPECIAL_251>",
255
+ "<SPECIAL_252>",
256
+ "<SPECIAL_253>",
257
+ "<SPECIAL_254>",
258
+ "<SPECIAL_255>",
259
+ "<SPECIAL_256>",
260
+ "<SPECIAL_257>",
261
+ "<SPECIAL_258>",
262
+ "<SPECIAL_259>",
263
+ "<SPECIAL_260>",
264
+ "<SPECIAL_261>",
265
+ "<SPECIAL_262>",
266
+ "<SPECIAL_263>",
267
+ "<SPECIAL_264>",
268
+ "<SPECIAL_265>",
269
+ "<SPECIAL_266>",
270
+ "<SPECIAL_267>",
271
+ "<SPECIAL_268>",
272
+ "<SPECIAL_269>",
273
+ "<SPECIAL_270>",
274
+ "<SPECIAL_271>",
275
+ "<SPECIAL_272>",
276
+ "<SPECIAL_273>",
277
+ "<SPECIAL_274>",
278
+ "<SPECIAL_275>",
279
+ "<SPECIAL_276>",
280
+ "<SPECIAL_277>",
281
+ "<SPECIAL_278>",
282
+ "<SPECIAL_279>",
283
+ "<SPECIAL_280>",
284
+ "<SPECIAL_281>",
285
+ "<SPECIAL_282>",
286
+ "<SPECIAL_283>",
287
+ "<SPECIAL_284>",
288
+ "<SPECIAL_285>",
289
+ "<SPECIAL_286>",
290
+ "<SPECIAL_287>",
291
+ "<SPECIAL_288>",
292
+ "<SPECIAL_289>",
293
+ "<SPECIAL_290>",
294
+ "<SPECIAL_291>",
295
+ "<SPECIAL_292>",
296
+ "<SPECIAL_293>",
297
+ "<SPECIAL_294>",
298
+ "<SPECIAL_295>",
299
+ "<SPECIAL_296>",
300
+ "<SPECIAL_297>",
301
+ "<SPECIAL_298>",
302
+ "<SPECIAL_299>",
303
+ "<SPECIAL_300>",
304
+ "<SPECIAL_301>",
305
+ "<SPECIAL_302>",
306
+ "<SPECIAL_303>",
307
+ "<SPECIAL_304>",
308
+ "<SPECIAL_305>",
309
+ "<SPECIAL_306>",
310
+ "<SPECIAL_307>",
311
+ "<SPECIAL_308>",
312
+ "<SPECIAL_309>",
313
+ "<SPECIAL_310>",
314
+ "<SPECIAL_311>",
315
+ "<SPECIAL_312>",
316
+ "<SPECIAL_313>",
317
+ "<SPECIAL_314>",
318
+ "<SPECIAL_315>",
319
+ "<SPECIAL_316>",
320
+ "<SPECIAL_317>",
321
+ "<SPECIAL_318>",
322
+ "<SPECIAL_319>",
323
+ "<SPECIAL_320>",
324
+ "<SPECIAL_321>",
325
+ "<SPECIAL_322>",
326
+ "<SPECIAL_323>",
327
+ "<SPECIAL_324>",
328
+ "<SPECIAL_325>",
329
+ "<SPECIAL_326>",
330
+ "<SPECIAL_327>",
331
+ "<SPECIAL_328>",
332
+ "<SPECIAL_329>",
333
+ "<SPECIAL_330>",
334
+ "<SPECIAL_331>",
335
+ "<SPECIAL_332>",
336
+ "<SPECIAL_333>",
337
+ "<SPECIAL_334>",
338
+ "<SPECIAL_335>",
339
+ "<SPECIAL_336>",
340
+ "<SPECIAL_337>",
341
+ "<SPECIAL_338>",
342
+ "<SPECIAL_339>",
343
+ "<SPECIAL_340>",
344
+ "<SPECIAL_341>",
345
+ "<SPECIAL_342>",
346
+ "<SPECIAL_343>",
347
+ "<SPECIAL_344>",
348
+ "<SPECIAL_345>",
349
+ "<SPECIAL_346>",
350
+ "<SPECIAL_347>",
351
+ "<SPECIAL_348>",
352
+ "<SPECIAL_349>",
353
+ "<SPECIAL_350>",
354
+ "<SPECIAL_351>",
355
+ "<SPECIAL_352>",
356
+ "<SPECIAL_353>",
357
+ "<SPECIAL_354>",
358
+ "<SPECIAL_355>",
359
+ "<SPECIAL_356>",
360
+ "<SPECIAL_357>",
361
+ "<SPECIAL_358>",
362
+ "<SPECIAL_359>",
363
+ "<SPECIAL_360>",
364
+ "<SPECIAL_361>",
365
+ "<SPECIAL_362>",
366
+ "<SPECIAL_363>",
367
+ "<SPECIAL_364>",
368
+ "<SPECIAL_365>",
369
+ "<SPECIAL_366>",
370
+ "<SPECIAL_367>",
371
+ "<SPECIAL_368>",
372
+ "<SPECIAL_369>",
373
+ "<SPECIAL_370>",
374
+ "<SPECIAL_371>",
375
+ "<SPECIAL_372>",
376
+ "<SPECIAL_373>",
377
+ "<SPECIAL_374>",
378
+ "<SPECIAL_375>",
379
+ "<SPECIAL_376>",
380
+ "<SPECIAL_377>",
381
+ "<SPECIAL_378>",
382
+ "<SPECIAL_379>",
383
+ "<SPECIAL_380>",
384
+ "<SPECIAL_381>",
385
+ "<SPECIAL_382>",
386
+ "<SPECIAL_383>",
387
+ "<SPECIAL_384>",
388
+ "<SPECIAL_385>",
389
+ "<SPECIAL_386>",
390
+ "<SPECIAL_387>",
391
+ "<SPECIAL_388>",
392
+ "<SPECIAL_389>",
393
+ "<SPECIAL_390>",
394
+ "<SPECIAL_391>",
395
+ "<SPECIAL_392>",
396
+ "<SPECIAL_393>",
397
+ "<SPECIAL_394>",
398
+ "<SPECIAL_395>",
399
+ "<SPECIAL_396>",
400
+ "<SPECIAL_397>",
401
+ "<SPECIAL_398>",
402
+ "<SPECIAL_399>",
403
+ "<SPECIAL_400>",
404
+ "<SPECIAL_401>",
405
+ "<SPECIAL_402>",
406
+ "<SPECIAL_403>",
407
+ "<SPECIAL_404>",
408
+ "<SPECIAL_405>",
409
+ "<SPECIAL_406>",
410
+ "<SPECIAL_407>",
411
+ "<SPECIAL_408>",
412
+ "<SPECIAL_409>",
413
+ "<SPECIAL_410>",
414
+ "<SPECIAL_411>",
415
+ "<SPECIAL_412>",
416
+ "<SPECIAL_413>",
417
+ "<SPECIAL_414>",
418
+ "<SPECIAL_415>",
419
+ "<SPECIAL_416>",
420
+ "<SPECIAL_417>",
421
+ "<SPECIAL_418>",
422
+ "<SPECIAL_419>",
423
+ "<SPECIAL_420>",
424
+ "<SPECIAL_421>",
425
+ "<SPECIAL_422>",
426
+ "<SPECIAL_423>",
427
+ "<SPECIAL_424>",
428
+ "<SPECIAL_425>",
429
+ "<SPECIAL_426>",
430
+ "<SPECIAL_427>",
431
+ "<SPECIAL_428>",
432
+ "<SPECIAL_429>",
433
+ "<SPECIAL_430>",
434
+ "<SPECIAL_431>",
435
+ "<SPECIAL_432>",
436
+ "<SPECIAL_433>",
437
+ "<SPECIAL_434>",
438
+ "<SPECIAL_435>",
439
+ "<SPECIAL_436>",
440
+ "<SPECIAL_437>",
441
+ "<SPECIAL_438>",
442
+ "<SPECIAL_439>",
443
+ "<SPECIAL_440>",
444
+ "<SPECIAL_441>",
445
+ "<SPECIAL_442>",
446
+ "<SPECIAL_443>",
447
+ "<SPECIAL_444>",
448
+ "<SPECIAL_445>",
449
+ "<SPECIAL_446>",
450
+ "<SPECIAL_447>",
451
+ "<SPECIAL_448>",
452
+ "<SPECIAL_449>",
453
+ "<SPECIAL_450>",
454
+ "<SPECIAL_451>",
455
+ "<SPECIAL_452>",
456
+ "<SPECIAL_453>",
457
+ "<SPECIAL_454>",
458
+ "<SPECIAL_455>",
459
+ "<SPECIAL_456>",
460
+ "<SPECIAL_457>",
461
+ "<SPECIAL_458>",
462
+ "<SPECIAL_459>",
463
+ "<SPECIAL_460>",
464
+ "<SPECIAL_461>",
465
+ "<SPECIAL_462>",
466
+ "<SPECIAL_463>",
467
+ "<SPECIAL_464>",
468
+ "<SPECIAL_465>",
469
+ "<SPECIAL_466>",
470
+ "<SPECIAL_467>",
471
+ "<SPECIAL_468>",
472
+ "<SPECIAL_469>",
473
+ "<SPECIAL_470>",
474
+ "<SPECIAL_471>",
475
+ "<SPECIAL_472>",
476
+ "<SPECIAL_473>",
477
+ "<SPECIAL_474>",
478
+ "<SPECIAL_475>",
479
+ "<SPECIAL_476>",
480
+ "<SPECIAL_477>",
481
+ "<SPECIAL_478>",
482
+ "<SPECIAL_479>",
483
+ "<SPECIAL_480>",
484
+ "<SPECIAL_481>",
485
+ "<SPECIAL_482>",
486
+ "<SPECIAL_483>",
487
+ "<SPECIAL_484>",
488
+ "<SPECIAL_485>",
489
+ "<SPECIAL_486>",
490
+ "<SPECIAL_487>",
491
+ "<SPECIAL_488>",
492
+ "<SPECIAL_489>",
493
+ "<SPECIAL_490>",
494
+ "<SPECIAL_491>",
495
+ "<SPECIAL_492>",
496
+ "<SPECIAL_493>",
497
+ "<SPECIAL_494>",
498
+ "<SPECIAL_495>",
499
+ "<SPECIAL_496>",
500
+ "<SPECIAL_497>",
501
+ "<SPECIAL_498>",
502
+ "<SPECIAL_499>",
503
+ "<SPECIAL_500>",
504
+ "<SPECIAL_501>",
505
+ "<SPECIAL_502>",
506
+ "<SPECIAL_503>",
507
+ "<SPECIAL_504>",
508
+ "<SPECIAL_505>",
509
+ "<SPECIAL_506>",
510
+ "<SPECIAL_507>",
511
+ "<SPECIAL_508>",
512
+ "<SPECIAL_509>",
513
+ "<SPECIAL_510>",
514
+ "<SPECIAL_511>",
515
+ "<SPECIAL_512>",
516
+ "<SPECIAL_513>",
517
+ "<SPECIAL_514>",
518
+ "<SPECIAL_515>",
519
+ "<SPECIAL_516>",
520
+ "<SPECIAL_517>",
521
+ "<SPECIAL_518>",
522
+ "<SPECIAL_519>",
523
+ "<SPECIAL_520>",
524
+ "<SPECIAL_521>",
525
+ "<SPECIAL_522>",
526
+ "<SPECIAL_523>",
527
+ "<SPECIAL_524>",
528
+ "<SPECIAL_525>",
529
+ "<SPECIAL_526>",
530
+ "<SPECIAL_527>",
531
+ "<SPECIAL_528>",
532
+ "<SPECIAL_529>",
533
+ "<SPECIAL_530>",
534
+ "<SPECIAL_531>",
535
+ "<SPECIAL_532>",
536
+ "<SPECIAL_533>",
537
+ "<SPECIAL_534>",
538
+ "<SPECIAL_535>",
539
+ "<SPECIAL_536>",
540
+ "<SPECIAL_537>",
541
+ "<SPECIAL_538>",
542
+ "<SPECIAL_539>",
543
+ "<SPECIAL_540>",
544
+ "<SPECIAL_541>",
545
+ "<SPECIAL_542>",
546
+ "<SPECIAL_543>",
547
+ "<SPECIAL_544>",
548
+ "<SPECIAL_545>",
549
+ "<SPECIAL_546>",
550
+ "<SPECIAL_547>",
551
+ "<SPECIAL_548>",
552
+ "<SPECIAL_549>",
553
+ "<SPECIAL_550>",
554
+ "<SPECIAL_551>",
555
+ "<SPECIAL_552>",
556
+ "<SPECIAL_553>",
557
+ "<SPECIAL_554>",
558
+ "<SPECIAL_555>",
559
+ "<SPECIAL_556>",
560
+ "<SPECIAL_557>",
561
+ "<SPECIAL_558>",
562
+ "<SPECIAL_559>",
563
+ "<SPECIAL_560>",
564
+ "<SPECIAL_561>",
565
+ "<SPECIAL_562>",
566
+ "<SPECIAL_563>",
567
+ "<SPECIAL_564>",
568
+ "<SPECIAL_565>",
569
+ "<SPECIAL_566>",
570
+ "<SPECIAL_567>",
571
+ "<SPECIAL_568>",
572
+ "<SPECIAL_569>",
573
+ "<SPECIAL_570>",
574
+ "<SPECIAL_571>",
575
+ "<SPECIAL_572>",
576
+ "<SPECIAL_573>",
577
+ "<SPECIAL_574>",
578
+ "<SPECIAL_575>",
579
+ "<SPECIAL_576>",
580
+ "<SPECIAL_577>",
581
+ "<SPECIAL_578>",
582
+ "<SPECIAL_579>",
583
+ "<SPECIAL_580>",
584
+ "<SPECIAL_581>",
585
+ "<SPECIAL_582>",
586
+ "<SPECIAL_583>",
587
+ "<SPECIAL_584>",
588
+ "<SPECIAL_585>",
589
+ "<SPECIAL_586>",
590
+ "<SPECIAL_587>",
591
+ "<SPECIAL_588>",
592
+ "<SPECIAL_589>",
593
+ "<SPECIAL_590>",
594
+ "<SPECIAL_591>",
595
+ "<SPECIAL_592>",
596
+ "<SPECIAL_593>",
597
+ "<SPECIAL_594>",
598
+ "<SPECIAL_595>",
599
+ "<SPECIAL_596>",
600
+ "<SPECIAL_597>",
601
+ "<SPECIAL_598>",
602
+ "<SPECIAL_599>",
603
+ "<SPECIAL_600>",
604
+ "<SPECIAL_601>",
605
+ "<SPECIAL_602>",
606
+ "<SPECIAL_603>",
607
+ "<SPECIAL_604>",
608
+ "<SPECIAL_605>",
609
+ "<SPECIAL_606>",
610
+ "<SPECIAL_607>",
611
+ "<SPECIAL_608>",
612
+ "<SPECIAL_609>",
613
+ "<SPECIAL_610>",
614
+ "<SPECIAL_611>",
615
+ "<SPECIAL_612>",
616
+ "<SPECIAL_613>",
617
+ "<SPECIAL_614>",
618
+ "<SPECIAL_615>",
619
+ "<SPECIAL_616>",
620
+ "<SPECIAL_617>",
621
+ "<SPECIAL_618>",
622
+ "<SPECIAL_619>",
623
+ "<SPECIAL_620>",
624
+ "<SPECIAL_621>",
625
+ "<SPECIAL_622>",
626
+ "<SPECIAL_623>",
627
+ "<SPECIAL_624>",
628
+ "<SPECIAL_625>",
629
+ "<SPECIAL_626>",
630
+ "<SPECIAL_627>",
631
+ "<SPECIAL_628>",
632
+ "<SPECIAL_629>",
633
+ "<SPECIAL_630>",
634
+ "<SPECIAL_631>",
635
+ "<SPECIAL_632>",
636
+ "<SPECIAL_633>",
637
+ "<SPECIAL_634>",
638
+ "<SPECIAL_635>",
639
+ "<SPECIAL_636>",
640
+ "<SPECIAL_637>",
641
+ "<SPECIAL_638>",
642
+ "<SPECIAL_639>",
643
+ "<SPECIAL_640>",
644
+ "<SPECIAL_641>",
645
+ "<SPECIAL_642>",
646
+ "<SPECIAL_643>",
647
+ "<SPECIAL_644>",
648
+ "<SPECIAL_645>",
649
+ "<SPECIAL_646>",
650
+ "<SPECIAL_647>",
651
+ "<SPECIAL_648>",
652
+ "<SPECIAL_649>",
653
+ "<SPECIAL_650>",
654
+ "<SPECIAL_651>",
655
+ "<SPECIAL_652>",
656
+ "<SPECIAL_653>",
657
+ "<SPECIAL_654>",
658
+ "<SPECIAL_655>",
659
+ "<SPECIAL_656>",
660
+ "<SPECIAL_657>",
661
+ "<SPECIAL_658>",
662
+ "<SPECIAL_659>",
663
+ "<SPECIAL_660>",
664
+ "<SPECIAL_661>",
665
+ "<SPECIAL_662>",
666
+ "<SPECIAL_663>",
667
+ "<SPECIAL_664>",
668
+ "<SPECIAL_665>",
669
+ "<SPECIAL_666>",
670
+ "<SPECIAL_667>",
671
+ "<SPECIAL_668>",
672
+ "<SPECIAL_669>",
673
+ "<SPECIAL_670>",
674
+ "<SPECIAL_671>",
675
+ "<SPECIAL_672>",
676
+ "<SPECIAL_673>",
677
+ "<SPECIAL_674>",
678
+ "<SPECIAL_675>",
679
+ "<SPECIAL_676>",
680
+ "<SPECIAL_677>",
681
+ "<SPECIAL_678>",
682
+ "<SPECIAL_679>",
683
+ "<SPECIAL_680>",
684
+ "<SPECIAL_681>",
685
+ "<SPECIAL_682>",
686
+ "<SPECIAL_683>",
687
+ "<SPECIAL_684>",
688
+ "<SPECIAL_685>",
689
+ "<SPECIAL_686>",
690
+ "<SPECIAL_687>",
691
+ "<SPECIAL_688>",
692
+ "<SPECIAL_689>",
693
+ "<SPECIAL_690>",
694
+ "<SPECIAL_691>",
695
+ "<SPECIAL_692>",
696
+ "<SPECIAL_693>",
697
+ "<SPECIAL_694>",
698
+ "<SPECIAL_695>",
699
+ "<SPECIAL_696>",
700
+ "<SPECIAL_697>",
701
+ "<SPECIAL_698>",
702
+ "<SPECIAL_699>",
703
+ "<SPECIAL_700>",
704
+ "<SPECIAL_701>",
705
+ "<SPECIAL_702>",
706
+ "<SPECIAL_703>",
707
+ "<SPECIAL_704>",
708
+ "<SPECIAL_705>",
709
+ "<SPECIAL_706>",
710
+ "<SPECIAL_707>",
711
+ "<SPECIAL_708>",
712
+ "<SPECIAL_709>",
713
+ "<SPECIAL_710>",
714
+ "<SPECIAL_711>",
715
+ "<SPECIAL_712>",
716
+ "<SPECIAL_713>",
717
+ "<SPECIAL_714>",
718
+ "<SPECIAL_715>",
719
+ "<SPECIAL_716>",
720
+ "<SPECIAL_717>",
721
+ "<SPECIAL_718>",
722
+ "<SPECIAL_719>",
723
+ "<SPECIAL_720>",
724
+ "<SPECIAL_721>",
725
+ "<SPECIAL_722>",
726
+ "<SPECIAL_723>",
727
+ "<SPECIAL_724>",
728
+ "<SPECIAL_725>",
729
+ "<SPECIAL_726>",
730
+ "<SPECIAL_727>",
731
+ "<SPECIAL_728>",
732
+ "<SPECIAL_729>",
733
+ "<SPECIAL_730>",
734
+ "<SPECIAL_731>",
735
+ "<SPECIAL_732>",
736
+ "<SPECIAL_733>",
737
+ "<SPECIAL_734>",
738
+ "<SPECIAL_735>",
739
+ "<SPECIAL_736>",
740
+ "<SPECIAL_737>",
741
+ "<SPECIAL_738>",
742
+ "<SPECIAL_739>",
743
+ "<SPECIAL_740>",
744
+ "<SPECIAL_741>",
745
+ "<SPECIAL_742>",
746
+ "<SPECIAL_743>",
747
+ "<SPECIAL_744>",
748
+ "<SPECIAL_745>",
749
+ "<SPECIAL_746>",
750
+ "<SPECIAL_747>",
751
+ "<SPECIAL_748>",
752
+ "<SPECIAL_749>",
753
+ "<SPECIAL_750>",
754
+ "<SPECIAL_751>",
755
+ "<SPECIAL_752>",
756
+ "<SPECIAL_753>",
757
+ "<SPECIAL_754>",
758
+ "<SPECIAL_755>",
759
+ "<SPECIAL_756>",
760
+ "<SPECIAL_757>",
761
+ "<SPECIAL_758>",
762
+ "<SPECIAL_759>",
763
+ "<SPECIAL_760>",
764
+ "<SPECIAL_761>",
765
+ "<SPECIAL_762>",
766
+ "<SPECIAL_763>",
767
+ "<SPECIAL_764>",
768
+ "<SPECIAL_765>",
769
+ "<SPECIAL_766>",
770
+ "<SPECIAL_767>",
771
+ "<SPECIAL_768>",
772
+ "<SPECIAL_769>",
773
+ "<SPECIAL_770>",
774
+ "<SPECIAL_771>",
775
+ "<SPECIAL_772>",
776
+ "<SPECIAL_773>",
777
+ "<SPECIAL_774>",
778
+ "<SPECIAL_775>",
779
+ "<SPECIAL_776>",
780
+ "<SPECIAL_777>",
781
+ "<SPECIAL_778>",
782
+ "<SPECIAL_779>",
783
+ "<SPECIAL_780>",
784
+ "<SPECIAL_781>",
785
+ "<SPECIAL_782>",
786
+ "<SPECIAL_783>",
787
+ "<SPECIAL_784>",
788
+ "<SPECIAL_785>",
789
+ "<SPECIAL_786>",
790
+ "<SPECIAL_787>",
791
+ "<SPECIAL_788>",
792
+ "<SPECIAL_789>",
793
+ "<SPECIAL_790>",
794
+ "<SPECIAL_791>",
795
+ "<SPECIAL_792>",
796
+ "<SPECIAL_793>",
797
+ "<SPECIAL_794>",
798
+ "<SPECIAL_795>",
799
+ "<SPECIAL_796>",
800
+ "<SPECIAL_797>",
801
+ "<SPECIAL_798>",
802
+ "<SPECIAL_799>",
803
+ "<SPECIAL_800>",
804
+ "<SPECIAL_801>",
805
+ "<SPECIAL_802>",
806
+ "<SPECIAL_803>",
807
+ "<SPECIAL_804>",
808
+ "<SPECIAL_805>",
809
+ "<SPECIAL_806>",
810
+ "<SPECIAL_807>",
811
+ "<SPECIAL_808>",
812
+ "<SPECIAL_809>",
813
+ "<SPECIAL_810>",
814
+ "<SPECIAL_811>",
815
+ "<SPECIAL_812>",
816
+ "<SPECIAL_813>",
817
+ "<SPECIAL_814>",
818
+ "<SPECIAL_815>",
819
+ "<SPECIAL_816>",
820
+ "<SPECIAL_817>",
821
+ "<SPECIAL_818>",
822
+ "<SPECIAL_819>",
823
+ "<SPECIAL_820>",
824
+ "<SPECIAL_821>",
825
+ "<SPECIAL_822>",
826
+ "<SPECIAL_823>",
827
+ "<SPECIAL_824>",
828
+ "<SPECIAL_825>",
829
+ "<SPECIAL_826>",
830
+ "<SPECIAL_827>",
831
+ "<SPECIAL_828>",
832
+ "<SPECIAL_829>",
833
+ "<SPECIAL_830>",
834
+ "<SPECIAL_831>",
835
+ "<SPECIAL_832>",
836
+ "<SPECIAL_833>",
837
+ "<SPECIAL_834>",
838
+ "<SPECIAL_835>",
839
+ "<SPECIAL_836>",
840
+ "<SPECIAL_837>",
841
+ "<SPECIAL_838>",
842
+ "<SPECIAL_839>",
843
+ "<SPECIAL_840>",
844
+ "<SPECIAL_841>",
845
+ "<SPECIAL_842>",
846
+ "<SPECIAL_843>",
847
+ "<SPECIAL_844>",
848
+ "<SPECIAL_845>",
849
+ "<SPECIAL_846>",
850
+ "<SPECIAL_847>",
851
+ "<SPECIAL_848>",
852
+ "<SPECIAL_849>",
853
+ "<SPECIAL_850>",
854
+ "<SPECIAL_851>",
855
+ "<SPECIAL_852>",
856
+ "<SPECIAL_853>",
857
+ "<SPECIAL_854>",
858
+ "<SPECIAL_855>",
859
+ "<SPECIAL_856>",
860
+ "<SPECIAL_857>",
861
+ "<SPECIAL_858>",
862
+ "<SPECIAL_859>",
863
+ "<SPECIAL_860>",
864
+ "<SPECIAL_861>",
865
+ "<SPECIAL_862>",
866
+ "<SPECIAL_863>",
867
+ "<SPECIAL_864>",
868
+ "<SPECIAL_865>",
869
+ "<SPECIAL_866>",
870
+ "<SPECIAL_867>",
871
+ "<SPECIAL_868>",
872
+ "<SPECIAL_869>",
873
+ "<SPECIAL_870>",
874
+ "<SPECIAL_871>",
875
+ "<SPECIAL_872>",
876
+ "<SPECIAL_873>",
877
+ "<SPECIAL_874>",
878
+ "<SPECIAL_875>",
879
+ "<SPECIAL_876>",
880
+ "<SPECIAL_877>",
881
+ "<SPECIAL_878>",
882
+ "<SPECIAL_879>",
883
+ "<SPECIAL_880>",
884
+ "<SPECIAL_881>",
885
+ "<SPECIAL_882>",
886
+ "<SPECIAL_883>",
887
+ "<SPECIAL_884>",
888
+ "<SPECIAL_885>",
889
+ "<SPECIAL_886>",
890
+ "<SPECIAL_887>",
891
+ "<SPECIAL_888>",
892
+ "<SPECIAL_889>",
893
+ "<SPECIAL_890>",
894
+ "<SPECIAL_891>",
895
+ "<SPECIAL_892>",
896
+ "<SPECIAL_893>",
897
+ "<SPECIAL_894>",
898
+ "<SPECIAL_895>",
899
+ "<SPECIAL_896>",
900
+ "<SPECIAL_897>",
901
+ "<SPECIAL_898>",
902
+ "<SPECIAL_899>",
903
+ "<SPECIAL_900>",
904
+ "<SPECIAL_901>",
905
+ "<SPECIAL_902>",
906
+ "<SPECIAL_903>",
907
+ "<SPECIAL_904>",
908
+ "<SPECIAL_905>",
909
+ "<SPECIAL_906>",
910
+ "<SPECIAL_907>",
911
+ "<SPECIAL_908>",
912
+ "<SPECIAL_909>",
913
+ "<SPECIAL_910>",
914
+ "<SPECIAL_911>",
915
+ "<SPECIAL_912>",
916
+ "<SPECIAL_913>",
917
+ "<SPECIAL_914>",
918
+ "<SPECIAL_915>",
919
+ "<SPECIAL_916>",
920
+ "<SPECIAL_917>",
921
+ "<SPECIAL_918>",
922
+ "<SPECIAL_919>",
923
+ "<SPECIAL_920>",
924
+ "<SPECIAL_921>",
925
+ "<SPECIAL_922>",
926
+ "<SPECIAL_923>",
927
+ "<SPECIAL_924>",
928
+ "<SPECIAL_925>",
929
+ "<SPECIAL_926>",
930
+ "<SPECIAL_927>",
931
+ "<SPECIAL_928>",
932
+ "<SPECIAL_929>",
933
+ "<SPECIAL_930>",
934
+ "<SPECIAL_931>",
935
+ "<SPECIAL_932>",
936
+ "<SPECIAL_933>",
937
+ "<SPECIAL_934>",
938
+ "<SPECIAL_935>",
939
+ "<SPECIAL_936>",
940
+ "<SPECIAL_937>",
941
+ "<SPECIAL_938>",
942
+ "<SPECIAL_939>",
943
+ "<SPECIAL_940>",
944
+ "<SPECIAL_941>",
945
+ "<SPECIAL_942>",
946
+ "<SPECIAL_943>",
947
+ "<SPECIAL_944>",
948
+ "<SPECIAL_945>",
949
+ "<SPECIAL_946>",
950
+ "<SPECIAL_947>",
951
+ "<SPECIAL_948>",
952
+ "<SPECIAL_949>",
953
+ "<SPECIAL_950>",
954
+ "<SPECIAL_951>",
955
+ "<SPECIAL_952>",
956
+ "<SPECIAL_953>",
957
+ "<SPECIAL_954>",
958
+ "<SPECIAL_955>",
959
+ "<SPECIAL_956>",
960
+ "<SPECIAL_957>",
961
+ "<SPECIAL_958>",
962
+ "<SPECIAL_959>",
963
+ "<SPECIAL_960>",
964
+ "<SPECIAL_961>",
965
+ "<SPECIAL_962>",
966
+ "<SPECIAL_963>",
967
+ "<SPECIAL_964>",
968
+ "<SPECIAL_965>",
969
+ "<SPECIAL_966>",
970
+ "<SPECIAL_967>",
971
+ "<SPECIAL_968>",
972
+ "<SPECIAL_969>",
973
+ "<SPECIAL_970>",
974
+ "<SPECIAL_971>",
975
+ "<SPECIAL_972>",
976
+ "<SPECIAL_973>",
977
+ "<SPECIAL_974>",
978
+ "<SPECIAL_975>",
979
+ "<SPECIAL_976>",
980
+ "<SPECIAL_977>",
981
+ "<SPECIAL_978>",
982
+ "<SPECIAL_979>",
983
+ "<SPECIAL_980>",
984
+ "<SPECIAL_981>",
985
+ "<SPECIAL_982>",
986
+ "<SPECIAL_983>",
987
+ "<SPECIAL_984>",
988
+ "<SPECIAL_985>",
989
+ "<SPECIAL_986>",
990
+ "<SPECIAL_987>",
991
+ "<SPECIAL_988>",
992
+ "<SPECIAL_989>",
993
+ "<SPECIAL_990>",
994
+ "<SPECIAL_991>",
995
+ "<SPECIAL_992>",
996
+ "<SPECIAL_993>",
997
+ "<SPECIAL_994>",
998
+ "<SPECIAL_995>",
999
+ "<SPECIAL_996>",
1000
+ "<SPECIAL_997>",
1001
+ "<SPECIAL_998>",
1002
+ "<SPECIAL_999>"
1003
+ ],
1004
+ "bos_token": {
1005
+ "content": "<s>",
1006
+ "lstrip": false,
1007
+ "normalized": false,
1008
+ "rstrip": false,
1009
+ "single_word": false
1010
+ },
1011
+ "eos_token": {
1012
+ "content": "</s>",
1013
+ "lstrip": false,
1014
+ "normalized": false,
1015
+ "rstrip": false,
1016
+ "single_word": false
1017
+ },
1018
+ "pad_token": "</s>",
1019
+ "unk_token": {
1020
+ "content": "<unk>",
1021
+ "lstrip": false,
1022
+ "normalized": false,
1023
+ "rstrip": false,
1024
+ "single_word": false
1025
+ }
1026
+ }
checkpoint-169/tokenizer.json ADDED
@@ -0,0 +1,3 @@
 
 
 
 
1
+ version https://git-lfs.github.com/spec/v1
2
+ oid sha256:b76085f9923309d873994d444989f7eb6ec074b06f25b58f1e8d7b7741070949
3
+ size 17078037
checkpoint-169/tokenizer_config.json ADDED
The diff for this file is too large to render. See raw diff
 
checkpoint-169/trainer_state.json ADDED
@@ -0,0 +1,1296 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ {
2
+ "best_metric": null,
3
+ "best_model_checkpoint": null,
4
+ "epoch": 1.0,
5
+ "eval_steps": 17,
6
+ "global_step": 169,
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.005917159763313609,
13
+ "grad_norm": 0.6224875040916811,
14
+ "learning_rate": 3.75e-07,
15
+ "loss": 2.2194,
16
+ "step": 1
17
+ },
18
+ {
19
+ "epoch": 0.005917159763313609,
20
+ "eval_loss": 2.1284265518188477,
21
+ "eval_runtime": 197.2728,
22
+ "eval_samples_per_second": 0.938,
23
+ "eval_steps_per_second": 0.081,
24
+ "step": 1
25
+ },
26
+ {
27
+ "epoch": 0.011834319526627219,
28
+ "grad_norm": 0.699774954026372,
29
+ "learning_rate": 7.5e-07,
30
+ "loss": 2.2098,
31
+ "step": 2
32
+ },
33
+ {
34
+ "epoch": 0.01775147928994083,
35
+ "grad_norm": 0.8978069601988599,
36
+ "learning_rate": 1.125e-06,
37
+ "loss": 2.0771,
38
+ "step": 3
39
+ },
40
+ {
41
+ "epoch": 0.023668639053254437,
42
+ "grad_norm": 0.603433372430734,
43
+ "learning_rate": 1.5e-06,
44
+ "loss": 2.1207,
45
+ "step": 4
46
+ },
47
+ {
48
+ "epoch": 0.029585798816568046,
49
+ "grad_norm": 0.6705451670098455,
50
+ "learning_rate": 1.875e-06,
51
+ "loss": 2.0443,
52
+ "step": 5
53
+ },
54
+ {
55
+ "epoch": 0.03550295857988166,
56
+ "grad_norm": 0.5685871807834867,
57
+ "learning_rate": 2.25e-06,
58
+ "loss": 2.0938,
59
+ "step": 6
60
+ },
61
+ {
62
+ "epoch": 0.04142011834319527,
63
+ "grad_norm": 0.6813185340138558,
64
+ "learning_rate": 2.6250000000000003e-06,
65
+ "loss": 2.0113,
66
+ "step": 7
67
+ },
68
+ {
69
+ "epoch": 0.047337278106508875,
70
+ "grad_norm": 1.461724410712979,
71
+ "learning_rate": 3e-06,
72
+ "loss": 1.9878,
73
+ "step": 8
74
+ },
75
+ {
76
+ "epoch": 0.05325443786982249,
77
+ "grad_norm": 0.4806729570541462,
78
+ "learning_rate": 2.999785830935332e-06,
79
+ "loss": 2.1648,
80
+ "step": 9
81
+ },
82
+ {
83
+ "epoch": 0.05917159763313609,
84
+ "grad_norm": 0.6450195095319927,
85
+ "learning_rate": 2.999143405285129e-06,
86
+ "loss": 2.1168,
87
+ "step": 10
88
+ },
89
+ {
90
+ "epoch": 0.0650887573964497,
91
+ "grad_norm": 0.5199179785432192,
92
+ "learning_rate": 2.998072967649747e-06,
93
+ "loss": 2.1624,
94
+ "step": 11
95
+ },
96
+ {
97
+ "epoch": 0.07100591715976332,
98
+ "grad_norm": 0.5888842243430149,
99
+ "learning_rate": 2.9965749255929686e-06,
100
+ "loss": 2.0793,
101
+ "step": 12
102
+ },
103
+ {
104
+ "epoch": 0.07692307692307693,
105
+ "grad_norm": 0.5762628204395337,
106
+ "learning_rate": 2.9946498494868224e-06,
107
+ "loss": 2.1745,
108
+ "step": 13
109
+ },
110
+ {
111
+ "epoch": 0.08284023668639054,
112
+ "grad_norm": 0.4611886576496398,
113
+ "learning_rate": 2.9922984722944177e-06,
114
+ "loss": 2.1977,
115
+ "step": 14
116
+ },
117
+ {
118
+ "epoch": 0.08875739644970414,
119
+ "grad_norm": 0.4176129104372226,
120
+ "learning_rate": 2.9895216892908717e-06,
121
+ "loss": 2.1568,
122
+ "step": 15
123
+ },
124
+ {
125
+ "epoch": 0.09467455621301775,
126
+ "grad_norm": 0.9682295199118589,
127
+ "learning_rate": 2.9863205577224416e-06,
128
+ "loss": 2.181,
129
+ "step": 16
130
+ },
131
+ {
132
+ "epoch": 0.10059171597633136,
133
+ "grad_norm": 0.4087372617870282,
134
+ "learning_rate": 2.982696296403978e-06,
135
+ "loss": 2.2208,
136
+ "step": 17
137
+ },
138
+ {
139
+ "epoch": 0.10059171597633136,
140
+ "eval_loss": 2.090203285217285,
141
+ "eval_runtime": 197.1425,
142
+ "eval_samples_per_second": 0.938,
143
+ "eval_steps_per_second": 0.081,
144
+ "step": 17
145
+ },
146
+ {
147
+ "epoch": 0.10650887573964497,
148
+ "grad_norm": 0.6944983731430622,
149
+ "learning_rate": 2.9786502852548696e-06,
150
+ "loss": 1.9687,
151
+ "step": 18
152
+ },
153
+ {
154
+ "epoch": 0.11242603550295859,
155
+ "grad_norm": 0.42170107190665923,
156
+ "learning_rate": 2.9741840647736478e-06,
157
+ "loss": 2.1707,
158
+ "step": 19
159
+ },
160
+ {
161
+ "epoch": 0.11834319526627218,
162
+ "grad_norm": 0.5031933608002007,
163
+ "learning_rate": 2.9692993354514477e-06,
164
+ "loss": 1.838,
165
+ "step": 20
166
+ },
167
+ {
168
+ "epoch": 0.1242603550295858,
169
+ "grad_norm": 0.401561752549318,
170
+ "learning_rate": 2.9639979571245524e-06,
171
+ "loss": 2.1108,
172
+ "step": 21
173
+ },
174
+ {
175
+ "epoch": 0.1301775147928994,
176
+ "grad_norm": 0.4745388099037245,
177
+ "learning_rate": 2.958281948266274e-06,
178
+ "loss": 2.0944,
179
+ "step": 22
180
+ },
181
+ {
182
+ "epoch": 0.13609467455621302,
183
+ "grad_norm": 0.3966815146465992,
184
+ "learning_rate": 2.952153485218428e-06,
185
+ "loss": 2.1954,
186
+ "step": 23
187
+ },
188
+ {
189
+ "epoch": 0.14201183431952663,
190
+ "grad_norm": 0.38324183695928576,
191
+ "learning_rate": 2.9456149013627003e-06,
192
+ "loss": 2.0669,
193
+ "step": 24
194
+ },
195
+ {
196
+ "epoch": 0.14792899408284024,
197
+ "grad_norm": 0.45238869305755414,
198
+ "learning_rate": 2.9386686862322264e-06,
199
+ "loss": 2.0082,
200
+ "step": 25
201
+ },
202
+ {
203
+ "epoch": 0.15384615384615385,
204
+ "grad_norm": 0.43587746677118455,
205
+ "learning_rate": 2.9313174845637132e-06,
206
+ "loss": 2.0851,
207
+ "step": 26
208
+ },
209
+ {
210
+ "epoch": 0.15976331360946747,
211
+ "grad_norm": 0.3280269395122322,
212
+ "learning_rate": 2.9235640952904685e-06,
213
+ "loss": 2.1769,
214
+ "step": 27
215
+ },
216
+ {
217
+ "epoch": 0.16568047337278108,
218
+ "grad_norm": 0.3364191479742792,
219
+ "learning_rate": 2.91541147047672e-06,
220
+ "loss": 2.1024,
221
+ "step": 28
222
+ },
223
+ {
224
+ "epoch": 0.17159763313609466,
225
+ "grad_norm": 0.36098339761423204,
226
+ "learning_rate": 2.9068627141936344e-06,
227
+ "loss": 1.9672,
228
+ "step": 29
229
+ },
230
+ {
231
+ "epoch": 0.17751479289940827,
232
+ "grad_norm": 0.39425457725953256,
233
+ "learning_rate": 2.897921081337456e-06,
234
+ "loss": 2.0966,
235
+ "step": 30
236
+ },
237
+ {
238
+ "epoch": 0.1834319526627219,
239
+ "grad_norm": 0.6235048469037876,
240
+ "learning_rate": 2.8885899763902215e-06,
241
+ "loss": 2.0379,
242
+ "step": 31
243
+ },
244
+ {
245
+ "epoch": 0.1893491124260355,
246
+ "grad_norm": 0.5041187119001387,
247
+ "learning_rate": 2.878872952123519e-06,
248
+ "loss": 1.969,
249
+ "step": 32
250
+ },
251
+ {
252
+ "epoch": 0.1952662721893491,
253
+ "grad_norm": 0.5682354341756487,
254
+ "learning_rate": 2.8687737082457906e-06,
255
+ "loss": 1.9563,
256
+ "step": 33
257
+ },
258
+ {
259
+ "epoch": 0.20118343195266272,
260
+ "grad_norm": 0.45352123274250616,
261
+ "learning_rate": 2.8582960899936856e-06,
262
+ "loss": 1.9577,
263
+ "step": 34
264
+ },
265
+ {
266
+ "epoch": 0.20118343195266272,
267
+ "eval_loss": 2.0715060234069824,
268
+ "eval_runtime": 197.0,
269
+ "eval_samples_per_second": 0.939,
270
+ "eval_steps_per_second": 0.081,
271
+ "step": 34
272
+ },
273
+ {
274
+ "epoch": 0.20710059171597633,
275
+ "grad_norm": 0.4510223377290317,
276
+ "learning_rate": 2.8474440866680067e-06,
277
+ "loss": 2.0594,
278
+ "step": 35
279
+ },
280
+ {
281
+ "epoch": 0.21301775147928995,
282
+ "grad_norm": 0.4442729791530693,
283
+ "learning_rate": 2.8362218301147995e-06,
284
+ "loss": 2.0619,
285
+ "step": 36
286
+ },
287
+ {
288
+ "epoch": 0.21893491124260356,
289
+ "grad_norm": 0.47998679017895923,
290
+ "learning_rate": 2.824633593152181e-06,
291
+ "loss": 2.1122,
292
+ "step": 37
293
+ },
294
+ {
295
+ "epoch": 0.22485207100591717,
296
+ "grad_norm": 0.6162112942853689,
297
+ "learning_rate": 2.8126837879434773e-06,
298
+ "loss": 1.8633,
299
+ "step": 38
300
+ },
301
+ {
302
+ "epoch": 0.23076923076923078,
303
+ "grad_norm": 0.41576398758319444,
304
+ "learning_rate": 2.8003769643173186e-06,
305
+ "loss": 2.0621,
306
+ "step": 39
307
+ },
308
+ {
309
+ "epoch": 0.23668639053254437,
310
+ "grad_norm": 0.39062911846365234,
311
+ "learning_rate": 2.7877178080353143e-06,
312
+ "loss": 2.1515,
313
+ "step": 40
314
+ },
315
+ {
316
+ "epoch": 0.24260355029585798,
317
+ "grad_norm": 0.3203731890471317,
318
+ "learning_rate": 2.7747111390079716e-06,
319
+ "loss": 2.1345,
320
+ "step": 41
321
+ },
322
+ {
323
+ "epoch": 0.2485207100591716,
324
+ "grad_norm": 0.3736515378297021,
325
+ "learning_rate": 2.7613619094595384e-06,
326
+ "loss": 2.0328,
327
+ "step": 42
328
+ },
329
+ {
330
+ "epoch": 0.25443786982248523,
331
+ "grad_norm": 0.3652931120099813,
332
+ "learning_rate": 2.7476752020424724e-06,
333
+ "loss": 2.1758,
334
+ "step": 43
335
+ },
336
+ {
337
+ "epoch": 0.2603550295857988,
338
+ "grad_norm": 0.5017055557620015,
339
+ "learning_rate": 2.7336562279022408e-06,
340
+ "loss": 1.931,
341
+ "step": 44
342
+ },
343
+ {
344
+ "epoch": 0.26627218934911245,
345
+ "grad_norm": 0.4301135712170236,
346
+ "learning_rate": 2.719310324693207e-06,
347
+ "loss": 2.0955,
348
+ "step": 45
349
+ },
350
+ {
351
+ "epoch": 0.27218934911242604,
352
+ "grad_norm": 0.3238684774961103,
353
+ "learning_rate": 2.7046429545463427e-06,
354
+ "loss": 2.1779,
355
+ "step": 46
356
+ },
357
+ {
358
+ "epoch": 0.2781065088757396,
359
+ "grad_norm": 0.4294422570883719,
360
+ "learning_rate": 2.689659701989552e-06,
361
+ "loss": 2.1401,
362
+ "step": 47
363
+ },
364
+ {
365
+ "epoch": 0.28402366863905326,
366
+ "grad_norm": 0.4013075492659738,
367
+ "learning_rate": 2.6743662718213877e-06,
368
+ "loss": 2.0659,
369
+ "step": 48
370
+ },
371
+ {
372
+ "epoch": 0.28994082840236685,
373
+ "grad_norm": 0.38070293237873504,
374
+ "learning_rate": 2.658768486938977e-06,
375
+ "loss": 2.0451,
376
+ "step": 49
377
+ },
378
+ {
379
+ "epoch": 0.2958579881656805,
380
+ "grad_norm": 0.5883048349438712,
381
+ "learning_rate": 2.642872286120986e-06,
382
+ "loss": 1.6926,
383
+ "step": 50
384
+ },
385
+ {
386
+ "epoch": 0.30177514792899407,
387
+ "grad_norm": 0.3674848173159696,
388
+ "learning_rate": 2.6266837217664563e-06,
389
+ "loss": 2.0438,
390
+ "step": 51
391
+ },
392
+ {
393
+ "epoch": 0.30177514792899407,
394
+ "eval_loss": 2.0649750232696533,
395
+ "eval_runtime": 197.0473,
396
+ "eval_samples_per_second": 0.939,
397
+ "eval_steps_per_second": 0.081,
398
+ "step": 51
399
+ },
400
+ {
401
+ "epoch": 0.3076923076923077,
402
+ "grad_norm": 0.3855104418508937,
403
+ "learning_rate": 2.6102089575903843e-06,
404
+ "loss": 1.9911,
405
+ "step": 52
406
+ },
407
+ {
408
+ "epoch": 0.3136094674556213,
409
+ "grad_norm": 0.3277096398159887,
410
+ "learning_rate": 2.5934542662769215e-06,
411
+ "loss": 2.0673,
412
+ "step": 53
413
+ },
414
+ {
415
+ "epoch": 0.31952662721893493,
416
+ "grad_norm": 0.2710467788777273,
417
+ "learning_rate": 2.5764260270910756e-06,
418
+ "loss": 2.1808,
419
+ "step": 54
420
+ },
421
+ {
422
+ "epoch": 0.3254437869822485,
423
+ "grad_norm": 0.34338292531552644,
424
+ "learning_rate": 2.559130723449841e-06,
425
+ "loss": 2.1452,
426
+ "step": 55
427
+ },
428
+ {
429
+ "epoch": 0.33136094674556216,
430
+ "grad_norm": 0.3886306481682962,
431
+ "learning_rate": 2.5415749404536692e-06,
432
+ "loss": 2.0926,
433
+ "step": 56
434
+ },
435
+ {
436
+ "epoch": 0.33727810650887574,
437
+ "grad_norm": 0.5452588522983003,
438
+ "learning_rate": 2.5237653623792258e-06,
439
+ "loss": 2.0391,
440
+ "step": 57
441
+ },
442
+ {
443
+ "epoch": 0.3431952662721893,
444
+ "grad_norm": 0.2748571757395172,
445
+ "learning_rate": 2.5057087701343825e-06,
446
+ "loss": 2.108,
447
+ "step": 58
448
+ },
449
+ {
450
+ "epoch": 0.34911242603550297,
451
+ "grad_norm": 0.35785257549325855,
452
+ "learning_rate": 2.4874120386764222e-06,
453
+ "loss": 2.1324,
454
+ "step": 59
455
+ },
456
+ {
457
+ "epoch": 0.35502958579881655,
458
+ "grad_norm": 0.34659803845552295,
459
+ "learning_rate": 2.4688821343944365e-06,
460
+ "loss": 2.0996,
461
+ "step": 60
462
+ },
463
+ {
464
+ "epoch": 0.3609467455621302,
465
+ "grad_norm": 0.47823113552366736,
466
+ "learning_rate": 2.4501261124569018e-06,
467
+ "loss": 1.9417,
468
+ "step": 61
469
+ },
470
+ {
471
+ "epoch": 0.3668639053254438,
472
+ "grad_norm": 0.3886628781847926,
473
+ "learning_rate": 2.431151114125462e-06,
474
+ "loss": 2.0717,
475
+ "step": 62
476
+ },
477
+ {
478
+ "epoch": 0.3727810650887574,
479
+ "grad_norm": 0.41637337375433764,
480
+ "learning_rate": 2.411964364035932e-06,
481
+ "loss": 2.0472,
482
+ "step": 63
483
+ },
484
+ {
485
+ "epoch": 0.378698224852071,
486
+ "grad_norm": 0.4644842201042378,
487
+ "learning_rate": 2.3925731674475463e-06,
488
+ "loss": 1.9156,
489
+ "step": 64
490
+ },
491
+ {
492
+ "epoch": 0.38461538461538464,
493
+ "grad_norm": 0.34299640828041933,
494
+ "learning_rate": 2.3729849074615258e-06,
495
+ "loss": 2.0973,
496
+ "step": 65
497
+ },
498
+ {
499
+ "epoch": 0.3905325443786982,
500
+ "grad_norm": 0.465534798859227,
501
+ "learning_rate": 2.3532070422099952e-06,
502
+ "loss": 2.0175,
503
+ "step": 66
504
+ },
505
+ {
506
+ "epoch": 0.39644970414201186,
507
+ "grad_norm": 0.38388811243306536,
508
+ "learning_rate": 2.333247102016334e-06,
509
+ "loss": 2.2457,
510
+ "step": 67
511
+ },
512
+ {
513
+ "epoch": 0.40236686390532544,
514
+ "grad_norm": 0.4119153295734741,
515
+ "learning_rate": 2.31311268652805e-06,
516
+ "loss": 1.9935,
517
+ "step": 68
518
+ },
519
+ {
520
+ "epoch": 0.40236686390532544,
521
+ "eval_loss": 2.0609700679779053,
522
+ "eval_runtime": 197.0317,
523
+ "eval_samples_per_second": 0.939,
524
+ "eval_steps_per_second": 0.081,
525
+ "step": 68
526
+ },
527
+ {
528
+ "epoch": 0.40828402366863903,
529
+ "grad_norm": 0.2600987199979094,
530
+ "learning_rate": 2.292811461823245e-06,
531
+ "loss": 2.1588,
532
+ "step": 69
533
+ },
534
+ {
535
+ "epoch": 0.41420118343195267,
536
+ "grad_norm": 0.35184712345028246,
537
+ "learning_rate": 2.2723511574917977e-06,
538
+ "loss": 2.1939,
539
+ "step": 70
540
+ },
541
+ {
542
+ "epoch": 0.42011834319526625,
543
+ "grad_norm": 0.3287296450199714,
544
+ "learning_rate": 2.2517395636923592e-06,
545
+ "loss": 2.2062,
546
+ "step": 71
547
+ },
548
+ {
549
+ "epoch": 0.4260355029585799,
550
+ "grad_norm": 0.4366762426991315,
551
+ "learning_rate": 2.230984528186291e-06,
552
+ "loss": 2.2086,
553
+ "step": 72
554
+ },
555
+ {
556
+ "epoch": 0.4319526627218935,
557
+ "grad_norm": 0.40210740908304027,
558
+ "learning_rate": 2.2100939533496664e-06,
559
+ "loss": 2.0549,
560
+ "step": 73
561
+ },
562
+ {
563
+ "epoch": 0.4378698224852071,
564
+ "grad_norm": 0.35537547070081377,
565
+ "learning_rate": 2.1890757931644816e-06,
566
+ "loss": 2.0266,
567
+ "step": 74
568
+ },
569
+ {
570
+ "epoch": 0.4437869822485207,
571
+ "grad_norm": 0.48889944051944084,
572
+ "learning_rate": 2.1679380501902175e-06,
573
+ "loss": 2.1634,
574
+ "step": 75
575
+ },
576
+ {
577
+ "epoch": 0.44970414201183434,
578
+ "grad_norm": 0.43673725907480276,
579
+ "learning_rate": 2.1466887725169053e-06,
580
+ "loss": 2.1562,
581
+ "step": 76
582
+ },
583
+ {
584
+ "epoch": 0.4556213017751479,
585
+ "grad_norm": 0.4464354735845316,
586
+ "learning_rate": 2.1253360507008536e-06,
587
+ "loss": 2.0489,
588
+ "step": 77
589
+ },
590
+ {
591
+ "epoch": 0.46153846153846156,
592
+ "grad_norm": 0.551735341467971,
593
+ "learning_rate": 2.103888014684213e-06,
594
+ "loss": 1.9353,
595
+ "step": 78
596
+ },
597
+ {
598
+ "epoch": 0.46745562130177515,
599
+ "grad_norm": 0.3391884892526875,
600
+ "learning_rate": 2.0823528306995395e-06,
601
+ "loss": 2.1243,
602
+ "step": 79
603
+ },
604
+ {
605
+ "epoch": 0.47337278106508873,
606
+ "grad_norm": 0.49953528831796856,
607
+ "learning_rate": 2.060738698160541e-06,
608
+ "loss": 2.0935,
609
+ "step": 80
610
+ },
611
+ {
612
+ "epoch": 0.47928994082840237,
613
+ "grad_norm": 0.30540893712680506,
614
+ "learning_rate": 2.0390538465401963e-06,
615
+ "loss": 2.157,
616
+ "step": 81
617
+ },
618
+ {
619
+ "epoch": 0.48520710059171596,
620
+ "grad_norm": 0.4160329675240926,
621
+ "learning_rate": 2.0173065322374184e-06,
622
+ "loss": 2.0091,
623
+ "step": 82
624
+ },
625
+ {
626
+ "epoch": 0.4911242603550296,
627
+ "grad_norm": 0.45938737991716166,
628
+ "learning_rate": 1.995505035433475e-06,
629
+ "loss": 1.9679,
630
+ "step": 83
631
+ },
632
+ {
633
+ "epoch": 0.4970414201183432,
634
+ "grad_norm": 0.44098477928990076,
635
+ "learning_rate": 1.9736576569393506e-06,
636
+ "loss": 1.9118,
637
+ "step": 84
638
+ },
639
+ {
640
+ "epoch": 0.5029585798816568,
641
+ "grad_norm": 0.36166230095649654,
642
+ "learning_rate": 1.951772715035255e-06,
643
+ "loss": 2.0261,
644
+ "step": 85
645
+ },
646
+ {
647
+ "epoch": 0.5029585798816568,
648
+ "eval_loss": 2.0585973262786865,
649
+ "eval_runtime": 197.2952,
650
+ "eval_samples_per_second": 0.938,
651
+ "eval_steps_per_second": 0.081,
652
+ "step": 85
653
+ },
654
+ {
655
+ "epoch": 0.5088757396449705,
656
+ "grad_norm": 0.37736250654116943,
657
+ "learning_rate": 1.9298585423034768e-06,
658
+ "loss": 2.0185,
659
+ "step": 86
660
+ },
661
+ {
662
+ "epoch": 0.514792899408284,
663
+ "grad_norm": 0.5083423760461777,
664
+ "learning_rate": 1.9079234824557984e-06,
665
+ "loss": 2.0253,
666
+ "step": 87
667
+ },
668
+ {
669
+ "epoch": 0.5207100591715976,
670
+ "grad_norm": 0.36488400826084927,
671
+ "learning_rate": 1.8859758871566654e-06,
672
+ "loss": 2.2593,
673
+ "step": 88
674
+ },
675
+ {
676
+ "epoch": 0.5266272189349113,
677
+ "grad_norm": 0.33659295246372684,
678
+ "learning_rate": 1.8640241128433347e-06,
679
+ "loss": 2.1716,
680
+ "step": 89
681
+ },
682
+ {
683
+ "epoch": 0.5325443786982249,
684
+ "grad_norm": 0.40471742900044827,
685
+ "learning_rate": 1.8420765175442019e-06,
686
+ "loss": 2.1536,
687
+ "step": 90
688
+ },
689
+ {
690
+ "epoch": 0.5384615384615384,
691
+ "grad_norm": 0.3965904151678124,
692
+ "learning_rate": 1.8201414576965231e-06,
693
+ "loss": 2.1851,
694
+ "step": 91
695
+ },
696
+ {
697
+ "epoch": 0.5443786982248521,
698
+ "grad_norm": 0.427430137656633,
699
+ "learning_rate": 1.7982272849647454e-06,
700
+ "loss": 2.0576,
701
+ "step": 92
702
+ },
703
+ {
704
+ "epoch": 0.5502958579881657,
705
+ "grad_norm": 0.4309059134194876,
706
+ "learning_rate": 1.7763423430606493e-06,
707
+ "loss": 2.0851,
708
+ "step": 93
709
+ },
710
+ {
711
+ "epoch": 0.5562130177514792,
712
+ "grad_norm": 0.31370304680938815,
713
+ "learning_rate": 1.7544949645665255e-06,
714
+ "loss": 2.1916,
715
+ "step": 94
716
+ },
717
+ {
718
+ "epoch": 0.5621301775147929,
719
+ "grad_norm": 0.44355132968935695,
720
+ "learning_rate": 1.7326934677625821e-06,
721
+ "loss": 2.0184,
722
+ "step": 95
723
+ },
724
+ {
725
+ "epoch": 0.5680473372781065,
726
+ "grad_norm": 0.3507027787266398,
727
+ "learning_rate": 1.7109461534598034e-06,
728
+ "loss": 1.9014,
729
+ "step": 96
730
+ },
731
+ {
732
+ "epoch": 0.5739644970414202,
733
+ "grad_norm": 0.35023248910125193,
734
+ "learning_rate": 1.6892613018394585e-06,
735
+ "loss": 2.1613,
736
+ "step": 97
737
+ },
738
+ {
739
+ "epoch": 0.5798816568047337,
740
+ "grad_norm": 0.3544702327033375,
741
+ "learning_rate": 1.667647169300461e-06,
742
+ "loss": 2.0655,
743
+ "step": 98
744
+ },
745
+ {
746
+ "epoch": 0.5857988165680473,
747
+ "grad_norm": 0.3190768281309395,
748
+ "learning_rate": 1.6461119853157872e-06,
749
+ "loss": 2.0558,
750
+ "step": 99
751
+ },
752
+ {
753
+ "epoch": 0.591715976331361,
754
+ "grad_norm": 0.332044027634356,
755
+ "learning_rate": 1.6246639492991465e-06,
756
+ "loss": 2.0473,
757
+ "step": 100
758
+ },
759
+ {
760
+ "epoch": 0.5976331360946746,
761
+ "grad_norm": 0.4381431696124247,
762
+ "learning_rate": 1.6033112274830948e-06,
763
+ "loss": 2.069,
764
+ "step": 101
765
+ },
766
+ {
767
+ "epoch": 0.6035502958579881,
768
+ "grad_norm": 0.3442118002969128,
769
+ "learning_rate": 1.5820619498097823e-06,
770
+ "loss": 2.1091,
771
+ "step": 102
772
+ },
773
+ {
774
+ "epoch": 0.6035502958579881,
775
+ "eval_loss": 2.0571818351745605,
776
+ "eval_runtime": 197.484,
777
+ "eval_samples_per_second": 0.937,
778
+ "eval_steps_per_second": 0.081,
779
+ "step": 102
780
+ },
781
+ {
782
+ "epoch": 0.6094674556213018,
783
+ "grad_norm": 0.38322580626320313,
784
+ "learning_rate": 1.5609242068355187e-06,
785
+ "loss": 2.0131,
786
+ "step": 103
787
+ },
788
+ {
789
+ "epoch": 0.6153846153846154,
790
+ "grad_norm": 0.320919726210023,
791
+ "learning_rate": 1.539906046650334e-06,
792
+ "loss": 2.0862,
793
+ "step": 104
794
+ },
795
+ {
796
+ "epoch": 0.621301775147929,
797
+ "grad_norm": 0.33990726724651393,
798
+ "learning_rate": 1.519015471813709e-06,
799
+ "loss": 2.2082,
800
+ "step": 105
801
+ },
802
+ {
803
+ "epoch": 0.6272189349112426,
804
+ "grad_norm": 0.3293962254034366,
805
+ "learning_rate": 1.4982604363076406e-06,
806
+ "loss": 2.2581,
807
+ "step": 106
808
+ },
809
+ {
810
+ "epoch": 0.6331360946745562,
811
+ "grad_norm": 0.3296440018497174,
812
+ "learning_rate": 1.4776488425082022e-06,
813
+ "loss": 2.1717,
814
+ "step": 107
815
+ },
816
+ {
817
+ "epoch": 0.6390532544378699,
818
+ "grad_norm": 0.39729249501674174,
819
+ "learning_rate": 1.4571885381767552e-06,
820
+ "loss": 2.1594,
821
+ "step": 108
822
+ },
823
+ {
824
+ "epoch": 0.6449704142011834,
825
+ "grad_norm": 0.39211215538915173,
826
+ "learning_rate": 1.4368873134719502e-06,
827
+ "loss": 1.9043,
828
+ "step": 109
829
+ },
830
+ {
831
+ "epoch": 0.650887573964497,
832
+ "grad_norm": 0.40567310249296884,
833
+ "learning_rate": 1.416752897983666e-06,
834
+ "loss": 2.1102,
835
+ "step": 110
836
+ },
837
+ {
838
+ "epoch": 0.6568047337278107,
839
+ "grad_norm": 0.36338277248170253,
840
+ "learning_rate": 1.3967929577900053e-06,
841
+ "loss": 1.9978,
842
+ "step": 111
843
+ },
844
+ {
845
+ "epoch": 0.6627218934911243,
846
+ "grad_norm": 0.37583876418520656,
847
+ "learning_rate": 1.377015092538474e-06,
848
+ "loss": 1.9507,
849
+ "step": 112
850
+ },
851
+ {
852
+ "epoch": 0.6686390532544378,
853
+ "grad_norm": 0.29975901286833806,
854
+ "learning_rate": 1.3574268325524538e-06,
855
+ "loss": 2.1545,
856
+ "step": 113
857
+ },
858
+ {
859
+ "epoch": 0.6745562130177515,
860
+ "grad_norm": 0.2961136115233122,
861
+ "learning_rate": 1.3380356359640687e-06,
862
+ "loss": 2.1928,
863
+ "step": 114
864
+ },
865
+ {
866
+ "epoch": 0.6804733727810651,
867
+ "grad_norm": 0.4503063977803398,
868
+ "learning_rate": 1.3188488858745378e-06,
869
+ "loss": 2.0015,
870
+ "step": 115
871
+ },
872
+ {
873
+ "epoch": 0.6863905325443787,
874
+ "grad_norm": 0.5462004147529383,
875
+ "learning_rate": 1.2998738875430985e-06,
876
+ "loss": 1.8975,
877
+ "step": 116
878
+ },
879
+ {
880
+ "epoch": 0.6923076923076923,
881
+ "grad_norm": 0.6036460598258993,
882
+ "learning_rate": 1.2811178656055636e-06,
883
+ "loss": 1.7253,
884
+ "step": 117
885
+ },
886
+ {
887
+ "epoch": 0.6982248520710059,
888
+ "grad_norm": 0.5229175578330094,
889
+ "learning_rate": 1.2625879613235779e-06,
890
+ "loss": 1.794,
891
+ "step": 118
892
+ },
893
+ {
894
+ "epoch": 0.7041420118343196,
895
+ "grad_norm": 0.36458617974932406,
896
+ "learning_rate": 1.244291229865618e-06,
897
+ "loss": 1.9768,
898
+ "step": 119
899
+ },
900
+ {
901
+ "epoch": 0.7041420118343196,
902
+ "eval_loss": 2.056403636932373,
903
+ "eval_runtime": 197.7669,
904
+ "eval_samples_per_second": 0.935,
905
+ "eval_steps_per_second": 0.081,
906
+ "step": 119
907
+ },
908
+ {
909
+ "epoch": 0.7100591715976331,
910
+ "grad_norm": 0.4889209533835279,
911
+ "learning_rate": 1.2262346376207745e-06,
912
+ "loss": 2.0582,
913
+ "step": 120
914
+ },
915
+ {
916
+ "epoch": 0.7159763313609467,
917
+ "grad_norm": 0.2889788829772602,
918
+ "learning_rate": 1.2084250595463308e-06,
919
+ "loss": 2.1367,
920
+ "step": 121
921
+ },
922
+ {
923
+ "epoch": 0.7218934911242604,
924
+ "grad_norm": 0.4302221545440225,
925
+ "learning_rate": 1.1908692765501592e-06,
926
+ "loss": 1.9656,
927
+ "step": 122
928
+ },
929
+ {
930
+ "epoch": 0.727810650887574,
931
+ "grad_norm": 0.35581945155759426,
932
+ "learning_rate": 1.173573972908925e-06,
933
+ "loss": 2.0071,
934
+ "step": 123
935
+ },
936
+ {
937
+ "epoch": 0.7337278106508875,
938
+ "grad_norm": 0.4349692224614605,
939
+ "learning_rate": 1.156545733723079e-06,
940
+ "loss": 2.0014,
941
+ "step": 124
942
+ },
943
+ {
944
+ "epoch": 0.7396449704142012,
945
+ "grad_norm": 0.3437659822805173,
946
+ "learning_rate": 1.1397910424096156e-06,
947
+ "loss": 2.1156,
948
+ "step": 125
949
+ },
950
+ {
951
+ "epoch": 0.7455621301775148,
952
+ "grad_norm": 0.40904283800990143,
953
+ "learning_rate": 1.1233162782335444e-06,
954
+ "loss": 2.1074,
955
+ "step": 126
956
+ },
957
+ {
958
+ "epoch": 0.7514792899408284,
959
+ "grad_norm": 0.47991420528393985,
960
+ "learning_rate": 1.1071277138790144e-06,
961
+ "loss": 1.9586,
962
+ "step": 127
963
+ },
964
+ {
965
+ "epoch": 0.757396449704142,
966
+ "grad_norm": 0.4307041452491789,
967
+ "learning_rate": 1.0912315130610233e-06,
968
+ "loss": 2.1032,
969
+ "step": 128
970
+ },
971
+ {
972
+ "epoch": 0.7633136094674556,
973
+ "grad_norm": 0.3114188877431307,
974
+ "learning_rate": 1.0756337281786124e-06,
975
+ "loss": 2.0598,
976
+ "step": 129
977
+ },
978
+ {
979
+ "epoch": 0.7692307692307693,
980
+ "grad_norm": 0.36225738130219465,
981
+ "learning_rate": 1.060340298010448e-06,
982
+ "loss": 2.0007,
983
+ "step": 130
984
+ },
985
+ {
986
+ "epoch": 0.7751479289940828,
987
+ "grad_norm": 0.3058543816876523,
988
+ "learning_rate": 1.0453570454536576e-06,
989
+ "loss": 2.1337,
990
+ "step": 131
991
+ },
992
+ {
993
+ "epoch": 0.7810650887573964,
994
+ "grad_norm": 0.4514038046647418,
995
+ "learning_rate": 1.0306896753067935e-06,
996
+ "loss": 1.7684,
997
+ "step": 132
998
+ },
999
+ {
1000
+ "epoch": 0.7869822485207101,
1001
+ "grad_norm": 0.33881079311892265,
1002
+ "learning_rate": 1.0163437720977595e-06,
1003
+ "loss": 2.023,
1004
+ "step": 133
1005
+ },
1006
+ {
1007
+ "epoch": 0.7928994082840237,
1008
+ "grad_norm": 0.36748821075070165,
1009
+ "learning_rate": 1.0023247979575275e-06,
1010
+ "loss": 2.0969,
1011
+ "step": 134
1012
+ },
1013
+ {
1014
+ "epoch": 0.7988165680473372,
1015
+ "grad_norm": 0.3680494379442148,
1016
+ "learning_rate": 9.886380905404615e-07,
1017
+ "loss": 2.0919,
1018
+ "step": 135
1019
+ },
1020
+ {
1021
+ "epoch": 0.8047337278106509,
1022
+ "grad_norm": 0.36745637991739233,
1023
+ "learning_rate": 9.75288860992029e-07,
1024
+ "loss": 2.149,
1025
+ "step": 136
1026
+ },
1027
+ {
1028
+ "epoch": 0.8047337278106509,
1029
+ "eval_loss": 2.055842399597168,
1030
+ "eval_runtime": 198.2767,
1031
+ "eval_samples_per_second": 0.933,
1032
+ "eval_steps_per_second": 0.081,
1033
+ "step": 136
1034
+ },
1035
+ {
1036
+ "epoch": 0.8106508875739645,
1037
+ "grad_norm": 0.4516985518699513,
1038
+ "learning_rate": 9.62282191964686e-07,
1039
+ "loss": 2.0051,
1040
+ "step": 137
1041
+ },
1042
+ {
1043
+ "epoch": 0.8165680473372781,
1044
+ "grad_norm": 0.4241561010305517,
1045
+ "learning_rate": 9.496230356826816e-07,
1046
+ "loss": 2.0454,
1047
+ "step": 138
1048
+ },
1049
+ {
1050
+ "epoch": 0.8224852071005917,
1051
+ "grad_norm": 0.35268203661515457,
1052
+ "learning_rate": 9.373162120565227e-07,
1053
+ "loss": 2.1126,
1054
+ "step": 139
1055
+ },
1056
+ {
1057
+ "epoch": 0.8284023668639053,
1058
+ "grad_norm": 0.41806079485106246,
1059
+ "learning_rate": 9.253664068478191e-07,
1060
+ "loss": 2.078,
1061
+ "step": 140
1062
+ },
1063
+ {
1064
+ "epoch": 0.834319526627219,
1065
+ "grad_norm": 0.520280194503135,
1066
+ "learning_rate": 9.137781698852005e-07,
1067
+ "loss": 2.0028,
1068
+ "step": 141
1069
+ },
1070
+ {
1071
+ "epoch": 0.8402366863905325,
1072
+ "grad_norm": 0.4306449164932711,
1073
+ "learning_rate": 9.025559133319939e-07,
1074
+ "loss": 1.9961,
1075
+ "step": 142
1076
+ },
1077
+ {
1078
+ "epoch": 0.8461538461538461,
1079
+ "grad_norm": 0.7185081383654739,
1080
+ "learning_rate": 8.917039100063143e-07,
1081
+ "loss": 1.9954,
1082
+ "step": 143
1083
+ },
1084
+ {
1085
+ "epoch": 0.8520710059171598,
1086
+ "grad_norm": 0.4261564524540679,
1087
+ "learning_rate": 8.812262917542094e-07,
1088
+ "loss": 2.0213,
1089
+ "step": 144
1090
+ },
1091
+ {
1092
+ "epoch": 0.8579881656804734,
1093
+ "grad_norm": 0.35117801817322697,
1094
+ "learning_rate": 8.711270478764811e-07,
1095
+ "loss": 1.9992,
1096
+ "step": 145
1097
+ },
1098
+ {
1099
+ "epoch": 0.863905325443787,
1100
+ "grad_norm": 0.3355379801047803,
1101
+ "learning_rate": 8.614100236097786e-07,
1102
+ "loss": 1.9944,
1103
+ "step": 146
1104
+ },
1105
+ {
1106
+ "epoch": 0.8698224852071006,
1107
+ "grad_norm": 0.3554896701673393,
1108
+ "learning_rate": 8.520789186625437e-07,
1109
+ "loss": 2.0622,
1110
+ "step": 147
1111
+ },
1112
+ {
1113
+ "epoch": 0.8757396449704142,
1114
+ "grad_norm": 0.4231747268502637,
1115
+ "learning_rate": 8.431372858063655e-07,
1116
+ "loss": 1.9006,
1117
+ "step": 148
1118
+ },
1119
+ {
1120
+ "epoch": 0.8816568047337278,
1121
+ "grad_norm": 0.42535619101097,
1122
+ "learning_rate": 8.345885295232802e-07,
1123
+ "loss": 2.0719,
1124
+ "step": 149
1125
+ },
1126
+ {
1127
+ "epoch": 0.8875739644970414,
1128
+ "grad_norm": 0.6277732187271408,
1129
+ "learning_rate": 8.264359047095321e-07,
1130
+ "loss": 2.1649,
1131
+ "step": 150
1132
+ },
1133
+ {
1134
+ "epoch": 0.893491124260355,
1135
+ "grad_norm": 0.3395676759339747,
1136
+ "learning_rate": 8.18682515436287e-07,
1137
+ "loss": 1.9553,
1138
+ "step": 151
1139
+ },
1140
+ {
1141
+ "epoch": 0.8994082840236687,
1142
+ "grad_norm": 0.3255756917307362,
1143
+ "learning_rate": 8.113313137677737e-07,
1144
+ "loss": 2.1432,
1145
+ "step": 152
1146
+ },
1147
+ {
1148
+ "epoch": 0.9053254437869822,
1149
+ "grad_norm": 0.3546025002626972,
1150
+ "learning_rate": 8.043850986372999e-07,
1151
+ "loss": 1.9458,
1152
+ "step": 153
1153
+ },
1154
+ {
1155
+ "epoch": 0.9053254437869822,
1156
+ "eval_loss": 2.055553436279297,
1157
+ "eval_runtime": 198.454,
1158
+ "eval_samples_per_second": 0.932,
1159
+ "eval_steps_per_second": 0.081,
1160
+ "step": 153
1161
+ },
1162
+ {
1163
+ "epoch": 0.9112426035502958,
1164
+ "grad_norm": 0.3805290831108246,
1165
+ "learning_rate": 7.978465147815721e-07,
1166
+ "loss": 2.2608,
1167
+ "step": 154
1168
+ },
1169
+ {
1170
+ "epoch": 0.9171597633136095,
1171
+ "grad_norm": 0.3631189463389273,
1172
+ "learning_rate": 7.917180517337259e-07,
1173
+ "loss": 2.084,
1174
+ "step": 155
1175
+ },
1176
+ {
1177
+ "epoch": 0.9230769230769231,
1178
+ "grad_norm": 0.367323143714555,
1179
+ "learning_rate": 7.860020428754477e-07,
1180
+ "loss": 2.1859,
1181
+ "step": 156
1182
+ },
1183
+ {
1184
+ "epoch": 0.9289940828402367,
1185
+ "grad_norm": 0.431420741400224,
1186
+ "learning_rate": 7.807006645485528e-07,
1187
+ "loss": 2.0085,
1188
+ "step": 157
1189
+ },
1190
+ {
1191
+ "epoch": 0.9349112426035503,
1192
+ "grad_norm": 0.3520993154950307,
1193
+ "learning_rate": 7.758159352263519e-07,
1194
+ "loss": 1.9591,
1195
+ "step": 158
1196
+ },
1197
+ {
1198
+ "epoch": 0.9408284023668639,
1199
+ "grad_norm": 0.4999371259522363,
1200
+ "learning_rate": 7.713497147451306e-07,
1201
+ "loss": 1.9551,
1202
+ "step": 159
1203
+ },
1204
+ {
1205
+ "epoch": 0.9467455621301775,
1206
+ "grad_norm": 0.29568560909731995,
1207
+ "learning_rate": 7.673037035960225e-07,
1208
+ "loss": 2.2102,
1209
+ "step": 160
1210
+ },
1211
+ {
1212
+ "epoch": 0.9526627218934911,
1213
+ "grad_norm": 0.41206656097993316,
1214
+ "learning_rate": 7.636794422775584e-07,
1215
+ "loss": 2.1114,
1216
+ "step": 161
1217
+ },
1218
+ {
1219
+ "epoch": 0.9585798816568047,
1220
+ "grad_norm": 0.43919655216705533,
1221
+ "learning_rate": 7.604783107091279e-07,
1222
+ "loss": 1.978,
1223
+ "step": 162
1224
+ },
1225
+ {
1226
+ "epoch": 0.9644970414201184,
1227
+ "grad_norm": 0.3694121289092457,
1228
+ "learning_rate": 7.577015277055826e-07,
1229
+ "loss": 1.9795,
1230
+ "step": 163
1231
+ },
1232
+ {
1233
+ "epoch": 0.9704142011834319,
1234
+ "grad_norm": 0.2972089830569135,
1235
+ "learning_rate": 7.553501505131776e-07,
1236
+ "loss": 2.1093,
1237
+ "step": 164
1238
+ },
1239
+ {
1240
+ "epoch": 0.9763313609467456,
1241
+ "grad_norm": 0.3033335245017897,
1242
+ "learning_rate": 7.534250744070314e-07,
1243
+ "loss": 2.031,
1244
+ "step": 165
1245
+ },
1246
+ {
1247
+ "epoch": 0.9822485207100592,
1248
+ "grad_norm": 0.5296826208782749,
1249
+ "learning_rate": 7.519270323502531e-07,
1250
+ "loss": 1.7548,
1251
+ "step": 166
1252
+ },
1253
+ {
1254
+ "epoch": 0.9881656804733728,
1255
+ "grad_norm": 0.31577732762298244,
1256
+ "learning_rate": 7.508565947148714e-07,
1257
+ "loss": 2.0197,
1258
+ "step": 167
1259
+ },
1260
+ {
1261
+ "epoch": 0.9940828402366864,
1262
+ "grad_norm": 0.305419250158058,
1263
+ "learning_rate": 7.502141690646682e-07,
1264
+ "loss": 2.2453,
1265
+ "step": 168
1266
+ },
1267
+ {
1268
+ "epoch": 1.0,
1269
+ "grad_norm": 0.3296352668838936,
1270
+ "learning_rate": 7.5e-07,
1271
+ "loss": 2.0452,
1272
+ "step": 169
1273
+ }
1274
+ ],
1275
+ "logging_steps": 1,
1276
+ "max_steps": 169,
1277
+ "num_input_tokens_seen": 0,
1278
+ "num_train_epochs": 1,
1279
+ "save_steps": 34,
1280
+ "stateful_callbacks": {
1281
+ "TrainerControl": {
1282
+ "args": {
1283
+ "should_epoch_stop": false,
1284
+ "should_evaluate": false,
1285
+ "should_log": false,
1286
+ "should_save": true,
1287
+ "should_training_stop": true
1288
+ },
1289
+ "attributes": {}
1290
+ }
1291
+ },
1292
+ "total_flos": 41339395768320.0,
1293
+ "train_batch_size": 3,
1294
+ "trial_name": null,
1295
+ "trial_params": null
1296
+ }
checkpoint-169/training_args.bin ADDED
@@ -0,0 +1,3 @@
 
 
 
 
1
+ version https://git-lfs.github.com/spec/v1
2
+ oid sha256:c2e2e6507f387fda28def5804cc60171b78b893f677b7b6925da98471b296786
3
+ size 9464
checkpoint-169/zero_to_fp32.py ADDED
@@ -0,0 +1,760 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ #!/usr/bin/env python
2
+
3
+ # Copyright (c) Microsoft Corporation.
4
+ # SPDX-License-Identifier: Apache-2.0
5
+
6
+ # DeepSpeed Team
7
+
8
+ # This script extracts fp32 consolidated weights from a zero 1, 2 and 3 DeepSpeed checkpoints. It gets
9
+ # copied into the top level checkpoint dir, so the user can easily do the conversion at any point in
10
+ # the future. Once extracted, the weights don't require DeepSpeed and can be used in any
11
+ # application.
12
+ #
13
+ # example:
14
+ # python zero_to_fp32.py . output_dir/
15
+ # or
16
+ # python zero_to_fp32.py . output_dir/ --safe_serialization
17
+
18
+ import argparse
19
+ import torch
20
+ import glob
21
+ import math
22
+ import os
23
+ import re
24
+ import gc
25
+ import json
26
+ import numpy as np
27
+ from tqdm import tqdm
28
+ from collections import OrderedDict
29
+ from dataclasses import dataclass
30
+
31
+ # while this script doesn't use deepspeed to recover data, since the checkpoints are pickled with
32
+ # DeepSpeed data structures it has to be available in the current python environment.
33
+ from deepspeed.utils import logger
34
+ from deepspeed.checkpoint.constants import (DS_VERSION, OPTIMIZER_STATE_DICT, SINGLE_PARTITION_OF_FP32_GROUPS,
35
+ FP32_FLAT_GROUPS, ZERO_STAGE, PARTITION_COUNT, PARAM_SHAPES, BUFFER_NAMES,
36
+ FROZEN_PARAM_SHAPES, FROZEN_PARAM_FRAGMENTS)
37
+
38
+
39
+ @dataclass
40
+ class zero_model_state:
41
+ buffers: dict()
42
+ param_shapes: dict()
43
+ shared_params: list
44
+ ds_version: int
45
+ frozen_param_shapes: dict()
46
+ frozen_param_fragments: dict()
47
+
48
+
49
+ debug = 0
50
+
51
+ # load to cpu
52
+ device = torch.device('cpu')
53
+
54
+
55
+ def atoi(text):
56
+ return int(text) if text.isdigit() else text
57
+
58
+
59
+ def natural_keys(text):
60
+ '''
61
+ alist.sort(key=natural_keys) sorts in human order
62
+ http://nedbatchelder.com/blog/200712/human_sorting.html
63
+ (See Toothy's implementation in the comments)
64
+ '''
65
+ return [atoi(c) for c in re.split(r'(\d+)', text)]
66
+
67
+
68
+ def get_model_state_file(checkpoint_dir, zero_stage):
69
+ if not os.path.isdir(checkpoint_dir):
70
+ raise FileNotFoundError(f"Directory '{checkpoint_dir}' doesn't exist")
71
+
72
+ # there should be only one file
73
+ if zero_stage <= 2:
74
+ file = os.path.join(checkpoint_dir, "mp_rank_00_model_states.pt")
75
+ elif zero_stage == 3:
76
+ file = os.path.join(checkpoint_dir, "zero_pp_rank_0_mp_rank_00_model_states.pt")
77
+
78
+ if not os.path.exists(file):
79
+ raise FileNotFoundError(f"can't find model states file at '{file}'")
80
+
81
+ return file
82
+
83
+
84
+ def get_checkpoint_files(checkpoint_dir, glob_pattern):
85
+ # XXX: need to test that this simple glob rule works for multi-node setup too
86
+ ckpt_files = sorted(glob.glob(os.path.join(checkpoint_dir, glob_pattern)), key=natural_keys)
87
+
88
+ if len(ckpt_files) == 0:
89
+ raise FileNotFoundError(f"can't find {glob_pattern} files in directory '{checkpoint_dir}'")
90
+
91
+ return ckpt_files
92
+
93
+
94
+ def get_optim_files(checkpoint_dir):
95
+ return get_checkpoint_files(checkpoint_dir, "*_optim_states.pt")
96
+
97
+
98
+ def get_model_state_files(checkpoint_dir):
99
+ return get_checkpoint_files(checkpoint_dir, "*_model_states.pt")
100
+
101
+
102
+ def parse_model_states(files):
103
+ zero_model_states = []
104
+ for file in files:
105
+ state_dict = torch.load(file, map_location=device, weights_only=False)
106
+
107
+ if BUFFER_NAMES not in state_dict:
108
+ raise ValueError(f"{file} is not a model state checkpoint")
109
+ buffer_names = state_dict[BUFFER_NAMES]
110
+ if debug:
111
+ print("Found buffers:", buffer_names)
112
+
113
+ # recover just the buffers while restoring them to fp32 if they were saved in fp16
114
+ buffers = {k: v.float() for k, v in state_dict["module"].items() if k in buffer_names}
115
+ param_shapes = state_dict[PARAM_SHAPES]
116
+
117
+ # collect parameters that are included in param_shapes
118
+ param_names = []
119
+ for s in param_shapes:
120
+ for name in s.keys():
121
+ param_names.append(name)
122
+
123
+ # update with frozen parameters
124
+ frozen_param_shapes = state_dict.get(FROZEN_PARAM_SHAPES, None)
125
+ if frozen_param_shapes is not None:
126
+ if debug:
127
+ print(f"Found frozen_param_shapes: {frozen_param_shapes}")
128
+ param_names += list(frozen_param_shapes.keys())
129
+
130
+ # handle shared params
131
+ shared_params = [[k, v] for k, v in state_dict["shared_params"].items()]
132
+
133
+ ds_version = state_dict.get(DS_VERSION, None)
134
+
135
+ frozen_param_fragments = state_dict.get(FROZEN_PARAM_FRAGMENTS, None)
136
+
137
+ z_model_state = zero_model_state(buffers=buffers,
138
+ param_shapes=param_shapes,
139
+ shared_params=shared_params,
140
+ ds_version=ds_version,
141
+ frozen_param_shapes=frozen_param_shapes,
142
+ frozen_param_fragments=frozen_param_fragments)
143
+ zero_model_states.append(z_model_state)
144
+
145
+ return zero_model_states
146
+
147
+
148
+ def parse_optim_states(files, ds_checkpoint_dir):
149
+ total_files = len(files)
150
+ state_dicts = []
151
+ for f in tqdm(files, desc='Loading checkpoint shards'):
152
+ state_dict = torch.load(f, map_location=device, mmap=True, weights_only=False)
153
+ # immediately discard the potentially huge 2 optimizer states as we only care for fp32 master weights
154
+ # and also handle the case where it was already removed by another helper script
155
+ state_dict["optimizer_state_dict"].pop("optimizer_state_dict", None)
156
+ state_dicts.append(state_dict)
157
+
158
+ if not ZERO_STAGE in state_dicts[0][OPTIMIZER_STATE_DICT]:
159
+ raise ValueError(f"{files[0]} is not a zero checkpoint")
160
+ zero_stage = state_dicts[0][OPTIMIZER_STATE_DICT][ZERO_STAGE]
161
+ world_size = state_dicts[0][OPTIMIZER_STATE_DICT][PARTITION_COUNT]
162
+
163
+ # For ZeRO-2 each param group can have different partition_count as data parallelism for expert
164
+ # parameters can be different from data parallelism for non-expert parameters. So we can just
165
+ # use the max of the partition_count to get the dp world_size.
166
+
167
+ if type(world_size) is list:
168
+ world_size = max(world_size)
169
+
170
+ if world_size != total_files:
171
+ raise ValueError(
172
+ f"Expected {world_size} of '*_optim_states.pt' under '{ds_checkpoint_dir}' but found {total_files} files. "
173
+ "Possibly due to an overwrite of an old checkpoint, or a checkpoint didn't get saved by one or more processes."
174
+ )
175
+
176
+ # the groups are named differently in each stage
177
+ if zero_stage <= 2:
178
+ fp32_groups_key = SINGLE_PARTITION_OF_FP32_GROUPS
179
+ elif zero_stage == 3:
180
+ fp32_groups_key = FP32_FLAT_GROUPS
181
+ else:
182
+ raise ValueError(f"unknown zero stage {zero_stage}")
183
+
184
+ fp32_flat_groups = [state_dicts[i][OPTIMIZER_STATE_DICT][fp32_groups_key] for i in range(len(state_dicts))]
185
+ return zero_stage, world_size, fp32_flat_groups
186
+
187
+
188
+ def _get_fp32_state_dict_from_zero_checkpoint(ds_checkpoint_dir, exclude_frozen_parameters):
189
+ """
190
+ Returns fp32 state_dict reconstructed from ds checkpoint
191
+
192
+ Args:
193
+ - ``ds_checkpoint_dir``: path to the deepspeed checkpoint folder (where the optimizer files are)
194
+
195
+ """
196
+ print(f"Processing zero checkpoint '{ds_checkpoint_dir}'")
197
+
198
+ optim_files = get_optim_files(ds_checkpoint_dir)
199
+ zero_stage, world_size, fp32_flat_groups = parse_optim_states(optim_files, ds_checkpoint_dir)
200
+ print(f"Detected checkpoint of type zero stage {zero_stage}, world_size: {world_size}")
201
+
202
+ model_files = get_model_state_files(ds_checkpoint_dir)
203
+
204
+ zero_model_states = parse_model_states(model_files)
205
+ print(f'Parsing checkpoint created by deepspeed=={zero_model_states[0].ds_version}')
206
+
207
+ if zero_stage <= 2:
208
+ return _get_fp32_state_dict_from_zero2_checkpoint(world_size, fp32_flat_groups, zero_model_states,
209
+ exclude_frozen_parameters)
210
+ elif zero_stage == 3:
211
+ return _get_fp32_state_dict_from_zero3_checkpoint(world_size, fp32_flat_groups, zero_model_states,
212
+ exclude_frozen_parameters)
213
+
214
+
215
+ def _zero2_merge_frozen_params(state_dict, zero_model_states):
216
+ if zero_model_states[0].frozen_param_shapes is None or len(zero_model_states[0].frozen_param_shapes) == 0:
217
+ return
218
+
219
+ frozen_param_shapes = zero_model_states[0].frozen_param_shapes
220
+ frozen_param_fragments = zero_model_states[0].frozen_param_fragments
221
+
222
+ if debug:
223
+ num_elem = sum(s.numel() for s in frozen_param_shapes.values())
224
+ print(f'rank 0: {FROZEN_PARAM_SHAPES}.numel = {num_elem}')
225
+
226
+ wanted_params = len(frozen_param_shapes)
227
+ wanted_numel = sum(s.numel() for s in frozen_param_shapes.values())
228
+ avail_numel = sum([p.numel() for p in frozen_param_fragments.values()])
229
+ print(f'Frozen params: Have {avail_numel} numels to process.')
230
+ print(f'Frozen params: Need {wanted_numel} numels in {wanted_params} params')
231
+
232
+ total_params = 0
233
+ total_numel = 0
234
+ for name, shape in frozen_param_shapes.items():
235
+ total_params += 1
236
+ unpartitioned_numel = shape.numel()
237
+ total_numel += unpartitioned_numel
238
+
239
+ state_dict[name] = frozen_param_fragments[name]
240
+
241
+ if debug:
242
+ print(f"{name} full shape: {shape} unpartitioned numel {unpartitioned_numel} ")
243
+
244
+ print(f"Reconstructed Frozen fp32 state dict with {total_params} params {total_numel} elements")
245
+
246
+
247
+ def _has_callable(obj, fn):
248
+ attr = getattr(obj, fn, None)
249
+ return callable(attr)
250
+
251
+
252
+ def _zero2_merge_trainable_params(state_dict, world_size, fp32_flat_groups, zero_model_states):
253
+ param_shapes = zero_model_states[0].param_shapes
254
+
255
+ # Reconstruction protocol:
256
+ #
257
+ # XXX: document this
258
+
259
+ if debug:
260
+ for i in range(world_size):
261
+ for j in range(len(fp32_flat_groups[0])):
262
+ print(f"{FP32_FLAT_GROUPS}[{i}][{j}].shape={fp32_flat_groups[i][j].shape}")
263
+
264
+ # XXX: memory usage doubles here (zero2)
265
+ num_param_groups = len(fp32_flat_groups[0])
266
+ merged_single_partition_of_fp32_groups = []
267
+ for i in range(num_param_groups):
268
+ merged_partitions = [sd[i] for sd in fp32_flat_groups]
269
+ full_single_fp32_vector = torch.cat(merged_partitions, 0)
270
+ merged_single_partition_of_fp32_groups.append(full_single_fp32_vector)
271
+ avail_numel = sum(
272
+ [full_single_fp32_vector.numel() for full_single_fp32_vector in merged_single_partition_of_fp32_groups])
273
+
274
+ if debug:
275
+ wanted_params = sum([len(shapes) for shapes in param_shapes])
276
+ wanted_numel = sum([sum(shape.numel() for shape in shapes.values()) for shapes in param_shapes])
277
+ # not asserting if there is a mismatch due to possible padding
278
+ print(f"Have {avail_numel} numels to process.")
279
+ print(f"Need {wanted_numel} numels in {wanted_params} params.")
280
+
281
+ # params
282
+ # XXX: for huge models that can't fit into the host's RAM we will have to recode this to support
283
+ # out-of-core computing solution
284
+ total_numel = 0
285
+ total_params = 0
286
+ for shapes, full_single_fp32_vector in zip(param_shapes, merged_single_partition_of_fp32_groups):
287
+ offset = 0
288
+ avail_numel = full_single_fp32_vector.numel()
289
+ for name, shape in shapes.items():
290
+
291
+ unpartitioned_numel = shape.numel() if _has_callable(shape, 'numel') else math.prod(shape)
292
+ total_numel += unpartitioned_numel
293
+ total_params += 1
294
+
295
+ if debug:
296
+ print(f"{name} full shape: {shape} unpartitioned numel {unpartitioned_numel} ")
297
+ state_dict[name] = full_single_fp32_vector.narrow(0, offset, unpartitioned_numel).view(shape)
298
+ offset += unpartitioned_numel
299
+
300
+ # Z2 started to align to 2*world_size to improve nccl performance. Therefore both offset and
301
+ # avail_numel can differ by anywhere between 0..2*world_size. Due to two unrelated complex
302
+ # paddings performed in the code it's almost impossible to predict the exact numbers w/o the
303
+ # live optimizer object, so we are checking that the numbers are within the right range
304
+ align_to = 2 * world_size
305
+
306
+ def zero2_align(x):
307
+ return align_to * math.ceil(x / align_to)
308
+
309
+ if debug:
310
+ print(f"original offset={offset}, avail_numel={avail_numel}")
311
+
312
+ offset = zero2_align(offset)
313
+ avail_numel = zero2_align(avail_numel)
314
+
315
+ if debug:
316
+ print(f"aligned offset={offset}, avail_numel={avail_numel}")
317
+
318
+ # Sanity check
319
+ if offset != avail_numel:
320
+ raise ValueError(f"consumed {offset} numels out of {avail_numel} - something is wrong")
321
+
322
+ print(f"Reconstructed fp32 state dict with {total_params} params {total_numel} elements")
323
+
324
+
325
+ def _get_fp32_state_dict_from_zero2_checkpoint(world_size, fp32_flat_groups, zero_model_states,
326
+ exclude_frozen_parameters):
327
+ state_dict = OrderedDict()
328
+
329
+ # buffers
330
+ buffers = zero_model_states[0].buffers
331
+ state_dict.update(buffers)
332
+ if debug:
333
+ print(f"added {len(buffers)} buffers")
334
+
335
+ if not exclude_frozen_parameters:
336
+ _zero2_merge_frozen_params(state_dict, zero_model_states)
337
+
338
+ _zero2_merge_trainable_params(state_dict, world_size, fp32_flat_groups, zero_model_states)
339
+
340
+ # recover shared parameters
341
+ for pair in zero_model_states[0].shared_params:
342
+ if pair[1] in state_dict:
343
+ state_dict[pair[0]] = state_dict[pair[1]]
344
+
345
+ return state_dict
346
+
347
+
348
+ def zero3_partitioned_param_info(unpartitioned_numel, world_size):
349
+ remainder = unpartitioned_numel % world_size
350
+ padding_numel = (world_size - remainder) if remainder else 0
351
+ partitioned_numel = math.ceil(unpartitioned_numel / world_size)
352
+ return partitioned_numel, padding_numel
353
+
354
+
355
+ def _zero3_merge_frozen_params(state_dict, world_size, zero_model_states):
356
+ if zero_model_states[0].frozen_param_shapes is None or len(zero_model_states[0].frozen_param_shapes) == 0:
357
+ return
358
+
359
+ if debug:
360
+ for i in range(world_size):
361
+ num_elem = sum(s.numel() for s in zero_model_states[i].frozen_param_fragments.values())
362
+ print(f'rank {i}: {FROZEN_PARAM_SHAPES}.numel = {num_elem}')
363
+
364
+ frozen_param_shapes = zero_model_states[0].frozen_param_shapes
365
+ wanted_params = len(frozen_param_shapes)
366
+ wanted_numel = sum(s.numel() for s in frozen_param_shapes.values())
367
+ avail_numel = sum([p.numel() for p in zero_model_states[0].frozen_param_fragments.values()]) * world_size
368
+ print(f'Frozen params: Have {avail_numel} numels to process.')
369
+ print(f'Frozen params: Need {wanted_numel} numels in {wanted_params} params')
370
+
371
+ total_params = 0
372
+ total_numel = 0
373
+ for name, shape in zero_model_states[0].frozen_param_shapes.items():
374
+ total_params += 1
375
+ unpartitioned_numel = shape.numel()
376
+ total_numel += unpartitioned_numel
377
+
378
+ param_frags = tuple(model_state.frozen_param_fragments[name] for model_state in zero_model_states)
379
+ state_dict[name] = torch.cat(param_frags, 0).narrow(0, 0, unpartitioned_numel).view(shape)
380
+
381
+ partitioned_numel, partitioned_padding_numel = zero3_partitioned_param_info(unpartitioned_numel, world_size)
382
+
383
+ if debug:
384
+ print(
385
+ f"Frozen params: {total_params} {name} full shape: {shape} partition0 numel={partitioned_numel} partitioned_padding_numel={partitioned_padding_numel}"
386
+ )
387
+
388
+ print(f"Reconstructed Frozen fp32 state dict with {total_params} params {total_numel} elements")
389
+
390
+
391
+ class GatheredTensor:
392
+ """
393
+ A pseudo tensor that collects partitioned weights.
394
+ It is more memory efficient when there are multiple groups.
395
+ """
396
+
397
+ def __init__(self, flat_groups, flat_groups_offset, offset, partitioned_numel, shape):
398
+ self.flat_groups = flat_groups
399
+ self.flat_groups_offset = flat_groups_offset
400
+ self.offset = offset
401
+ self.partitioned_numel = partitioned_numel
402
+ self.shape = shape
403
+ self.dtype = self.flat_groups[0][0].dtype
404
+
405
+ def contiguous(self):
406
+ """
407
+ Merge partitioned weights from flat_groups into a single tensor.
408
+ """
409
+ end_idx = self.offset + self.partitioned_numel
410
+ world_size = len(self.flat_groups)
411
+ pad_flat_param_chunks = []
412
+
413
+ for rank_i in range(world_size):
414
+ # for each rank, we need to collect weights from related group/groups
415
+ flat_groups_at_rank_i = self.flat_groups[rank_i]
416
+ start_group_id = None
417
+ end_group_id = None
418
+ for group_id in range(len(self.flat_groups_offset)):
419
+ if self.flat_groups_offset[group_id] <= self.offset < self.flat_groups_offset[group_id + 1]:
420
+ start_group_id = group_id
421
+ if self.flat_groups_offset[group_id] < end_idx <= self.flat_groups_offset[group_id + 1]:
422
+ end_group_id = group_id
423
+ break
424
+ # collect weights from related group/groups
425
+ for group_id in range(start_group_id, end_group_id + 1):
426
+ flat_tensor = flat_groups_at_rank_i[group_id]
427
+ start_offset = self.offset - self.flat_groups_offset[group_id]
428
+ end_offset = min(end_idx, self.flat_groups_offset[group_id + 1]) - self.flat_groups_offset[group_id]
429
+ pad_flat_param_chunks.append(flat_tensor[start_offset:end_offset])
430
+
431
+ # collect weights from all ranks
432
+ pad_flat_param = torch.cat(pad_flat_param_chunks, dim=0)
433
+ param = pad_flat_param[:self.shape.numel()].view(self.shape).contiguous()
434
+ return param
435
+
436
+
437
+ def _zero3_merge_trainable_params(state_dict, world_size, fp32_flat_groups, zero_model_states):
438
+ param_shapes = zero_model_states[0].param_shapes
439
+ avail_numel = sum([flat_group.numel() for flat_group in fp32_flat_groups[0]]) * world_size
440
+
441
+ # Reconstruction protocol: For zero3 we need to zip the partitions together at boundary of each
442
+ # param, re-consolidating each param, while dealing with padding if any
443
+
444
+ # merge list of dicts, preserving order
445
+ param_shapes = {k: v for d in param_shapes for k, v in d.items()}
446
+
447
+ if debug:
448
+ for i in range(world_size):
449
+ print(f"{FP32_FLAT_GROUPS}[{i}].shape={fp32_flat_groups[i].shape}")
450
+
451
+ wanted_params = len(param_shapes)
452
+ wanted_numel = sum(shape.numel() for shape in param_shapes.values())
453
+ # not asserting if there is a mismatch due to possible padding
454
+ avail_numel = fp32_flat_groups[0].numel() * world_size
455
+ print(f"Trainable params: Have {avail_numel} numels to process.")
456
+ print(f"Trainable params: Need {wanted_numel} numels in {wanted_params} params.")
457
+
458
+ # params
459
+ # XXX: for huge models that can't fit into the host's RAM we will have to recode this to support
460
+ # out-of-core computing solution
461
+ offset = 0
462
+ total_numel = 0
463
+ total_params = 0
464
+ flat_groups_offset = [0] + list(np.cumsum([flat_tensor.numel() for flat_tensor in fp32_flat_groups[0]]))
465
+ for name, shape in tqdm(param_shapes.items(), desc='Gathering sharded weights'):
466
+ unpartitioned_numel = shape.numel()
467
+ total_numel += unpartitioned_numel
468
+ total_params += 1
469
+ partitioned_numel, partitioned_padding_numel = zero3_partitioned_param_info(unpartitioned_numel, world_size)
470
+
471
+ if debug:
472
+ print(
473
+ f"Trainable params: {total_params} {name} full shape: {shape} partition0 numel={partitioned_numel} partitioned_padding_numel={partitioned_padding_numel}"
474
+ )
475
+
476
+ # memory efficient tensor
477
+ tensor = GatheredTensor(fp32_flat_groups, flat_groups_offset, offset, partitioned_numel, shape)
478
+ state_dict[name] = tensor
479
+ offset += partitioned_numel
480
+
481
+ offset *= world_size
482
+
483
+ # Sanity check
484
+ if offset != avail_numel:
485
+ raise ValueError(f"consumed {offset} numels out of {avail_numel} - something is wrong")
486
+
487
+ print(f"Reconstructed Trainable fp32 state dict with {total_params} params {total_numel} elements")
488
+
489
+
490
+ def _get_fp32_state_dict_from_zero3_checkpoint(world_size, fp32_flat_groups, zero_model_states,
491
+ exclude_frozen_parameters):
492
+ state_dict = OrderedDict()
493
+
494
+ # buffers
495
+ buffers = zero_model_states[0].buffers
496
+ state_dict.update(buffers)
497
+ if debug:
498
+ print(f"added {len(buffers)} buffers")
499
+
500
+ if not exclude_frozen_parameters:
501
+ _zero3_merge_frozen_params(state_dict, world_size, zero_model_states)
502
+
503
+ _zero3_merge_trainable_params(state_dict, world_size, fp32_flat_groups, zero_model_states)
504
+
505
+ # recover shared parameters
506
+ for pair in zero_model_states[0].shared_params:
507
+ if pair[1] in state_dict:
508
+ state_dict[pair[0]] = state_dict[pair[1]]
509
+
510
+ return state_dict
511
+
512
+
513
+ def to_torch_tensor(state_dict, return_empty_tensor=False):
514
+ """
515
+ Convert state_dict of GatheredTensor to torch tensor
516
+ """
517
+ torch_state_dict = {}
518
+ converted_tensors = {}
519
+ for name, tensor in state_dict.items():
520
+ tensor_id = id(tensor)
521
+ if tensor_id in converted_tensors: # shared tensors
522
+ shared_tensor = torch_state_dict[converted_tensors[tensor_id]]
523
+ torch_state_dict[name] = shared_tensor
524
+ else:
525
+ converted_tensors[tensor_id] = name
526
+ if return_empty_tensor:
527
+ torch_state_dict[name] = torch.empty(tensor.shape, dtype=tensor.dtype)
528
+ else:
529
+ torch_state_dict[name] = tensor.contiguous()
530
+ return torch_state_dict
531
+
532
+
533
+ def get_fp32_state_dict_from_zero_checkpoint(checkpoint_dir,
534
+ tag=None,
535
+ exclude_frozen_parameters=False,
536
+ lazy_mode=False):
537
+ """
538
+ Convert ZeRO 2 or 3 checkpoint into a single fp32 consolidated state_dict that can be loaded with
539
+ ``load_state_dict()`` and used for training without DeepSpeed or shared with others, for example
540
+ via a model hub.
541
+
542
+ Args:
543
+ - ``checkpoint_dir``: path to the desired checkpoint folder
544
+ - ``tag``: checkpoint tag used as a unique identifier for checkpoint. If not provided will attempt to load tag in 'latest' file. e.g., ``global_step14``
545
+ - ``exclude_frozen_parameters``: exclude frozen parameters
546
+ - ``lazy_mode``: get state_dict in lazy mode. It returns a dict of pesduo tensor instead of torch tensor, which is more memory efficient.
547
+ Convert the pesduo tensor to torch tensor by ``.contiguous()``
548
+
549
+ Returns:
550
+ - pytorch ``state_dict``
551
+
552
+ A typical usage might be ::
553
+
554
+ from deepspeed.utils.zero_to_fp32 import get_fp32_state_dict_from_zero_checkpoint
555
+ # do the training and checkpoint saving
556
+ state_dict = get_fp32_state_dict_from_zero_checkpoint(checkpoint_dir) # already on cpu
557
+ model = model.cpu() # move to cpu
558
+ model.load_state_dict(state_dict)
559
+ # submit to model hub or save the model to share with others
560
+
561
+ In this example the ``model`` will no longer be usable in the deepspeed context of the same
562
+ application. i.e. you will need to re-initialize the deepspeed engine, since
563
+ ``model.load_state_dict(state_dict)`` will remove all the deepspeed magic from it.
564
+
565
+ If you want it all done for you, use ``load_state_dict_from_zero_checkpoint`` instead.
566
+
567
+ Note: the above usage may not work if your application doesn't have sufficient free CPU memory.
568
+ You may need to use the offline approach using the ``zero_to_fp32.py`` script that is saved with
569
+ the checkpoint. Or you can load state_dict in lazy mode ::
570
+
571
+ from deepspeed.utils.zero_to_fp32 import get_fp32_state_dict_from_zero_checkpoint
572
+ state_dict = get_fp32_state_dict_from_zero_checkpoint(checkpoint_dir, lazy_mode=True) # not on cpu
573
+ for name, lazy_tensor in state_dict.item():
574
+ tensor = lazy_tensor.contiguous() # to cpu
575
+ print(name, tensor)
576
+ # del tensor to release memory if it no longer in use
577
+ """
578
+ if tag is None:
579
+ latest_path = os.path.join(checkpoint_dir, 'latest')
580
+ if os.path.isfile(latest_path):
581
+ with open(latest_path, 'r') as fd:
582
+ tag = fd.read().strip()
583
+ else:
584
+ raise ValueError(f"Unable to find 'latest' file at {latest_path}")
585
+
586
+ ds_checkpoint_dir = os.path.join(checkpoint_dir, tag)
587
+
588
+ if not os.path.isdir(ds_checkpoint_dir):
589
+ raise FileNotFoundError(f"Directory '{ds_checkpoint_dir}' doesn't exist")
590
+
591
+ state_dict = _get_fp32_state_dict_from_zero_checkpoint(ds_checkpoint_dir, exclude_frozen_parameters)
592
+ if lazy_mode:
593
+ return state_dict
594
+ else:
595
+ return to_torch_tensor(state_dict)
596
+
597
+
598
+ def convert_zero_checkpoint_to_fp32_state_dict(checkpoint_dir,
599
+ output_dir,
600
+ max_shard_size="5GB",
601
+ safe_serialization=False,
602
+ tag=None,
603
+ exclude_frozen_parameters=False):
604
+ """
605
+ Convert ZeRO 2 or 3 checkpoint into a single fp32 consolidated ``state_dict`` file that can be
606
+ loaded with ``torch.load(file)`` + ``load_state_dict()`` and used for training without DeepSpeed.
607
+
608
+ Args:
609
+ - ``checkpoint_dir``: path to the desired checkpoint folder. (one that contains the tag-folder, like ``global_step14``)
610
+ - ``output_dir``: directory to the pytorch fp32 state_dict output files
611
+ - ``max_shard_size``: the maximum size for a checkpoint before being sharded, default value is 5GB
612
+ - ``safe_serialization``: whether to save the model using `safetensors` or the traditional PyTorch way (that uses `pickle`).
613
+ - ``tag``: checkpoint tag used as a unique identifier for checkpoint. If not provided will attempt to load tag in the file named ``latest`` in the checkpoint folder, e.g., ``global_step14``
614
+ - ``exclude_frozen_parameters``: exclude frozen parameters
615
+ """
616
+
617
+ # Dependency pre-check
618
+ if safe_serialization:
619
+ try:
620
+ from safetensors.torch import save_file
621
+ except ImportError:
622
+ print('If you want to use `safe_serialization`, please `pip install safetensors`')
623
+ raise
624
+ if max_shard_size is not None:
625
+ try:
626
+ from huggingface_hub import split_torch_state_dict_into_shards
627
+ except ImportError:
628
+ print('If you want to use `max_shard_size`, please `pip install huggingface_hub`')
629
+ raise
630
+
631
+ # Convert zero checkpoint to state_dict
632
+ state_dict = get_fp32_state_dict_from_zero_checkpoint(checkpoint_dir,
633
+ tag,
634
+ exclude_frozen_parameters,
635
+ lazy_mode=True)
636
+
637
+ # Shard the model if it is too big.
638
+ weights_name = "model.safetensors" if safe_serialization else "pytorch_model.bin"
639
+ if max_shard_size is not None:
640
+ filename_pattern = weights_name.replace(".bin", "{suffix}.bin").replace(".safetensors", "{suffix}.safetensors")
641
+ # an memory-efficient approach for sharding
642
+ empty_state_dict = to_torch_tensor(state_dict, return_empty_tensor=True)
643
+ state_dict_split = split_torch_state_dict_into_shards(empty_state_dict,
644
+ filename_pattern=filename_pattern,
645
+ max_shard_size=max_shard_size)
646
+ else:
647
+ from collections import namedtuple
648
+ StateDictSplit = namedtuple("StateDictSplit", ["is_sharded", "filename_to_tensors"])
649
+ state_dict_split = StateDictSplit(is_sharded=False,
650
+ filename_to_tensors={weights_name: list(state_dict.keys())})
651
+
652
+ # Save the model by shard
653
+ os.makedirs(output_dir, exist_ok=True)
654
+ filename_to_tensors = state_dict_split.filename_to_tensors.items()
655
+ for shard_file, tensors in tqdm(filename_to_tensors, desc="Saving checkpoint shards"):
656
+ shard_state_dict = {tensor_name: state_dict[tensor_name] for tensor_name in tensors}
657
+ shard_state_dict = to_torch_tensor(shard_state_dict)
658
+ output_path = os.path.join(output_dir, shard_file)
659
+ if safe_serialization:
660
+ save_file(shard_state_dict, output_path, metadata={"format": "pt"})
661
+ else:
662
+ torch.save(shard_state_dict, output_path)
663
+ # release the memory of current shard
664
+ for tensor_name in list(shard_state_dict.keys()):
665
+ del state_dict[tensor_name]
666
+ del shard_state_dict[tensor_name]
667
+ del shard_state_dict
668
+ gc.collect()
669
+
670
+ # Save index if sharded
671
+ if state_dict_split.is_sharded:
672
+ index = {
673
+ "metadata": state_dict_split.metadata,
674
+ "weight_map": state_dict_split.tensor_to_filename,
675
+ }
676
+ save_index_file = "model.safetensors.index.json" if safe_serialization else "pytorch_model.bin.index.json"
677
+ save_index_file = os.path.join(output_dir, save_index_file)
678
+ with open(save_index_file, "w", encoding="utf-8") as f:
679
+ content = json.dumps(index, indent=2, sort_keys=True) + "\n"
680
+ f.write(content)
681
+
682
+
683
+ def load_state_dict_from_zero_checkpoint(model, checkpoint_dir, tag=None):
684
+ """
685
+ 1. Put the provided model to cpu
686
+ 2. Convert ZeRO 2 or 3 checkpoint into a single fp32 consolidated ``state_dict``
687
+ 3. Load it into the provided model
688
+
689
+ Args:
690
+ - ``model``: the model object to update
691
+ - ``checkpoint_dir``: path to the desired checkpoint folder. (one that contains the tag-folder, like ``global_step14``)
692
+ - ``tag``: checkpoint tag used as a unique identifier for checkpoint. If not provided will attempt to load tag in the file named ``latest`` in the checkpoint folder, e.g., ``global_step14``
693
+
694
+ Returns:
695
+ - ``model`: modified model
696
+
697
+ Make sure you have plenty of CPU memory available before you call this function. If you don't
698
+ have enough use the ``zero_to_fp32.py`` utility to do the conversion. You will find it
699
+ conveniently placed for you in the checkpoint folder.
700
+
701
+ A typical usage might be ::
702
+
703
+ from deepspeed.utils.zero_to_fp32 import load_state_dict_from_zero_checkpoint
704
+ model = load_state_dict_from_zero_checkpoint(trainer.model, checkpoint_dir)
705
+ # submit to model hub or save the model to share with others
706
+
707
+ Note, that once this was run, the ``model`` will no longer be usable in the deepspeed context
708
+ of the same application. i.e. you will need to re-initialize the deepspeed engine, since
709
+ ``model.load_state_dict(state_dict)`` will remove all the deepspeed magic from it.
710
+
711
+ """
712
+ logger.info(f"Extracting fp32 weights")
713
+ state_dict = get_fp32_state_dict_from_zero_checkpoint(checkpoint_dir, tag)
714
+
715
+ logger.info(f"Overwriting model with fp32 weights")
716
+ model = model.cpu()
717
+ model.load_state_dict(state_dict, strict=False)
718
+
719
+ return model
720
+
721
+
722
+ if __name__ == "__main__":
723
+ parser = argparse.ArgumentParser()
724
+ parser.add_argument("checkpoint_dir",
725
+ type=str,
726
+ help="path to the desired checkpoint folder, e.g., path/checkpoint-12")
727
+ parser.add_argument("output_dir",
728
+ type=str,
729
+ help="directory to the pytorch fp32 state_dict output files"
730
+ "(e.g. path/checkpoint-12-output/)")
731
+ parser.add_argument(
732
+ "--max_shard_size",
733
+ type=str,
734
+ default="5GB",
735
+ help="The maximum size for a checkpoint before being sharded. Checkpoints shard will then be each of size"
736
+ "lower than this size. If expressed as a string, needs to be digits followed by a unit (like `5MB`"
737
+ "We default it to 5GB in order for models to be able to run easily on free-tier google colab instances"
738
+ "without CPU OOM issues.")
739
+ parser.add_argument(
740
+ "--safe_serialization",
741
+ default=False,
742
+ action='store_true',
743
+ help="Whether to save the model using `safetensors` or the traditional PyTorch way (that uses `pickle`).")
744
+ parser.add_argument("-t",
745
+ "--tag",
746
+ type=str,
747
+ default=None,
748
+ help="checkpoint tag used as a unique identifier for checkpoint. e.g., global_step1")
749
+ parser.add_argument("--exclude_frozen_parameters", action='store_true', help="exclude frozen parameters")
750
+ parser.add_argument("-d", "--debug", action='store_true', help="enable debug")
751
+ args = parser.parse_args()
752
+
753
+ debug = args.debug
754
+
755
+ convert_zero_checkpoint_to_fp32_state_dict(args.checkpoint_dir,
756
+ args.output_dir,
757
+ max_shard_size=args.max_shard_size,
758
+ safe_serialization=args.safe_serialization,
759
+ tag=args.tag,
760
+ exclude_frozen_parameters=args.exclude_frozen_parameters)