chenzju commited on
Commit
d0c849a
·
verified ·
1 Parent(s): 5ada956

Upload 147 files

Browse files
This view is limited to 50 files because it contains too many changes.   See raw diff
Files changed (50) hide show
  1. adapter_config.json +42 -0
  2. adapter_model.safetensors +3 -0
  3. checkpoint-100/README.md +207 -0
  4. checkpoint-100/adapter_config.json +42 -0
  5. checkpoint-100/adapter_model.safetensors +3 -0
  6. checkpoint-100/global_step100/bf16_zero_pp_rank_0_mp_rank_00_optim_states.pt +3 -0
  7. checkpoint-100/global_step100/bf16_zero_pp_rank_1_mp_rank_00_optim_states.pt +3 -0
  8. checkpoint-100/global_step100/bf16_zero_pp_rank_2_mp_rank_00_optim_states.pt +3 -0
  9. checkpoint-100/global_step100/bf16_zero_pp_rank_3_mp_rank_00_optim_states.pt +3 -0
  10. checkpoint-100/global_step100/bf16_zero_pp_rank_4_mp_rank_00_optim_states.pt +3 -0
  11. checkpoint-100/global_step100/bf16_zero_pp_rank_5_mp_rank_00_optim_states.pt +3 -0
  12. checkpoint-100/global_step100/bf16_zero_pp_rank_6_mp_rank_00_optim_states.pt +3 -0
  13. checkpoint-100/global_step100/bf16_zero_pp_rank_7_mp_rank_00_optim_states.pt +3 -0
  14. checkpoint-100/global_step100/mp_rank_00_model_states.pt +3 -0
  15. checkpoint-100/latest +1 -0
  16. checkpoint-100/rng_state_0.pth +3 -0
  17. checkpoint-100/rng_state_1.pth +3 -0
  18. checkpoint-100/rng_state_2.pth +3 -0
  19. checkpoint-100/rng_state_3.pth +3 -0
  20. checkpoint-100/rng_state_4.pth +3 -0
  21. checkpoint-100/rng_state_5.pth +3 -0
  22. checkpoint-100/rng_state_6.pth +3 -0
  23. checkpoint-100/rng_state_7.pth +3 -0
  24. checkpoint-100/scheduler.pt +3 -0
  25. checkpoint-100/special_tokens_map.json +24 -0
  26. checkpoint-100/tokenizer.model +3 -0
  27. checkpoint-100/tokenizer_config.json +43 -0
  28. checkpoint-100/trainer_state.json +733 -0
  29. checkpoint-100/training_args.bin +3 -0
  30. checkpoint-100/zero_to_fp32.py +760 -0
  31. checkpoint-150/README.md +207 -0
  32. checkpoint-150/adapter_config.json +42 -0
  33. checkpoint-150/adapter_model.safetensors +3 -0
  34. checkpoint-150/global_step150/bf16_zero_pp_rank_0_mp_rank_00_optim_states.pt +3 -0
  35. checkpoint-150/global_step150/bf16_zero_pp_rank_1_mp_rank_00_optim_states.pt +3 -0
  36. checkpoint-150/global_step150/bf16_zero_pp_rank_2_mp_rank_00_optim_states.pt +3 -0
  37. checkpoint-150/global_step150/bf16_zero_pp_rank_3_mp_rank_00_optim_states.pt +3 -0
  38. checkpoint-150/global_step150/bf16_zero_pp_rank_4_mp_rank_00_optim_states.pt +3 -0
  39. checkpoint-150/global_step150/bf16_zero_pp_rank_5_mp_rank_00_optim_states.pt +3 -0
  40. checkpoint-150/global_step150/bf16_zero_pp_rank_6_mp_rank_00_optim_states.pt +3 -0
  41. checkpoint-150/global_step150/bf16_zero_pp_rank_7_mp_rank_00_optim_states.pt +3 -0
  42. checkpoint-150/global_step150/mp_rank_00_model_states.pt +3 -0
  43. checkpoint-150/latest +1 -0
  44. checkpoint-150/rng_state_0.pth +3 -0
  45. checkpoint-150/rng_state_1.pth +3 -0
  46. checkpoint-150/rng_state_2.pth +3 -0
  47. checkpoint-150/rng_state_3.pth +3 -0
  48. checkpoint-150/rng_state_4.pth +3 -0
  49. checkpoint-150/rng_state_5.pth +3 -0
  50. checkpoint-150/rng_state_6.pth +3 -0
adapter_config.json ADDED
@@ -0,0 +1,42 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ {
2
+ "alpha_pattern": {},
3
+ "auto_mapping": null,
4
+ "base_model_name_or_path": "/mnt/phwfile/datafrontier/chenyang/data/models/Eagle-X5-7B",
5
+ "bias": "none",
6
+ "corda_config": null,
7
+ "eva_config": null,
8
+ "exclude_modules": null,
9
+ "fan_in_fan_out": false,
10
+ "inference_mode": true,
11
+ "init_lora_weights": true,
12
+ "layer_replication": null,
13
+ "layers_pattern": null,
14
+ "layers_to_transform": null,
15
+ "loftq_config": {},
16
+ "lora_alpha": 128,
17
+ "lora_bias": false,
18
+ "lora_dropout": 0.05,
19
+ "megatron_config": null,
20
+ "megatron_core": "megatron.core",
21
+ "modules_to_save": null,
22
+ "peft_type": "LORA",
23
+ "qalora_group_size": 16,
24
+ "r": 64,
25
+ "rank_pattern": {},
26
+ "revision": null,
27
+ "target_modules": [
28
+ "q_proj",
29
+ "down_proj",
30
+ "gate_proj",
31
+ "o_proj",
32
+ "k_proj",
33
+ "v_proj",
34
+ "up_proj"
35
+ ],
36
+ "target_parameters": null,
37
+ "task_type": "CAUSAL_LM",
38
+ "trainable_token_indices": null,
39
+ "use_dora": false,
40
+ "use_qalora": false,
41
+ "use_rslora": false
42
+ }
adapter_model.safetensors ADDED
@@ -0,0 +1,3 @@
 
 
 
 
1
+ version https://git-lfs.github.com/spec/v1
2
+ oid sha256:2f3d8836d63a7b223d474b46eca6e48ebf21c4231acf477ac23d86b0770a0bc1
3
+ size 357679240
checkpoint-100/README.md ADDED
@@ -0,0 +1,207 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ ---
2
+ base_model: /mnt/phwfile/datafrontier/chenyang/data/models/Eagle-X5-7B
3
+ library_name: peft
4
+ pipeline_tag: text-generation
5
+ tags:
6
+ - base_model:adapter:/mnt/phwfile/datafrontier/chenyang/data/models/Eagle-X5-7B
7
+ - lora
8
+ - transformers
9
+ ---
10
+
11
+ # Model Card for Model ID
12
+
13
+ <!-- Provide a quick summary of what the model is/does. -->
14
+
15
+
16
+
17
+ ## Model Details
18
+
19
+ ### Model Description
20
+
21
+ <!-- Provide a longer summary of what this model is. -->
22
+
23
+
24
+
25
+ - **Developed by:** [More Information Needed]
26
+ - **Funded by [optional]:** [More Information Needed]
27
+ - **Shared by [optional]:** [More Information Needed]
28
+ - **Model type:** [More Information Needed]
29
+ - **Language(s) (NLP):** [More Information Needed]
30
+ - **License:** [More Information Needed]
31
+ - **Finetuned from model [optional]:** [More Information Needed]
32
+
33
+ ### Model Sources [optional]
34
+
35
+ <!-- Provide the basic links for the model. -->
36
+
37
+ - **Repository:** [More Information Needed]
38
+ - **Paper [optional]:** [More Information Needed]
39
+ - **Demo [optional]:** [More Information Needed]
40
+
41
+ ## Uses
42
+
43
+ <!-- Address questions around how the model is intended to be used, including the foreseeable users of the model and those affected by the model. -->
44
+
45
+ ### Direct Use
46
+
47
+ <!-- This section is for the model use without fine-tuning or plugging into a larger ecosystem/app. -->
48
+
49
+ [More Information Needed]
50
+
51
+ ### Downstream Use [optional]
52
+
53
+ <!-- This section is for the model use when fine-tuned for a task, or when plugged into a larger ecosystem/app -->
54
+
55
+ [More Information Needed]
56
+
57
+ ### Out-of-Scope Use
58
+
59
+ <!-- This section addresses misuse, malicious use, and uses that the model will not work well for. -->
60
+
61
+ [More Information Needed]
62
+
63
+ ## Bias, Risks, and Limitations
64
+
65
+ <!-- This section is meant to convey both technical and sociotechnical limitations. -->
66
+
67
+ [More Information Needed]
68
+
69
+ ### Recommendations
70
+
71
+ <!-- This section is meant to convey recommendations with respect to the bias, risk, and technical limitations. -->
72
+
73
+ Users (both direct and downstream) should be made aware of the risks, biases and limitations of the model. More information needed for further recommendations.
74
+
75
+ ## How to Get Started with the Model
76
+
77
+ Use the code below to get started with the model.
78
+
79
+ [More Information Needed]
80
+
81
+ ## Training Details
82
+
83
+ ### Training Data
84
+
85
+ <!-- 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. -->
86
+
87
+ [More Information Needed]
88
+
89
+ ### Training Procedure
90
+
91
+ <!-- This relates heavily to the Technical Specifications. Content here should link to that section when it is relevant to the training procedure. -->
92
+
93
+ #### Preprocessing [optional]
94
+
95
+ [More Information Needed]
96
+
97
+
98
+ #### Training Hyperparameters
99
+
100
+ - **Training regime:** [More Information Needed] <!--fp32, fp16 mixed precision, bf16 mixed precision, bf16 non-mixed precision, fp16 non-mixed precision, fp8 mixed precision -->
101
+
102
+ #### Speeds, Sizes, Times [optional]
103
+
104
+ <!-- This section provides information about throughput, start/end time, checkpoint size if relevant, etc. -->
105
+
106
+ [More Information Needed]
107
+
108
+ ## Evaluation
109
+
110
+ <!-- This section describes the evaluation protocols and provides the results. -->
111
+
112
+ ### Testing Data, Factors & Metrics
113
+
114
+ #### Testing Data
115
+
116
+ <!-- This should link to a Dataset Card if possible. -->
117
+
118
+ [More Information Needed]
119
+
120
+ #### Factors
121
+
122
+ <!-- These are the things the evaluation is disaggregating by, e.g., subpopulations or domains. -->
123
+
124
+ [More Information Needed]
125
+
126
+ #### Metrics
127
+
128
+ <!-- These are the evaluation metrics being used, ideally with a description of why. -->
129
+
130
+ [More Information Needed]
131
+
132
+ ### Results
133
+
134
+ [More Information Needed]
135
+
136
+ #### Summary
137
+
138
+
139
+
140
+ ## Model Examination [optional]
141
+
142
+ <!-- Relevant interpretability work for the model goes here -->
143
+
144
+ [More Information Needed]
145
+
146
+ ## Environmental Impact
147
+
148
+ <!-- Total emissions (in grams of CO2eq) and additional considerations, such as electricity usage, go here. Edit the suggested text below accordingly -->
149
+
150
+ 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).
151
+
152
+ - **Hardware Type:** [More Information Needed]
153
+ - **Hours used:** [More Information Needed]
154
+ - **Cloud Provider:** [More Information Needed]
155
+ - **Compute Region:** [More Information Needed]
156
+ - **Carbon Emitted:** [More Information Needed]
157
+
158
+ ## Technical Specifications [optional]
159
+
160
+ ### Model Architecture and Objective
161
+
162
+ [More Information Needed]
163
+
164
+ ### Compute Infrastructure
165
+
166
+ [More Information Needed]
167
+
168
+ #### Hardware
169
+
170
+ [More Information Needed]
171
+
172
+ #### Software
173
+
174
+ [More Information Needed]
175
+
176
+ ## Citation [optional]
177
+
178
+ <!-- If there is a paper or blog post introducing the model, the APA and Bibtex information for that should go in this section. -->
179
+
180
+ **BibTeX:**
181
+
182
+ [More Information Needed]
183
+
184
+ **APA:**
185
+
186
+ [More Information Needed]
187
+
188
+ ## Glossary [optional]
189
+
190
+ <!-- If relevant, include terms and calculations in this section that can help readers understand the model or model card. -->
191
+
192
+ [More Information Needed]
193
+
194
+ ## More Information [optional]
195
+
196
+ [More Information Needed]
197
+
198
+ ## Model Card Authors [optional]
199
+
200
+ [More Information Needed]
201
+
202
+ ## Model Card Contact
203
+
204
+ [More Information Needed]
205
+ ### Framework versions
206
+
207
+ - PEFT 0.17.1
checkpoint-100/adapter_config.json ADDED
@@ -0,0 +1,42 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ {
2
+ "alpha_pattern": {},
3
+ "auto_mapping": null,
4
+ "base_model_name_or_path": "/mnt/phwfile/datafrontier/chenyang/data/models/Eagle-X5-7B",
5
+ "bias": "none",
6
+ "corda_config": null,
7
+ "eva_config": null,
8
+ "exclude_modules": null,
9
+ "fan_in_fan_out": false,
10
+ "inference_mode": true,
11
+ "init_lora_weights": true,
12
+ "layer_replication": null,
13
+ "layers_pattern": null,
14
+ "layers_to_transform": null,
15
+ "loftq_config": {},
16
+ "lora_alpha": 128,
17
+ "lora_bias": false,
18
+ "lora_dropout": 0.05,
19
+ "megatron_config": null,
20
+ "megatron_core": "megatron.core",
21
+ "modules_to_save": null,
22
+ "peft_type": "LORA",
23
+ "qalora_group_size": 16,
24
+ "r": 64,
25
+ "rank_pattern": {},
26
+ "revision": null,
27
+ "target_modules": [
28
+ "q_proj",
29
+ "down_proj",
30
+ "gate_proj",
31
+ "o_proj",
32
+ "k_proj",
33
+ "v_proj",
34
+ "up_proj"
35
+ ],
36
+ "target_parameters": null,
37
+ "task_type": "CAUSAL_LM",
38
+ "trainable_token_indices": null,
39
+ "use_dora": false,
40
+ "use_qalora": false,
41
+ "use_rslora": false
42
+ }
checkpoint-100/adapter_model.safetensors ADDED
@@ -0,0 +1,3 @@
 
 
 
 
1
+ version https://git-lfs.github.com/spec/v1
2
+ oid sha256:d4c4195dbe71a0946c57150b52e6f41bb8b51253e2f01bc9bff79fbbafb8a1d5
3
+ size 357679240
checkpoint-100/global_step100/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:c2540c371c784e7f4ec73382dee70e0b9345d5e9fce56b0e09f05bf4019a38a9
3
+ size 340551088
checkpoint-100/global_step100/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:fb55dc415c81c6e89b96972e30aa701ac6475e7a543808142be1ae52a3c48871
3
+ size 340550896
checkpoint-100/global_step100/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:069eff2bc45865450618e8a56a67e8e2b282f75ccf8134c3471329008db6480b
3
+ size 340550832
checkpoint-100/global_step100/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:72fb24023c6418d72dd9f097af94601b78bf123be18284b6480a0d8da48e86e0
3
+ size 340551216
checkpoint-100/global_step100/bf16_zero_pp_rank_4_mp_rank_00_optim_states.pt ADDED
@@ -0,0 +1,3 @@
 
 
 
 
1
+ version https://git-lfs.github.com/spec/v1
2
+ oid sha256:8c7943ab571c6df46bbf4a086415154176f42fcb9553b68e2d9e7a4fb9ad7311
3
+ size 340551088
checkpoint-100/global_step100/bf16_zero_pp_rank_5_mp_rank_00_optim_states.pt ADDED
@@ -0,0 +1,3 @@
 
 
 
 
1
+ version https://git-lfs.github.com/spec/v1
2
+ oid sha256:882aaee5d595704472eaa96086fdf296fe2fb23ead7ea7ea704c181fad65a4df
3
+ size 340574832
checkpoint-100/global_step100/bf16_zero_pp_rank_6_mp_rank_00_optim_states.pt ADDED
@@ -0,0 +1,3 @@
 
 
 
 
1
+ version https://git-lfs.github.com/spec/v1
2
+ oid sha256:b1a022748162dcb5ae5febe60b05eb44bbfce6392a7063032b49324bc2a4dc40
3
+ size 340561584
checkpoint-100/global_step100/bf16_zero_pp_rank_7_mp_rank_00_optim_states.pt ADDED
@@ -0,0 +1,3 @@
 
 
 
 
1
+ version https://git-lfs.github.com/spec/v1
2
+ oid sha256:d38dfb12952fc14e9dc3eb2cb402964808830dd4ce95df41a853dc881ccb6447
3
+ size 340542512
checkpoint-100/global_step100/mp_rank_00_model_states.pt ADDED
@@ -0,0 +1,3 @@
 
 
 
 
1
+ version https://git-lfs.github.com/spec/v1
2
+ oid sha256:bfa17c7fb02721bf9eb943a673afdc1811760325497c97b450258322d62bd636
3
+ size 456033832
checkpoint-100/latest ADDED
@@ -0,0 +1 @@
 
 
1
+ global_step100
checkpoint-100/rng_state_0.pth ADDED
@@ -0,0 +1,3 @@
 
 
 
 
1
+ version https://git-lfs.github.com/spec/v1
2
+ oid sha256:8201b91357aac77529bab468b8e17607764f5c92705e4d93a0ccfb6b59f4b90f
3
+ size 15984
checkpoint-100/rng_state_1.pth ADDED
@@ -0,0 +1,3 @@
 
 
 
 
1
+ version https://git-lfs.github.com/spec/v1
2
+ oid sha256:8e10ecefe0414af47758ce2df442cc1a4bd90c62d172740588a1e4721dccce57
3
+ size 15984
checkpoint-100/rng_state_2.pth ADDED
@@ -0,0 +1,3 @@
 
 
 
 
1
+ version https://git-lfs.github.com/spec/v1
2
+ oid sha256:f3d6f268d9e0911516f31bd644f608b9e9f1af47231ae13cf78f4495447a0f88
3
+ size 15984
checkpoint-100/rng_state_3.pth ADDED
@@ -0,0 +1,3 @@
 
 
 
 
1
+ version https://git-lfs.github.com/spec/v1
2
+ oid sha256:55f55de3df61463fabae4461ddab493e2b337d696e7c75f4f160e358ee6c2230
3
+ size 15984
checkpoint-100/rng_state_4.pth ADDED
@@ -0,0 +1,3 @@
 
 
 
 
1
+ version https://git-lfs.github.com/spec/v1
2
+ oid sha256:3b48e262494a5827cd6008605e549a6977d9e4be42e90235aee4e29b57ad0b48
3
+ size 15984
checkpoint-100/rng_state_5.pth ADDED
@@ -0,0 +1,3 @@
 
 
 
 
1
+ version https://git-lfs.github.com/spec/v1
2
+ oid sha256:ab1dc970cc4773115110638482b52d63db0151aa09729fc15c0063d58c7d4760
3
+ size 15984
checkpoint-100/rng_state_6.pth ADDED
@@ -0,0 +1,3 @@
 
 
 
 
1
+ version https://git-lfs.github.com/spec/v1
2
+ oid sha256:0aff83d443730569c3a2641b8b1c05c005b3690d05f093e81bb3fc7bb9096d6a
3
+ size 15984
checkpoint-100/rng_state_7.pth ADDED
@@ -0,0 +1,3 @@
 
 
 
 
1
+ version https://git-lfs.github.com/spec/v1
2
+ oid sha256:634311fc2e3bdfabf26cbb8ad12d7b1e83f2d3990e6a9574a5f2c580fcaee86f
3
+ size 15984
checkpoint-100/scheduler.pt ADDED
@@ -0,0 +1,3 @@
 
 
 
 
1
+ version https://git-lfs.github.com/spec/v1
2
+ oid sha256:67dd3e2a4bcfc946c6a325fbcc9dbc410cac1229fc3dcbf329bdb1ba8ac4618d
3
+ size 1064
checkpoint-100/special_tokens_map.json ADDED
@@ -0,0 +1,24 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ {
2
+ "bos_token": {
3
+ "content": "<s>",
4
+ "lstrip": false,
5
+ "normalized": false,
6
+ "rstrip": false,
7
+ "single_word": false
8
+ },
9
+ "eos_token": {
10
+ "content": "</s>",
11
+ "lstrip": false,
12
+ "normalized": false,
13
+ "rstrip": false,
14
+ "single_word": false
15
+ },
16
+ "pad_token": "<unk>",
17
+ "unk_token": {
18
+ "content": "<unk>",
19
+ "lstrip": false,
20
+ "normalized": false,
21
+ "rstrip": false,
22
+ "single_word": false
23
+ }
24
+ }
checkpoint-100/tokenizer.model ADDED
@@ -0,0 +1,3 @@
 
 
 
 
1
+ version https://git-lfs.github.com/spec/v1
2
+ oid sha256:9e556afd44213b6bd1be2b850ebbbd98f5481437a8021afaf58ee7fb1818d347
3
+ size 499723
checkpoint-100/tokenizer_config.json ADDED
@@ -0,0 +1,43 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ {
2
+ "add_bos_token": true,
3
+ "add_eos_token": false,
4
+ "add_prefix_space": true,
5
+ "added_tokens_decoder": {
6
+ "0": {
7
+ "content": "<unk>",
8
+ "lstrip": false,
9
+ "normalized": false,
10
+ "rstrip": false,
11
+ "single_word": false,
12
+ "special": true
13
+ },
14
+ "1": {
15
+ "content": "<s>",
16
+ "lstrip": false,
17
+ "normalized": false,
18
+ "rstrip": false,
19
+ "single_word": false,
20
+ "special": true
21
+ },
22
+ "2": {
23
+ "content": "</s>",
24
+ "lstrip": false,
25
+ "normalized": false,
26
+ "rstrip": false,
27
+ "single_word": false,
28
+ "special": true
29
+ }
30
+ },
31
+ "bos_token": "<s>",
32
+ "clean_up_tokenization_spaces": false,
33
+ "eos_token": "</s>",
34
+ "legacy": false,
35
+ "model_max_length": 2048,
36
+ "pad_token": "<unk>",
37
+ "padding_side": "right",
38
+ "sp_model_kwargs": {},
39
+ "spaces_between_special_tokens": false,
40
+ "tokenizer_class": "LlamaTokenizer",
41
+ "unk_token": "<unk>",
42
+ "use_default_system_prompt": false
43
+ }
checkpoint-100/trainer_state.json ADDED
@@ -0,0 +1,733 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ {
2
+ "best_metric": null,
3
+ "best_model_checkpoint": null,
4
+ "epoch": 1.3333333333333333,
5
+ "eval_steps": 500,
6
+ "global_step": 100,
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.013333333333333334,
13
+ "grad_norm": 1.0028682947158813,
14
+ "learning_rate": 2.2222222222222223e-05,
15
+ "loss": 1.43,
16
+ "step": 1
17
+ },
18
+ {
19
+ "epoch": 0.02666666666666667,
20
+ "grad_norm": 1.6397583484649658,
21
+ "learning_rate": 4.4444444444444447e-05,
22
+ "loss": 1.5374,
23
+ "step": 2
24
+ },
25
+ {
26
+ "epoch": 0.04,
27
+ "grad_norm": 1.2198785543441772,
28
+ "learning_rate": 6.666666666666667e-05,
29
+ "loss": 1.5106,
30
+ "step": 3
31
+ },
32
+ {
33
+ "epoch": 0.05333333333333334,
34
+ "grad_norm": 0.8468486070632935,
35
+ "learning_rate": 8.888888888888889e-05,
36
+ "loss": 1.447,
37
+ "step": 4
38
+ },
39
+ {
40
+ "epoch": 0.06666666666666667,
41
+ "grad_norm": 0.9268608689308167,
42
+ "learning_rate": 0.00011111111111111112,
43
+ "loss": 1.4743,
44
+ "step": 5
45
+ },
46
+ {
47
+ "epoch": 0.08,
48
+ "grad_norm": 1.0168085098266602,
49
+ "learning_rate": 0.00013333333333333334,
50
+ "loss": 1.3245,
51
+ "step": 6
52
+ },
53
+ {
54
+ "epoch": 0.09333333333333334,
55
+ "grad_norm": 0.6773934960365295,
56
+ "learning_rate": 0.00015555555555555556,
57
+ "loss": 1.3738,
58
+ "step": 7
59
+ },
60
+ {
61
+ "epoch": 0.10666666666666667,
62
+ "grad_norm": 0.6985631585121155,
63
+ "learning_rate": 0.00017777777777777779,
64
+ "loss": 1.3951,
65
+ "step": 8
66
+ },
67
+ {
68
+ "epoch": 0.12,
69
+ "grad_norm": 1.0221399068832397,
70
+ "learning_rate": 0.0002,
71
+ "loss": 1.3246,
72
+ "step": 9
73
+ },
74
+ {
75
+ "epoch": 0.13333333333333333,
76
+ "grad_norm": 0.6119747161865234,
77
+ "learning_rate": 0.00019999417253661235,
78
+ "loss": 1.2951,
79
+ "step": 10
80
+ },
81
+ {
82
+ "epoch": 0.14666666666666667,
83
+ "grad_norm": 0.6660990118980408,
84
+ "learning_rate": 0.00019997669082563597,
85
+ "loss": 1.2529,
86
+ "step": 11
87
+ },
88
+ {
89
+ "epoch": 0.16,
90
+ "grad_norm": 0.5874819755554199,
91
+ "learning_rate": 0.00019994755690455152,
92
+ "loss": 1.2252,
93
+ "step": 12
94
+ },
95
+ {
96
+ "epoch": 0.17333333333333334,
97
+ "grad_norm": 0.4818006157875061,
98
+ "learning_rate": 0.00019990677416889608,
99
+ "loss": 1.1708,
100
+ "step": 13
101
+ },
102
+ {
103
+ "epoch": 0.18666666666666668,
104
+ "grad_norm": 0.652045488357544,
105
+ "learning_rate": 0.0001998543473718677,
106
+ "loss": 0.9865,
107
+ "step": 14
108
+ },
109
+ {
110
+ "epoch": 0.2,
111
+ "grad_norm": 0.5517733693122864,
112
+ "learning_rate": 0.00019979028262377118,
113
+ "loss": 1.181,
114
+ "step": 15
115
+ },
116
+ {
117
+ "epoch": 0.21333333333333335,
118
+ "grad_norm": 0.47720542550086975,
119
+ "learning_rate": 0.00019971458739130598,
120
+ "loss": 1.0633,
121
+ "step": 16
122
+ },
123
+ {
124
+ "epoch": 0.22666666666666666,
125
+ "grad_norm": 0.7947096228599548,
126
+ "learning_rate": 0.000199627270496696,
127
+ "loss": 1.1458,
128
+ "step": 17
129
+ },
130
+ {
131
+ "epoch": 0.24,
132
+ "grad_norm": 0.5301257371902466,
133
+ "learning_rate": 0.0001995283421166614,
134
+ "loss": 1.2245,
135
+ "step": 18
136
+ },
137
+ {
138
+ "epoch": 0.25333333333333335,
139
+ "grad_norm": 0.9473271369934082,
140
+ "learning_rate": 0.00019941781378123244,
141
+ "loss": 1.0859,
142
+ "step": 19
143
+ },
144
+ {
145
+ "epoch": 0.26666666666666666,
146
+ "grad_norm": 1.1834161281585693,
147
+ "learning_rate": 0.00019929569837240564,
148
+ "loss": 1.1808,
149
+ "step": 20
150
+ },
151
+ {
152
+ "epoch": 0.28,
153
+ "grad_norm": 0.6784033179283142,
154
+ "learning_rate": 0.00019916201012264254,
155
+ "loss": 1.202,
156
+ "step": 21
157
+ },
158
+ {
159
+ "epoch": 0.29333333333333333,
160
+ "grad_norm": 0.7274785041809082,
161
+ "learning_rate": 0.00019901676461321068,
162
+ "loss": 1.2242,
163
+ "step": 22
164
+ },
165
+ {
166
+ "epoch": 0.30666666666666664,
167
+ "grad_norm": 0.7520783543586731,
168
+ "learning_rate": 0.00019885997877236788,
169
+ "loss": 1.173,
170
+ "step": 23
171
+ },
172
+ {
173
+ "epoch": 0.32,
174
+ "grad_norm": 0.8218541145324707,
175
+ "learning_rate": 0.00019869167087338907,
176
+ "loss": 1.0723,
177
+ "step": 24
178
+ },
179
+ {
180
+ "epoch": 0.3333333333333333,
181
+ "grad_norm": 0.6361420154571533,
182
+ "learning_rate": 0.00019851186053243666,
183
+ "loss": 1.1607,
184
+ "step": 25
185
+ },
186
+ {
187
+ "epoch": 0.3466666666666667,
188
+ "grad_norm": 0.6401374936103821,
189
+ "learning_rate": 0.00019832056870627417,
190
+ "loss": 1.1398,
191
+ "step": 26
192
+ },
193
+ {
194
+ "epoch": 0.36,
195
+ "grad_norm": 1.0995603799819946,
196
+ "learning_rate": 0.0001981178176898239,
197
+ "loss": 0.9475,
198
+ "step": 27
199
+ },
200
+ {
201
+ "epoch": 0.37333333333333335,
202
+ "grad_norm": 0.5122275948524475,
203
+ "learning_rate": 0.00019790363111356837,
204
+ "loss": 1.0125,
205
+ "step": 28
206
+ },
207
+ {
208
+ "epoch": 0.38666666666666666,
209
+ "grad_norm": 0.9316695332527161,
210
+ "learning_rate": 0.00019767803394079615,
211
+ "loss": 1.0554,
212
+ "step": 29
213
+ },
214
+ {
215
+ "epoch": 0.4,
216
+ "grad_norm": 0.6831843256950378,
217
+ "learning_rate": 0.00019744105246469263,
218
+ "loss": 1.027,
219
+ "step": 30
220
+ },
221
+ {
222
+ "epoch": 0.41333333333333333,
223
+ "grad_norm": 0.5529218912124634,
224
+ "learning_rate": 0.0001971927143052752,
225
+ "loss": 1.0218,
226
+ "step": 31
227
+ },
228
+ {
229
+ "epoch": 0.4266666666666667,
230
+ "grad_norm": 0.7164443135261536,
231
+ "learning_rate": 0.00019693304840617457,
232
+ "loss": 1.0901,
233
+ "step": 32
234
+ },
235
+ {
236
+ "epoch": 0.44,
237
+ "grad_norm": 0.7430665493011475,
238
+ "learning_rate": 0.00019666208503126112,
239
+ "loss": 1.125,
240
+ "step": 33
241
+ },
242
+ {
243
+ "epoch": 0.4533333333333333,
244
+ "grad_norm": 0.7198122143745422,
245
+ "learning_rate": 0.00019637985576111778,
246
+ "loss": 0.9926,
247
+ "step": 34
248
+ },
249
+ {
250
+ "epoch": 0.4666666666666667,
251
+ "grad_norm": 0.6613873839378357,
252
+ "learning_rate": 0.0001960863934893594,
253
+ "loss": 1.1925,
254
+ "step": 35
255
+ },
256
+ {
257
+ "epoch": 0.48,
258
+ "grad_norm": 1.2440484762191772,
259
+ "learning_rate": 0.00019578173241879872,
260
+ "loss": 0.8948,
261
+ "step": 36
262
+ },
263
+ {
264
+ "epoch": 0.49333333333333335,
265
+ "grad_norm": 0.6995570659637451,
266
+ "learning_rate": 0.00019546590805746052,
267
+ "loss": 0.9525,
268
+ "step": 37
269
+ },
270
+ {
271
+ "epoch": 0.5066666666666667,
272
+ "grad_norm": 0.6873968243598938,
273
+ "learning_rate": 0.00019513895721444286,
274
+ "loss": 0.9966,
275
+ "step": 38
276
+ },
277
+ {
278
+ "epoch": 0.52,
279
+ "grad_norm": 0.5394595861434937,
280
+ "learning_rate": 0.00019480091799562704,
281
+ "loss": 1.0787,
282
+ "step": 39
283
+ },
284
+ {
285
+ "epoch": 0.5333333333333333,
286
+ "grad_norm": 0.9196312427520752,
287
+ "learning_rate": 0.00019445182979923654,
288
+ "loss": 1.0559,
289
+ "step": 40
290
+ },
291
+ {
292
+ "epoch": 0.5466666666666666,
293
+ "grad_norm": 2.5954103469848633,
294
+ "learning_rate": 0.000194091733311245,
295
+ "loss": 0.9638,
296
+ "step": 41
297
+ },
298
+ {
299
+ "epoch": 0.56,
300
+ "grad_norm": 1.244681715965271,
301
+ "learning_rate": 0.00019372067050063438,
302
+ "loss": 0.9325,
303
+ "step": 42
304
+ },
305
+ {
306
+ "epoch": 0.5733333333333334,
307
+ "grad_norm": 0.613715410232544,
308
+ "learning_rate": 0.0001933386846145036,
309
+ "loss": 0.9428,
310
+ "step": 43
311
+ },
312
+ {
313
+ "epoch": 0.5866666666666667,
314
+ "grad_norm": 0.9604235291481018,
315
+ "learning_rate": 0.00019294582017302797,
316
+ "loss": 0.9486,
317
+ "step": 44
318
+ },
319
+ {
320
+ "epoch": 0.6,
321
+ "grad_norm": 0.7591239809989929,
322
+ "learning_rate": 0.00019254212296427044,
323
+ "loss": 1.0955,
324
+ "step": 45
325
+ },
326
+ {
327
+ "epoch": 0.6133333333333333,
328
+ "grad_norm": 0.5218423008918762,
329
+ "learning_rate": 0.0001921276400388451,
330
+ "loss": 1.0368,
331
+ "step": 46
332
+ },
333
+ {
334
+ "epoch": 0.6266666666666667,
335
+ "grad_norm": 0.5670755505561829,
336
+ "learning_rate": 0.00019170241970443343,
337
+ "loss": 0.9854,
338
+ "step": 47
339
+ },
340
+ {
341
+ "epoch": 0.64,
342
+ "grad_norm": 0.8089922070503235,
343
+ "learning_rate": 0.00019126651152015403,
344
+ "loss": 1.0396,
345
+ "step": 48
346
+ },
347
+ {
348
+ "epoch": 0.6533333333333333,
349
+ "grad_norm": 0.6459051966667175,
350
+ "learning_rate": 0.00019081996629078657,
351
+ "loss": 1.0156,
352
+ "step": 49
353
+ },
354
+ {
355
+ "epoch": 0.6666666666666666,
356
+ "grad_norm": 1.1918997764587402,
357
+ "learning_rate": 0.00019036283606085053,
358
+ "loss": 1.1542,
359
+ "step": 50
360
+ },
361
+ {
362
+ "epoch": 0.68,
363
+ "grad_norm": 0.6263722777366638,
364
+ "learning_rate": 0.00018989517410853955,
365
+ "loss": 1.1471,
366
+ "step": 51
367
+ },
368
+ {
369
+ "epoch": 0.6933333333333334,
370
+ "grad_norm": 0.534618616104126,
371
+ "learning_rate": 0.00018941703493951164,
372
+ "loss": 0.9055,
373
+ "step": 52
374
+ },
375
+ {
376
+ "epoch": 0.7066666666666667,
377
+ "grad_norm": 0.529036819934845,
378
+ "learning_rate": 0.00018892847428053693,
379
+ "loss": 0.9896,
380
+ "step": 53
381
+ },
382
+ {
383
+ "epoch": 0.72,
384
+ "grad_norm": 0.716572105884552,
385
+ "learning_rate": 0.00018842954907300236,
386
+ "loss": 1.0204,
387
+ "step": 54
388
+ },
389
+ {
390
+ "epoch": 0.7333333333333333,
391
+ "grad_norm": 0.832662045955658,
392
+ "learning_rate": 0.00018792031746627563,
393
+ "loss": 1.0263,
394
+ "step": 55
395
+ },
396
+ {
397
+ "epoch": 0.7466666666666667,
398
+ "grad_norm": 0.5659884810447693,
399
+ "learning_rate": 0.0001874008388109276,
400
+ "loss": 1.0529,
401
+ "step": 56
402
+ },
403
+ {
404
+ "epoch": 0.76,
405
+ "grad_norm": 0.4971260726451874,
406
+ "learning_rate": 0.00018687117365181512,
407
+ "loss": 1.0109,
408
+ "step": 57
409
+ },
410
+ {
411
+ "epoch": 0.7733333333333333,
412
+ "grad_norm": 0.5997689962387085,
413
+ "learning_rate": 0.00018633138372102468,
414
+ "loss": 1.0363,
415
+ "step": 58
416
+ },
417
+ {
418
+ "epoch": 0.7866666666666666,
419
+ "grad_norm": 0.42450904846191406,
420
+ "learning_rate": 0.00018578153193067745,
421
+ "loss": 1.0156,
422
+ "step": 59
423
+ },
424
+ {
425
+ "epoch": 0.8,
426
+ "grad_norm": 1.0025880336761475,
427
+ "learning_rate": 0.00018522168236559695,
428
+ "loss": 0.96,
429
+ "step": 60
430
+ },
431
+ {
432
+ "epoch": 0.8133333333333334,
433
+ "grad_norm": 0.47225672006607056,
434
+ "learning_rate": 0.00018465190027584005,
435
+ "loss": 1.0402,
436
+ "step": 61
437
+ },
438
+ {
439
+ "epoch": 0.8266666666666667,
440
+ "grad_norm": 0.6419042348861694,
441
+ "learning_rate": 0.00018407225206909208,
442
+ "loss": 0.9727,
443
+ "step": 62
444
+ },
445
+ {
446
+ "epoch": 0.84,
447
+ "grad_norm": 0.9594618082046509,
448
+ "learning_rate": 0.00018348280530292713,
449
+ "loss": 0.986,
450
+ "step": 63
451
+ },
452
+ {
453
+ "epoch": 0.8533333333333334,
454
+ "grad_norm": 0.5415605902671814,
455
+ "learning_rate": 0.00018288362867693414,
456
+ "loss": 1.019,
457
+ "step": 64
458
+ },
459
+ {
460
+ "epoch": 0.8666666666666667,
461
+ "grad_norm": 0.9662086367607117,
462
+ "learning_rate": 0.00018227479202471015,
463
+ "loss": 0.9531,
464
+ "step": 65
465
+ },
466
+ {
467
+ "epoch": 0.88,
468
+ "grad_norm": 0.7523136734962463,
469
+ "learning_rate": 0.0001816563663057211,
470
+ "loss": 1.0383,
471
+ "step": 66
472
+ },
473
+ {
474
+ "epoch": 0.8933333333333333,
475
+ "grad_norm": 0.7249945998191833,
476
+ "learning_rate": 0.00018102842359703176,
477
+ "loss": 1.1131,
478
+ "step": 67
479
+ },
480
+ {
481
+ "epoch": 0.9066666666666666,
482
+ "grad_norm": 0.4781404435634613,
483
+ "learning_rate": 0.000180391037084905,
484
+ "loss": 0.9701,
485
+ "step": 68
486
+ },
487
+ {
488
+ "epoch": 0.92,
489
+ "grad_norm": 0.5435504913330078,
490
+ "learning_rate": 0.00017974428105627208,
491
+ "loss": 1.2701,
492
+ "step": 69
493
+ },
494
+ {
495
+ "epoch": 0.9333333333333333,
496
+ "grad_norm": 0.48021838068962097,
497
+ "learning_rate": 0.00017908823089007457,
498
+ "loss": 0.9212,
499
+ "step": 70
500
+ },
501
+ {
502
+ "epoch": 0.9466666666666667,
503
+ "grad_norm": 0.7063950300216675,
504
+ "learning_rate": 0.00017842296304847893,
505
+ "loss": 1.0076,
506
+ "step": 71
507
+ },
508
+ {
509
+ "epoch": 0.96,
510
+ "grad_norm": 0.5694530606269836,
511
+ "learning_rate": 0.00017774855506796496,
512
+ "loss": 1.0417,
513
+ "step": 72
514
+ },
515
+ {
516
+ "epoch": 0.9733333333333334,
517
+ "grad_norm": 0.6120775938034058,
518
+ "learning_rate": 0.00017706508555028893,
519
+ "loss": 1.0501,
520
+ "step": 73
521
+ },
522
+ {
523
+ "epoch": 0.9866666666666667,
524
+ "grad_norm": 0.5728889107704163,
525
+ "learning_rate": 0.0001763726341533227,
526
+ "loss": 1.0024,
527
+ "step": 74
528
+ },
529
+ {
530
+ "epoch": 1.0,
531
+ "grad_norm": 0.8452621102333069,
532
+ "learning_rate": 0.00017567128158176953,
533
+ "loss": 1.0966,
534
+ "step": 75
535
+ },
536
+ {
537
+ "epoch": 1.0133333333333334,
538
+ "grad_norm": 0.5769606828689575,
539
+ "learning_rate": 0.0001749611095777581,
540
+ "loss": 0.8877,
541
+ "step": 76
542
+ },
543
+ {
544
+ "epoch": 1.0266666666666666,
545
+ "grad_norm": 0.9046480059623718,
546
+ "learning_rate": 0.00017424220091131535,
547
+ "loss": 0.752,
548
+ "step": 77
549
+ },
550
+ {
551
+ "epoch": 1.04,
552
+ "grad_norm": 0.4488053023815155,
553
+ "learning_rate": 0.00017351463937072004,
554
+ "loss": 0.7588,
555
+ "step": 78
556
+ },
557
+ {
558
+ "epoch": 1.0533333333333332,
559
+ "grad_norm": 0.41479629278182983,
560
+ "learning_rate": 0.00017277850975273696,
561
+ "loss": 0.779,
562
+ "step": 79
563
+ },
564
+ {
565
+ "epoch": 1.0666666666666667,
566
+ "grad_norm": 0.7192550301551819,
567
+ "learning_rate": 0.000172033897852734,
568
+ "loss": 0.7809,
569
+ "step": 80
570
+ },
571
+ {
572
+ "epoch": 1.08,
573
+ "grad_norm": 0.7553783655166626,
574
+ "learning_rate": 0.00017128089045468294,
575
+ "loss": 0.7421,
576
+ "step": 81
577
+ },
578
+ {
579
+ "epoch": 1.0933333333333333,
580
+ "grad_norm": 0.5650737881660461,
581
+ "learning_rate": 0.0001705195753210446,
582
+ "loss": 0.7044,
583
+ "step": 82
584
+ },
585
+ {
586
+ "epoch": 1.1066666666666667,
587
+ "grad_norm": 0.6692880988121033,
588
+ "learning_rate": 0.0001697500411825403,
589
+ "loss": 0.8415,
590
+ "step": 83
591
+ },
592
+ {
593
+ "epoch": 1.12,
594
+ "grad_norm": 0.6710836291313171,
595
+ "learning_rate": 0.00016897237772781044,
596
+ "loss": 0.7247,
597
+ "step": 84
598
+ },
599
+ {
600
+ "epoch": 1.1333333333333333,
601
+ "grad_norm": 0.5887194275856018,
602
+ "learning_rate": 0.0001681866755929612,
603
+ "loss": 0.7947,
604
+ "step": 85
605
+ },
606
+ {
607
+ "epoch": 1.1466666666666667,
608
+ "grad_norm": 0.5538906455039978,
609
+ "learning_rate": 0.00016739302635100108,
610
+ "loss": 0.7337,
611
+ "step": 86
612
+ },
613
+ {
614
+ "epoch": 1.16,
615
+ "grad_norm": 0.6018480062484741,
616
+ "learning_rate": 0.00016659152250116812,
617
+ "loss": 0.6801,
618
+ "step": 87
619
+ },
620
+ {
621
+ "epoch": 1.1733333333333333,
622
+ "grad_norm": 0.548251748085022,
623
+ "learning_rate": 0.00016578225745814907,
624
+ "loss": 0.6898,
625
+ "step": 88
626
+ },
627
+ {
628
+ "epoch": 1.1866666666666668,
629
+ "grad_norm": 0.49416568875312805,
630
+ "learning_rate": 0.00016496532554119214,
631
+ "loss": 0.719,
632
+ "step": 89
633
+ },
634
+ {
635
+ "epoch": 1.2,
636
+ "grad_norm": 0.6101306676864624,
637
+ "learning_rate": 0.000164140821963114,
638
+ "loss": 0.7917,
639
+ "step": 90
640
+ },
641
+ {
642
+ "epoch": 1.2133333333333334,
643
+ "grad_norm": 0.588020920753479,
644
+ "learning_rate": 0.000163308842819203,
645
+ "loss": 0.8035,
646
+ "step": 91
647
+ },
648
+ {
649
+ "epoch": 1.2266666666666666,
650
+ "grad_norm": 0.5376534461975098,
651
+ "learning_rate": 0.00016246948507601914,
652
+ "loss": 0.7816,
653
+ "step": 92
654
+ },
655
+ {
656
+ "epoch": 1.24,
657
+ "grad_norm": 0.549625813961029,
658
+ "learning_rate": 0.00016162284656009274,
659
+ "loss": 0.7245,
660
+ "step": 93
661
+ },
662
+ {
663
+ "epoch": 1.2533333333333334,
664
+ "grad_norm": 0.6054933667182922,
665
+ "learning_rate": 0.0001607690259465229,
666
+ "loss": 0.7484,
667
+ "step": 94
668
+ },
669
+ {
670
+ "epoch": 1.2666666666666666,
671
+ "grad_norm": 0.5613316297531128,
672
+ "learning_rate": 0.00015990812274747692,
673
+ "loss": 0.7369,
674
+ "step": 95
675
+ },
676
+ {
677
+ "epoch": 1.28,
678
+ "grad_norm": 0.5984250903129578,
679
+ "learning_rate": 0.00015904023730059228,
680
+ "loss": 0.891,
681
+ "step": 96
682
+ },
683
+ {
684
+ "epoch": 1.2933333333333334,
685
+ "grad_norm": 0.6490495204925537,
686
+ "learning_rate": 0.00015816547075728226,
687
+ "loss": 0.775,
688
+ "step": 97
689
+ },
690
+ {
691
+ "epoch": 1.3066666666666666,
692
+ "grad_norm": 0.6675053834915161,
693
+ "learning_rate": 0.000157283925070947,
694
+ "loss": 0.7565,
695
+ "step": 98
696
+ },
697
+ {
698
+ "epoch": 1.32,
699
+ "grad_norm": 0.5397291779518127,
700
+ "learning_rate": 0.00015639570298509064,
701
+ "loss": 0.6685,
702
+ "step": 99
703
+ },
704
+ {
705
+ "epoch": 1.3333333333333333,
706
+ "grad_norm": 0.5830179452896118,
707
+ "learning_rate": 0.000155500908021347,
708
+ "loss": 0.8132,
709
+ "step": 100
710
+ }
711
+ ],
712
+ "logging_steps": 1.0,
713
+ "max_steps": 300,
714
+ "num_input_tokens_seen": 0,
715
+ "num_train_epochs": 4,
716
+ "save_steps": 50,
717
+ "stateful_callbacks": {
718
+ "TrainerControl": {
719
+ "args": {
720
+ "should_epoch_stop": false,
721
+ "should_evaluate": false,
722
+ "should_log": false,
723
+ "should_save": true,
724
+ "should_training_stop": false
725
+ },
726
+ "attributes": {}
727
+ }
728
+ },
729
+ "total_flos": 2.904617129292595e+16,
730
+ "train_batch_size": 2,
731
+ "trial_name": null,
732
+ "trial_params": null
733
+ }
checkpoint-100/training_args.bin ADDED
@@ -0,0 +1,3 @@
 
 
 
 
1
+ version https://git-lfs.github.com/spec/v1
2
+ oid sha256:54335a849ae8d377cae5839a736f4196087c7894666ca9b9f10dd899e0ada95c
3
+ size 6904
checkpoint-100/zero_to_fp32.py ADDED
@@ -0,0 +1,760 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ #!/usr/bin/env python
2
+
3
+ # Copyright (c) Microsoft Corporation.
4
+ # SPDX-License-Identifier: Apache-2.0
5
+
6
+ # DeepSpeed Team
7
+
8
+ # This script extracts fp32 consolidated weights from a zero 1, 2 and 3 DeepSpeed checkpoints. It gets
9
+ # copied into the top level checkpoint dir, so the user can easily do the conversion at any point in
10
+ # the future. Once extracted, the weights don't require DeepSpeed and can be used in any
11
+ # application.
12
+ #
13
+ # example:
14
+ # python zero_to_fp32.py . output_dir/
15
+ # or
16
+ # python zero_to_fp32.py . output_dir/ --safe_serialization
17
+
18
+ import argparse
19
+ import torch
20
+ import glob
21
+ import math
22
+ import os
23
+ import re
24
+ import gc
25
+ import json
26
+ import numpy as np
27
+ from tqdm import tqdm
28
+ from collections import OrderedDict
29
+ from dataclasses import dataclass
30
+
31
+ # while this script doesn't use deepspeed to recover data, since the checkpoints are pickled with
32
+ # DeepSpeed data structures it has to be available in the current python environment.
33
+ from deepspeed.utils import logger
34
+ from deepspeed.checkpoint.constants import (DS_VERSION, OPTIMIZER_STATE_DICT, SINGLE_PARTITION_OF_FP32_GROUPS,
35
+ FP32_FLAT_GROUPS, ZERO_STAGE, PARTITION_COUNT, PARAM_SHAPES, BUFFER_NAMES,
36
+ FROZEN_PARAM_SHAPES, FROZEN_PARAM_FRAGMENTS)
37
+
38
+
39
+ @dataclass
40
+ class zero_model_state:
41
+ buffers: dict()
42
+ param_shapes: dict()
43
+ shared_params: list
44
+ ds_version: int
45
+ frozen_param_shapes: dict()
46
+ frozen_param_fragments: dict()
47
+
48
+
49
+ debug = 0
50
+
51
+ # load to cpu
52
+ device = torch.device('cpu')
53
+
54
+
55
+ def atoi(text):
56
+ return int(text) if text.isdigit() else text
57
+
58
+
59
+ def natural_keys(text):
60
+ '''
61
+ alist.sort(key=natural_keys) sorts in human order
62
+ http://nedbatchelder.com/blog/200712/human_sorting.html
63
+ (See Toothy's implementation in the comments)
64
+ '''
65
+ return [atoi(c) for c in re.split(r'(\d+)', text)]
66
+
67
+
68
+ def get_model_state_file(checkpoint_dir, zero_stage):
69
+ if not os.path.isdir(checkpoint_dir):
70
+ raise FileNotFoundError(f"Directory '{checkpoint_dir}' doesn't exist")
71
+
72
+ # there should be only one file
73
+ if zero_stage <= 2:
74
+ file = os.path.join(checkpoint_dir, "mp_rank_00_model_states.pt")
75
+ elif zero_stage == 3:
76
+ file = os.path.join(checkpoint_dir, "zero_pp_rank_0_mp_rank_00_model_states.pt")
77
+
78
+ if not os.path.exists(file):
79
+ raise FileNotFoundError(f"can't find model states file at '{file}'")
80
+
81
+ return file
82
+
83
+
84
+ def get_checkpoint_files(checkpoint_dir, glob_pattern):
85
+ # XXX: need to test that this simple glob rule works for multi-node setup too
86
+ ckpt_files = sorted(glob.glob(os.path.join(checkpoint_dir, glob_pattern)), key=natural_keys)
87
+
88
+ if len(ckpt_files) == 0:
89
+ raise FileNotFoundError(f"can't find {glob_pattern} files in directory '{checkpoint_dir}'")
90
+
91
+ return ckpt_files
92
+
93
+
94
+ def get_optim_files(checkpoint_dir):
95
+ return get_checkpoint_files(checkpoint_dir, "*_optim_states.pt")
96
+
97
+
98
+ def get_model_state_files(checkpoint_dir):
99
+ return get_checkpoint_files(checkpoint_dir, "*_model_states.pt")
100
+
101
+
102
+ def parse_model_states(files):
103
+ zero_model_states = []
104
+ for file in files:
105
+ state_dict = torch.load(file, map_location=device, weights_only=False)
106
+
107
+ if BUFFER_NAMES not in state_dict:
108
+ raise ValueError(f"{file} is not a model state checkpoint")
109
+ buffer_names = state_dict[BUFFER_NAMES]
110
+ if debug:
111
+ print("Found buffers:", buffer_names)
112
+
113
+ # recover just the buffers while restoring them to fp32 if they were saved in fp16
114
+ buffers = {k: v.float() for k, v in state_dict["module"].items() if k in buffer_names}
115
+ param_shapes = state_dict[PARAM_SHAPES]
116
+
117
+ # collect parameters that are included in param_shapes
118
+ param_names = []
119
+ for s in param_shapes:
120
+ for name in s.keys():
121
+ param_names.append(name)
122
+
123
+ # update with frozen parameters
124
+ frozen_param_shapes = state_dict.get(FROZEN_PARAM_SHAPES, None)
125
+ if frozen_param_shapes is not None:
126
+ if debug:
127
+ print(f"Found frozen_param_shapes: {frozen_param_shapes}")
128
+ param_names += list(frozen_param_shapes.keys())
129
+
130
+ # handle shared params
131
+ shared_params = [[k, v] for k, v in state_dict["shared_params"].items()]
132
+
133
+ ds_version = state_dict.get(DS_VERSION, None)
134
+
135
+ frozen_param_fragments = state_dict.get(FROZEN_PARAM_FRAGMENTS, None)
136
+
137
+ z_model_state = zero_model_state(buffers=buffers,
138
+ param_shapes=param_shapes,
139
+ shared_params=shared_params,
140
+ ds_version=ds_version,
141
+ frozen_param_shapes=frozen_param_shapes,
142
+ frozen_param_fragments=frozen_param_fragments)
143
+ zero_model_states.append(z_model_state)
144
+
145
+ return zero_model_states
146
+
147
+
148
+ def parse_optim_states(files, ds_checkpoint_dir):
149
+ total_files = len(files)
150
+ state_dicts = []
151
+ for f in tqdm(files, desc='Loading checkpoint shards'):
152
+ state_dict = torch.load(f, map_location=device, mmap=True, weights_only=False)
153
+ # immediately discard the potentially huge 2 optimizer states as we only care for fp32 master weights
154
+ # and also handle the case where it was already removed by another helper script
155
+ state_dict["optimizer_state_dict"].pop("optimizer_state_dict", None)
156
+ state_dicts.append(state_dict)
157
+
158
+ if ZERO_STAGE not in state_dicts[0][OPTIMIZER_STATE_DICT]:
159
+ raise ValueError(f"{files[0]} is not a zero checkpoint")
160
+ zero_stage = state_dicts[0][OPTIMIZER_STATE_DICT][ZERO_STAGE]
161
+ world_size = state_dicts[0][OPTIMIZER_STATE_DICT][PARTITION_COUNT]
162
+
163
+ # For ZeRO-2 each param group can have different partition_count as data parallelism for expert
164
+ # parameters can be different from data parallelism for non-expert parameters. So we can just
165
+ # use the max of the partition_count to get the dp world_size.
166
+
167
+ if type(world_size) is list:
168
+ world_size = max(world_size)
169
+
170
+ if world_size != total_files:
171
+ raise ValueError(
172
+ f"Expected {world_size} of '*_optim_states.pt' under '{ds_checkpoint_dir}' but found {total_files} files. "
173
+ "Possibly due to an overwrite of an old checkpoint, or a checkpoint didn't get saved by one or more processes."
174
+ )
175
+
176
+ # the groups are named differently in each stage
177
+ if zero_stage <= 2:
178
+ fp32_groups_key = SINGLE_PARTITION_OF_FP32_GROUPS
179
+ elif zero_stage == 3:
180
+ fp32_groups_key = FP32_FLAT_GROUPS
181
+ else:
182
+ raise ValueError(f"unknown zero stage {zero_stage}")
183
+
184
+ fp32_flat_groups = [state_dicts[i][OPTIMIZER_STATE_DICT][fp32_groups_key] for i in range(len(state_dicts))]
185
+ return zero_stage, world_size, fp32_flat_groups
186
+
187
+
188
+ def _get_fp32_state_dict_from_zero_checkpoint(ds_checkpoint_dir, exclude_frozen_parameters):
189
+ """
190
+ Returns fp32 state_dict reconstructed from ds checkpoint
191
+
192
+ Args:
193
+ - ``ds_checkpoint_dir``: path to the deepspeed checkpoint folder (where the optimizer files are)
194
+
195
+ """
196
+ print(f"Processing zero checkpoint '{ds_checkpoint_dir}'")
197
+
198
+ optim_files = get_optim_files(ds_checkpoint_dir)
199
+ zero_stage, world_size, fp32_flat_groups = parse_optim_states(optim_files, ds_checkpoint_dir)
200
+ print(f"Detected checkpoint of type zero stage {zero_stage}, world_size: {world_size}")
201
+
202
+ model_files = get_model_state_files(ds_checkpoint_dir)
203
+
204
+ zero_model_states = parse_model_states(model_files)
205
+ print(f'Parsing checkpoint created by deepspeed=={zero_model_states[0].ds_version}')
206
+
207
+ if zero_stage <= 2:
208
+ return _get_fp32_state_dict_from_zero2_checkpoint(world_size, fp32_flat_groups, zero_model_states,
209
+ exclude_frozen_parameters)
210
+ elif zero_stage == 3:
211
+ return _get_fp32_state_dict_from_zero3_checkpoint(world_size, fp32_flat_groups, zero_model_states,
212
+ exclude_frozen_parameters)
213
+
214
+
215
+ def _zero2_merge_frozen_params(state_dict, zero_model_states):
216
+ if zero_model_states[0].frozen_param_shapes is None or len(zero_model_states[0].frozen_param_shapes) == 0:
217
+ return
218
+
219
+ frozen_param_shapes = zero_model_states[0].frozen_param_shapes
220
+ frozen_param_fragments = zero_model_states[0].frozen_param_fragments
221
+
222
+ if debug:
223
+ num_elem = sum(s.numel() for s in frozen_param_shapes.values())
224
+ print(f'rank 0: {FROZEN_PARAM_SHAPES}.numel = {num_elem}')
225
+
226
+ wanted_params = len(frozen_param_shapes)
227
+ wanted_numel = sum(s.numel() for s in frozen_param_shapes.values())
228
+ avail_numel = sum([p.numel() for p in frozen_param_fragments.values()])
229
+ print(f'Frozen params: Have {avail_numel} numels to process.')
230
+ print(f'Frozen params: Need {wanted_numel} numels in {wanted_params} params')
231
+
232
+ total_params = 0
233
+ total_numel = 0
234
+ for name, shape in frozen_param_shapes.items():
235
+ total_params += 1
236
+ unpartitioned_numel = shape.numel()
237
+ total_numel += unpartitioned_numel
238
+
239
+ state_dict[name] = frozen_param_fragments[name]
240
+
241
+ if debug:
242
+ print(f"{name} full shape: {shape} unpartitioned numel {unpartitioned_numel} ")
243
+
244
+ print(f"Reconstructed Frozen fp32 state dict with {total_params} params {total_numel} elements")
245
+
246
+
247
+ def _has_callable(obj, fn):
248
+ attr = getattr(obj, fn, None)
249
+ return callable(attr)
250
+
251
+
252
+ def _zero2_merge_trainable_params(state_dict, world_size, fp32_flat_groups, zero_model_states):
253
+ param_shapes = zero_model_states[0].param_shapes
254
+
255
+ # Reconstruction protocol:
256
+ #
257
+ # XXX: document this
258
+
259
+ if debug:
260
+ for i in range(world_size):
261
+ for j in range(len(fp32_flat_groups[0])):
262
+ print(f"{FP32_FLAT_GROUPS}[{i}][{j}].shape={fp32_flat_groups[i][j].shape}")
263
+
264
+ # XXX: memory usage doubles here (zero2)
265
+ num_param_groups = len(fp32_flat_groups[0])
266
+ merged_single_partition_of_fp32_groups = []
267
+ for i in range(num_param_groups):
268
+ merged_partitions = [sd[i] for sd in fp32_flat_groups]
269
+ full_single_fp32_vector = torch.cat(merged_partitions, 0)
270
+ merged_single_partition_of_fp32_groups.append(full_single_fp32_vector)
271
+ avail_numel = sum(
272
+ [full_single_fp32_vector.numel() for full_single_fp32_vector in merged_single_partition_of_fp32_groups])
273
+
274
+ if debug:
275
+ wanted_params = sum([len(shapes) for shapes in param_shapes])
276
+ wanted_numel = sum([sum(shape.numel() for shape in shapes.values()) for shapes in param_shapes])
277
+ # not asserting if there is a mismatch due to possible padding
278
+ print(f"Have {avail_numel} numels to process.")
279
+ print(f"Need {wanted_numel} numels in {wanted_params} params.")
280
+
281
+ # params
282
+ # XXX: for huge models that can't fit into the host's RAM we will have to recode this to support
283
+ # out-of-core computing solution
284
+ total_numel = 0
285
+ total_params = 0
286
+ for shapes, full_single_fp32_vector in zip(param_shapes, merged_single_partition_of_fp32_groups):
287
+ offset = 0
288
+ avail_numel = full_single_fp32_vector.numel()
289
+ for name, shape in shapes.items():
290
+
291
+ unpartitioned_numel = shape.numel() if _has_callable(shape, 'numel') else math.prod(shape)
292
+ total_numel += unpartitioned_numel
293
+ total_params += 1
294
+
295
+ if debug:
296
+ print(f"{name} full shape: {shape} unpartitioned numel {unpartitioned_numel} ")
297
+ state_dict[name] = full_single_fp32_vector.narrow(0, offset, unpartitioned_numel).view(shape)
298
+ offset += unpartitioned_numel
299
+
300
+ # Z2 started to align to 2*world_size to improve nccl performance. Therefore both offset and
301
+ # avail_numel can differ by anywhere between 0..2*world_size. Due to two unrelated complex
302
+ # paddings performed in the code it's almost impossible to predict the exact numbers w/o the
303
+ # live optimizer object, so we are checking that the numbers are within the right range
304
+ align_to = 2 * world_size
305
+
306
+ def zero2_align(x):
307
+ return align_to * math.ceil(x / align_to)
308
+
309
+ if debug:
310
+ print(f"original offset={offset}, avail_numel={avail_numel}")
311
+
312
+ offset = zero2_align(offset)
313
+ avail_numel = zero2_align(avail_numel)
314
+
315
+ if debug:
316
+ print(f"aligned offset={offset}, avail_numel={avail_numel}")
317
+
318
+ # Sanity check
319
+ if offset != avail_numel:
320
+ raise ValueError(f"consumed {offset} numels out of {avail_numel} - something is wrong")
321
+
322
+ print(f"Reconstructed fp32 state dict with {total_params} params {total_numel} elements")
323
+
324
+
325
+ def _get_fp32_state_dict_from_zero2_checkpoint(world_size, fp32_flat_groups, zero_model_states,
326
+ exclude_frozen_parameters):
327
+ state_dict = OrderedDict()
328
+
329
+ # buffers
330
+ buffers = zero_model_states[0].buffers
331
+ state_dict.update(buffers)
332
+ if debug:
333
+ print(f"added {len(buffers)} buffers")
334
+
335
+ if not exclude_frozen_parameters:
336
+ _zero2_merge_frozen_params(state_dict, zero_model_states)
337
+
338
+ _zero2_merge_trainable_params(state_dict, world_size, fp32_flat_groups, zero_model_states)
339
+
340
+ # recover shared parameters
341
+ for pair in zero_model_states[0].shared_params:
342
+ if pair[1] in state_dict:
343
+ state_dict[pair[0]] = state_dict[pair[1]]
344
+
345
+ return state_dict
346
+
347
+
348
+ def zero3_partitioned_param_info(unpartitioned_numel, world_size):
349
+ remainder = unpartitioned_numel % world_size
350
+ padding_numel = (world_size - remainder) if remainder else 0
351
+ partitioned_numel = math.ceil(unpartitioned_numel / world_size)
352
+ return partitioned_numel, padding_numel
353
+
354
+
355
+ def _zero3_merge_frozen_params(state_dict, world_size, zero_model_states):
356
+ if zero_model_states[0].frozen_param_shapes is None or len(zero_model_states[0].frozen_param_shapes) == 0:
357
+ return
358
+
359
+ if debug:
360
+ for i in range(world_size):
361
+ num_elem = sum(s.numel() for s in zero_model_states[i].frozen_param_fragments.values())
362
+ print(f'rank {i}: {FROZEN_PARAM_SHAPES}.numel = {num_elem}')
363
+
364
+ frozen_param_shapes = zero_model_states[0].frozen_param_shapes
365
+ wanted_params = len(frozen_param_shapes)
366
+ wanted_numel = sum(s.numel() for s in frozen_param_shapes.values())
367
+ avail_numel = sum([p.numel() for p in zero_model_states[0].frozen_param_fragments.values()]) * world_size
368
+ print(f'Frozen params: Have {avail_numel} numels to process.')
369
+ print(f'Frozen params: Need {wanted_numel} numels in {wanted_params} params')
370
+
371
+ total_params = 0
372
+ total_numel = 0
373
+ for name, shape in zero_model_states[0].frozen_param_shapes.items():
374
+ total_params += 1
375
+ unpartitioned_numel = shape.numel()
376
+ total_numel += unpartitioned_numel
377
+
378
+ param_frags = tuple(model_state.frozen_param_fragments[name] for model_state in zero_model_states)
379
+ state_dict[name] = torch.cat(param_frags, 0).narrow(0, 0, unpartitioned_numel).view(shape)
380
+
381
+ partitioned_numel, partitioned_padding_numel = zero3_partitioned_param_info(unpartitioned_numel, world_size)
382
+
383
+ if debug:
384
+ print(
385
+ f"Frozen params: {total_params} {name} full shape: {shape} partition0 numel={partitioned_numel} partitioned_padding_numel={partitioned_padding_numel}"
386
+ )
387
+
388
+ print(f"Reconstructed Frozen fp32 state dict with {total_params} params {total_numel} elements")
389
+
390
+
391
+ class GatheredTensor:
392
+ """
393
+ A pseudo tensor that collects partitioned weights.
394
+ It is more memory efficient when there are multiple groups.
395
+ """
396
+
397
+ def __init__(self, flat_groups, flat_groups_offset, offset, partitioned_numel, shape):
398
+ self.flat_groups = flat_groups
399
+ self.flat_groups_offset = flat_groups_offset
400
+ self.offset = offset
401
+ self.partitioned_numel = partitioned_numel
402
+ self.shape = shape
403
+ self.dtype = self.flat_groups[0][0].dtype
404
+
405
+ def contiguous(self):
406
+ """
407
+ Merge partitioned weights from flat_groups into a single tensor.
408
+ """
409
+ end_idx = self.offset + self.partitioned_numel
410
+ world_size = len(self.flat_groups)
411
+ pad_flat_param_chunks = []
412
+
413
+ for rank_i in range(world_size):
414
+ # for each rank, we need to collect weights from related group/groups
415
+ flat_groups_at_rank_i = self.flat_groups[rank_i]
416
+ start_group_id = None
417
+ end_group_id = None
418
+ for group_id in range(len(self.flat_groups_offset)):
419
+ if self.flat_groups_offset[group_id] <= self.offset < self.flat_groups_offset[group_id + 1]:
420
+ start_group_id = group_id
421
+ if self.flat_groups_offset[group_id] < end_idx <= self.flat_groups_offset[group_id + 1]:
422
+ end_group_id = group_id
423
+ break
424
+ # collect weights from related group/groups
425
+ for group_id in range(start_group_id, end_group_id + 1):
426
+ flat_tensor = flat_groups_at_rank_i[group_id]
427
+ start_offset = self.offset - self.flat_groups_offset[group_id]
428
+ end_offset = min(end_idx, self.flat_groups_offset[group_id + 1]) - self.flat_groups_offset[group_id]
429
+ pad_flat_param_chunks.append(flat_tensor[start_offset:end_offset])
430
+
431
+ # collect weights from all ranks
432
+ pad_flat_param = torch.cat(pad_flat_param_chunks, dim=0)
433
+ param = pad_flat_param[:self.shape.numel()].view(self.shape).contiguous()
434
+ return param
435
+
436
+
437
+ def _zero3_merge_trainable_params(state_dict, world_size, fp32_flat_groups, zero_model_states):
438
+ param_shapes = zero_model_states[0].param_shapes
439
+ avail_numel = sum([flat_group.numel() for flat_group in fp32_flat_groups[0]]) * world_size
440
+
441
+ # Reconstruction protocol: For zero3 we need to zip the partitions together at boundary of each
442
+ # param, re-consolidating each param, while dealing with padding if any
443
+
444
+ # merge list of dicts, preserving order
445
+ param_shapes = {k: v for d in param_shapes for k, v in d.items()}
446
+
447
+ if debug:
448
+ for i in range(world_size):
449
+ print(f"{FP32_FLAT_GROUPS}[{i}].shape={fp32_flat_groups[i].shape}")
450
+
451
+ wanted_params = len(param_shapes)
452
+ wanted_numel = sum(shape.numel() for shape in param_shapes.values())
453
+ # not asserting if there is a mismatch due to possible padding
454
+ avail_numel = fp32_flat_groups[0].numel() * world_size
455
+ print(f"Trainable params: Have {avail_numel} numels to process.")
456
+ print(f"Trainable params: Need {wanted_numel} numels in {wanted_params} params.")
457
+
458
+ # params
459
+ # XXX: for huge models that can't fit into the host's RAM we will have to recode this to support
460
+ # out-of-core computing solution
461
+ offset = 0
462
+ total_numel = 0
463
+ total_params = 0
464
+ flat_groups_offset = [0] + list(np.cumsum([flat_tensor.numel() for flat_tensor in fp32_flat_groups[0]]))
465
+ for name, shape in tqdm(param_shapes.items(), desc='Gathering sharded weights'):
466
+ unpartitioned_numel = shape.numel()
467
+ total_numel += unpartitioned_numel
468
+ total_params += 1
469
+ partitioned_numel, partitioned_padding_numel = zero3_partitioned_param_info(unpartitioned_numel, world_size)
470
+
471
+ if debug:
472
+ print(
473
+ f"Trainable params: {total_params} {name} full shape: {shape} partition0 numel={partitioned_numel} partitioned_padding_numel={partitioned_padding_numel}"
474
+ )
475
+
476
+ # memory efficient tensor
477
+ tensor = GatheredTensor(fp32_flat_groups, flat_groups_offset, offset, partitioned_numel, shape)
478
+ state_dict[name] = tensor
479
+ offset += partitioned_numel
480
+
481
+ offset *= world_size
482
+
483
+ # Sanity check
484
+ if offset != avail_numel:
485
+ raise ValueError(f"consumed {offset} numels out of {avail_numel} - something is wrong")
486
+
487
+ print(f"Reconstructed Trainable fp32 state dict with {total_params} params {total_numel} elements")
488
+
489
+
490
+ def _get_fp32_state_dict_from_zero3_checkpoint(world_size, fp32_flat_groups, zero_model_states,
491
+ exclude_frozen_parameters):
492
+ state_dict = OrderedDict()
493
+
494
+ # buffers
495
+ buffers = zero_model_states[0].buffers
496
+ state_dict.update(buffers)
497
+ if debug:
498
+ print(f"added {len(buffers)} buffers")
499
+
500
+ if not exclude_frozen_parameters:
501
+ _zero3_merge_frozen_params(state_dict, world_size, zero_model_states)
502
+
503
+ _zero3_merge_trainable_params(state_dict, world_size, fp32_flat_groups, zero_model_states)
504
+
505
+ # recover shared parameters
506
+ for pair in zero_model_states[0].shared_params:
507
+ if pair[1] in state_dict:
508
+ state_dict[pair[0]] = state_dict[pair[1]]
509
+
510
+ return state_dict
511
+
512
+
513
+ def to_torch_tensor(state_dict, return_empty_tensor=False):
514
+ """
515
+ Convert state_dict of GatheredTensor to torch tensor
516
+ """
517
+ torch_state_dict = {}
518
+ converted_tensors = {}
519
+ for name, tensor in state_dict.items():
520
+ tensor_id = id(tensor)
521
+ if tensor_id in converted_tensors: # shared tensors
522
+ shared_tensor = torch_state_dict[converted_tensors[tensor_id]]
523
+ torch_state_dict[name] = shared_tensor
524
+ else:
525
+ converted_tensors[tensor_id] = name
526
+ if return_empty_tensor:
527
+ torch_state_dict[name] = torch.empty(tensor.shape, dtype=tensor.dtype)
528
+ else:
529
+ torch_state_dict[name] = tensor.contiguous()
530
+ return torch_state_dict
531
+
532
+
533
+ def get_fp32_state_dict_from_zero_checkpoint(checkpoint_dir,
534
+ tag=None,
535
+ exclude_frozen_parameters=False,
536
+ lazy_mode=False):
537
+ """
538
+ Convert ZeRO 2 or 3 checkpoint into a single fp32 consolidated state_dict that can be loaded with
539
+ ``load_state_dict()`` and used for training without DeepSpeed or shared with others, for example
540
+ via a model hub.
541
+
542
+ Args:
543
+ - ``checkpoint_dir``: path to the desired checkpoint folder
544
+ - ``tag``: checkpoint tag used as a unique identifier for checkpoint. If not provided will attempt to load tag in 'latest' file. e.g., ``global_step14``
545
+ - ``exclude_frozen_parameters``: exclude frozen parameters
546
+ - ``lazy_mode``: get state_dict in lazy mode. It returns a dict of pesduo tensor instead of torch tensor, which is more memory efficient.
547
+ Convert the pesduo tensor to torch tensor by ``.contiguous()``
548
+
549
+ Returns:
550
+ - pytorch ``state_dict``
551
+
552
+ A typical usage might be ::
553
+
554
+ from deepspeed.utils.zero_to_fp32 import get_fp32_state_dict_from_zero_checkpoint
555
+ # do the training and checkpoint saving
556
+ state_dict = get_fp32_state_dict_from_zero_checkpoint(checkpoint_dir) # already on cpu
557
+ model = model.cpu() # move to cpu
558
+ model.load_state_dict(state_dict)
559
+ # submit to model hub or save the model to share with others
560
+
561
+ In this example the ``model`` will no longer be usable in the deepspeed context of the same
562
+ application. i.e. you will need to re-initialize the deepspeed engine, since
563
+ ``model.load_state_dict(state_dict)`` will remove all the deepspeed magic from it.
564
+
565
+ If you want it all done for you, use ``load_state_dict_from_zero_checkpoint`` instead.
566
+
567
+ Note: the above usage may not work if your application doesn't have sufficient free CPU memory.
568
+ You may need to use the offline approach using the ``zero_to_fp32.py`` script that is saved with
569
+ the checkpoint. Or you can load state_dict in lazy mode ::
570
+
571
+ from deepspeed.utils.zero_to_fp32 import get_fp32_state_dict_from_zero_checkpoint
572
+ state_dict = get_fp32_state_dict_from_zero_checkpoint(checkpoint_dir, lazy_mode=True) # not on cpu
573
+ for name, lazy_tensor in state_dict.item():
574
+ tensor = lazy_tensor.contiguous() # to cpu
575
+ print(name, tensor)
576
+ # del tensor to release memory if it no longer in use
577
+ """
578
+ if tag is None:
579
+ latest_path = os.path.join(checkpoint_dir, 'latest')
580
+ if os.path.isfile(latest_path):
581
+ with open(latest_path, 'r') as fd:
582
+ tag = fd.read().strip()
583
+ else:
584
+ raise ValueError(f"Unable to find 'latest' file at {latest_path}")
585
+
586
+ ds_checkpoint_dir = os.path.join(checkpoint_dir, tag)
587
+
588
+ if not os.path.isdir(ds_checkpoint_dir):
589
+ raise FileNotFoundError(f"Directory '{ds_checkpoint_dir}' doesn't exist")
590
+
591
+ state_dict = _get_fp32_state_dict_from_zero_checkpoint(ds_checkpoint_dir, exclude_frozen_parameters)
592
+ if lazy_mode:
593
+ return state_dict
594
+ else:
595
+ return to_torch_tensor(state_dict)
596
+
597
+
598
+ def convert_zero_checkpoint_to_fp32_state_dict(checkpoint_dir,
599
+ output_dir,
600
+ max_shard_size="5GB",
601
+ safe_serialization=False,
602
+ tag=None,
603
+ exclude_frozen_parameters=False):
604
+ """
605
+ Convert ZeRO 2 or 3 checkpoint into a single fp32 consolidated ``state_dict`` file that can be
606
+ loaded with ``torch.load(file)`` + ``load_state_dict()`` and used for training without DeepSpeed.
607
+
608
+ Args:
609
+ - ``checkpoint_dir``: path to the desired checkpoint folder. (one that contains the tag-folder, like ``global_step14``)
610
+ - ``output_dir``: directory to the pytorch fp32 state_dict output files
611
+ - ``max_shard_size``: the maximum size for a checkpoint before being sharded, default value is 5GB
612
+ - ``safe_serialization``: whether to save the model using `safetensors` or the traditional PyTorch way (that uses `pickle`).
613
+ - ``tag``: checkpoint tag used as a unique identifier for checkpoint. If not provided will attempt to load tag in the file named ``latest`` in the checkpoint folder, e.g., ``global_step14``
614
+ - ``exclude_frozen_parameters``: exclude frozen parameters
615
+ """
616
+
617
+ # Dependency pre-check
618
+ if safe_serialization:
619
+ try:
620
+ from safetensors.torch import save_file
621
+ except ImportError:
622
+ print('If you want to use `safe_serialization`, please `pip install safetensors`')
623
+ raise
624
+ if max_shard_size is not None:
625
+ try:
626
+ from huggingface_hub import split_torch_state_dict_into_shards
627
+ except ImportError:
628
+ print('If you want to use `max_shard_size`, please `pip install huggingface_hub`')
629
+ raise
630
+
631
+ # Convert zero checkpoint to state_dict
632
+ state_dict = get_fp32_state_dict_from_zero_checkpoint(checkpoint_dir,
633
+ tag,
634
+ exclude_frozen_parameters,
635
+ lazy_mode=True)
636
+
637
+ # Shard the model if it is too big.
638
+ weights_name = "model.safetensors" if safe_serialization else "pytorch_model.bin"
639
+ if max_shard_size is not None:
640
+ filename_pattern = weights_name.replace(".bin", "{suffix}.bin").replace(".safetensors", "{suffix}.safetensors")
641
+ # an memory-efficient approach for sharding
642
+ empty_state_dict = to_torch_tensor(state_dict, return_empty_tensor=True)
643
+ state_dict_split = split_torch_state_dict_into_shards(empty_state_dict,
644
+ filename_pattern=filename_pattern,
645
+ max_shard_size=max_shard_size)
646
+ else:
647
+ from collections import namedtuple
648
+ StateDictSplit = namedtuple("StateDictSplit", ["is_sharded", "filename_to_tensors"])
649
+ state_dict_split = StateDictSplit(is_sharded=False,
650
+ filename_to_tensors={weights_name: list(state_dict.keys())})
651
+
652
+ # Save the model by shard
653
+ os.makedirs(output_dir, exist_ok=True)
654
+ filename_to_tensors = state_dict_split.filename_to_tensors.items()
655
+ for shard_file, tensors in tqdm(filename_to_tensors, desc="Saving checkpoint shards"):
656
+ shard_state_dict = {tensor_name: state_dict[tensor_name] for tensor_name in tensors}
657
+ shard_state_dict = to_torch_tensor(shard_state_dict)
658
+ output_path = os.path.join(output_dir, shard_file)
659
+ if safe_serialization:
660
+ save_file(shard_state_dict, output_path, metadata={"format": "pt"})
661
+ else:
662
+ torch.save(shard_state_dict, output_path)
663
+ # release the memory of current shard
664
+ for tensor_name in list(shard_state_dict.keys()):
665
+ del state_dict[tensor_name]
666
+ del shard_state_dict[tensor_name]
667
+ del shard_state_dict
668
+ gc.collect()
669
+
670
+ # Save index if sharded
671
+ if state_dict_split.is_sharded:
672
+ index = {
673
+ "metadata": state_dict_split.metadata,
674
+ "weight_map": state_dict_split.tensor_to_filename,
675
+ }
676
+ save_index_file = "model.safetensors.index.json" if safe_serialization else "pytorch_model.bin.index.json"
677
+ save_index_file = os.path.join(output_dir, save_index_file)
678
+ with open(save_index_file, "w", encoding="utf-8") as f:
679
+ content = json.dumps(index, indent=2, sort_keys=True) + "\n"
680
+ f.write(content)
681
+
682
+
683
+ def load_state_dict_from_zero_checkpoint(model, checkpoint_dir, tag=None):
684
+ """
685
+ 1. Put the provided model to cpu
686
+ 2. Convert ZeRO 2 or 3 checkpoint into a single fp32 consolidated ``state_dict``
687
+ 3. Load it into the provided model
688
+
689
+ Args:
690
+ - ``model``: the model object to update
691
+ - ``checkpoint_dir``: path to the desired checkpoint folder. (one that contains the tag-folder, like ``global_step14``)
692
+ - ``tag``: checkpoint tag used as a unique identifier for checkpoint. If not provided will attempt to load tag in the file named ``latest`` in the checkpoint folder, e.g., ``global_step14``
693
+
694
+ Returns:
695
+ - ``model`: modified model
696
+
697
+ Make sure you have plenty of CPU memory available before you call this function. If you don't
698
+ have enough use the ``zero_to_fp32.py`` utility to do the conversion. You will find it
699
+ conveniently placed for you in the checkpoint folder.
700
+
701
+ A typical usage might be ::
702
+
703
+ from deepspeed.utils.zero_to_fp32 import load_state_dict_from_zero_checkpoint
704
+ model = load_state_dict_from_zero_checkpoint(trainer.model, checkpoint_dir)
705
+ # submit to model hub or save the model to share with others
706
+
707
+ Note, that once this was run, the ``model`` will no longer be usable in the deepspeed context
708
+ of the same application. i.e. you will need to re-initialize the deepspeed engine, since
709
+ ``model.load_state_dict(state_dict)`` will remove all the deepspeed magic from it.
710
+
711
+ """
712
+ logger.info("Extracting fp32 weights")
713
+ state_dict = get_fp32_state_dict_from_zero_checkpoint(checkpoint_dir, tag)
714
+
715
+ logger.info("Overwriting model with fp32 weights")
716
+ model = model.cpu()
717
+ model.load_state_dict(state_dict, strict=False)
718
+
719
+ return model
720
+
721
+
722
+ if __name__ == "__main__":
723
+ parser = argparse.ArgumentParser()
724
+ parser.add_argument("checkpoint_dir",
725
+ type=str,
726
+ help="path to the desired checkpoint folder, e.g., path/checkpoint-12")
727
+ parser.add_argument("output_dir",
728
+ type=str,
729
+ help="directory to the pytorch fp32 state_dict output files"
730
+ "(e.g. path/checkpoint-12-output/)")
731
+ parser.add_argument(
732
+ "--max_shard_size",
733
+ type=str,
734
+ default="5GB",
735
+ help="The maximum size for a checkpoint before being sharded. Checkpoints shard will then be each of size"
736
+ "lower than this size. If expressed as a string, needs to be digits followed by a unit (like `5MB`"
737
+ "We default it to 5GB in order for models to be able to run easily on free-tier google colab instances"
738
+ "without CPU OOM issues.")
739
+ parser.add_argument(
740
+ "--safe_serialization",
741
+ default=False,
742
+ action='store_true',
743
+ help="Whether to save the model using `safetensors` or the traditional PyTorch way (that uses `pickle`).")
744
+ parser.add_argument("-t",
745
+ "--tag",
746
+ type=str,
747
+ default=None,
748
+ help="checkpoint tag used as a unique identifier for checkpoint. e.g., global_step1")
749
+ parser.add_argument("--exclude_frozen_parameters", action='store_true', help="exclude frozen parameters")
750
+ parser.add_argument("-d", "--debug", action='store_true', help="enable debug")
751
+ args = parser.parse_args()
752
+
753
+ debug = args.debug
754
+
755
+ convert_zero_checkpoint_to_fp32_state_dict(args.checkpoint_dir,
756
+ args.output_dir,
757
+ max_shard_size=args.max_shard_size,
758
+ safe_serialization=args.safe_serialization,
759
+ tag=args.tag,
760
+ exclude_frozen_parameters=args.exclude_frozen_parameters)
checkpoint-150/README.md ADDED
@@ -0,0 +1,207 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ ---
2
+ base_model: /mnt/phwfile/datafrontier/chenyang/data/models/Eagle-X5-7B
3
+ library_name: peft
4
+ pipeline_tag: text-generation
5
+ tags:
6
+ - base_model:adapter:/mnt/phwfile/datafrontier/chenyang/data/models/Eagle-X5-7B
7
+ - lora
8
+ - transformers
9
+ ---
10
+
11
+ # Model Card for Model ID
12
+
13
+ <!-- Provide a quick summary of what the model is/does. -->
14
+
15
+
16
+
17
+ ## Model Details
18
+
19
+ ### Model Description
20
+
21
+ <!-- Provide a longer summary of what this model is. -->
22
+
23
+
24
+
25
+ - **Developed by:** [More Information Needed]
26
+ - **Funded by [optional]:** [More Information Needed]
27
+ - **Shared by [optional]:** [More Information Needed]
28
+ - **Model type:** [More Information Needed]
29
+ - **Language(s) (NLP):** [More Information Needed]
30
+ - **License:** [More Information Needed]
31
+ - **Finetuned from model [optional]:** [More Information Needed]
32
+
33
+ ### Model Sources [optional]
34
+
35
+ <!-- Provide the basic links for the model. -->
36
+
37
+ - **Repository:** [More Information Needed]
38
+ - **Paper [optional]:** [More Information Needed]
39
+ - **Demo [optional]:** [More Information Needed]
40
+
41
+ ## Uses
42
+
43
+ <!-- Address questions around how the model is intended to be used, including the foreseeable users of the model and those affected by the model. -->
44
+
45
+ ### Direct Use
46
+
47
+ <!-- This section is for the model use without fine-tuning or plugging into a larger ecosystem/app. -->
48
+
49
+ [More Information Needed]
50
+
51
+ ### Downstream Use [optional]
52
+
53
+ <!-- This section is for the model use when fine-tuned for a task, or when plugged into a larger ecosystem/app -->
54
+
55
+ [More Information Needed]
56
+
57
+ ### Out-of-Scope Use
58
+
59
+ <!-- This section addresses misuse, malicious use, and uses that the model will not work well for. -->
60
+
61
+ [More Information Needed]
62
+
63
+ ## Bias, Risks, and Limitations
64
+
65
+ <!-- This section is meant to convey both technical and sociotechnical limitations. -->
66
+
67
+ [More Information Needed]
68
+
69
+ ### Recommendations
70
+
71
+ <!-- This section is meant to convey recommendations with respect to the bias, risk, and technical limitations. -->
72
+
73
+ Users (both direct and downstream) should be made aware of the risks, biases and limitations of the model. More information needed for further recommendations.
74
+
75
+ ## How to Get Started with the Model
76
+
77
+ Use the code below to get started with the model.
78
+
79
+ [More Information Needed]
80
+
81
+ ## Training Details
82
+
83
+ ### Training Data
84
+
85
+ <!-- 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. -->
86
+
87
+ [More Information Needed]
88
+
89
+ ### Training Procedure
90
+
91
+ <!-- This relates heavily to the Technical Specifications. Content here should link to that section when it is relevant to the training procedure. -->
92
+
93
+ #### Preprocessing [optional]
94
+
95
+ [More Information Needed]
96
+
97
+
98
+ #### Training Hyperparameters
99
+
100
+ - **Training regime:** [More Information Needed] <!--fp32, fp16 mixed precision, bf16 mixed precision, bf16 non-mixed precision, fp16 non-mixed precision, fp8 mixed precision -->
101
+
102
+ #### Speeds, Sizes, Times [optional]
103
+
104
+ <!-- This section provides information about throughput, start/end time, checkpoint size if relevant, etc. -->
105
+
106
+ [More Information Needed]
107
+
108
+ ## Evaluation
109
+
110
+ <!-- This section describes the evaluation protocols and provides the results. -->
111
+
112
+ ### Testing Data, Factors & Metrics
113
+
114
+ #### Testing Data
115
+
116
+ <!-- This should link to a Dataset Card if possible. -->
117
+
118
+ [More Information Needed]
119
+
120
+ #### Factors
121
+
122
+ <!-- These are the things the evaluation is disaggregating by, e.g., subpopulations or domains. -->
123
+
124
+ [More Information Needed]
125
+
126
+ #### Metrics
127
+
128
+ <!-- These are the evaluation metrics being used, ideally with a description of why. -->
129
+
130
+ [More Information Needed]
131
+
132
+ ### Results
133
+
134
+ [More Information Needed]
135
+
136
+ #### Summary
137
+
138
+
139
+
140
+ ## Model Examination [optional]
141
+
142
+ <!-- Relevant interpretability work for the model goes here -->
143
+
144
+ [More Information Needed]
145
+
146
+ ## Environmental Impact
147
+
148
+ <!-- Total emissions (in grams of CO2eq) and additional considerations, such as electricity usage, go here. Edit the suggested text below accordingly -->
149
+
150
+ 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).
151
+
152
+ - **Hardware Type:** [More Information Needed]
153
+ - **Hours used:** [More Information Needed]
154
+ - **Cloud Provider:** [More Information Needed]
155
+ - **Compute Region:** [More Information Needed]
156
+ - **Carbon Emitted:** [More Information Needed]
157
+
158
+ ## Technical Specifications [optional]
159
+
160
+ ### Model Architecture and Objective
161
+
162
+ [More Information Needed]
163
+
164
+ ### Compute Infrastructure
165
+
166
+ [More Information Needed]
167
+
168
+ #### Hardware
169
+
170
+ [More Information Needed]
171
+
172
+ #### Software
173
+
174
+ [More Information Needed]
175
+
176
+ ## Citation [optional]
177
+
178
+ <!-- If there is a paper or blog post introducing the model, the APA and Bibtex information for that should go in this section. -->
179
+
180
+ **BibTeX:**
181
+
182
+ [More Information Needed]
183
+
184
+ **APA:**
185
+
186
+ [More Information Needed]
187
+
188
+ ## Glossary [optional]
189
+
190
+ <!-- If relevant, include terms and calculations in this section that can help readers understand the model or model card. -->
191
+
192
+ [More Information Needed]
193
+
194
+ ## More Information [optional]
195
+
196
+ [More Information Needed]
197
+
198
+ ## Model Card Authors [optional]
199
+
200
+ [More Information Needed]
201
+
202
+ ## Model Card Contact
203
+
204
+ [More Information Needed]
205
+ ### Framework versions
206
+
207
+ - PEFT 0.17.1
checkpoint-150/adapter_config.json ADDED
@@ -0,0 +1,42 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ {
2
+ "alpha_pattern": {},
3
+ "auto_mapping": null,
4
+ "base_model_name_or_path": "/mnt/phwfile/datafrontier/chenyang/data/models/Eagle-X5-7B",
5
+ "bias": "none",
6
+ "corda_config": null,
7
+ "eva_config": null,
8
+ "exclude_modules": null,
9
+ "fan_in_fan_out": false,
10
+ "inference_mode": true,
11
+ "init_lora_weights": true,
12
+ "layer_replication": null,
13
+ "layers_pattern": null,
14
+ "layers_to_transform": null,
15
+ "loftq_config": {},
16
+ "lora_alpha": 128,
17
+ "lora_bias": false,
18
+ "lora_dropout": 0.05,
19
+ "megatron_config": null,
20
+ "megatron_core": "megatron.core",
21
+ "modules_to_save": null,
22
+ "peft_type": "LORA",
23
+ "qalora_group_size": 16,
24
+ "r": 64,
25
+ "rank_pattern": {},
26
+ "revision": null,
27
+ "target_modules": [
28
+ "q_proj",
29
+ "down_proj",
30
+ "gate_proj",
31
+ "o_proj",
32
+ "k_proj",
33
+ "v_proj",
34
+ "up_proj"
35
+ ],
36
+ "target_parameters": null,
37
+ "task_type": "CAUSAL_LM",
38
+ "trainable_token_indices": null,
39
+ "use_dora": false,
40
+ "use_qalora": false,
41
+ "use_rslora": false
42
+ }
checkpoint-150/adapter_model.safetensors ADDED
@@ -0,0 +1,3 @@
 
 
 
 
1
+ version https://git-lfs.github.com/spec/v1
2
+ oid sha256:0cff569fccc330603ba7e3e056044a89e8d9aa5d1aefddd83cb1076accebb3a1
3
+ size 357679240
checkpoint-150/global_step150/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:ad10d9c0e5fa6a7ff7698cd5ed180d9c4beb9913d6553c7af8c354d0a031dffd
3
+ size 340551088
checkpoint-150/global_step150/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:ffec7f49bc27546fb8d89450428e4eb35eda050d7e746b4b56f188f9c93e4749
3
+ size 340550896
checkpoint-150/global_step150/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:374162972107657e905fdc3f79c7cc216fa42a20fd4783808efc4d05b3f4a65e
3
+ size 340550832
checkpoint-150/global_step150/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:413326fdf18c69c0d3fe0a42c3853c3e2903b17f43f1eff44063eb1c6a55c91a
3
+ size 340551216
checkpoint-150/global_step150/bf16_zero_pp_rank_4_mp_rank_00_optim_states.pt ADDED
@@ -0,0 +1,3 @@
 
 
 
 
1
+ version https://git-lfs.github.com/spec/v1
2
+ oid sha256:67691177471f1db26268c57549e7de3c0e3a8c594639aae7f2ca7cb67ead5146
3
+ size 340551088
checkpoint-150/global_step150/bf16_zero_pp_rank_5_mp_rank_00_optim_states.pt ADDED
@@ -0,0 +1,3 @@
 
 
 
 
1
+ version https://git-lfs.github.com/spec/v1
2
+ oid sha256:52c316499ef51fb55929556b8b13538dd64261338accece7f936e7d4a364b7b7
3
+ size 340574832
checkpoint-150/global_step150/bf16_zero_pp_rank_6_mp_rank_00_optim_states.pt ADDED
@@ -0,0 +1,3 @@
 
 
 
 
1
+ version https://git-lfs.github.com/spec/v1
2
+ oid sha256:62ac89a7b1c2b4c8b16a7af4463d29e2f6faeef5b29e29abbdedbff5471bf997
3
+ size 340561584
checkpoint-150/global_step150/bf16_zero_pp_rank_7_mp_rank_00_optim_states.pt ADDED
@@ -0,0 +1,3 @@
 
 
 
 
1
+ version https://git-lfs.github.com/spec/v1
2
+ oid sha256:0cfacfe3fa4f9f1128ea79725115b851fbe3f2fcb22627b21005d8ec64d255a3
3
+ size 340542512
checkpoint-150/global_step150/mp_rank_00_model_states.pt ADDED
@@ -0,0 +1,3 @@
 
 
 
 
1
+ version https://git-lfs.github.com/spec/v1
2
+ oid sha256:940565dc256828af4ef3cccf87697d1eec925e8350b312376864334f4248b495
3
+ size 456033832
checkpoint-150/latest ADDED
@@ -0,0 +1 @@
 
 
1
+ global_step150
checkpoint-150/rng_state_0.pth ADDED
@@ -0,0 +1,3 @@
 
 
 
 
1
+ version https://git-lfs.github.com/spec/v1
2
+ oid sha256:72e856b75792d055582543fbfc010b7fa2c0d3468d6703b1614d4597965d6e97
3
+ size 15984
checkpoint-150/rng_state_1.pth ADDED
@@ -0,0 +1,3 @@
 
 
 
 
1
+ version https://git-lfs.github.com/spec/v1
2
+ oid sha256:73d22c18b2cc7869b85de54d900cd63b3d71626b2444ececc92288437891ee11
3
+ size 15984
checkpoint-150/rng_state_2.pth ADDED
@@ -0,0 +1,3 @@
 
 
 
 
1
+ version https://git-lfs.github.com/spec/v1
2
+ oid sha256:a787b019a543574c268d3bb21ffa38b25447a066932015b9d2bf9544cc1f8f7f
3
+ size 15984
checkpoint-150/rng_state_3.pth ADDED
@@ -0,0 +1,3 @@
 
 
 
 
1
+ version https://git-lfs.github.com/spec/v1
2
+ oid sha256:e432d3cc376fa1e9a64651a018f1b1e2772f511592fc94d7704685d2a4d8f675
3
+ size 15984
checkpoint-150/rng_state_4.pth ADDED
@@ -0,0 +1,3 @@
 
 
 
 
1
+ version https://git-lfs.github.com/spec/v1
2
+ oid sha256:d31ee9d950235b086cc3f24a6930421c44a62fa406c3963f317feb3c1c9603a1
3
+ size 15984
checkpoint-150/rng_state_5.pth ADDED
@@ -0,0 +1,3 @@
 
 
 
 
1
+ version https://git-lfs.github.com/spec/v1
2
+ oid sha256:cdf136a33a2fd52b89376a3693adb05b5344fe85d0a089694b29b26b08840602
3
+ size 15984
checkpoint-150/rng_state_6.pth ADDED
@@ -0,0 +1,3 @@
 
 
 
 
1
+ version https://git-lfs.github.com/spec/v1
2
+ oid sha256:1d4ec421ddb9a38c0416480e948aabbe4aaff6dc26d7b5a88d1b73206ce44bb3
3
+ size 15984