Training in progress, step 1000, checkpoint
Browse files- checkpoint-1000/README.md +202 -0
- checkpoint-1000/adapter_config.json +34 -0
- checkpoint-1000/adapter_model.safetensors +3 -0
- checkpoint-1000/global_step1000/bf16_zero_pp_rank_0_mp_rank_00_optim_states.pt +3 -0
- checkpoint-1000/global_step1000/bf16_zero_pp_rank_1_mp_rank_00_optim_states.pt +3 -0
- checkpoint-1000/global_step1000/bf16_zero_pp_rank_2_mp_rank_00_optim_states.pt +3 -0
- checkpoint-1000/global_step1000/bf16_zero_pp_rank_3_mp_rank_00_optim_states.pt +3 -0
- checkpoint-1000/global_step1000/bf16_zero_pp_rank_4_mp_rank_00_optim_states.pt +3 -0
- checkpoint-1000/global_step1000/bf16_zero_pp_rank_5_mp_rank_00_optim_states.pt +3 -0
- checkpoint-1000/global_step1000/bf16_zero_pp_rank_6_mp_rank_00_optim_states.pt +3 -0
- checkpoint-1000/global_step1000/bf16_zero_pp_rank_7_mp_rank_00_optim_states.pt +3 -0
- checkpoint-1000/global_step1000/mp_rank_00_model_states.pt +3 -0
- checkpoint-1000/latest +1 -0
- checkpoint-1000/rng_state_0.pth +3 -0
- checkpoint-1000/rng_state_1.pth +3 -0
- checkpoint-1000/rng_state_2.pth +3 -0
- checkpoint-1000/rng_state_3.pth +3 -0
- checkpoint-1000/rng_state_4.pth +3 -0
- checkpoint-1000/rng_state_5.pth +3 -0
- checkpoint-1000/rng_state_6.pth +3 -0
- checkpoint-1000/rng_state_7.pth +3 -0
- checkpoint-1000/scheduler.pt +3 -0
- checkpoint-1000/special_tokens_map.json +30 -0
- checkpoint-1000/tokenizer.json +0 -0
- checkpoint-1000/tokenizer_config.json +133 -0
- checkpoint-1000/trainer_state.json +1853 -0
- checkpoint-1000/training_args.bin +3 -0
- checkpoint-1000/zero_to_fp32.py +674 -0
checkpoint-1000/README.md
ADDED
@@ -0,0 +1,202 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
1 |
+
---
|
2 |
+
base_model: microsoft/Phi-3-mini-4k-instruct
|
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-1000/adapter_config.json
ADDED
@@ -0,0 +1,34 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
1 |
+
{
|
2 |
+
"alpha_pattern": {},
|
3 |
+
"auto_mapping": null,
|
4 |
+
"base_model_name_or_path": "microsoft/Phi-3-mini-4k-instruct",
|
5 |
+
"bias": "none",
|
6 |
+
"eva_config": null,
|
7 |
+
"exclude_modules": null,
|
8 |
+
"fan_in_fan_out": false,
|
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": 16,
|
16 |
+
"lora_bias": false,
|
17 |
+
"lora_dropout": 0.0,
|
18 |
+
"megatron_config": null,
|
19 |
+
"megatron_core": "megatron.core",
|
20 |
+
"modules_to_save": null,
|
21 |
+
"peft_type": "LORA",
|
22 |
+
"r": 8,
|
23 |
+
"rank_pattern": {},
|
24 |
+
"revision": null,
|
25 |
+
"target_modules": [
|
26 |
+
"qkv_proj",
|
27 |
+
"o_proj",
|
28 |
+
"down_proj",
|
29 |
+
"gate_up_proj"
|
30 |
+
],
|
31 |
+
"task_type": "CAUSAL_LM",
|
32 |
+
"use_dora": false,
|
33 |
+
"use_rslora": false
|
34 |
+
}
|
checkpoint-1000/adapter_model.safetensors
ADDED
@@ -0,0 +1,3 @@
|
|
|
|
|
|
|
|
|
1 |
+
version https://git-lfs.github.com/spec/v1
|
2 |
+
oid sha256:4153273255a8a0e426daccb16f830c060478b9de8a217a2af0c679ca5a8f342f
|
3 |
+
size 25200088
|
checkpoint-1000/global_step1000/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:fd338fd934eee0344f73eb0d0b21feb2a10235433e68d688e0f30e2b609753ee
|
3 |
+
size 18881328
|
checkpoint-1000/global_step1000/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:fe76616707322b07568be3aa9f13ba37887de170138dbabec94f2e3e6c6d2c32
|
3 |
+
size 18881328
|
checkpoint-1000/global_step1000/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:645d7c0304196b9c26e9bcff687d422c7e3456d0527d4c1d067b4894f59d9b1b
|
3 |
+
size 18881328
|
checkpoint-1000/global_step1000/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:394296165f8175d773fdd45bbe8c1276fbf49f0f14ab76c70ffd4a500b495aa4
|
3 |
+
size 18881392
|
checkpoint-1000/global_step1000/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:4a11b860e495f00f82c8402d4c37f1906239ed59fef257c99f653c62006235e7
|
3 |
+
size 18881392
|
checkpoint-1000/global_step1000/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:0f5e5b9473971fba5f87bb38a3af603b7e208ff65893015f6b1df5c2d08102d5
|
3 |
+
size 18881392
|
checkpoint-1000/global_step1000/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:7d69ba154799ee255a0169755f7423e32f8ed58e9e267e9680ed77795d4c41fb
|
3 |
+
size 18881392
|
checkpoint-1000/global_step1000/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:14bc4e7dee9d20bf4fc0b2d84db2c2579b3b66e2dc4b27ecba3644ebb150a988
|
3 |
+
size 18881392
|
checkpoint-1000/global_step1000/mp_rank_00_model_states.pt
ADDED
@@ -0,0 +1,3 @@
|
|
|
|
|
|
|
|
|
1 |
+
version https://git-lfs.github.com/spec/v1
|
2 |
+
oid sha256:bca09e0131c0e1f68caf2b4831c751b434ae6a75c3336426bd838e427cba0fac
|
3 |
+
size 25379244
|
checkpoint-1000/latest
ADDED
@@ -0,0 +1 @@
|
|
|
|
|
1 |
+
global_step1000
|
checkpoint-1000/rng_state_0.pth
ADDED
@@ -0,0 +1,3 @@
|
|
|
|
|
|
|
|
|
1 |
+
version https://git-lfs.github.com/spec/v1
|
2 |
+
oid sha256:7a711ae47907423581a85380ad2222bf6eaf1af9c9ec45797d4f1a9fb127db2c
|
3 |
+
size 15984
|
checkpoint-1000/rng_state_1.pth
ADDED
@@ -0,0 +1,3 @@
|
|
|
|
|
|
|
|
|
1 |
+
version https://git-lfs.github.com/spec/v1
|
2 |
+
oid sha256:1e8c873ca3f378713a8a07acffb82e5be966b4efb3815b7ddf04ac4a39c37a73
|
3 |
+
size 15984
|
checkpoint-1000/rng_state_2.pth
ADDED
@@ -0,0 +1,3 @@
|
|
|
|
|
|
|
|
|
1 |
+
version https://git-lfs.github.com/spec/v1
|
2 |
+
oid sha256:b0fcb54b765d5b0c806961a1b8bdc3214f4fc0489fbe2c720c7312b23d2db5cf
|
3 |
+
size 15984
|
checkpoint-1000/rng_state_3.pth
ADDED
@@ -0,0 +1,3 @@
|
|
|
|
|
|
|
|
|
1 |
+
version https://git-lfs.github.com/spec/v1
|
2 |
+
oid sha256:b2a30b2ad9b3632b41b5d2a70ad5aabce34a6f7a76a9e1e270a22f600a05ec22
|
3 |
+
size 15984
|
checkpoint-1000/rng_state_4.pth
ADDED
@@ -0,0 +1,3 @@
|
|
|
|
|
|
|
|
|
1 |
+
version https://git-lfs.github.com/spec/v1
|
2 |
+
oid sha256:4ee9cd8fd6ff53fdc84fbb7925a1d22d7707021b0e4b45ae16328680d2405512
|
3 |
+
size 15984
|
checkpoint-1000/rng_state_5.pth
ADDED
@@ -0,0 +1,3 @@
|
|
|
|
|
|
|
|
|
1 |
+
version https://git-lfs.github.com/spec/v1
|
2 |
+
oid sha256:2b60c5d4b71ffd198beb51d796fd8e27c367782bb1efc7c5f1065d3ed20df402
|
3 |
+
size 15984
|
checkpoint-1000/rng_state_6.pth
ADDED
@@ -0,0 +1,3 @@
|
|
|
|
|
|
|
|
|
1 |
+
version https://git-lfs.github.com/spec/v1
|
2 |
+
oid sha256:87c6f1afcb23fc820bb3d68d94d047f124b182adf1d874dcd0fa3a260a51bb2b
|
3 |
+
size 15984
|
checkpoint-1000/rng_state_7.pth
ADDED
@@ -0,0 +1,3 @@
|
|
|
|
|
|
|
|
|
1 |
+
version https://git-lfs.github.com/spec/v1
|
2 |
+
oid sha256:7ebfc4481eb53675078ccf162293df1d6b7500f8ba0b2d00cad430e67f4a70a3
|
3 |
+
size 15984
|
checkpoint-1000/scheduler.pt
ADDED
@@ -0,0 +1,3 @@
|
|
|
|
|
|
|
|
|
1 |
+
version https://git-lfs.github.com/spec/v1
|
2 |
+
oid sha256:a498704a8ad8218099b8320e4fe5be9e58fb53a12149a5b34663802705d52163
|
3 |
+
size 1064
|
checkpoint-1000/special_tokens_map.json
ADDED
@@ -0,0 +1,30 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
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": "<|end|>",
|
11 |
+
"lstrip": false,
|
12 |
+
"normalized": false,
|
13 |
+
"rstrip": false,
|
14 |
+
"single_word": false
|
15 |
+
},
|
16 |
+
"pad_token": {
|
17 |
+
"content": "<|endoftext|>",
|
18 |
+
"lstrip": false,
|
19 |
+
"normalized": false,
|
20 |
+
"rstrip": false,
|
21 |
+
"single_word": false
|
22 |
+
},
|
23 |
+
"unk_token": {
|
24 |
+
"content": "<unk>",
|
25 |
+
"lstrip": false,
|
26 |
+
"normalized": false,
|
27 |
+
"rstrip": false,
|
28 |
+
"single_word": false
|
29 |
+
}
|
30 |
+
}
|
checkpoint-1000/tokenizer.json
ADDED
The diff for this file is too large to render.
See raw diff
|
|
checkpoint-1000/tokenizer_config.json
ADDED
@@ -0,0 +1,133 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
1 |
+
{
|
2 |
+
"add_bos_token": false,
|
3 |
+
"add_eos_token": false,
|
4 |
+
"add_prefix_space": null,
|
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": true,
|
27 |
+
"single_word": false,
|
28 |
+
"special": false
|
29 |
+
},
|
30 |
+
"32000": {
|
31 |
+
"content": "<|endoftext|>",
|
32 |
+
"lstrip": false,
|
33 |
+
"normalized": false,
|
34 |
+
"rstrip": false,
|
35 |
+
"single_word": false,
|
36 |
+
"special": true
|
37 |
+
},
|
38 |
+
"32001": {
|
39 |
+
"content": "<|assistant|>",
|
40 |
+
"lstrip": false,
|
41 |
+
"normalized": false,
|
42 |
+
"rstrip": true,
|
43 |
+
"single_word": false,
|
44 |
+
"special": true
|
45 |
+
},
|
46 |
+
"32002": {
|
47 |
+
"content": "<|placeholder1|>",
|
48 |
+
"lstrip": false,
|
49 |
+
"normalized": false,
|
50 |
+
"rstrip": true,
|
51 |
+
"single_word": false,
|
52 |
+
"special": true
|
53 |
+
},
|
54 |
+
"32003": {
|
55 |
+
"content": "<|placeholder2|>",
|
56 |
+
"lstrip": false,
|
57 |
+
"normalized": false,
|
58 |
+
"rstrip": true,
|
59 |
+
"single_word": false,
|
60 |
+
"special": true
|
61 |
+
},
|
62 |
+
"32004": {
|
63 |
+
"content": "<|placeholder3|>",
|
64 |
+
"lstrip": false,
|
65 |
+
"normalized": false,
|
66 |
+
"rstrip": true,
|
67 |
+
"single_word": false,
|
68 |
+
"special": true
|
69 |
+
},
|
70 |
+
"32005": {
|
71 |
+
"content": "<|placeholder4|>",
|
72 |
+
"lstrip": false,
|
73 |
+
"normalized": false,
|
74 |
+
"rstrip": true,
|
75 |
+
"single_word": false,
|
76 |
+
"special": true
|
77 |
+
},
|
78 |
+
"32006": {
|
79 |
+
"content": "<|system|>",
|
80 |
+
"lstrip": false,
|
81 |
+
"normalized": false,
|
82 |
+
"rstrip": true,
|
83 |
+
"single_word": false,
|
84 |
+
"special": true
|
85 |
+
},
|
86 |
+
"32007": {
|
87 |
+
"content": "<|end|>",
|
88 |
+
"lstrip": false,
|
89 |
+
"normalized": false,
|
90 |
+
"rstrip": false,
|
91 |
+
"single_word": false,
|
92 |
+
"special": true
|
93 |
+
},
|
94 |
+
"32008": {
|
95 |
+
"content": "<|placeholder5|>",
|
96 |
+
"lstrip": false,
|
97 |
+
"normalized": false,
|
98 |
+
"rstrip": true,
|
99 |
+
"single_word": false,
|
100 |
+
"special": true
|
101 |
+
},
|
102 |
+
"32009": {
|
103 |
+
"content": "<|placeholder6|>",
|
104 |
+
"lstrip": false,
|
105 |
+
"normalized": false,
|
106 |
+
"rstrip": true,
|
107 |
+
"single_word": false,
|
108 |
+
"special": true
|
109 |
+
},
|
110 |
+
"32010": {
|
111 |
+
"content": "<|user|>",
|
112 |
+
"lstrip": false,
|
113 |
+
"normalized": false,
|
114 |
+
"rstrip": true,
|
115 |
+
"single_word": false,
|
116 |
+
"special": true
|
117 |
+
}
|
118 |
+
},
|
119 |
+
"bos_token": "<s>",
|
120 |
+
"chat_template": "{% set system_message = 'You are a helpful AI assistant.' %}{% if messages[0]['role'] == 'system' %}{% set system_message = messages[0]['content'] %}{% endif %}{% if system_message is defined %}{{ '<s>' + '<|system|>\n' + system_message + '<|end|>\n' }}{% endif %}{% for message in messages %}{% set content = message['content'] %}{% if message['role'] == 'user' %}{{ '<|user|>\n' + content + '<|end|>\n<|assistant|>\n' }}{% elif message['role'] == 'assistant' %}{{ content + '<|end|>' + '\n' }}{% endif %}{% endfor %}",
|
121 |
+
"clean_up_tokenization_spaces": false,
|
122 |
+
"eos_token": "<|end|>",
|
123 |
+
"extra_special_tokens": {},
|
124 |
+
"legacy": false,
|
125 |
+
"model_max_length": 4096,
|
126 |
+
"pad_token": "<|endoftext|>",
|
127 |
+
"padding_side": "right",
|
128 |
+
"sp_model_kwargs": {},
|
129 |
+
"split_special_tokens": false,
|
130 |
+
"tokenizer_class": "LlamaTokenizer",
|
131 |
+
"unk_token": "<unk>",
|
132 |
+
"use_default_system_prompt": false
|
133 |
+
}
|
checkpoint-1000/trainer_state.json
ADDED
@@ -0,0 +1,1853 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|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zero": true,
|
9 |
+
"is_world_process_zero": true,
|
10 |
+
"log_history": [
|
11 |
+
{
|
12 |
+
"epoch": 0.008594757198109154,
|
13 |
+
"grad_norm": 0.05167795345187187,
|
14 |
+
"learning_rate": 4.999451708687114e-06,
|
15 |
+
"logits/chosen": 15.084823608398438,
|
16 |
+
"logits/rejected": 15.218259811401367,
|
17 |
+
"logps/chosen": -0.3124043345451355,
|
18 |
+
"logps/rejected": -0.31854626536369324,
|
19 |
+
"loss": 0.9405,
|
20 |
+
"rewards/accuracies": 0.4375,
|
21 |
+
"rewards/chosen": -0.46860653162002563,
|
22 |
+
"rewards/margins": 0.009212849661707878,
|
23 |
+
"rewards/rejected": -0.47781938314437866,
|
24 |
+
"step": 10
|
25 |
+
},
|
26 |
+
{
|
27 |
+
"epoch": 0.017189514396218308,
|
28 |
+
"grad_norm": 0.06444549560546875,
|
29 |
+
"learning_rate": 4.997807075247147e-06,
|
30 |
+
"logits/chosen": 14.565855026245117,
|
31 |
+
"logits/rejected": 14.914319038391113,
|
32 |
+
"logps/chosen": -0.28220412135124207,
|
33 |
+
"logps/rejected": -0.3605547249317169,
|
34 |
+
"loss": 0.9294,
|
35 |
+
"rewards/accuracies": 0.6000000238418579,
|
36 |
+
"rewards/chosen": -0.4233061671257019,
|
37 |
+
"rewards/margins": 0.11752591282129288,
|
38 |
+
"rewards/rejected": -0.5408320426940918,
|
39 |
+
"step": 20
|
40 |
+
},
|
41 |
+
{
|
42 |
+
"epoch": 0.02578427159432746,
|
43 |
+
"grad_norm": 0.059900399297475815,
|
44 |
+
"learning_rate": 4.9950668210706795e-06,
|
45 |
+
"logits/chosen": 14.878230094909668,
|
46 |
+
"logits/rejected": 15.334558486938477,
|
47 |
+
"logps/chosen": -0.2837519347667694,
|
48 |
+
"logps/rejected": -0.320808470249176,
|
49 |
+
"loss": 0.9338,
|
50 |
+
"rewards/accuracies": 0.4625000059604645,
|
51 |
+
"rewards/chosen": -0.4256278872489929,
|
52 |
+
"rewards/margins": 0.05558476969599724,
|
53 |
+
"rewards/rejected": -0.48121267557144165,
|
54 |
+
"step": 30
|
55 |
+
},
|
56 |
+
{
|
57 |
+
"epoch": 0.034379028792436615,
|
58 |
+
"grad_norm": 0.05459418520331383,
|
59 |
+
"learning_rate": 4.9912321481237616e-06,
|
60 |
+
"logits/chosen": 14.800946235656738,
|
61 |
+
"logits/rejected": 15.134121894836426,
|
62 |
+
"logps/chosen": -0.2971518635749817,
|
63 |
+
"logps/rejected": -0.3476788401603699,
|
64 |
+
"loss": 0.9202,
|
65 |
+
"rewards/accuracies": 0.4625000059604645,
|
66 |
+
"rewards/chosen": -0.4457278251647949,
|
67 |
+
"rewards/margins": 0.07579050213098526,
|
68 |
+
"rewards/rejected": -0.521518349647522,
|
69 |
+
"step": 40
|
70 |
+
},
|
71 |
+
{
|
72 |
+
"epoch": 0.042973785990545764,
|
73 |
+
"grad_norm": 0.05792691186070442,
|
74 |
+
"learning_rate": 4.986304738420684e-06,
|
75 |
+
"logits/chosen": 14.62980842590332,
|
76 |
+
"logits/rejected": 14.848493576049805,
|
77 |
+
"logps/chosen": -0.27511823177337646,
|
78 |
+
"logps/rejected": -0.32557612657546997,
|
79 |
+
"loss": 0.9213,
|
80 |
+
"rewards/accuracies": 0.550000011920929,
|
81 |
+
"rewards/chosen": -0.4126773774623871,
|
82 |
+
"rewards/margins": 0.07568677514791489,
|
83 |
+
"rewards/rejected": -0.48836421966552734,
|
84 |
+
"step": 50
|
85 |
+
},
|
86 |
+
{
|
87 |
+
"epoch": 0.042973785990545764,
|
88 |
+
"eval_logits/chosen": 14.195974349975586,
|
89 |
+
"eval_logits/rejected": 15.046167373657227,
|
90 |
+
"eval_logps/chosen": -0.27934810519218445,
|
91 |
+
"eval_logps/rejected": -0.3643363118171692,
|
92 |
+
"eval_loss": 0.9250189065933228,
|
93 |
+
"eval_rewards/accuracies": 0.557894766330719,
|
94 |
+
"eval_rewards/chosen": -0.4190221428871155,
|
95 |
+
"eval_rewards/margins": 0.1274823397397995,
|
96 |
+
"eval_rewards/rejected": -0.5465044379234314,
|
97 |
+
"eval_runtime": 26.0506,
|
98 |
+
"eval_samples_per_second": 28.905,
|
99 |
+
"eval_steps_per_second": 3.647,
|
100 |
+
"step": 50
|
101 |
+
},
|
102 |
+
{
|
103 |
+
"epoch": 0.05156854318865492,
|
104 |
+
"grad_norm": 0.08806851506233215,
|
105 |
+
"learning_rate": 4.980286753286196e-06,
|
106 |
+
"logits/chosen": 14.311370849609375,
|
107 |
+
"logits/rejected": 15.19476318359375,
|
108 |
+
"logps/chosen": -0.26153135299682617,
|
109 |
+
"logps/rejected": -0.34108471870422363,
|
110 |
+
"loss": 0.9255,
|
111 |
+
"rewards/accuracies": 0.512499988079071,
|
112 |
+
"rewards/chosen": -0.39229699969291687,
|
113 |
+
"rewards/margins": 0.11933007091283798,
|
114 |
+
"rewards/rejected": -0.5116270780563354,
|
115 |
+
"step": 60
|
116 |
+
},
|
117 |
+
{
|
118 |
+
"epoch": 0.060163300386764075,
|
119 |
+
"grad_norm": 0.10536951571702957,
|
120 |
+
"learning_rate": 4.973180832407471e-06,
|
121 |
+
"logits/chosen": 14.646909713745117,
|
122 |
+
"logits/rejected": 15.134190559387207,
|
123 |
+
"logps/chosen": -0.2928832173347473,
|
124 |
+
"logps/rejected": -0.37275972962379456,
|
125 |
+
"loss": 0.9155,
|
126 |
+
"rewards/accuracies": 0.512499988079071,
|
127 |
+
"rewards/chosen": -0.4393247961997986,
|
128 |
+
"rewards/margins": 0.11981481313705444,
|
129 |
+
"rewards/rejected": -0.559139609336853,
|
130 |
+
"step": 70
|
131 |
+
},
|
132 |
+
{
|
133 |
+
"epoch": 0.06875805758487323,
|
134 |
+
"grad_norm": 0.07452531903982162,
|
135 |
+
"learning_rate": 4.964990092676263e-06,
|
136 |
+
"logits/chosen": 14.383807182312012,
|
137 |
+
"logits/rejected": 14.806958198547363,
|
138 |
+
"logps/chosen": -0.2724239230155945,
|
139 |
+
"logps/rejected": -0.33048146963119507,
|
140 |
+
"loss": 0.9191,
|
141 |
+
"rewards/accuracies": 0.48750001192092896,
|
142 |
+
"rewards/chosen": -0.4086359143257141,
|
143 |
+
"rewards/margins": 0.08708634227514267,
|
144 |
+
"rewards/rejected": -0.495722234249115,
|
145 |
+
"step": 80
|
146 |
+
},
|
147 |
+
{
|
148 |
+
"epoch": 0.07735281478298238,
|
149 |
+
"grad_norm": 0.06996195018291473,
|
150 |
+
"learning_rate": 4.9557181268217225e-06,
|
151 |
+
"logits/chosen": 14.557902336120605,
|
152 |
+
"logits/rejected": 15.043550491333008,
|
153 |
+
"logps/chosen": -0.3053165078163147,
|
154 |
+
"logps/rejected": -0.36941051483154297,
|
155 |
+
"loss": 0.9255,
|
156 |
+
"rewards/accuracies": 0.5249999761581421,
|
157 |
+
"rewards/chosen": -0.45797473192214966,
|
158 |
+
"rewards/margins": 0.0961410254240036,
|
159 |
+
"rewards/rejected": -0.5541157126426697,
|
160 |
+
"step": 90
|
161 |
+
},
|
162 |
+
{
|
163 |
+
"epoch": 0.08594757198109153,
|
164 |
+
"grad_norm": 0.09053988754749298,
|
165 |
+
"learning_rate": 4.9453690018345144e-06,
|
166 |
+
"logits/chosen": 13.747509956359863,
|
167 |
+
"logits/rejected": 14.678106307983398,
|
168 |
+
"logps/chosen": -0.2453141212463379,
|
169 |
+
"logps/rejected": -0.36430835723876953,
|
170 |
+
"loss": 0.9022,
|
171 |
+
"rewards/accuracies": 0.625,
|
172 |
+
"rewards/chosen": -0.36797118186950684,
|
173 |
+
"rewards/margins": 0.17849135398864746,
|
174 |
+
"rewards/rejected": -0.5464625358581543,
|
175 |
+
"step": 100
|
176 |
+
},
|
177 |
+
{
|
178 |
+
"epoch": 0.08594757198109153,
|
179 |
+
"eval_logits/chosen": 14.017444610595703,
|
180 |
+
"eval_logits/rejected": 14.885564804077148,
|
181 |
+
"eval_logps/chosen": -0.2685285806655884,
|
182 |
+
"eval_logps/rejected": -0.3654690384864807,
|
183 |
+
"eval_loss": 0.9166209697723389,
|
184 |
+
"eval_rewards/accuracies": 0.557894766330719,
|
185 |
+
"eval_rewards/chosen": -0.4027928411960602,
|
186 |
+
"eval_rewards/margins": 0.14541073143482208,
|
187 |
+
"eval_rewards/rejected": -0.5482036471366882,
|
188 |
+
"eval_runtime": 26.0431,
|
189 |
+
"eval_samples_per_second": 28.914,
|
190 |
+
"eval_steps_per_second": 3.648,
|
191 |
+
"step": 100
|
192 |
+
},
|
193 |
+
{
|
194 |
+
"epoch": 0.09454232917920069,
|
195 |
+
"grad_norm": 0.07788874208927155,
|
196 |
+
"learning_rate": 4.933947257182901e-06,
|
197 |
+
"logits/chosen": 14.805160522460938,
|
198 |
+
"logits/rejected": 14.767298698425293,
|
199 |
+
"logps/chosen": -0.30586495995521545,
|
200 |
+
"logps/rejected": -0.3159794211387634,
|
201 |
+
"loss": 0.9128,
|
202 |
+
"rewards/accuracies": 0.42500001192092896,
|
203 |
+
"rewards/chosen": -0.45879751443862915,
|
204 |
+
"rewards/margins": 0.015171671286225319,
|
205 |
+
"rewards/rejected": -0.47396916151046753,
|
206 |
+
"step": 110
|
207 |
+
},
|
208 |
+
{
|
209 |
+
"epoch": 0.10313708637730984,
|
210 |
+
"grad_norm": 0.07691823691129684,
|
211 |
+
"learning_rate": 4.921457902821578e-06,
|
212 |
+
"logits/chosen": 13.761972427368164,
|
213 |
+
"logits/rejected": 14.64726448059082,
|
214 |
+
"logps/chosen": -0.2784760296344757,
|
215 |
+
"logps/rejected": -0.34076255559921265,
|
216 |
+
"loss": 0.9179,
|
217 |
+
"rewards/accuracies": 0.5249999761581421,
|
218 |
+
"rewards/chosen": -0.41771402955055237,
|
219 |
+
"rewards/margins": 0.09342982620000839,
|
220 |
+
"rewards/rejected": -0.5111438632011414,
|
221 |
+
"step": 120
|
222 |
+
},
|
223 |
+
{
|
224 |
+
"epoch": 0.11173184357541899,
|
225 |
+
"grad_norm": 0.08534488826990128,
|
226 |
+
"learning_rate": 4.907906416994146e-06,
|
227 |
+
"logits/chosen": 13.837780952453613,
|
228 |
+
"logits/rejected": 14.767657279968262,
|
229 |
+
"logps/chosen": -0.26367664337158203,
|
230 |
+
"logps/rejected": -0.3845904469490051,
|
231 |
+
"loss": 0.8978,
|
232 |
+
"rewards/accuracies": 0.550000011920929,
|
233 |
+
"rewards/chosen": -0.39551490545272827,
|
234 |
+
"rewards/margins": 0.18137072026729584,
|
235 |
+
"rewards/rejected": -0.5768855810165405,
|
236 |
+
"step": 130
|
237 |
+
},
|
238 |
+
{
|
239 |
+
"epoch": 0.12032660077352815,
|
240 |
+
"grad_norm": 0.08117899298667908,
|
241 |
+
"learning_rate": 4.893298743830168e-06,
|
242 |
+
"logits/chosen": 13.270025253295898,
|
243 |
+
"logits/rejected": 14.128207206726074,
|
244 |
+
"logps/chosen": -0.24728116393089294,
|
245 |
+
"logps/rejected": -0.3510771095752716,
|
246 |
+
"loss": 0.9117,
|
247 |
+
"rewards/accuracies": 0.5874999761581421,
|
248 |
+
"rewards/chosen": -0.370921790599823,
|
249 |
+
"rewards/margins": 0.1556939035654068,
|
250 |
+
"rewards/rejected": -0.5266156196594238,
|
251 |
+
"step": 140
|
252 |
+
},
|
253 |
+
{
|
254 |
+
"epoch": 0.1289213579716373,
|
255 |
+
"grad_norm": 0.1263500601053238,
|
256 |
+
"learning_rate": 4.8776412907378845e-06,
|
257 |
+
"logits/chosen": 13.525009155273438,
|
258 |
+
"logits/rejected": 14.163309097290039,
|
259 |
+
"logps/chosen": -0.24874648451805115,
|
260 |
+
"logps/rejected": -0.38132259249687195,
|
261 |
+
"loss": 0.9007,
|
262 |
+
"rewards/accuracies": 0.625,
|
263 |
+
"rewards/chosen": -0.3731197714805603,
|
264 |
+
"rewards/margins": 0.1988641768693924,
|
265 |
+
"rewards/rejected": -0.5719839334487915,
|
266 |
+
"step": 150
|
267 |
+
},
|
268 |
+
{
|
269 |
+
"epoch": 0.1289213579716373,
|
270 |
+
"eval_logits/chosen": 12.438652992248535,
|
271 |
+
"eval_logits/rejected": 13.519843101501465,
|
272 |
+
"eval_logps/chosen": -0.2689361274242401,
|
273 |
+
"eval_logps/rejected": -0.3897271454334259,
|
274 |
+
"eval_loss": 0.8991575241088867,
|
275 |
+
"eval_rewards/accuracies": 0.5894736647605896,
|
276 |
+
"eval_rewards/chosen": -0.40340420603752136,
|
277 |
+
"eval_rewards/margins": 0.1811865121126175,
|
278 |
+
"eval_rewards/rejected": -0.5845907330513,
|
279 |
+
"eval_runtime": 26.0482,
|
280 |
+
"eval_samples_per_second": 28.908,
|
281 |
+
"eval_steps_per_second": 3.647,
|
282 |
+
"step": 150
|
283 |
+
},
|
284 |
+
{
|
285 |
+
"epoch": 0.13751611516974646,
|
286 |
+
"grad_norm": 0.11390316486358643,
|
287 |
+
"learning_rate": 4.860940925593703e-06,
|
288 |
+
"logits/chosen": 12.494891166687012,
|
289 |
+
"logits/rejected": 13.346384048461914,
|
290 |
+
"logps/chosen": -0.26858460903167725,
|
291 |
+
"logps/rejected": -0.4170496463775635,
|
292 |
+
"loss": 0.8854,
|
293 |
+
"rewards/accuracies": 0.5625,
|
294 |
+
"rewards/chosen": -0.4028768539428711,
|
295 |
+
"rewards/margins": 0.22269758582115173,
|
296 |
+
"rewards/rejected": -0.6255744695663452,
|
297 |
+
"step": 160
|
298 |
+
},
|
299 |
+
{
|
300 |
+
"epoch": 0.1461108723678556,
|
301 |
+
"grad_norm": 0.14250700175762177,
|
302 |
+
"learning_rate": 4.84320497372973e-06,
|
303 |
+
"logits/chosen": 11.637483596801758,
|
304 |
+
"logits/rejected": 12.72177505493164,
|
305 |
+
"logps/chosen": -0.2967775762081146,
|
306 |
+
"logps/rejected": -0.440357506275177,
|
307 |
+
"loss": 0.8884,
|
308 |
+
"rewards/accuracies": 0.625,
|
309 |
+
"rewards/chosen": -0.4451664090156555,
|
310 |
+
"rewards/margins": 0.21536986529827118,
|
311 |
+
"rewards/rejected": -0.6605362892150879,
|
312 |
+
"step": 170
|
313 |
+
},
|
314 |
+
{
|
315 |
+
"epoch": 0.15470562956596476,
|
316 |
+
"grad_norm": 0.174351766705513,
|
317 |
+
"learning_rate": 4.824441214720629e-06,
|
318 |
+
"logits/chosen": 11.577589988708496,
|
319 |
+
"logits/rejected": 12.179681777954102,
|
320 |
+
"logps/chosen": -0.29397666454315186,
|
321 |
+
"logps/rejected": -0.4009665548801422,
|
322 |
+
"loss": 0.8756,
|
323 |
+
"rewards/accuracies": 0.574999988079071,
|
324 |
+
"rewards/chosen": -0.44096502661705017,
|
325 |
+
"rewards/margins": 0.16048480570316315,
|
326 |
+
"rewards/rejected": -0.6014498472213745,
|
327 |
+
"step": 180
|
328 |
+
},
|
329 |
+
{
|
330 |
+
"epoch": 0.1633003867640739,
|
331 |
+
"grad_norm": 0.22877676784992218,
|
332 |
+
"learning_rate": 4.804657878971252e-06,
|
333 |
+
"logits/chosen": 9.352752685546875,
|
334 |
+
"logits/rejected": 10.27645206451416,
|
335 |
+
"logps/chosen": -0.30452457070350647,
|
336 |
+
"logps/rejected": -0.4765443205833435,
|
337 |
+
"loss": 0.8781,
|
338 |
+
"rewards/accuracies": 0.612500011920929,
|
339 |
+
"rewards/chosen": -0.4567868113517761,
|
340 |
+
"rewards/margins": 0.25802966952323914,
|
341 |
+
"rewards/rejected": -0.7148164510726929,
|
342 |
+
"step": 190
|
343 |
+
},
|
344 |
+
{
|
345 |
+
"epoch": 0.17189514396218306,
|
346 |
+
"grad_norm": 0.2517675459384918,
|
347 |
+
"learning_rate": 4.783863644106502e-06,
|
348 |
+
"logits/chosen": 8.136419296264648,
|
349 |
+
"logits/rejected": 9.26432991027832,
|
350 |
+
"logps/chosen": -0.3416380286216736,
|
351 |
+
"logps/rejected": -0.4680122435092926,
|
352 |
+
"loss": 0.8531,
|
353 |
+
"rewards/accuracies": 0.6000000238418579,
|
354 |
+
"rewards/chosen": -0.5124570727348328,
|
355 |
+
"rewards/margins": 0.18956127762794495,
|
356 |
+
"rewards/rejected": -0.7020183801651001,
|
357 |
+
"step": 200
|
358 |
+
},
|
359 |
+
{
|
360 |
+
"epoch": 0.17189514396218306,
|
361 |
+
"eval_logits/chosen": 7.26609992980957,
|
362 |
+
"eval_logits/rejected": 8.391904830932617,
|
363 |
+
"eval_logps/chosen": -0.31862083077430725,
|
364 |
+
"eval_logps/rejected": -0.5189473032951355,
|
365 |
+
"eval_loss": 0.8484573364257812,
|
366 |
+
"eval_rewards/accuracies": 0.6315789222717285,
|
367 |
+
"eval_rewards/chosen": -0.47793126106262207,
|
368 |
+
"eval_rewards/margins": 0.30048972368240356,
|
369 |
+
"eval_rewards/rejected": -0.7784210443496704,
|
370 |
+
"eval_runtime": 26.0496,
|
371 |
+
"eval_samples_per_second": 28.906,
|
372 |
+
"eval_steps_per_second": 3.647,
|
373 |
+
"step": 200
|
374 |
+
},
|
375 |
+
{
|
376 |
+
"epoch": 0.18048990116029223,
|
377 |
+
"grad_norm": 0.28971683979034424,
|
378 |
+
"learning_rate": 4.762067631165049e-06,
|
379 |
+
"logits/chosen": 7.321592807769775,
|
380 |
+
"logits/rejected": 7.871228218078613,
|
381 |
+
"logps/chosen": -0.3311695158481598,
|
382 |
+
"logps/rejected": -0.4879254400730133,
|
383 |
+
"loss": 0.8211,
|
384 |
+
"rewards/accuracies": 0.612500011920929,
|
385 |
+
"rewards/chosen": -0.4967542588710785,
|
386 |
+
"rewards/margins": 0.23513388633728027,
|
387 |
+
"rewards/rejected": -0.7318881750106812,
|
388 |
+
"step": 210
|
389 |
+
},
|
390 |
+
{
|
391 |
+
"epoch": 0.18908465835840138,
|
392 |
+
"grad_norm": 0.568050742149353,
|
393 |
+
"learning_rate": 4.7392794005985324e-06,
|
394 |
+
"logits/chosen": 5.077876091003418,
|
395 |
+
"logits/rejected": 5.706583499908447,
|
396 |
+
"logps/chosen": -0.3127230405807495,
|
397 |
+
"logps/rejected": -0.5744297504425049,
|
398 |
+
"loss": 0.8331,
|
399 |
+
"rewards/accuracies": 0.675000011920929,
|
400 |
+
"rewards/chosen": -0.46908459067344666,
|
401 |
+
"rewards/margins": 0.39256006479263306,
|
402 |
+
"rewards/rejected": -0.8616446256637573,
|
403 |
+
"step": 220
|
404 |
+
},
|
405 |
+
{
|
406 |
+
"epoch": 0.19767941555651053,
|
407 |
+
"grad_norm": 0.32453760504722595,
|
408 |
+
"learning_rate": 4.715508948078037e-06,
|
409 |
+
"logits/chosen": 4.265925407409668,
|
410 |
+
"logits/rejected": 4.2006964683532715,
|
411 |
+
"logps/chosen": -0.4032830595970154,
|
412 |
+
"logps/rejected": -0.6459742784500122,
|
413 |
+
"loss": 0.7986,
|
414 |
+
"rewards/accuracies": 0.6625000238418579,
|
415 |
+
"rewards/chosen": -0.6049246191978455,
|
416 |
+
"rewards/margins": 0.3640367388725281,
|
417 |
+
"rewards/rejected": -0.9689614176750183,
|
418 |
+
"step": 230
|
419 |
+
},
|
420 |
+
{
|
421 |
+
"epoch": 0.20627417275461968,
|
422 |
+
"grad_norm": 0.448809951543808,
|
423 |
+
"learning_rate": 4.690766700109659e-06,
|
424 |
+
"logits/chosen": 3.3534884452819824,
|
425 |
+
"logits/rejected": 3.4250903129577637,
|
426 |
+
"logps/chosen": -0.3817242383956909,
|
427 |
+
"logps/rejected": -0.7190496921539307,
|
428 |
+
"loss": 0.7708,
|
429 |
+
"rewards/accuracies": 0.675000011920929,
|
430 |
+
"rewards/chosen": -0.5725863575935364,
|
431 |
+
"rewards/margins": 0.5059882402420044,
|
432 |
+
"rewards/rejected": -1.078574538230896,
|
433 |
+
"step": 240
|
434 |
+
},
|
435 |
+
{
|
436 |
+
"epoch": 0.21486892995272883,
|
437 |
+
"grad_norm": 0.4277574419975281,
|
438 |
+
"learning_rate": 4.665063509461098e-06,
|
439 |
+
"logits/chosen": 3.151397228240967,
|
440 |
+
"logits/rejected": 2.8183228969573975,
|
441 |
+
"logps/chosen": -0.44173598289489746,
|
442 |
+
"logps/rejected": -0.8323748707771301,
|
443 |
+
"loss": 0.7722,
|
444 |
+
"rewards/accuracies": 0.625,
|
445 |
+
"rewards/chosen": -0.6626039743423462,
|
446 |
+
"rewards/margins": 0.5859583616256714,
|
447 |
+
"rewards/rejected": -1.248562216758728,
|
448 |
+
"step": 250
|
449 |
+
},
|
450 |
+
{
|
451 |
+
"epoch": 0.21486892995272883,
|
452 |
+
"eval_logits/chosen": 2.520007848739624,
|
453 |
+
"eval_logits/rejected": 1.9197090864181519,
|
454 |
+
"eval_logps/chosen": -0.4703753888607025,
|
455 |
+
"eval_logps/rejected": -0.90553879737854,
|
456 |
+
"eval_loss": 0.7410055994987488,
|
457 |
+
"eval_rewards/accuracies": 0.6631578803062439,
|
458 |
+
"eval_rewards/chosen": -0.7055630087852478,
|
459 |
+
"eval_rewards/margins": 0.6527453064918518,
|
460 |
+
"eval_rewards/rejected": -1.3583083152770996,
|
461 |
+
"eval_runtime": 26.0441,
|
462 |
+
"eval_samples_per_second": 28.912,
|
463 |
+
"eval_steps_per_second": 3.648,
|
464 |
+
"step": 250
|
465 |
+
},
|
466 |
+
{
|
467 |
+
"epoch": 0.22346368715083798,
|
468 |
+
"grad_norm": 0.5626497268676758,
|
469 |
+
"learning_rate": 4.638410650401267e-06,
|
470 |
+
"logits/chosen": 1.2351257801055908,
|
471 |
+
"logits/rejected": 0.5925868153572083,
|
472 |
+
"logps/chosen": -0.46581563353538513,
|
473 |
+
"logps/rejected": -0.9673674702644348,
|
474 |
+
"loss": 0.6933,
|
475 |
+
"rewards/accuracies": 0.75,
|
476 |
+
"rewards/chosen": -0.6987233757972717,
|
477 |
+
"rewards/margins": 0.7523276209831238,
|
478 |
+
"rewards/rejected": -1.451051115989685,
|
479 |
+
"step": 260
|
480 |
+
},
|
481 |
+
{
|
482 |
+
"epoch": 0.23205844434894715,
|
483 |
+
"grad_norm": 0.7433231472969055,
|
484 |
+
"learning_rate": 4.610819813755038e-06,
|
485 |
+
"logits/chosen": 3.1690659523010254,
|
486 |
+
"logits/rejected": 2.0423803329467773,
|
487 |
+
"logps/chosen": -0.506645679473877,
|
488 |
+
"logps/rejected": -1.0180162191390991,
|
489 |
+
"loss": 0.7265,
|
490 |
+
"rewards/accuracies": 0.699999988079071,
|
491 |
+
"rewards/chosen": -0.7599684596061707,
|
492 |
+
"rewards/margins": 0.767055869102478,
|
493 |
+
"rewards/rejected": -1.527024507522583,
|
494 |
+
"step": 270
|
495 |
+
},
|
496 |
+
{
|
497 |
+
"epoch": 0.2406532015470563,
|
498 |
+
"grad_norm": 1.4220589399337769,
|
499 |
+
"learning_rate": 4.582303101775249e-06,
|
500 |
+
"logits/chosen": 2.8173985481262207,
|
501 |
+
"logits/rejected": 1.5537467002868652,
|
502 |
+
"logps/chosen": -0.5869659185409546,
|
503 |
+
"logps/rejected": -1.1085975170135498,
|
504 |
+
"loss": 0.6725,
|
505 |
+
"rewards/accuracies": 0.6625000238418579,
|
506 |
+
"rewards/chosen": -0.8804486989974976,
|
507 |
+
"rewards/margins": 0.7824474573135376,
|
508 |
+
"rewards/rejected": -1.6628963947296143,
|
509 |
+
"step": 280
|
510 |
+
},
|
511 |
+
{
|
512 |
+
"epoch": 0.24924795874516545,
|
513 |
+
"grad_norm": 0.6397098898887634,
|
514 |
+
"learning_rate": 4.55287302283426e-06,
|
515 |
+
"logits/chosen": 2.734229564666748,
|
516 |
+
"logits/rejected": 1.9948323965072632,
|
517 |
+
"logps/chosen": -0.6540845036506653,
|
518 |
+
"logps/rejected": -1.451608419418335,
|
519 |
+
"loss": 0.571,
|
520 |
+
"rewards/accuracies": 0.6000000238418579,
|
521 |
+
"rewards/chosen": -0.9811266660690308,
|
522 |
+
"rewards/margins": 1.1962860822677612,
|
523 |
+
"rewards/rejected": -2.177412748336792,
|
524 |
+
"step": 290
|
525 |
+
},
|
526 |
+
{
|
527 |
+
"epoch": 0.2578427159432746,
|
528 |
+
"grad_norm": 0.4591177701950073,
|
529 |
+
"learning_rate": 4.522542485937369e-06,
|
530 |
+
"logits/chosen": 2.2491040229797363,
|
531 |
+
"logits/rejected": 1.345014214515686,
|
532 |
+
"logps/chosen": -0.6877793073654175,
|
533 |
+
"logps/rejected": -1.6054528951644897,
|
534 |
+
"loss": 0.5782,
|
535 |
+
"rewards/accuracies": 0.612500011920929,
|
536 |
+
"rewards/chosen": -1.0316689014434814,
|
537 |
+
"rewards/margins": 1.3765103816986084,
|
538 |
+
"rewards/rejected": -2.408179521560669,
|
539 |
+
"step": 300
|
540 |
+
},
|
541 |
+
{
|
542 |
+
"epoch": 0.2578427159432746,
|
543 |
+
"eval_logits/chosen": 1.661840796470642,
|
544 |
+
"eval_logits/rejected": 0.6246702671051025,
|
545 |
+
"eval_logps/chosen": -0.7322248816490173,
|
546 |
+
"eval_logps/rejected": -2.272771120071411,
|
547 |
+
"eval_loss": 0.563686728477478,
|
548 |
+
"eval_rewards/accuracies": 0.7157894968986511,
|
549 |
+
"eval_rewards/chosen": -1.0983372926712036,
|
550 |
+
"eval_rewards/margins": 2.310819387435913,
|
551 |
+
"eval_rewards/rejected": -3.409156560897827,
|
552 |
+
"eval_runtime": 26.0455,
|
553 |
+
"eval_samples_per_second": 28.911,
|
554 |
+
"eval_steps_per_second": 3.647,
|
555 |
+
"step": 300
|
556 |
+
},
|
557 |
+
{
|
558 |
+
"epoch": 0.2664374731413838,
|
559 |
+
"grad_norm": 0.786809504032135,
|
560 |
+
"learning_rate": 4.491324795060491e-06,
|
561 |
+
"logits/chosen": 1.3445788621902466,
|
562 |
+
"logits/rejected": 0.4989510178565979,
|
563 |
+
"logps/chosen": -0.7276264429092407,
|
564 |
+
"logps/rejected": -2.3235878944396973,
|
565 |
+
"loss": 0.5253,
|
566 |
+
"rewards/accuracies": 0.75,
|
567 |
+
"rewards/chosen": -1.0914397239685059,
|
568 |
+
"rewards/margins": 2.393942356109619,
|
569 |
+
"rewards/rejected": -3.485382080078125,
|
570 |
+
"step": 310
|
571 |
+
},
|
572 |
+
{
|
573 |
+
"epoch": 0.2750322303394929,
|
574 |
+
"grad_norm": 0.3913320004940033,
|
575 |
+
"learning_rate": 4.4592336433146e-06,
|
576 |
+
"logits/chosen": 2.61965012550354,
|
577 |
+
"logits/rejected": 1.9477211236953735,
|
578 |
+
"logps/chosen": -0.7146936655044556,
|
579 |
+
"logps/rejected": -1.9647115468978882,
|
580 |
+
"loss": 0.5294,
|
581 |
+
"rewards/accuracies": 0.675000011920929,
|
582 |
+
"rewards/chosen": -1.0720404386520386,
|
583 |
+
"rewards/margins": 1.8750267028808594,
|
584 |
+
"rewards/rejected": -2.9470672607421875,
|
585 |
+
"step": 320
|
586 |
+
},
|
587 |
+
{
|
588 |
+
"epoch": 0.28362698753760207,
|
589 |
+
"grad_norm": 0.4867005944252014,
|
590 |
+
"learning_rate": 4.426283106939474e-06,
|
591 |
+
"logits/chosen": 2.500439167022705,
|
592 |
+
"logits/rejected": 1.6413562297821045,
|
593 |
+
"logps/chosen": -0.8710287809371948,
|
594 |
+
"logps/rejected": -2.36894154548645,
|
595 |
+
"loss": 0.548,
|
596 |
+
"rewards/accuracies": 0.625,
|
597 |
+
"rewards/chosen": -1.306543231010437,
|
598 |
+
"rewards/margins": 2.246868848800659,
|
599 |
+
"rewards/rejected": -3.5534119606018066,
|
600 |
+
"step": 330
|
601 |
+
},
|
602 |
+
{
|
603 |
+
"epoch": 0.2922217447357112,
|
604 |
+
"grad_norm": 0.8009849786758423,
|
605 |
+
"learning_rate": 4.3924876391293915e-06,
|
606 |
+
"logits/chosen": 1.3847177028656006,
|
607 |
+
"logits/rejected": 0.8994542360305786,
|
608 |
+
"logps/chosen": -0.8447234034538269,
|
609 |
+
"logps/rejected": -2.800283908843994,
|
610 |
+
"loss": 0.4797,
|
611 |
+
"rewards/accuracies": 0.699999988079071,
|
612 |
+
"rewards/chosen": -1.2670851945877075,
|
613 |
+
"rewards/margins": 2.9333412647247314,
|
614 |
+
"rewards/rejected": -4.2004265785217285,
|
615 |
+
"step": 340
|
616 |
+
},
|
617 |
+
{
|
618 |
+
"epoch": 0.30081650193382037,
|
619 |
+
"grad_norm": 2.0202796459198,
|
620 |
+
"learning_rate": 4.357862063693486e-06,
|
621 |
+
"logits/chosen": 2.3197357654571533,
|
622 |
+
"logits/rejected": 1.37326180934906,
|
623 |
+
"logps/chosen": -0.8590717315673828,
|
624 |
+
"logps/rejected": -2.1532845497131348,
|
625 |
+
"loss": 0.5126,
|
626 |
+
"rewards/accuracies": 0.574999988079071,
|
627 |
+
"rewards/chosen": -1.2886077165603638,
|
628 |
+
"rewards/margins": 1.941319465637207,
|
629 |
+
"rewards/rejected": -3.2299270629882812,
|
630 |
+
"step": 350
|
631 |
+
},
|
632 |
+
{
|
633 |
+
"epoch": 0.30081650193382037,
|
634 |
+
"eval_logits/chosen": 2.0864102840423584,
|
635 |
+
"eval_logits/rejected": 1.2036340236663818,
|
636 |
+
"eval_logps/chosen": -0.9554746150970459,
|
637 |
+
"eval_logps/rejected": -3.0601954460144043,
|
638 |
+
"eval_loss": 0.5108997821807861,
|
639 |
+
"eval_rewards/accuracies": 0.7368420958518982,
|
640 |
+
"eval_rewards/chosen": -1.4332119226455688,
|
641 |
+
"eval_rewards/margins": 3.15708065032959,
|
642 |
+
"eval_rewards/rejected": -4.590292930603027,
|
643 |
+
"eval_runtime": 26.0503,
|
644 |
+
"eval_samples_per_second": 28.906,
|
645 |
+
"eval_steps_per_second": 3.647,
|
646 |
+
"step": 350
|
647 |
+
},
|
648 |
+
{
|
649 |
+
"epoch": 0.3094112591319295,
|
650 |
+
"grad_norm": 1.0668681859970093,
|
651 |
+
"learning_rate": 4.322421568553529e-06,
|
652 |
+
"logits/chosen": 1.6770871877670288,
|
653 |
+
"logits/rejected": 1.073407530784607,
|
654 |
+
"logps/chosen": -1.1393296718597412,
|
655 |
+
"logps/rejected": -2.886169910430908,
|
656 |
+
"loss": 0.5031,
|
657 |
+
"rewards/accuracies": 0.6625000238418579,
|
658 |
+
"rewards/chosen": -1.7089945077896118,
|
659 |
+
"rewards/margins": 2.620260238647461,
|
660 |
+
"rewards/rejected": -4.329255104064941,
|
661 |
+
"step": 360
|
662 |
+
},
|
663 |
+
{
|
664 |
+
"epoch": 0.31800601633003867,
|
665 |
+
"grad_norm": 0.5015287399291992,
|
666 |
+
"learning_rate": 4.286181699082008e-06,
|
667 |
+
"logits/chosen": 2.156587600708008,
|
668 |
+
"logits/rejected": 1.371209979057312,
|
669 |
+
"logps/chosen": -0.9851818084716797,
|
670 |
+
"logps/rejected": -3.2286324501037598,
|
671 |
+
"loss": 0.4662,
|
672 |
+
"rewards/accuracies": 0.7875000238418579,
|
673 |
+
"rewards/chosen": -1.47777259349823,
|
674 |
+
"rewards/margins": 3.3651764392852783,
|
675 |
+
"rewards/rejected": -4.842948913574219,
|
676 |
+
"step": 370
|
677 |
+
},
|
678 |
+
{
|
679 |
+
"epoch": 0.3266007735281478,
|
680 |
+
"grad_norm": 0.9893808960914612,
|
681 |
+
"learning_rate": 4.249158351283414e-06,
|
682 |
+
"logits/chosen": 2.6184191703796387,
|
683 |
+
"logits/rejected": 2.212998390197754,
|
684 |
+
"logps/chosen": -0.9414733052253723,
|
685 |
+
"logps/rejected": -2.940886974334717,
|
686 |
+
"loss": 0.4829,
|
687 |
+
"rewards/accuracies": 0.6625000238418579,
|
688 |
+
"rewards/chosen": -1.4122098684310913,
|
689 |
+
"rewards/margins": 2.9991202354431152,
|
690 |
+
"rewards/rejected": -4.411330223083496,
|
691 |
+
"step": 380
|
692 |
+
},
|
693 |
+
{
|
694 |
+
"epoch": 0.33519553072625696,
|
695 |
+
"grad_norm": 0.7588702440261841,
|
696 |
+
"learning_rate": 4.211367764821722e-06,
|
697 |
+
"logits/chosen": 3.257941484451294,
|
698 |
+
"logits/rejected": 2.5362088680267334,
|
699 |
+
"logps/chosen": -1.182255744934082,
|
700 |
+
"logps/rejected": -2.8621151447296143,
|
701 |
+
"loss": 0.4538,
|
702 |
+
"rewards/accuracies": 0.637499988079071,
|
703 |
+
"rewards/chosen": -1.7733834981918335,
|
704 |
+
"rewards/margins": 2.5197887420654297,
|
705 |
+
"rewards/rejected": -4.293172359466553,
|
706 |
+
"step": 390
|
707 |
+
},
|
708 |
+
{
|
709 |
+
"epoch": 0.3437902879243661,
|
710 |
+
"grad_norm": 0.6317985653877258,
|
711 |
+
"learning_rate": 4.172826515897146e-06,
|
712 |
+
"logits/chosen": 3.057791233062744,
|
713 |
+
"logits/rejected": 2.4121367931365967,
|
714 |
+
"logps/chosen": -1.0847463607788086,
|
715 |
+
"logps/rejected": -3.3152599334716797,
|
716 |
+
"loss": 0.4847,
|
717 |
+
"rewards/accuracies": 0.699999988079071,
|
718 |
+
"rewards/chosen": -1.6271196603775024,
|
719 |
+
"rewards/margins": 3.3457705974578857,
|
720 |
+
"rewards/rejected": -4.9728899002075195,
|
721 |
+
"step": 400
|
722 |
+
},
|
723 |
+
{
|
724 |
+
"epoch": 0.3437902879243661,
|
725 |
+
"eval_logits/chosen": 2.9584426879882812,
|
726 |
+
"eval_logits/rejected": 2.292771577835083,
|
727 |
+
"eval_logps/chosen": -1.202886939048767,
|
728 |
+
"eval_logps/rejected": -3.6770312786102295,
|
729 |
+
"eval_loss": 0.47303518652915955,
|
730 |
+
"eval_rewards/accuracies": 0.7473683953285217,
|
731 |
+
"eval_rewards/chosen": -1.8043304681777954,
|
732 |
+
"eval_rewards/margins": 3.711216688156128,
|
733 |
+
"eval_rewards/rejected": -5.515547275543213,
|
734 |
+
"eval_runtime": 26.0247,
|
735 |
+
"eval_samples_per_second": 28.934,
|
736 |
+
"eval_steps_per_second": 3.65,
|
737 |
+
"step": 400
|
738 |
+
},
|
739 |
+
{
|
740 |
+
"epoch": 0.3523850451224753,
|
741 |
+
"grad_norm": 1.0523916482925415,
|
742 |
+
"learning_rate": 4.133551509975264e-06,
|
743 |
+
"logits/chosen": 2.9360365867614746,
|
744 |
+
"logits/rejected": 2.330521583557129,
|
745 |
+
"logps/chosen": -1.3002166748046875,
|
746 |
+
"logps/rejected": -3.2887542247772217,
|
747 |
+
"loss": 0.4398,
|
748 |
+
"rewards/accuracies": 0.675000011920929,
|
749 |
+
"rewards/chosen": -1.9503250122070312,
|
750 |
+
"rewards/margins": 2.9828057289123535,
|
751 |
+
"rewards/rejected": -4.933130741119385,
|
752 |
+
"step": 410
|
753 |
+
},
|
754 |
+
{
|
755 |
+
"epoch": 0.36097980232058446,
|
756 |
+
"grad_norm": 0.6079875826835632,
|
757 |
+
"learning_rate": 4.093559974371725e-06,
|
758 |
+
"logits/chosen": 3.1500794887542725,
|
759 |
+
"logits/rejected": 2.329282283782959,
|
760 |
+
"logps/chosen": -1.23466157913208,
|
761 |
+
"logps/rejected": -3.291548252105713,
|
762 |
+
"loss": 0.4774,
|
763 |
+
"rewards/accuracies": 0.7124999761581421,
|
764 |
+
"rewards/chosen": -1.8519923686981201,
|
765 |
+
"rewards/margins": 3.085329532623291,
|
766 |
+
"rewards/rejected": -4.93732213973999,
|
767 |
+
"step": 420
|
768 |
+
},
|
769 |
+
{
|
770 |
+
"epoch": 0.3695745595186936,
|
771 |
+
"grad_norm": 1.3175437450408936,
|
772 |
+
"learning_rate": 4.052869450695776e-06,
|
773 |
+
"logits/chosen": 3.4488296508789062,
|
774 |
+
"logits/rejected": 2.6282899379730225,
|
775 |
+
"logps/chosen": -1.380877137184143,
|
776 |
+
"logps/rejected": -4.005017280578613,
|
777 |
+
"loss": 0.4158,
|
778 |
+
"rewards/accuracies": 0.7749999761581421,
|
779 |
+
"rewards/chosen": -2.0713157653808594,
|
780 |
+
"rewards/margins": 3.9362099170684814,
|
781 |
+
"rewards/rejected": -6.007525444030762,
|
782 |
+
"step": 430
|
783 |
+
},
|
784 |
+
{
|
785 |
+
"epoch": 0.37816931671680276,
|
786 |
+
"grad_norm": 3.7249863147735596,
|
787 |
+
"learning_rate": 4.011497787155938e-06,
|
788 |
+
"logits/chosen": 2.5173678398132324,
|
789 |
+
"logits/rejected": 1.943926215171814,
|
790 |
+
"logps/chosen": -1.7800304889678955,
|
791 |
+
"logps/rejected": -4.422289848327637,
|
792 |
+
"loss": 0.3916,
|
793 |
+
"rewards/accuracies": 0.862500011920929,
|
794 |
+
"rewards/chosen": -2.6700453758239746,
|
795 |
+
"rewards/margins": 3.9633898735046387,
|
796 |
+
"rewards/rejected": -6.633435249328613,
|
797 |
+
"step": 440
|
798 |
+
},
|
799 |
+
{
|
800 |
+
"epoch": 0.3867640739149119,
|
801 |
+
"grad_norm": 2.9776103496551514,
|
802 |
+
"learning_rate": 3.969463130731183e-06,
|
803 |
+
"logits/chosen": 3.2318034172058105,
|
804 |
+
"logits/rejected": 2.5253517627716064,
|
805 |
+
"logps/chosen": -2.309701442718506,
|
806 |
+
"logps/rejected": -4.725776672363281,
|
807 |
+
"loss": 0.368,
|
808 |
+
"rewards/accuracies": 0.887499988079071,
|
809 |
+
"rewards/chosen": -3.464552640914917,
|
810 |
+
"rewards/margins": 3.624112606048584,
|
811 |
+
"rewards/rejected": -7.0886640548706055,
|
812 |
+
"step": 450
|
813 |
+
},
|
814 |
+
{
|
815 |
+
"epoch": 0.3867640739149119,
|
816 |
+
"eval_logits/chosen": 2.397157907485962,
|
817 |
+
"eval_logits/rejected": 2.0492196083068848,
|
818 |
+
"eval_logps/chosen": -2.6244213581085205,
|
819 |
+
"eval_logps/rejected": -5.247391700744629,
|
820 |
+
"eval_loss": 0.3982011079788208,
|
821 |
+
"eval_rewards/accuracies": 0.8842105269432068,
|
822 |
+
"eval_rewards/chosen": -3.936631917953491,
|
823 |
+
"eval_rewards/margins": 3.934455633163452,
|
824 |
+
"eval_rewards/rejected": -7.87108850479126,
|
825 |
+
"eval_runtime": 26.0501,
|
826 |
+
"eval_samples_per_second": 28.906,
|
827 |
+
"eval_steps_per_second": 3.647,
|
828 |
+
"step": 450
|
829 |
+
},
|
830 |
+
{
|
831 |
+
"epoch": 0.39535883111302106,
|
832 |
+
"grad_norm": 2.3925623893737793,
|
833 |
+
"learning_rate": 3.92678391921108e-06,
|
834 |
+
"logits/chosen": 3.0329971313476562,
|
835 |
+
"logits/rejected": 2.67683482170105,
|
836 |
+
"logps/chosen": -2.4644994735717773,
|
837 |
+
"logps/rejected": -4.755246162414551,
|
838 |
+
"loss": 0.3584,
|
839 |
+
"rewards/accuracies": 0.8125,
|
840 |
+
"rewards/chosen": -3.696749210357666,
|
841 |
+
"rewards/margins": 3.436119794845581,
|
842 |
+
"rewards/rejected": -7.132868766784668,
|
843 |
+
"step": 460
|
844 |
+
},
|
845 |
+
{
|
846 |
+
"epoch": 0.4039535883111302,
|
847 |
+
"grad_norm": 3.1981327533721924,
|
848 |
+
"learning_rate": 3.88347887310836e-06,
|
849 |
+
"logits/chosen": 2.219741106033325,
|
850 |
+
"logits/rejected": 1.8649622201919556,
|
851 |
+
"logps/chosen": -2.2890329360961914,
|
852 |
+
"logps/rejected": -5.124932289123535,
|
853 |
+
"loss": 0.3709,
|
854 |
+
"rewards/accuracies": 0.8500000238418579,
|
855 |
+
"rewards/chosen": -3.433549404144287,
|
856 |
+
"rewards/margins": 4.253849029541016,
|
857 |
+
"rewards/rejected": -7.687398433685303,
|
858 |
+
"step": 470
|
859 |
+
},
|
860 |
+
{
|
861 |
+
"epoch": 0.41254834550923936,
|
862 |
+
"grad_norm": 2.0272741317749023,
|
863 |
+
"learning_rate": 3.839566987447492e-06,
|
864 |
+
"logits/chosen": 3.6659038066864014,
|
865 |
+
"logits/rejected": 3.202749252319336,
|
866 |
+
"logps/chosen": -2.5729193687438965,
|
867 |
+
"logps/rejected": -4.992354393005371,
|
868 |
+
"loss": 0.3837,
|
869 |
+
"rewards/accuracies": 0.8374999761581421,
|
870 |
+
"rewards/chosen": -3.859379529953003,
|
871 |
+
"rewards/margins": 3.629152297973633,
|
872 |
+
"rewards/rejected": -7.488531589508057,
|
873 |
+
"step": 480
|
874 |
+
},
|
875 |
+
{
|
876 |
+
"epoch": 0.4211431027073485,
|
877 |
+
"grad_norm": 2.5182268619537354,
|
878 |
+
"learning_rate": 3.795067523432826e-06,
|
879 |
+
"logits/chosen": 3.327012538909912,
|
880 |
+
"logits/rejected": 3.1205530166625977,
|
881 |
+
"logps/chosen": -3.016247510910034,
|
882 |
+
"logps/rejected": -5.566779136657715,
|
883 |
+
"loss": 0.3112,
|
884 |
+
"rewards/accuracies": 0.875,
|
885 |
+
"rewards/chosen": -4.524371147155762,
|
886 |
+
"rewards/margins": 3.8257980346679688,
|
887 |
+
"rewards/rejected": -8.35016918182373,
|
888 |
+
"step": 490
|
889 |
+
},
|
890 |
+
{
|
891 |
+
"epoch": 0.42973785990545765,
|
892 |
+
"grad_norm": 2.990694046020508,
|
893 |
+
"learning_rate": 3.7500000000000005e-06,
|
894 |
+
"logits/chosen": 2.7793381214141846,
|
895 |
+
"logits/rejected": 2.7330098152160645,
|
896 |
+
"logps/chosen": -2.7836732864379883,
|
897 |
+
"logps/rejected": -5.60109806060791,
|
898 |
+
"loss": 0.3069,
|
899 |
+
"rewards/accuracies": 0.875,
|
900 |
+
"rewards/chosen": -4.175509929656982,
|
901 |
+
"rewards/margins": 4.226136684417725,
|
902 |
+
"rewards/rejected": -8.401647567749023,
|
903 |
+
"step": 500
|
904 |
+
},
|
905 |
+
{
|
906 |
+
"epoch": 0.42973785990545765,
|
907 |
+
"eval_logits/chosen": 2.5767242908477783,
|
908 |
+
"eval_logits/rejected": 2.1918540000915527,
|
909 |
+
"eval_logps/chosen": -3.1751770973205566,
|
910 |
+
"eval_logps/rejected": -6.361191749572754,
|
911 |
+
"eval_loss": 0.35469338297843933,
|
912 |
+
"eval_rewards/accuracies": 0.9157894849777222,
|
913 |
+
"eval_rewards/chosen": -4.762764930725098,
|
914 |
+
"eval_rewards/margins": 4.779022693634033,
|
915 |
+
"eval_rewards/rejected": -9.541787147521973,
|
916 |
+
"eval_runtime": 26.0483,
|
917 |
+
"eval_samples_per_second": 28.908,
|
918 |
+
"eval_steps_per_second": 3.647,
|
919 |
+
"step": 500
|
920 |
+
},
|
921 |
+
{
|
922 |
+
"epoch": 0.4383326171035668,
|
923 |
+
"grad_norm": 3.1177096366882324,
|
924 |
+
"learning_rate": 3.7043841852542884e-06,
|
925 |
+
"logits/chosen": 3.4840216636657715,
|
926 |
+
"logits/rejected": 2.871774196624756,
|
927 |
+
"logps/chosen": -2.739344596862793,
|
928 |
+
"logps/rejected": -5.363945960998535,
|
929 |
+
"loss": 0.3468,
|
930 |
+
"rewards/accuracies": 0.887499988079071,
|
931 |
+
"rewards/chosen": -4.1090168952941895,
|
932 |
+
"rewards/margins": 3.9369025230407715,
|
933 |
+
"rewards/rejected": -8.045918464660645,
|
934 |
+
"step": 510
|
935 |
+
},
|
936 |
+
{
|
937 |
+
"epoch": 0.44692737430167595,
|
938 |
+
"grad_norm": 2.212597131729126,
|
939 |
+
"learning_rate": 3.658240087799655e-06,
|
940 |
+
"logits/chosen": 2.8667449951171875,
|
941 |
+
"logits/rejected": 2.463776111602783,
|
942 |
+
"logps/chosen": -3.17940092086792,
|
943 |
+
"logps/rejected": -6.375420570373535,
|
944 |
+
"loss": 0.3092,
|
945 |
+
"rewards/accuracies": 0.8999999761581421,
|
946 |
+
"rewards/chosen": -4.769101619720459,
|
947 |
+
"rewards/margins": 4.794029235839844,
|
948 |
+
"rewards/rejected": -9.563131332397461,
|
949 |
+
"step": 520
|
950 |
+
},
|
951 |
+
{
|
952 |
+
"epoch": 0.45552213149978515,
|
953 |
+
"grad_norm": 4.475163459777832,
|
954 |
+
"learning_rate": 3.611587947962319e-06,
|
955 |
+
"logits/chosen": 3.234764814376831,
|
956 |
+
"logits/rejected": 2.6656813621520996,
|
957 |
+
"logps/chosen": -3.0503814220428467,
|
958 |
+
"logps/rejected": -5.525468826293945,
|
959 |
+
"loss": 0.3044,
|
960 |
+
"rewards/accuracies": 0.862500011920929,
|
961 |
+
"rewards/chosen": -4.5755720138549805,
|
962 |
+
"rewards/margins": 3.7126305103302,
|
963 |
+
"rewards/rejected": -8.288202285766602,
|
964 |
+
"step": 530
|
965 |
+
},
|
966 |
+
{
|
967 |
+
"epoch": 0.4641168886978943,
|
968 |
+
"grad_norm": 1.8678548336029053,
|
969 |
+
"learning_rate": 3.564448228912682e-06,
|
970 |
+
"logits/chosen": 2.1433145999908447,
|
971 |
+
"logits/rejected": 2.1412692070007324,
|
972 |
+
"logps/chosen": -2.6177189350128174,
|
973 |
+
"logps/rejected": -5.8179192543029785,
|
974 |
+
"loss": 0.3376,
|
975 |
+
"rewards/accuracies": 0.9125000238418579,
|
976 |
+
"rewards/chosen": -3.9265785217285156,
|
977 |
+
"rewards/margins": 4.800299644470215,
|
978 |
+
"rewards/rejected": -8.72687816619873,
|
979 |
+
"step": 540
|
980 |
+
},
|
981 |
+
{
|
982 |
+
"epoch": 0.47271164589600345,
|
983 |
+
"grad_norm": 2.3289716243743896,
|
984 |
+
"learning_rate": 3.516841607689501e-06,
|
985 |
+
"logits/chosen": 2.7216885089874268,
|
986 |
+
"logits/rejected": 2.549870729446411,
|
987 |
+
"logps/chosen": -2.7370285987854004,
|
988 |
+
"logps/rejected": -5.929703712463379,
|
989 |
+
"loss": 0.2937,
|
990 |
+
"rewards/accuracies": 0.887499988079071,
|
991 |
+
"rewards/chosen": -4.1055426597595215,
|
992 |
+
"rewards/margins": 4.7890119552612305,
|
993 |
+
"rewards/rejected": -8.894556045532227,
|
994 |
+
"step": 550
|
995 |
+
},
|
996 |
+
{
|
997 |
+
"epoch": 0.47271164589600345,
|
998 |
+
"eval_logits/chosen": 2.7431576251983643,
|
999 |
+
"eval_logits/rejected": 2.386326789855957,
|
1000 |
+
"eval_logps/chosen": -3.3791866302490234,
|
1001 |
+
"eval_logps/rejected": -6.955687999725342,
|
1002 |
+
"eval_loss": 0.33076339960098267,
|
1003 |
+
"eval_rewards/accuracies": 0.9157894849777222,
|
1004 |
+
"eval_rewards/chosen": -5.068779945373535,
|
1005 |
+
"eval_rewards/margins": 5.364751815795898,
|
1006 |
+
"eval_rewards/rejected": -10.433531761169434,
|
1007 |
+
"eval_runtime": 26.0558,
|
1008 |
+
"eval_samples_per_second": 28.899,
|
1009 |
+
"eval_steps_per_second": 3.646,
|
1010 |
+
"step": 550
|
1011 |
+
},
|
1012 |
+
{
|
1013 |
+
"epoch": 0.4813064030941126,
|
1014 |
+
"grad_norm": 2.7705740928649902,
|
1015 |
+
"learning_rate": 3.4687889661302577e-06,
|
1016 |
+
"logits/chosen": 2.2392983436584473,
|
1017 |
+
"logits/rejected": 1.9859422445297241,
|
1018 |
+
"logps/chosen": -3.14917254447937,
|
1019 |
+
"logps/rejected": -6.809067726135254,
|
1020 |
+
"loss": 0.2983,
|
1021 |
+
"rewards/accuracies": 0.925000011920929,
|
1022 |
+
"rewards/chosen": -4.723758697509766,
|
1023 |
+
"rewards/margins": 5.489841938018799,
|
1024 |
+
"rewards/rejected": -10.213602066040039,
|
1025 |
+
"step": 560
|
1026 |
+
},
|
1027 |
+
{
|
1028 |
+
"epoch": 0.48990116029222175,
|
1029 |
+
"grad_norm": 2.1203205585479736,
|
1030 |
+
"learning_rate": 3.4203113817116955e-06,
|
1031 |
+
"logits/chosen": 2.5817489624023438,
|
1032 |
+
"logits/rejected": 2.54498291015625,
|
1033 |
+
"logps/chosen": -3.4195308685302734,
|
1034 |
+
"logps/rejected": -7.411266326904297,
|
1035 |
+
"loss": 0.3014,
|
1036 |
+
"rewards/accuracies": 0.987500011920929,
|
1037 |
+
"rewards/chosen": -5.129295349121094,
|
1038 |
+
"rewards/margins": 5.987602710723877,
|
1039 |
+
"rewards/rejected": -11.116899490356445,
|
1040 |
+
"step": 570
|
1041 |
+
},
|
1042 |
+
{
|
1043 |
+
"epoch": 0.4984959174903309,
|
1044 |
+
"grad_norm": 1.7489718198776245,
|
1045 |
+
"learning_rate": 3.3714301183045382e-06,
|
1046 |
+
"logits/chosen": 2.1257646083831787,
|
1047 |
+
"logits/rejected": 2.1210994720458984,
|
1048 |
+
"logps/chosen": -2.9680445194244385,
|
1049 |
+
"logps/rejected": -6.824588775634766,
|
1050 |
+
"loss": 0.2752,
|
1051 |
+
"rewards/accuracies": 0.9375,
|
1052 |
+
"rewards/chosen": -4.452066898345947,
|
1053 |
+
"rewards/margins": 5.784815788269043,
|
1054 |
+
"rewards/rejected": -10.236883163452148,
|
1055 |
+
"step": 580
|
1056 |
+
},
|
1057 |
+
{
|
1058 |
+
"epoch": 0.50709067468844,
|
1059 |
+
"grad_norm": 2.1680099964141846,
|
1060 |
+
"learning_rate": 3.3221666168464584e-06,
|
1061 |
+
"logits/chosen": 2.5764970779418945,
|
1062 |
+
"logits/rejected": 2.2523038387298584,
|
1063 |
+
"logps/chosen": -3.667435884475708,
|
1064 |
+
"logps/rejected": -7.162708282470703,
|
1065 |
+
"loss": 0.2968,
|
1066 |
+
"rewards/accuracies": 0.9375,
|
1067 |
+
"rewards/chosen": -5.501153945922852,
|
1068 |
+
"rewards/margins": 5.242908954620361,
|
1069 |
+
"rewards/rejected": -10.744061470031738,
|
1070 |
+
"step": 590
|
1071 |
+
},
|
1072 |
+
{
|
1073 |
+
"epoch": 0.5156854318865493,
|
1074 |
+
"grad_norm": 1.7536494731903076,
|
1075 |
+
"learning_rate": 3.272542485937369e-06,
|
1076 |
+
"logits/chosen": 2.2658116817474365,
|
1077 |
+
"logits/rejected": 1.980126142501831,
|
1078 |
+
"logps/chosen": -3.5995922088623047,
|
1079 |
+
"logps/rejected": -7.158552646636963,
|
1080 |
+
"loss": 0.2971,
|
1081 |
+
"rewards/accuracies": 0.925000011920929,
|
1082 |
+
"rewards/chosen": -5.399388313293457,
|
1083 |
+
"rewards/margins": 5.338440418243408,
|
1084 |
+
"rewards/rejected": -10.737829208374023,
|
1085 |
+
"step": 600
|
1086 |
+
},
|
1087 |
+
{
|
1088 |
+
"epoch": 0.5156854318865493,
|
1089 |
+
"eval_logits/chosen": 2.6781415939331055,
|
1090 |
+
"eval_logits/rejected": 2.508939027786255,
|
1091 |
+
"eval_logps/chosen": -3.80741548538208,
|
1092 |
+
"eval_logps/rejected": -7.577634334564209,
|
1093 |
+
"eval_loss": 0.3210188150405884,
|
1094 |
+
"eval_rewards/accuracies": 0.9368420839309692,
|
1095 |
+
"eval_rewards/chosen": -5.711122989654541,
|
1096 |
+
"eval_rewards/margins": 5.655328273773193,
|
1097 |
+
"eval_rewards/rejected": -11.366451263427734,
|
1098 |
+
"eval_runtime": 26.0494,
|
1099 |
+
"eval_samples_per_second": 28.907,
|
1100 |
+
"eval_steps_per_second": 3.647,
|
1101 |
+
"step": 600
|
1102 |
+
},
|
1103 |
+
{
|
1104 |
+
"epoch": 0.5242801890846583,
|
1105 |
+
"grad_norm": 2.856853485107422,
|
1106 |
+
"learning_rate": 3.222579492361179e-06,
|
1107 |
+
"logits/chosen": 2.6607539653778076,
|
1108 |
+
"logits/rejected": 2.6158082485198975,
|
1109 |
+
"logps/chosen": -3.489922285079956,
|
1110 |
+
"logps/rejected": -7.035357475280762,
|
1111 |
+
"loss": 0.2508,
|
1112 |
+
"rewards/accuracies": 0.9125000238418579,
|
1113 |
+
"rewards/chosen": -5.2348833084106445,
|
1114 |
+
"rewards/margins": 5.318153381347656,
|
1115 |
+
"rewards/rejected": -10.553037643432617,
|
1116 |
+
"step": 610
|
1117 |
+
},
|
1118 |
+
{
|
1119 |
+
"epoch": 0.5328749462827675,
|
1120 |
+
"grad_norm": 4.409074783325195,
|
1121 |
+
"learning_rate": 3.1722995515381644e-06,
|
1122 |
+
"logits/chosen": 3.0015037059783936,
|
1123 |
+
"logits/rejected": 2.8305137157440186,
|
1124 |
+
"logps/chosen": -3.5414748191833496,
|
1125 |
+
"logps/rejected": -7.11874532699585,
|
1126 |
+
"loss": 0.3102,
|
1127 |
+
"rewards/accuracies": 0.925000011920929,
|
1128 |
+
"rewards/chosen": -5.312211990356445,
|
1129 |
+
"rewards/margins": 5.365906715393066,
|
1130 |
+
"rewards/rejected": -10.678118705749512,
|
1131 |
+
"step": 620
|
1132 |
+
},
|
1133 |
+
{
|
1134 |
+
"epoch": 0.5414697034808766,
|
1135 |
+
"grad_norm": 2.839806079864502,
|
1136 |
+
"learning_rate": 3.121724717912138e-06,
|
1137 |
+
"logits/chosen": 2.3477985858917236,
|
1138 |
+
"logits/rejected": 2.3716092109680176,
|
1139 |
+
"logps/chosen": -3.313047409057617,
|
1140 |
+
"logps/rejected": -6.408308506011963,
|
1141 |
+
"loss": 0.2967,
|
1142 |
+
"rewards/accuracies": 0.925000011920929,
|
1143 |
+
"rewards/chosen": -4.969571590423584,
|
1144 |
+
"rewards/margins": 4.642891883850098,
|
1145 |
+
"rewards/rejected": -9.612462997436523,
|
1146 |
+
"step": 630
|
1147 |
+
},
|
1148 |
+
{
|
1149 |
+
"epoch": 0.5500644606789858,
|
1150 |
+
"grad_norm": 2.654181957244873,
|
1151 |
+
"learning_rate": 3.0708771752766397e-06,
|
1152 |
+
"logits/chosen": 3.0838463306427,
|
1153 |
+
"logits/rejected": 2.7085671424865723,
|
1154 |
+
"logps/chosen": -3.0019986629486084,
|
1155 |
+
"logps/rejected": -6.516921043395996,
|
1156 |
+
"loss": 0.2949,
|
1157 |
+
"rewards/accuracies": 0.925000011920929,
|
1158 |
+
"rewards/chosen": -4.502998352050781,
|
1159 |
+
"rewards/margins": 5.272383689880371,
|
1160 |
+
"rewards/rejected": -9.775381088256836,
|
1161 |
+
"step": 640
|
1162 |
+
},
|
1163 |
+
{
|
1164 |
+
"epoch": 0.5586592178770949,
|
1165 |
+
"grad_norm": 4.577066898345947,
|
1166 |
+
"learning_rate": 3.019779227044398e-06,
|
1167 |
+
"logits/chosen": 2.633059501647949,
|
1168 |
+
"logits/rejected": 2.3362865447998047,
|
1169 |
+
"logps/chosen": -3.0310661792755127,
|
1170 |
+
"logps/rejected": -6.479100227355957,
|
1171 |
+
"loss": 0.2591,
|
1172 |
+
"rewards/accuracies": 0.949999988079071,
|
1173 |
+
"rewards/chosen": -4.5465989112854,
|
1174 |
+
"rewards/margins": 5.172050476074219,
|
1175 |
+
"rewards/rejected": -9.718649864196777,
|
1176 |
+
"step": 650
|
1177 |
+
},
|
1178 |
+
{
|
1179 |
+
"epoch": 0.5586592178770949,
|
1180 |
+
"eval_logits/chosen": 2.7705864906311035,
|
1181 |
+
"eval_logits/rejected": 2.544156312942505,
|
1182 |
+
"eval_logps/chosen": -3.3805298805236816,
|
1183 |
+
"eval_logps/rejected": -7.496833324432373,
|
1184 |
+
"eval_loss": 0.2849542498588562,
|
1185 |
+
"eval_rewards/accuracies": 0.9263157844543457,
|
1186 |
+
"eval_rewards/chosen": -5.070794582366943,
|
1187 |
+
"eval_rewards/margins": 6.174455642700195,
|
1188 |
+
"eval_rewards/rejected": -11.24524974822998,
|
1189 |
+
"eval_runtime": 26.0431,
|
1190 |
+
"eval_samples_per_second": 28.914,
|
1191 |
+
"eval_steps_per_second": 3.648,
|
1192 |
+
"step": 650
|
1193 |
+
},
|
1194 |
+
{
|
1195 |
+
"epoch": 0.5672539750752041,
|
1196 |
+
"grad_norm": 2.702881097793579,
|
1197 |
+
"learning_rate": 2.9684532864643123e-06,
|
1198 |
+
"logits/chosen": 3.2417023181915283,
|
1199 |
+
"logits/rejected": 3.033658504486084,
|
1200 |
+
"logps/chosen": -3.447977066040039,
|
1201 |
+
"logps/rejected": -6.834619045257568,
|
1202 |
+
"loss": 0.2769,
|
1203 |
+
"rewards/accuracies": 0.8999999761581421,
|
1204 |
+
"rewards/chosen": -5.171965599060059,
|
1205 |
+
"rewards/margins": 5.079962253570557,
|
1206 |
+
"rewards/rejected": -10.251927375793457,
|
1207 |
+
"step": 660
|
1208 |
+
},
|
1209 |
+
{
|
1210 |
+
"epoch": 0.5758487322733132,
|
1211 |
+
"grad_norm": 3.4991097450256348,
|
1212 |
+
"learning_rate": 2.9169218667902562e-06,
|
1213 |
+
"logits/chosen": 2.873870372772217,
|
1214 |
+
"logits/rejected": 3.067615032196045,
|
1215 |
+
"logps/chosen": -2.999001979827881,
|
1216 |
+
"logps/rejected": -6.282449245452881,
|
1217 |
+
"loss": 0.2768,
|
1218 |
+
"rewards/accuracies": 0.9125000238418579,
|
1219 |
+
"rewards/chosen": -4.498503684997559,
|
1220 |
+
"rewards/margins": 4.9251708984375,
|
1221 |
+
"rewards/rejected": -9.423673629760742,
|
1222 |
+
"step": 670
|
1223 |
+
},
|
1224 |
+
{
|
1225 |
+
"epoch": 0.5844434894714224,
|
1226 |
+
"grad_norm": 2.037074565887451,
|
1227 |
+
"learning_rate": 2.8652075714060296e-06,
|
1228 |
+
"logits/chosen": 2.6497623920440674,
|
1229 |
+
"logits/rejected": 2.6266252994537354,
|
1230 |
+
"logps/chosen": -3.240567445755005,
|
1231 |
+
"logps/rejected": -7.337438106536865,
|
1232 |
+
"loss": 0.2279,
|
1233 |
+
"rewards/accuracies": 0.9750000238418579,
|
1234 |
+
"rewards/chosen": -4.860850811004639,
|
1235 |
+
"rewards/margins": 6.14530611038208,
|
1236 |
+
"rewards/rejected": -11.006157875061035,
|
1237 |
+
"step": 680
|
1238 |
+
},
|
1239 |
+
{
|
1240 |
+
"epoch": 0.5930382466695315,
|
1241 |
+
"grad_norm": 3.344770908355713,
|
1242 |
+
"learning_rate": 2.813333083910761e-06,
|
1243 |
+
"logits/chosen": 3.0279605388641357,
|
1244 |
+
"logits/rejected": 3.087311029434204,
|
1245 |
+
"logps/chosen": -3.819802761077881,
|
1246 |
+
"logps/rejected": -7.53275203704834,
|
1247 |
+
"loss": 0.2303,
|
1248 |
+
"rewards/accuracies": 0.925000011920929,
|
1249 |
+
"rewards/chosen": -5.729703903198242,
|
1250 |
+
"rewards/margins": 5.569423675537109,
|
1251 |
+
"rewards/rejected": -11.299127578735352,
|
1252 |
+
"step": 690
|
1253 |
+
},
|
1254 |
+
{
|
1255 |
+
"epoch": 0.6016330038676407,
|
1256 |
+
"grad_norm": 3.2010765075683594,
|
1257 |
+
"learning_rate": 2.761321158169134e-06,
|
1258 |
+
"logits/chosen": 2.4958834648132324,
|
1259 |
+
"logits/rejected": 2.5570173263549805,
|
1260 |
+
"logps/chosen": -3.407851457595825,
|
1261 |
+
"logps/rejected": -7.984216213226318,
|
1262 |
+
"loss": 0.2378,
|
1263 |
+
"rewards/accuracies": 0.9624999761581421,
|
1264 |
+
"rewards/chosen": -5.111776828765869,
|
1265 |
+
"rewards/margins": 6.8645477294921875,
|
1266 |
+
"rewards/rejected": -11.976324081420898,
|
1267 |
+
"step": 700
|
1268 |
+
},
|
1269 |
+
{
|
1270 |
+
"epoch": 0.6016330038676407,
|
1271 |
+
"eval_logits/chosen": 2.612185001373291,
|
1272 |
+
"eval_logits/rejected": 2.496657609939575,
|
1273 |
+
"eval_logps/chosen": -3.7988975048065186,
|
1274 |
+
"eval_logps/rejected": -8.164173126220703,
|
1275 |
+
"eval_loss": 0.2825009524822235,
|
1276 |
+
"eval_rewards/accuracies": 0.9368420839309692,
|
1277 |
+
"eval_rewards/chosen": -5.698346138000488,
|
1278 |
+
"eval_rewards/margins": 6.547913074493408,
|
1279 |
+
"eval_rewards/rejected": -12.246257781982422,
|
1280 |
+
"eval_runtime": 26.0516,
|
1281 |
+
"eval_samples_per_second": 28.904,
|
1282 |
+
"eval_steps_per_second": 3.647,
|
1283 |
+
"step": 700
|
1284 |
+
},
|
1285 |
+
{
|
1286 |
+
"epoch": 0.6102277610657499,
|
1287 |
+
"grad_norm": 5.041301250457764,
|
1288 |
+
"learning_rate": 2.70919460833079e-06,
|
1289 |
+
"logits/chosen": 3.299370527267456,
|
1290 |
+
"logits/rejected": 3.0894174575805664,
|
1291 |
+
"logps/chosen": -3.194427728652954,
|
1292 |
+
"logps/rejected": -7.703743934631348,
|
1293 |
+
"loss": 0.2785,
|
1294 |
+
"rewards/accuracies": 0.925000011920929,
|
1295 |
+
"rewards/chosen": -4.791642189025879,
|
1296 |
+
"rewards/margins": 6.763974666595459,
|
1297 |
+
"rewards/rejected": -11.55561637878418,
|
1298 |
+
"step": 710
|
1299 |
+
},
|
1300 |
+
{
|
1301 |
+
"epoch": 0.618822518263859,
|
1302 |
+
"grad_norm": 2.529698133468628,
|
1303 |
+
"learning_rate": 2.6569762988232838e-06,
|
1304 |
+
"logits/chosen": 2.993044853210449,
|
1305 |
+
"logits/rejected": 2.8644943237304688,
|
1306 |
+
"logps/chosen": -3.544390916824341,
|
1307 |
+
"logps/rejected": -7.395848274230957,
|
1308 |
+
"loss": 0.2601,
|
1309 |
+
"rewards/accuracies": 0.8999999761581421,
|
1310 |
+
"rewards/chosen": -5.316585540771484,
|
1311 |
+
"rewards/margins": 5.777185916900635,
|
1312 |
+
"rewards/rejected": -11.093771934509277,
|
1313 |
+
"step": 720
|
1314 |
+
},
|
1315 |
+
{
|
1316 |
+
"epoch": 0.6274172754619682,
|
1317 |
+
"grad_norm": 7.421131610870361,
|
1318 |
+
"learning_rate": 2.604689134322999e-06,
|
1319 |
+
"logits/chosen": 2.8646786212921143,
|
1320 |
+
"logits/rejected": 2.6174604892730713,
|
1321 |
+
"logps/chosen": -3.453138828277588,
|
1322 |
+
"logps/rejected": -7.3844780921936035,
|
1323 |
+
"loss": 0.2575,
|
1324 |
+
"rewards/accuracies": 0.9125000238418579,
|
1325 |
+
"rewards/chosen": -5.1797075271606445,
|
1326 |
+
"rewards/margins": 5.897009372711182,
|
1327 |
+
"rewards/rejected": -11.076717376708984,
|
1328 |
+
"step": 730
|
1329 |
+
},
|
1330 |
+
{
|
1331 |
+
"epoch": 0.6360120326600773,
|
1332 |
+
"grad_norm": 2.1014463901519775,
|
1333 |
+
"learning_rate": 2.5523560497083927e-06,
|
1334 |
+
"logits/chosen": 2.8302714824676514,
|
1335 |
+
"logits/rejected": 2.8019368648529053,
|
1336 |
+
"logps/chosen": -3.5820255279541016,
|
1337 |
+
"logps/rejected": -7.563794136047363,
|
1338 |
+
"loss": 0.1993,
|
1339 |
+
"rewards/accuracies": 0.9375,
|
1340 |
+
"rewards/chosen": -5.373038291931152,
|
1341 |
+
"rewards/margins": 5.972653388977051,
|
1342 |
+
"rewards/rejected": -11.345690727233887,
|
1343 |
+
"step": 740
|
1344 |
+
},
|
1345 |
+
{
|
1346 |
+
"epoch": 0.6446067898581865,
|
1347 |
+
"grad_norm": 5.518689155578613,
|
1348 |
+
"learning_rate": 2.5e-06,
|
1349 |
+
"logits/chosen": 3.2593605518341064,
|
1350 |
+
"logits/rejected": 3.0433804988861084,
|
1351 |
+
"logps/chosen": -3.267456531524658,
|
1352 |
+
"logps/rejected": -7.076251983642578,
|
1353 |
+
"loss": 0.232,
|
1354 |
+
"rewards/accuracies": 0.9375,
|
1355 |
+
"rewards/chosen": -4.901184558868408,
|
1356 |
+
"rewards/margins": 5.713194370269775,
|
1357 |
+
"rewards/rejected": -10.6143798828125,
|
1358 |
+
"step": 750
|
1359 |
+
},
|
1360 |
+
{
|
1361 |
+
"epoch": 0.6446067898581865,
|
1362 |
+
"eval_logits/chosen": 2.7629785537719727,
|
1363 |
+
"eval_logits/rejected": 2.6254494190216064,
|
1364 |
+
"eval_logps/chosen": -3.9823832511901855,
|
1365 |
+
"eval_logps/rejected": -8.553824424743652,
|
1366 |
+
"eval_loss": 0.2789475917816162,
|
1367 |
+
"eval_rewards/accuracies": 0.9368420839309692,
|
1368 |
+
"eval_rewards/chosen": -5.973575115203857,
|
1369 |
+
"eval_rewards/margins": 6.857161521911621,
|
1370 |
+
"eval_rewards/rejected": -12.830737113952637,
|
1371 |
+
"eval_runtime": 26.0463,
|
1372 |
+
"eval_samples_per_second": 28.91,
|
1373 |
+
"eval_steps_per_second": 3.647,
|
1374 |
+
"step": 750
|
1375 |
+
},
|
1376 |
+
{
|
1377 |
+
"epoch": 0.6532015470562956,
|
1378 |
+
"grad_norm": 2.6179347038269043,
|
1379 |
+
"learning_rate": 2.447643950291608e-06,
|
1380 |
+
"logits/chosen": 2.6019458770751953,
|
1381 |
+
"logits/rejected": 2.424398422241211,
|
1382 |
+
"logps/chosen": -4.219740867614746,
|
1383 |
+
"logps/rejected": -8.018190383911133,
|
1384 |
+
"loss": 0.2308,
|
1385 |
+
"rewards/accuracies": 0.9375,
|
1386 |
+
"rewards/chosen": -6.329610347747803,
|
1387 |
+
"rewards/margins": 5.697674751281738,
|
1388 |
+
"rewards/rejected": -12.0272855758667,
|
1389 |
+
"step": 760
|
1390 |
+
},
|
1391 |
+
{
|
1392 |
+
"epoch": 0.6617963042544048,
|
1393 |
+
"grad_norm": 4.589828968048096,
|
1394 |
+
"learning_rate": 2.3953108656770018e-06,
|
1395 |
+
"logits/chosen": 3.2706522941589355,
|
1396 |
+
"logits/rejected": 3.175826072692871,
|
1397 |
+
"logps/chosen": -3.878615617752075,
|
1398 |
+
"logps/rejected": -7.1606879234313965,
|
1399 |
+
"loss": 0.2568,
|
1400 |
+
"rewards/accuracies": 0.887499988079071,
|
1401 |
+
"rewards/chosen": -5.817923069000244,
|
1402 |
+
"rewards/margins": 4.9231085777282715,
|
1403 |
+
"rewards/rejected": -10.741032600402832,
|
1404 |
+
"step": 770
|
1405 |
+
},
|
1406 |
+
{
|
1407 |
+
"epoch": 0.6703910614525139,
|
1408 |
+
"grad_norm": 2.977869987487793,
|
1409 |
+
"learning_rate": 2.3430237011767166e-06,
|
1410 |
+
"logits/chosen": 2.5545144081115723,
|
1411 |
+
"logits/rejected": 2.5734703540802,
|
1412 |
+
"logps/chosen": -4.024557590484619,
|
1413 |
+
"logps/rejected": -8.60046672821045,
|
1414 |
+
"loss": 0.2412,
|
1415 |
+
"rewards/accuracies": 0.9750000238418579,
|
1416 |
+
"rewards/chosen": -6.036835670471191,
|
1417 |
+
"rewards/margins": 6.863864898681641,
|
1418 |
+
"rewards/rejected": -12.900700569152832,
|
1419 |
+
"step": 780
|
1420 |
+
},
|
1421 |
+
{
|
1422 |
+
"epoch": 0.6789858186506231,
|
1423 |
+
"grad_norm": 3.6560606956481934,
|
1424 |
+
"learning_rate": 2.290805391669212e-06,
|
1425 |
+
"logits/chosen": 2.492705821990967,
|
1426 |
+
"logits/rejected": 2.3359062671661377,
|
1427 |
+
"logps/chosen": -3.947359561920166,
|
1428 |
+
"logps/rejected": -8.342267990112305,
|
1429 |
+
"loss": 0.2296,
|
1430 |
+
"rewards/accuracies": 0.925000011920929,
|
1431 |
+
"rewards/chosen": -5.921038627624512,
|
1432 |
+
"rewards/margins": 6.592364311218262,
|
1433 |
+
"rewards/rejected": -12.51340389251709,
|
1434 |
+
"step": 790
|
1435 |
+
},
|
1436 |
+
{
|
1437 |
+
"epoch": 0.6875805758487322,
|
1438 |
+
"grad_norm": 3.9279472827911377,
|
1439 |
+
"learning_rate": 2.238678841830867e-06,
|
1440 |
+
"logits/chosen": 2.8240795135498047,
|
1441 |
+
"logits/rejected": 3.1099812984466553,
|
1442 |
+
"logps/chosen": -3.8079333305358887,
|
1443 |
+
"logps/rejected": -8.205657958984375,
|
1444 |
+
"loss": 0.2168,
|
1445 |
+
"rewards/accuracies": 0.887499988079071,
|
1446 |
+
"rewards/chosen": -5.711899757385254,
|
1447 |
+
"rewards/margins": 6.596588134765625,
|
1448 |
+
"rewards/rejected": -12.308488845825195,
|
1449 |
+
"step": 800
|
1450 |
+
},
|
1451 |
+
{
|
1452 |
+
"epoch": 0.6875805758487322,
|
1453 |
+
"eval_logits/chosen": 2.7551891803741455,
|
1454 |
+
"eval_logits/rejected": 2.601799488067627,
|
1455 |
+
"eval_logps/chosen": -3.887099027633667,
|
1456 |
+
"eval_logps/rejected": -8.64702320098877,
|
1457 |
+
"eval_loss": 0.2762486934661865,
|
1458 |
+
"eval_rewards/accuracies": 0.9368420839309692,
|
1459 |
+
"eval_rewards/chosen": -5.830648422241211,
|
1460 |
+
"eval_rewards/margins": 7.139886856079102,
|
1461 |
+
"eval_rewards/rejected": -12.970536231994629,
|
1462 |
+
"eval_runtime": 26.0484,
|
1463 |
+
"eval_samples_per_second": 28.908,
|
1464 |
+
"eval_steps_per_second": 3.647,
|
1465 |
+
"step": 800
|
1466 |
+
},
|
1467 |
+
{
|
1468 |
+
"epoch": 0.6961753330468414,
|
1469 |
+
"grad_norm": 8.265795707702637,
|
1470 |
+
"learning_rate": 2.186666916089239e-06,
|
1471 |
+
"logits/chosen": 2.428936719894409,
|
1472 |
+
"logits/rejected": 2.250732183456421,
|
1473 |
+
"logps/chosen": -3.8794636726379395,
|
1474 |
+
"logps/rejected": -8.740089416503906,
|
1475 |
+
"loss": 0.2642,
|
1476 |
+
"rewards/accuracies": 0.925000011920929,
|
1477 |
+
"rewards/chosen": -5.819195747375488,
|
1478 |
+
"rewards/margins": 7.290940284729004,
|
1479 |
+
"rewards/rejected": -13.110135078430176,
|
1480 |
+
"step": 810
|
1481 |
+
},
|
1482 |
+
{
|
1483 |
+
"epoch": 0.7047700902449506,
|
1484 |
+
"grad_norm": 2.2785184383392334,
|
1485 |
+
"learning_rate": 2.134792428593971e-06,
|
1486 |
+
"logits/chosen": 3.366255283355713,
|
1487 |
+
"logits/rejected": 3.3257839679718018,
|
1488 |
+
"logps/chosen": -3.8746776580810547,
|
1489 |
+
"logps/rejected": -8.137792587280273,
|
1490 |
+
"loss": 0.1911,
|
1491 |
+
"rewards/accuracies": 0.8999999761581421,
|
1492 |
+
"rewards/chosen": -5.812016487121582,
|
1493 |
+
"rewards/margins": 6.394671440124512,
|
1494 |
+
"rewards/rejected": -12.206687927246094,
|
1495 |
+
"step": 820
|
1496 |
+
},
|
1497 |
+
{
|
1498 |
+
"epoch": 0.7133648474430597,
|
1499 |
+
"grad_norm": 3.9450490474700928,
|
1500 |
+
"learning_rate": 2.0830781332097446e-06,
|
1501 |
+
"logits/chosen": 2.4217989444732666,
|
1502 |
+
"logits/rejected": 2.4092135429382324,
|
1503 |
+
"logps/chosen": -3.6179535388946533,
|
1504 |
+
"logps/rejected": -8.20048713684082,
|
1505 |
+
"loss": 0.2169,
|
1506 |
+
"rewards/accuracies": 0.949999988079071,
|
1507 |
+
"rewards/chosen": -5.426929950714111,
|
1508 |
+
"rewards/margins": 6.873800754547119,
|
1509 |
+
"rewards/rejected": -12.300729751586914,
|
1510 |
+
"step": 830
|
1511 |
+
},
|
1512 |
+
{
|
1513 |
+
"epoch": 0.7219596046411689,
|
1514 |
+
"grad_norm": 4.863241672515869,
|
1515 |
+
"learning_rate": 2.031546713535688e-06,
|
1516 |
+
"logits/chosen": 2.8715851306915283,
|
1517 |
+
"logits/rejected": 2.6674141883850098,
|
1518 |
+
"logps/chosen": -3.812260150909424,
|
1519 |
+
"logps/rejected": -8.3114013671875,
|
1520 |
+
"loss": 0.2036,
|
1521 |
+
"rewards/accuracies": 0.9375,
|
1522 |
+
"rewards/chosen": -5.718389987945557,
|
1523 |
+
"rewards/margins": 6.748712062835693,
|
1524 |
+
"rewards/rejected": -12.46710205078125,
|
1525 |
+
"step": 840
|
1526 |
+
},
|
1527 |
+
{
|
1528 |
+
"epoch": 0.730554361839278,
|
1529 |
+
"grad_norm": 2.593899726867676,
|
1530 |
+
"learning_rate": 1.9802207729556023e-06,
|
1531 |
+
"logits/chosen": 3.424074172973633,
|
1532 |
+
"logits/rejected": 3.024358034133911,
|
1533 |
+
"logps/chosen": -3.8419318199157715,
|
1534 |
+
"logps/rejected": -7.625539302825928,
|
1535 |
+
"loss": 0.2401,
|
1536 |
+
"rewards/accuracies": 0.8999999761581421,
|
1537 |
+
"rewards/chosen": -5.762897968292236,
|
1538 |
+
"rewards/margins": 5.675411701202393,
|
1539 |
+
"rewards/rejected": -11.438309669494629,
|
1540 |
+
"step": 850
|
1541 |
+
},
|
1542 |
+
{
|
1543 |
+
"epoch": 0.730554361839278,
|
1544 |
+
"eval_logits/chosen": 2.7013235092163086,
|
1545 |
+
"eval_logits/rejected": 2.5711612701416016,
|
1546 |
+
"eval_logps/chosen": -3.905956983566284,
|
1547 |
+
"eval_logps/rejected": -8.749403953552246,
|
1548 |
+
"eval_loss": 0.25881054997444153,
|
1549 |
+
"eval_rewards/accuracies": 0.9368420839309692,
|
1550 |
+
"eval_rewards/chosen": -5.858935356140137,
|
1551 |
+
"eval_rewards/margins": 7.265170097351074,
|
1552 |
+
"eval_rewards/rejected": -13.124105453491211,
|
1553 |
+
"eval_runtime": 26.1338,
|
1554 |
+
"eval_samples_per_second": 28.813,
|
1555 |
+
"eval_steps_per_second": 3.635,
|
1556 |
+
"step": 850
|
1557 |
+
},
|
1558 |
+
{
|
1559 |
+
"epoch": 0.7391491190373872,
|
1560 |
+
"grad_norm": 2.430412769317627,
|
1561 |
+
"learning_rate": 1.9291228247233607e-06,
|
1562 |
+
"logits/chosen": 2.6950340270996094,
|
1563 |
+
"logits/rejected": 2.8298139572143555,
|
1564 |
+
"logps/chosen": -3.6957314014434814,
|
1565 |
+
"logps/rejected": -8.42276382446289,
|
1566 |
+
"loss": 0.236,
|
1567 |
+
"rewards/accuracies": 0.9125000238418579,
|
1568 |
+
"rewards/chosen": -5.543597221374512,
|
1569 |
+
"rewards/margins": 7.090548038482666,
|
1570 |
+
"rewards/rejected": -12.63414478302002,
|
1571 |
+
"step": 860
|
1572 |
+
},
|
1573 |
+
{
|
1574 |
+
"epoch": 0.7477438762354963,
|
1575 |
+
"grad_norm": 3.259122610092163,
|
1576 |
+
"learning_rate": 1.8782752820878636e-06,
|
1577 |
+
"logits/chosen": 3.0335607528686523,
|
1578 |
+
"logits/rejected": 2.6622061729431152,
|
1579 |
+
"logps/chosen": -3.5311496257781982,
|
1580 |
+
"logps/rejected": -8.468803405761719,
|
1581 |
+
"loss": 0.2133,
|
1582 |
+
"rewards/accuracies": 0.9624999761581421,
|
1583 |
+
"rewards/chosen": -5.296724796295166,
|
1584 |
+
"rewards/margins": 7.406480312347412,
|
1585 |
+
"rewards/rejected": -12.703205108642578,
|
1586 |
+
"step": 870
|
1587 |
+
},
|
1588 |
+
{
|
1589 |
+
"epoch": 0.7563386334336055,
|
1590 |
+
"grad_norm": 4.110405445098877,
|
1591 |
+
"learning_rate": 1.827700448461836e-06,
|
1592 |
+
"logits/chosen": 3.1867451667785645,
|
1593 |
+
"logits/rejected": 3.188183307647705,
|
1594 |
+
"logps/chosen": -3.9485092163085938,
|
1595 |
+
"logps/rejected": -8.32574462890625,
|
1596 |
+
"loss": 0.225,
|
1597 |
+
"rewards/accuracies": 0.925000011920929,
|
1598 |
+
"rewards/chosen": -5.922764778137207,
|
1599 |
+
"rewards/margins": 6.56585168838501,
|
1600 |
+
"rewards/rejected": -12.488615036010742,
|
1601 |
+
"step": 880
|
1602 |
+
},
|
1603 |
+
{
|
1604 |
+
"epoch": 0.7649333906317146,
|
1605 |
+
"grad_norm": 2.139331817626953,
|
1606 |
+
"learning_rate": 1.7774205076388207e-06,
|
1607 |
+
"logits/chosen": 3.1500871181488037,
|
1608 |
+
"logits/rejected": 3.003722906112671,
|
1609 |
+
"logps/chosen": -3.997753143310547,
|
1610 |
+
"logps/rejected": -8.36584186553955,
|
1611 |
+
"loss": 0.2081,
|
1612 |
+
"rewards/accuracies": 0.925000011920929,
|
1613 |
+
"rewards/chosen": -5.99662971496582,
|
1614 |
+
"rewards/margins": 6.552132606506348,
|
1615 |
+
"rewards/rejected": -12.548762321472168,
|
1616 |
+
"step": 890
|
1617 |
+
},
|
1618 |
+
{
|
1619 |
+
"epoch": 0.7735281478298238,
|
1620 |
+
"grad_norm": 3.141416072845459,
|
1621 |
+
"learning_rate": 1.7274575140626318e-06,
|
1622 |
+
"logits/chosen": 2.8322606086730957,
|
1623 |
+
"logits/rejected": 2.7169883251190186,
|
1624 |
+
"logps/chosen": -3.7250099182128906,
|
1625 |
+
"logps/rejected": -7.989205837249756,
|
1626 |
+
"loss": 0.2286,
|
1627 |
+
"rewards/accuracies": 0.949999988079071,
|
1628 |
+
"rewards/chosen": -5.587515354156494,
|
1629 |
+
"rewards/margins": 6.396294593811035,
|
1630 |
+
"rewards/rejected": -11.983808517456055,
|
1631 |
+
"step": 900
|
1632 |
+
},
|
1633 |
+
{
|
1634 |
+
"epoch": 0.7735281478298238,
|
1635 |
+
"eval_logits/chosen": 2.6913206577301025,
|
1636 |
+
"eval_logits/rejected": 2.585991144180298,
|
1637 |
+
"eval_logps/chosen": -3.8541626930236816,
|
1638 |
+
"eval_logps/rejected": -8.840813636779785,
|
1639 |
+
"eval_loss": 0.24709106981754303,
|
1640 |
+
"eval_rewards/accuracies": 0.9473684430122375,
|
1641 |
+
"eval_rewards/chosen": -5.781244277954102,
|
1642 |
+
"eval_rewards/margins": 7.479976177215576,
|
1643 |
+
"eval_rewards/rejected": -13.261219024658203,
|
1644 |
+
"eval_runtime": 26.0437,
|
1645 |
+
"eval_samples_per_second": 28.913,
|
1646 |
+
"eval_steps_per_second": 3.648,
|
1647 |
+
"step": 900
|
1648 |
+
},
|
1649 |
+
{
|
1650 |
+
"epoch": 0.7821229050279329,
|
1651 |
+
"grad_norm": 2.6290950775146484,
|
1652 |
+
"learning_rate": 1.677833383153542e-06,
|
1653 |
+
"logits/chosen": 2.428351402282715,
|
1654 |
+
"logits/rejected": 2.203674077987671,
|
1655 |
+
"logps/chosen": -3.5989551544189453,
|
1656 |
+
"logps/rejected": -7.524004936218262,
|
1657 |
+
"loss": 0.2157,
|
1658 |
+
"rewards/accuracies": 0.925000011920929,
|
1659 |
+
"rewards/chosen": -5.398432731628418,
|
1660 |
+
"rewards/margins": 5.887574195861816,
|
1661 |
+
"rewards/rejected": -11.286008834838867,
|
1662 |
+
"step": 910
|
1663 |
+
},
|
1664 |
+
{
|
1665 |
+
"epoch": 0.7907176622260421,
|
1666 |
+
"grad_norm": 5.0300140380859375,
|
1667 |
+
"learning_rate": 1.6285698816954626e-06,
|
1668 |
+
"logits/chosen": 3.045369863510132,
|
1669 |
+
"logits/rejected": 2.8783938884735107,
|
1670 |
+
"logps/chosen": -3.6674282550811768,
|
1671 |
+
"logps/rejected": -8.223487854003906,
|
1672 |
+
"loss": 0.1969,
|
1673 |
+
"rewards/accuracies": 0.949999988079071,
|
1674 |
+
"rewards/chosen": -5.501142978668213,
|
1675 |
+
"rewards/margins": 6.834088325500488,
|
1676 |
+
"rewards/rejected": -12.335230827331543,
|
1677 |
+
"step": 920
|
1678 |
+
},
|
1679 |
+
{
|
1680 |
+
"epoch": 0.7993124194241513,
|
1681 |
+
"grad_norm": 1.3160176277160645,
|
1682 |
+
"learning_rate": 1.5796886182883053e-06,
|
1683 |
+
"logits/chosen": 3.5735950469970703,
|
1684 |
+
"logits/rejected": 3.1306614875793457,
|
1685 |
+
"logps/chosen": -3.6068572998046875,
|
1686 |
+
"logps/rejected": -8.208158493041992,
|
1687 |
+
"loss": 0.2309,
|
1688 |
+
"rewards/accuracies": 0.949999988079071,
|
1689 |
+
"rewards/chosen": -5.410286903381348,
|
1690 |
+
"rewards/margins": 6.901950836181641,
|
1691 |
+
"rewards/rejected": -12.312235832214355,
|
1692 |
+
"step": 930
|
1693 |
+
},
|
1694 |
+
{
|
1695 |
+
"epoch": 0.8079071766222604,
|
1696 |
+
"grad_norm": 2.0629019737243652,
|
1697 |
+
"learning_rate": 1.5312110338697427e-06,
|
1698 |
+
"logits/chosen": 2.279042959213257,
|
1699 |
+
"logits/rejected": 2.363171100616455,
|
1700 |
+
"logps/chosen": -3.690843105316162,
|
1701 |
+
"logps/rejected": -8.440999984741211,
|
1702 |
+
"loss": 0.2452,
|
1703 |
+
"rewards/accuracies": 0.9125000238418579,
|
1704 |
+
"rewards/chosen": -5.5362653732299805,
|
1705 |
+
"rewards/margins": 7.125234127044678,
|
1706 |
+
"rewards/rejected": -12.661499977111816,
|
1707 |
+
"step": 940
|
1708 |
+
},
|
1709 |
+
{
|
1710 |
+
"epoch": 0.8165019338203696,
|
1711 |
+
"grad_norm": 4.996740341186523,
|
1712 |
+
"learning_rate": 1.4831583923105e-06,
|
1713 |
+
"logits/chosen": 2.4931206703186035,
|
1714 |
+
"logits/rejected": 2.4499409198760986,
|
1715 |
+
"logps/chosen": -3.706071376800537,
|
1716 |
+
"logps/rejected": -8.696928977966309,
|
1717 |
+
"loss": 0.2346,
|
1718 |
+
"rewards/accuracies": 0.9624999761581421,
|
1719 |
+
"rewards/chosen": -5.559107780456543,
|
1720 |
+
"rewards/margins": 7.4862871170043945,
|
1721 |
+
"rewards/rejected": -13.045394897460938,
|
1722 |
+
"step": 950
|
1723 |
+
},
|
1724 |
+
{
|
1725 |
+
"epoch": 0.8165019338203696,
|
1726 |
+
"eval_logits/chosen": 2.8512210845947266,
|
1727 |
+
"eval_logits/rejected": 2.7410287857055664,
|
1728 |
+
"eval_logps/chosen": -3.736178159713745,
|
1729 |
+
"eval_logps/rejected": -8.9002046585083,
|
1730 |
+
"eval_loss": 0.2422085404396057,
|
1731 |
+
"eval_rewards/accuracies": 0.9473684430122375,
|
1732 |
+
"eval_rewards/chosen": -5.60426664352417,
|
1733 |
+
"eval_rewards/margins": 7.746040344238281,
|
1734 |
+
"eval_rewards/rejected": -13.350308418273926,
|
1735 |
+
"eval_runtime": 26.0516,
|
1736 |
+
"eval_samples_per_second": 28.904,
|
1737 |
+
"eval_steps_per_second": 3.647,
|
1738 |
+
"step": 950
|
1739 |
+
},
|
1740 |
+
{
|
1741 |
+
"epoch": 0.8250966910184787,
|
1742 |
+
"grad_norm": 3.8007683753967285,
|
1743 |
+
"learning_rate": 1.4355517710873184e-06,
|
1744 |
+
"logits/chosen": 3.1055569648742676,
|
1745 |
+
"logits/rejected": 2.932234525680542,
|
1746 |
+
"logps/chosen": -4.287350654602051,
|
1747 |
+
"logps/rejected": -8.713033676147461,
|
1748 |
+
"loss": 0.2177,
|
1749 |
+
"rewards/accuracies": 0.925000011920929,
|
1750 |
+
"rewards/chosen": -6.431025505065918,
|
1751 |
+
"rewards/margins": 6.63852596282959,
|
1752 |
+
"rewards/rejected": -13.069552421569824,
|
1753 |
+
"step": 960
|
1754 |
+
},
|
1755 |
+
{
|
1756 |
+
"epoch": 0.8336914482165879,
|
1757 |
+
"grad_norm": 8.133325576782227,
|
1758 |
+
"learning_rate": 1.388412052037682e-06,
|
1759 |
+
"logits/chosen": 2.822788715362549,
|
1760 |
+
"logits/rejected": 2.5713553428649902,
|
1761 |
+
"logps/chosen": -3.4133121967315674,
|
1762 |
+
"logps/rejected": -8.351690292358398,
|
1763 |
+
"loss": 0.2371,
|
1764 |
+
"rewards/accuracies": 0.949999988079071,
|
1765 |
+
"rewards/chosen": -5.119967460632324,
|
1766 |
+
"rewards/margins": 7.407568454742432,
|
1767 |
+
"rewards/rejected": -12.527536392211914,
|
1768 |
+
"step": 970
|
1769 |
+
},
|
1770 |
+
{
|
1771 |
+
"epoch": 0.842286205414697,
|
1772 |
+
"grad_norm": 5.39262056350708,
|
1773 |
+
"learning_rate": 1.3417599122003464e-06,
|
1774 |
+
"logits/chosen": 2.888523578643799,
|
1775 |
+
"logits/rejected": 2.752549409866333,
|
1776 |
+
"logps/chosen": -3.9895386695861816,
|
1777 |
+
"logps/rejected": -9.032824516296387,
|
1778 |
+
"loss": 0.1649,
|
1779 |
+
"rewards/accuracies": 0.9624999761581421,
|
1780 |
+
"rewards/chosen": -5.98430871963501,
|
1781 |
+
"rewards/margins": 7.564929008483887,
|
1782 |
+
"rewards/rejected": -13.549237251281738,
|
1783 |
+
"step": 980
|
1784 |
+
},
|
1785 |
+
{
|
1786 |
+
"epoch": 0.8508809626128062,
|
1787 |
+
"grad_norm": 4.744167327880859,
|
1788 |
+
"learning_rate": 1.2956158147457116e-06,
|
1789 |
+
"logits/chosen": 2.5370802879333496,
|
1790 |
+
"logits/rejected": 2.594423532485962,
|
1791 |
+
"logps/chosen": -3.6753451824188232,
|
1792 |
+
"logps/rejected": -8.043670654296875,
|
1793 |
+
"loss": 0.2277,
|
1794 |
+
"rewards/accuracies": 0.9375,
|
1795 |
+
"rewards/chosen": -5.513017654418945,
|
1796 |
+
"rewards/margins": 6.552487850189209,
|
1797 |
+
"rewards/rejected": -12.065505981445312,
|
1798 |
+
"step": 990
|
1799 |
+
},
|
1800 |
+
{
|
1801 |
+
"epoch": 0.8594757198109153,
|
1802 |
+
"grad_norm": 2.8420608043670654,
|
1803 |
+
"learning_rate": 1.2500000000000007e-06,
|
1804 |
+
"logits/chosen": 3.2587478160858154,
|
1805 |
+
"logits/rejected": 3.0482611656188965,
|
1806 |
+
"logps/chosen": -3.5280063152313232,
|
1807 |
+
"logps/rejected": -7.709681510925293,
|
1808 |
+
"loss": 0.196,
|
1809 |
+
"rewards/accuracies": 0.8999999761581421,
|
1810 |
+
"rewards/chosen": -5.292008876800537,
|
1811 |
+
"rewards/margins": 6.272514343261719,
|
1812 |
+
"rewards/rejected": -11.564523696899414,
|
1813 |
+
"step": 1000
|
1814 |
+
},
|
1815 |
+
{
|
1816 |
+
"epoch": 0.8594757198109153,
|
1817 |
+
"eval_logits/chosen": 2.8420093059539795,
|
1818 |
+
"eval_logits/rejected": 2.7762162685394287,
|
1819 |
+
"eval_logps/chosen": -3.8901867866516113,
|
1820 |
+
"eval_logps/rejected": -9.151087760925293,
|
1821 |
+
"eval_loss": 0.23557204008102417,
|
1822 |
+
"eval_rewards/accuracies": 0.9473684430122375,
|
1823 |
+
"eval_rewards/chosen": -5.83527946472168,
|
1824 |
+
"eval_rewards/margins": 7.891351699829102,
|
1825 |
+
"eval_rewards/rejected": -13.726632118225098,
|
1826 |
+
"eval_runtime": 26.0484,
|
1827 |
+
"eval_samples_per_second": 28.908,
|
1828 |
+
"eval_steps_per_second": 3.647,
|
1829 |
+
"step": 1000
|
1830 |
+
}
|
1831 |
+
],
|
1832 |
+
"logging_steps": 10,
|
1833 |
+
"max_steps": 1500,
|
1834 |
+
"num_input_tokens_seen": 0,
|
1835 |
+
"num_train_epochs": 2,
|
1836 |
+
"save_steps": 50,
|
1837 |
+
"stateful_callbacks": {
|
1838 |
+
"TrainerControl": {
|
1839 |
+
"args": {
|
1840 |
+
"should_epoch_stop": false,
|
1841 |
+
"should_evaluate": false,
|
1842 |
+
"should_log": false,
|
1843 |
+
"should_save": true,
|
1844 |
+
"should_training_stop": false
|
1845 |
+
},
|
1846 |
+
"attributes": {}
|
1847 |
+
}
|
1848 |
+
},
|
1849 |
+
"total_flos": 2.344938790839124e+18,
|
1850 |
+
"train_batch_size": 1,
|
1851 |
+
"trial_name": null,
|
1852 |
+
"trial_params": null
|
1853 |
+
}
|
checkpoint-1000/training_args.bin
ADDED
@@ -0,0 +1,3 @@
|
|
|
|
|
|
|
|
|
1 |
+
version https://git-lfs.github.com/spec/v1
|
2 |
+
oid sha256:624389fbed538b0a4a7a9ca58a805f090753eb489b444df41f15a2c23b6a1270
|
3 |
+
size 7224
|
checkpoint-1000/zero_to_fp32.py
ADDED
@@ -0,0 +1,674 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
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|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
1 |
+
#!/usr/bin/env python
|
2 |
+
|
3 |
+
# Copyright (c) Microsoft Corporation.
|
4 |
+
# SPDX-License-Identifier: Apache-2.0
|
5 |
+
|
6 |
+
# DeepSpeed Team
|
7 |
+
|
8 |
+
# This script extracts fp32 consolidated weights from a zero 1, 2 and 3 DeepSpeed checkpoints. It gets
|
9 |
+
# copied into the top level checkpoint dir, so the user can easily do the conversion at any point in
|
10 |
+
# the future. Once extracted, the weights don't require DeepSpeed and can be used in any
|
11 |
+
# application.
|
12 |
+
#
|
13 |
+
# example:
|
14 |
+
# python zero_to_fp32.py . output_dir/
|
15 |
+
# or
|
16 |
+
# python zero_to_fp32.py . output_dir/ --safe_serialization
|
17 |
+
|
18 |
+
import argparse
|
19 |
+
import torch
|
20 |
+
import glob
|
21 |
+
import math
|
22 |
+
import os
|
23 |
+
import re
|
24 |
+
import json
|
25 |
+
from tqdm import tqdm
|
26 |
+
from collections import OrderedDict
|
27 |
+
from dataclasses import dataclass
|
28 |
+
|
29 |
+
# while this script doesn't use deepspeed to recover data, since the checkpoints are pickled with
|
30 |
+
# DeepSpeed data structures it has to be available in the current python environment.
|
31 |
+
from deepspeed.utils import logger
|
32 |
+
from deepspeed.checkpoint.constants import (DS_VERSION, OPTIMIZER_STATE_DICT, SINGLE_PARTITION_OF_FP32_GROUPS,
|
33 |
+
FP32_FLAT_GROUPS, ZERO_STAGE, PARTITION_COUNT, PARAM_SHAPES, BUFFER_NAMES,
|
34 |
+
FROZEN_PARAM_SHAPES, FROZEN_PARAM_FRAGMENTS)
|
35 |
+
|
36 |
+
|
37 |
+
@dataclass
|
38 |
+
class zero_model_state:
|
39 |
+
buffers: dict()
|
40 |
+
param_shapes: dict()
|
41 |
+
shared_params: list
|
42 |
+
ds_version: int
|
43 |
+
frozen_param_shapes: dict()
|
44 |
+
frozen_param_fragments: dict()
|
45 |
+
|
46 |
+
|
47 |
+
debug = 0
|
48 |
+
|
49 |
+
# load to cpu
|
50 |
+
device = torch.device('cpu')
|
51 |
+
|
52 |
+
|
53 |
+
def atoi(text):
|
54 |
+
return int(text) if text.isdigit() else text
|
55 |
+
|
56 |
+
|
57 |
+
def natural_keys(text):
|
58 |
+
'''
|
59 |
+
alist.sort(key=natural_keys) sorts in human order
|
60 |
+
http://nedbatchelder.com/blog/200712/human_sorting.html
|
61 |
+
(See Toothy's implementation in the comments)
|
62 |
+
'''
|
63 |
+
return [atoi(c) for c in re.split(r'(\d+)', text)]
|
64 |
+
|
65 |
+
|
66 |
+
def get_model_state_file(checkpoint_dir, zero_stage):
|
67 |
+
if not os.path.isdir(checkpoint_dir):
|
68 |
+
raise FileNotFoundError(f"Directory '{checkpoint_dir}' doesn't exist")
|
69 |
+
|
70 |
+
# there should be only one file
|
71 |
+
if zero_stage <= 2:
|
72 |
+
file = os.path.join(checkpoint_dir, "mp_rank_00_model_states.pt")
|
73 |
+
elif zero_stage == 3:
|
74 |
+
file = os.path.join(checkpoint_dir, "zero_pp_rank_0_mp_rank_00_model_states.pt")
|
75 |
+
|
76 |
+
if not os.path.exists(file):
|
77 |
+
raise FileNotFoundError(f"can't find model states file at '{file}'")
|
78 |
+
|
79 |
+
return file
|
80 |
+
|
81 |
+
|
82 |
+
def get_checkpoint_files(checkpoint_dir, glob_pattern):
|
83 |
+
# XXX: need to test that this simple glob rule works for multi-node setup too
|
84 |
+
ckpt_files = sorted(glob.glob(os.path.join(checkpoint_dir, glob_pattern)), key=natural_keys)
|
85 |
+
|
86 |
+
if len(ckpt_files) == 0:
|
87 |
+
raise FileNotFoundError(f"can't find {glob_pattern} files in directory '{checkpoint_dir}'")
|
88 |
+
|
89 |
+
return ckpt_files
|
90 |
+
|
91 |
+
|
92 |
+
def get_optim_files(checkpoint_dir):
|
93 |
+
return get_checkpoint_files(checkpoint_dir, "*_optim_states.pt")
|
94 |
+
|
95 |
+
|
96 |
+
def get_model_state_files(checkpoint_dir):
|
97 |
+
return get_checkpoint_files(checkpoint_dir, "*_model_states.pt")
|
98 |
+
|
99 |
+
|
100 |
+
def parse_model_states(files):
|
101 |
+
zero_model_states = []
|
102 |
+
for file in files:
|
103 |
+
state_dict = torch.load(file, map_location=device)
|
104 |
+
|
105 |
+
if BUFFER_NAMES not in state_dict:
|
106 |
+
raise ValueError(f"{file} is not a model state checkpoint")
|
107 |
+
buffer_names = state_dict[BUFFER_NAMES]
|
108 |
+
if debug:
|
109 |
+
print("Found buffers:", buffer_names)
|
110 |
+
|
111 |
+
# recover just the buffers while restoring them to fp32 if they were saved in fp16
|
112 |
+
buffers = {k: v.float() for k, v in state_dict["module"].items() if k in buffer_names}
|
113 |
+
param_shapes = state_dict[PARAM_SHAPES]
|
114 |
+
|
115 |
+
# collect parameters that are included in param_shapes
|
116 |
+
param_names = []
|
117 |
+
for s in param_shapes:
|
118 |
+
for name in s.keys():
|
119 |
+
param_names.append(name)
|
120 |
+
|
121 |
+
# update with frozen parameters
|
122 |
+
frozen_param_shapes = state_dict.get(FROZEN_PARAM_SHAPES, None)
|
123 |
+
if frozen_param_shapes is not None:
|
124 |
+
if debug:
|
125 |
+
print(f"Found frozen_param_shapes: {frozen_param_shapes}")
|
126 |
+
param_names += list(frozen_param_shapes.keys())
|
127 |
+
|
128 |
+
# handle shared params
|
129 |
+
shared_params = [[k, v] for k, v in state_dict["shared_params"].items()]
|
130 |
+
|
131 |
+
ds_version = state_dict.get(DS_VERSION, None)
|
132 |
+
|
133 |
+
frozen_param_fragments = state_dict.get(FROZEN_PARAM_FRAGMENTS, None)
|
134 |
+
|
135 |
+
z_model_state = zero_model_state(buffers=buffers,
|
136 |
+
param_shapes=param_shapes,
|
137 |
+
shared_params=shared_params,
|
138 |
+
ds_version=ds_version,
|
139 |
+
frozen_param_shapes=frozen_param_shapes,
|
140 |
+
frozen_param_fragments=frozen_param_fragments)
|
141 |
+
zero_model_states.append(z_model_state)
|
142 |
+
|
143 |
+
return zero_model_states
|
144 |
+
|
145 |
+
|
146 |
+
def parse_optim_states(files, ds_checkpoint_dir):
|
147 |
+
total_files = len(files)
|
148 |
+
state_dicts = []
|
149 |
+
for f in files:
|
150 |
+
state_dict = torch.load(f, map_location=device)
|
151 |
+
# immediately discard the potentially huge 2 optimizer states as we only care for fp32 master weights
|
152 |
+
# and also handle the case where it was already removed by another helper script
|
153 |
+
state_dict["optimizer_state_dict"].pop("optimizer_state_dict", None)
|
154 |
+
state_dicts.append(state_dict)
|
155 |
+
|
156 |
+
if not ZERO_STAGE in state_dicts[0][OPTIMIZER_STATE_DICT]:
|
157 |
+
raise ValueError(f"{files[0]} is not a zero checkpoint")
|
158 |
+
zero_stage = state_dicts[0][OPTIMIZER_STATE_DICT][ZERO_STAGE]
|
159 |
+
world_size = state_dicts[0][OPTIMIZER_STATE_DICT][PARTITION_COUNT]
|
160 |
+
|
161 |
+
# For ZeRO-2 each param group can have different partition_count as data parallelism for expert
|
162 |
+
# parameters can be different from data parallelism for non-expert parameters. So we can just
|
163 |
+
# use the max of the partition_count to get the dp world_size.
|
164 |
+
|
165 |
+
if type(world_size) is list:
|
166 |
+
world_size = max(world_size)
|
167 |
+
|
168 |
+
if world_size != total_files:
|
169 |
+
raise ValueError(
|
170 |
+
f"Expected {world_size} of '*_optim_states.pt' under '{ds_checkpoint_dir}' but found {total_files} files. "
|
171 |
+
"Possibly due to an overwrite of an old checkpoint, or a checkpoint didn't get saved by one or more processes."
|
172 |
+
)
|
173 |
+
|
174 |
+
# the groups are named differently in each stage
|
175 |
+
if zero_stage <= 2:
|
176 |
+
fp32_groups_key = SINGLE_PARTITION_OF_FP32_GROUPS
|
177 |
+
elif zero_stage == 3:
|
178 |
+
fp32_groups_key = FP32_FLAT_GROUPS
|
179 |
+
else:
|
180 |
+
raise ValueError(f"unknown zero stage {zero_stage}")
|
181 |
+
|
182 |
+
if zero_stage <= 2:
|
183 |
+
fp32_flat_groups = [state_dicts[i][OPTIMIZER_STATE_DICT][fp32_groups_key] for i in range(len(state_dicts))]
|
184 |
+
elif zero_stage == 3:
|
185 |
+
# if there is more than one param group, there will be multiple flattened tensors - one
|
186 |
+
# flattened tensor per group - for simplicity merge them into a single tensor
|
187 |
+
#
|
188 |
+
# XXX: could make the script more memory efficient for when there are multiple groups - it
|
189 |
+
# will require matching the sub-lists of param_shapes for each param group flattened tensor
|
190 |
+
|
191 |
+
fp32_flat_groups = [
|
192 |
+
torch.cat(state_dicts[i][OPTIMIZER_STATE_DICT][fp32_groups_key], 0) for i in range(len(state_dicts))
|
193 |
+
]
|
194 |
+
|
195 |
+
return zero_stage, world_size, fp32_flat_groups
|
196 |
+
|
197 |
+
|
198 |
+
def _get_fp32_state_dict_from_zero_checkpoint(ds_checkpoint_dir, exclude_frozen_parameters):
|
199 |
+
"""
|
200 |
+
Returns fp32 state_dict reconstructed from ds checkpoint
|
201 |
+
|
202 |
+
Args:
|
203 |
+
- ``ds_checkpoint_dir``: path to the deepspeed checkpoint folder (where the optimizer files are)
|
204 |
+
|
205 |
+
"""
|
206 |
+
print(f"Processing zero checkpoint '{ds_checkpoint_dir}'")
|
207 |
+
|
208 |
+
optim_files = get_optim_files(ds_checkpoint_dir)
|
209 |
+
zero_stage, world_size, fp32_flat_groups = parse_optim_states(optim_files, ds_checkpoint_dir)
|
210 |
+
print(f"Detected checkpoint of type zero stage {zero_stage}, world_size: {world_size}")
|
211 |
+
|
212 |
+
model_files = get_model_state_files(ds_checkpoint_dir)
|
213 |
+
|
214 |
+
zero_model_states = parse_model_states(model_files)
|
215 |
+
print(f'Parsing checkpoint created by deepspeed=={zero_model_states[0].ds_version}')
|
216 |
+
|
217 |
+
if zero_stage <= 2:
|
218 |
+
return _get_fp32_state_dict_from_zero2_checkpoint(world_size, fp32_flat_groups, zero_model_states,
|
219 |
+
exclude_frozen_parameters)
|
220 |
+
elif zero_stage == 3:
|
221 |
+
return _get_fp32_state_dict_from_zero3_checkpoint(world_size, fp32_flat_groups, zero_model_states,
|
222 |
+
exclude_frozen_parameters)
|
223 |
+
|
224 |
+
|
225 |
+
def _zero2_merge_frozen_params(state_dict, zero_model_states):
|
226 |
+
if zero_model_states[0].frozen_param_shapes is None or len(zero_model_states[0].frozen_param_shapes) == 0:
|
227 |
+
return
|
228 |
+
|
229 |
+
frozen_param_shapes = zero_model_states[0].frozen_param_shapes
|
230 |
+
frozen_param_fragments = zero_model_states[0].frozen_param_fragments
|
231 |
+
|
232 |
+
if debug:
|
233 |
+
num_elem = sum(s.numel() for s in frozen_param_shapes.values())
|
234 |
+
print(f'rank 0: {FROZEN_PARAM_SHAPES}.numel = {num_elem}')
|
235 |
+
|
236 |
+
wanted_params = len(frozen_param_shapes)
|
237 |
+
wanted_numel = sum(s.numel() for s in frozen_param_shapes.values())
|
238 |
+
avail_numel = sum([p.numel() for p in frozen_param_fragments.values()])
|
239 |
+
print(f'Frozen params: Have {avail_numel} numels to process.')
|
240 |
+
print(f'Frozen params: Need {wanted_numel} numels in {wanted_params} params')
|
241 |
+
|
242 |
+
total_params = 0
|
243 |
+
total_numel = 0
|
244 |
+
for name, shape in frozen_param_shapes.items():
|
245 |
+
total_params += 1
|
246 |
+
unpartitioned_numel = shape.numel()
|
247 |
+
total_numel += unpartitioned_numel
|
248 |
+
|
249 |
+
state_dict[name] = frozen_param_fragments[name]
|
250 |
+
|
251 |
+
if debug:
|
252 |
+
print(f"{name} full shape: {shape} unpartitioned numel {unpartitioned_numel} ")
|
253 |
+
|
254 |
+
print(f"Reconstructed Frozen fp32 state dict with {total_params} params {total_numel} elements")
|
255 |
+
|
256 |
+
|
257 |
+
def _has_callable(obj, fn):
|
258 |
+
attr = getattr(obj, fn, None)
|
259 |
+
return callable(attr)
|
260 |
+
|
261 |
+
|
262 |
+
def _zero2_merge_trainable_params(state_dict, world_size, fp32_flat_groups, zero_model_states):
|
263 |
+
param_shapes = zero_model_states[0].param_shapes
|
264 |
+
|
265 |
+
# Reconstruction protocol:
|
266 |
+
#
|
267 |
+
# XXX: document this
|
268 |
+
|
269 |
+
if debug:
|
270 |
+
for i in range(world_size):
|
271 |
+
for j in range(len(fp32_flat_groups[0])):
|
272 |
+
print(f"{FP32_FLAT_GROUPS}[{i}][{j}].shape={fp32_flat_groups[i][j].shape}")
|
273 |
+
|
274 |
+
# XXX: memory usage doubles here (zero2)
|
275 |
+
num_param_groups = len(fp32_flat_groups[0])
|
276 |
+
merged_single_partition_of_fp32_groups = []
|
277 |
+
for i in range(num_param_groups):
|
278 |
+
merged_partitions = [sd[i] for sd in fp32_flat_groups]
|
279 |
+
full_single_fp32_vector = torch.cat(merged_partitions, 0)
|
280 |
+
merged_single_partition_of_fp32_groups.append(full_single_fp32_vector)
|
281 |
+
avail_numel = sum(
|
282 |
+
[full_single_fp32_vector.numel() for full_single_fp32_vector in merged_single_partition_of_fp32_groups])
|
283 |
+
|
284 |
+
if debug:
|
285 |
+
wanted_params = sum([len(shapes) for shapes in param_shapes])
|
286 |
+
wanted_numel = sum([sum(shape.numel() for shape in shapes.values()) for shapes in param_shapes])
|
287 |
+
# not asserting if there is a mismatch due to possible padding
|
288 |
+
print(f"Have {avail_numel} numels to process.")
|
289 |
+
print(f"Need {wanted_numel} numels in {wanted_params} params.")
|
290 |
+
|
291 |
+
# params
|
292 |
+
# XXX: for huge models that can't fit into the host's RAM we will have to recode this to support
|
293 |
+
# out-of-core computing solution
|
294 |
+
total_numel = 0
|
295 |
+
total_params = 0
|
296 |
+
for shapes, full_single_fp32_vector in zip(param_shapes, merged_single_partition_of_fp32_groups):
|
297 |
+
offset = 0
|
298 |
+
avail_numel = full_single_fp32_vector.numel()
|
299 |
+
for name, shape in shapes.items():
|
300 |
+
|
301 |
+
unpartitioned_numel = shape.numel() if _has_callable(shape, 'numel') else math.prod(shape)
|
302 |
+
total_numel += unpartitioned_numel
|
303 |
+
total_params += 1
|
304 |
+
|
305 |
+
if debug:
|
306 |
+
print(f"{name} full shape: {shape} unpartitioned numel {unpartitioned_numel} ")
|
307 |
+
state_dict[name] = full_single_fp32_vector.narrow(0, offset, unpartitioned_numel).view(shape)
|
308 |
+
offset += unpartitioned_numel
|
309 |
+
|
310 |
+
# Z2 started to align to 2*world_size to improve nccl performance. Therefore both offset and
|
311 |
+
# avail_numel can differ by anywhere between 0..2*world_size. Due to two unrelated complex
|
312 |
+
# paddings performed in the code it's almost impossible to predict the exact numbers w/o the
|
313 |
+
# live optimizer object, so we are checking that the numbers are within the right range
|
314 |
+
align_to = 2 * world_size
|
315 |
+
|
316 |
+
def zero2_align(x):
|
317 |
+
return align_to * math.ceil(x / align_to)
|
318 |
+
|
319 |
+
if debug:
|
320 |
+
print(f"original offset={offset}, avail_numel={avail_numel}")
|
321 |
+
|
322 |
+
offset = zero2_align(offset)
|
323 |
+
avail_numel = zero2_align(avail_numel)
|
324 |
+
|
325 |
+
if debug:
|
326 |
+
print(f"aligned offset={offset}, avail_numel={avail_numel}")
|
327 |
+
|
328 |
+
# Sanity check
|
329 |
+
if offset != avail_numel:
|
330 |
+
raise ValueError(f"consumed {offset} numels out of {avail_numel} - something is wrong")
|
331 |
+
|
332 |
+
print(f"Reconstructed fp32 state dict with {total_params} params {total_numel} elements")
|
333 |
+
|
334 |
+
|
335 |
+
def _get_fp32_state_dict_from_zero2_checkpoint(world_size, fp32_flat_groups, zero_model_states,
|
336 |
+
exclude_frozen_parameters):
|
337 |
+
state_dict = OrderedDict()
|
338 |
+
|
339 |
+
# buffers
|
340 |
+
buffers = zero_model_states[0].buffers
|
341 |
+
state_dict.update(buffers)
|
342 |
+
if debug:
|
343 |
+
print(f"added {len(buffers)} buffers")
|
344 |
+
|
345 |
+
if not exclude_frozen_parameters:
|
346 |
+
_zero2_merge_frozen_params(state_dict, zero_model_states)
|
347 |
+
|
348 |
+
_zero2_merge_trainable_params(state_dict, world_size, fp32_flat_groups, zero_model_states)
|
349 |
+
|
350 |
+
# recover shared parameters
|
351 |
+
for pair in zero_model_states[0].shared_params:
|
352 |
+
if pair[1] in state_dict:
|
353 |
+
state_dict[pair[0]] = state_dict[pair[1]]
|
354 |
+
|
355 |
+
return state_dict
|
356 |
+
|
357 |
+
|
358 |
+
def zero3_partitioned_param_info(unpartitioned_numel, world_size):
|
359 |
+
remainder = unpartitioned_numel % world_size
|
360 |
+
padding_numel = (world_size - remainder) if remainder else 0
|
361 |
+
partitioned_numel = math.ceil(unpartitioned_numel / world_size)
|
362 |
+
return partitioned_numel, padding_numel
|
363 |
+
|
364 |
+
|
365 |
+
def _zero3_merge_frozen_params(state_dict, world_size, zero_model_states):
|
366 |
+
if zero_model_states[0].frozen_param_shapes is None or len(zero_model_states[0].frozen_param_shapes) == 0:
|
367 |
+
return
|
368 |
+
|
369 |
+
if debug:
|
370 |
+
for i in range(world_size):
|
371 |
+
num_elem = sum(s.numel() for s in zero_model_states[i].frozen_param_fragments.values())
|
372 |
+
print(f'rank {i}: {FROZEN_PARAM_SHAPES}.numel = {num_elem}')
|
373 |
+
|
374 |
+
frozen_param_shapes = zero_model_states[0].frozen_param_shapes
|
375 |
+
wanted_params = len(frozen_param_shapes)
|
376 |
+
wanted_numel = sum(s.numel() for s in frozen_param_shapes.values())
|
377 |
+
avail_numel = sum([p.numel() for p in zero_model_states[0].frozen_param_fragments.values()]) * world_size
|
378 |
+
print(f'Frozen params: Have {avail_numel} numels to process.')
|
379 |
+
print(f'Frozen params: Need {wanted_numel} numels in {wanted_params} params')
|
380 |
+
|
381 |
+
total_params = 0
|
382 |
+
total_numel = 0
|
383 |
+
for name, shape in zero_model_states[0].frozen_param_shapes.items():
|
384 |
+
total_params += 1
|
385 |
+
unpartitioned_numel = shape.numel()
|
386 |
+
total_numel += unpartitioned_numel
|
387 |
+
|
388 |
+
param_frags = tuple(model_state.frozen_param_fragments[name] for model_state in zero_model_states)
|
389 |
+
state_dict[name] = torch.cat(param_frags, 0).narrow(0, 0, unpartitioned_numel).view(shape)
|
390 |
+
|
391 |
+
partitioned_numel, partitioned_padding_numel = zero3_partitioned_param_info(unpartitioned_numel, world_size)
|
392 |
+
|
393 |
+
if debug:
|
394 |
+
print(
|
395 |
+
f"Frozen params: {total_params} {name} full shape: {shape} partition0 numel={partitioned_numel} partitioned_padding_numel={partitioned_padding_numel}"
|
396 |
+
)
|
397 |
+
|
398 |
+
print(f"Reconstructed Frozen fp32 state dict with {total_params} params {total_numel} elements")
|
399 |
+
|
400 |
+
|
401 |
+
def _zero3_merge_trainable_params(state_dict, world_size, fp32_flat_groups, zero_model_states):
|
402 |
+
param_shapes = zero_model_states[0].param_shapes
|
403 |
+
avail_numel = fp32_flat_groups[0].numel() * world_size
|
404 |
+
# Reconstruction protocol: For zero3 we need to zip the partitions together at boundary of each
|
405 |
+
# param, re-consolidating each param, while dealing with padding if any
|
406 |
+
|
407 |
+
# merge list of dicts, preserving order
|
408 |
+
param_shapes = {k: v for d in param_shapes for k, v in d.items()}
|
409 |
+
|
410 |
+
if debug:
|
411 |
+
for i in range(world_size):
|
412 |
+
print(f"{FP32_FLAT_GROUPS}[{i}].shape={fp32_flat_groups[i].shape}")
|
413 |
+
|
414 |
+
wanted_params = len(param_shapes)
|
415 |
+
wanted_numel = sum(shape.numel() for shape in param_shapes.values())
|
416 |
+
# not asserting if there is a mismatch due to possible padding
|
417 |
+
avail_numel = fp32_flat_groups[0].numel() * world_size
|
418 |
+
print(f"Trainable params: Have {avail_numel} numels to process.")
|
419 |
+
print(f"Trainable params: Need {wanted_numel} numels in {wanted_params} params.")
|
420 |
+
|
421 |
+
# params
|
422 |
+
# XXX: for huge models that can't fit into the host's RAM we will have to recode this to support
|
423 |
+
# out-of-core computing solution
|
424 |
+
offset = 0
|
425 |
+
total_numel = 0
|
426 |
+
total_params = 0
|
427 |
+
for name, shape in tqdm(param_shapes.items(), desc='Gathering Sharded Weights'):
|
428 |
+
unpartitioned_numel = shape.numel()
|
429 |
+
total_numel += unpartitioned_numel
|
430 |
+
total_params += 1
|
431 |
+
partitioned_numel, partitioned_padding_numel = zero3_partitioned_param_info(unpartitioned_numel, world_size)
|
432 |
+
|
433 |
+
if debug:
|
434 |
+
print(
|
435 |
+
f"Trainable params: {total_params} {name} full shape: {shape} partition0 numel={partitioned_numel} partitioned_padding_numel={partitioned_padding_numel}"
|
436 |
+
)
|
437 |
+
|
438 |
+
# XXX: memory usage doubles here
|
439 |
+
state_dict[name] = torch.cat(
|
440 |
+
tuple(fp32_flat_groups[i].narrow(0, offset, partitioned_numel) for i in range(world_size)),
|
441 |
+
0).narrow(0, 0, unpartitioned_numel).view(shape)
|
442 |
+
offset += partitioned_numel
|
443 |
+
|
444 |
+
offset *= world_size
|
445 |
+
|
446 |
+
# Sanity check
|
447 |
+
if offset != avail_numel:
|
448 |
+
raise ValueError(f"consumed {offset} numels out of {avail_numel} - something is wrong")
|
449 |
+
|
450 |
+
print(f"Reconstructed Trainable fp32 state dict with {total_params} params {total_numel} elements")
|
451 |
+
|
452 |
+
|
453 |
+
def _get_fp32_state_dict_from_zero3_checkpoint(world_size, fp32_flat_groups, zero_model_states,
|
454 |
+
exclude_frozen_parameters):
|
455 |
+
state_dict = OrderedDict()
|
456 |
+
|
457 |
+
# buffers
|
458 |
+
buffers = zero_model_states[0].buffers
|
459 |
+
state_dict.update(buffers)
|
460 |
+
if debug:
|
461 |
+
print(f"added {len(buffers)} buffers")
|
462 |
+
|
463 |
+
if not exclude_frozen_parameters:
|
464 |
+
_zero3_merge_frozen_params(state_dict, world_size, zero_model_states)
|
465 |
+
|
466 |
+
_zero3_merge_trainable_params(state_dict, world_size, fp32_flat_groups, zero_model_states)
|
467 |
+
|
468 |
+
# recover shared parameters
|
469 |
+
for pair in zero_model_states[0].shared_params:
|
470 |
+
if pair[1] in state_dict:
|
471 |
+
state_dict[pair[0]] = state_dict[pair[1]]
|
472 |
+
|
473 |
+
return state_dict
|
474 |
+
|
475 |
+
|
476 |
+
def get_fp32_state_dict_from_zero_checkpoint(checkpoint_dir, tag=None, exclude_frozen_parameters=False):
|
477 |
+
"""
|
478 |
+
Convert ZeRO 2 or 3 checkpoint into a single fp32 consolidated state_dict that can be loaded with
|
479 |
+
``load_state_dict()`` and used for training without DeepSpeed or shared with others, for example
|
480 |
+
via a model hub.
|
481 |
+
|
482 |
+
Args:
|
483 |
+
- ``checkpoint_dir``: path to the desired checkpoint folder
|
484 |
+
- ``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``
|
485 |
+
- ``exclude_frozen_parameters``: exclude frozen parameters
|
486 |
+
|
487 |
+
Returns:
|
488 |
+
- pytorch ``state_dict``
|
489 |
+
|
490 |
+
Note: this approach may not work if your application doesn't have sufficient free CPU memory and
|
491 |
+
you may need to use the offline approach using the ``zero_to_fp32.py`` script that is saved with
|
492 |
+
the checkpoint.
|
493 |
+
|
494 |
+
A typical usage might be ::
|
495 |
+
|
496 |
+
from deepspeed.utils.zero_to_fp32 import get_fp32_state_dict_from_zero_checkpoint
|
497 |
+
# do the training and checkpoint saving
|
498 |
+
state_dict = get_fp32_state_dict_from_zero_checkpoint(checkpoint_dir) # already on cpu
|
499 |
+
model = model.cpu() # move to cpu
|
500 |
+
model.load_state_dict(state_dict)
|
501 |
+
# submit to model hub or save the model to share with others
|
502 |
+
|
503 |
+
In this example the ``model`` will no longer be usable in the deepspeed context of the same
|
504 |
+
application. i.e. you will need to re-initialize the deepspeed engine, since
|
505 |
+
``model.load_state_dict(state_dict)`` will remove all the deepspeed magic from it.
|
506 |
+
|
507 |
+
If you want it all done for you, use ``load_state_dict_from_zero_checkpoint`` instead.
|
508 |
+
|
509 |
+
"""
|
510 |
+
if tag is None:
|
511 |
+
latest_path = os.path.join(checkpoint_dir, 'latest')
|
512 |
+
if os.path.isfile(latest_path):
|
513 |
+
with open(latest_path, 'r') as fd:
|
514 |
+
tag = fd.read().strip()
|
515 |
+
else:
|
516 |
+
raise ValueError(f"Unable to find 'latest' file at {latest_path}")
|
517 |
+
|
518 |
+
ds_checkpoint_dir = os.path.join(checkpoint_dir, tag)
|
519 |
+
|
520 |
+
if not os.path.isdir(ds_checkpoint_dir):
|
521 |
+
raise FileNotFoundError(f"Directory '{ds_checkpoint_dir}' doesn't exist")
|
522 |
+
|
523 |
+
return _get_fp32_state_dict_from_zero_checkpoint(ds_checkpoint_dir, exclude_frozen_parameters)
|
524 |
+
|
525 |
+
|
526 |
+
def convert_zero_checkpoint_to_fp32_state_dict(checkpoint_dir,
|
527 |
+
output_dir,
|
528 |
+
max_shard_size="5GB",
|
529 |
+
safe_serialization=False,
|
530 |
+
tag=None,
|
531 |
+
exclude_frozen_parameters=False):
|
532 |
+
"""
|
533 |
+
Convert ZeRO 2 or 3 checkpoint into a single fp32 consolidated ``state_dict`` file that can be
|
534 |
+
loaded with ``torch.load(file)`` + ``load_state_dict()`` and used for training without DeepSpeed.
|
535 |
+
|
536 |
+
Args:
|
537 |
+
- ``checkpoint_dir``: path to the desired checkpoint folder. (one that contains the tag-folder, like ``global_step14``)
|
538 |
+
- ``output_dir``: directory to the pytorch fp32 state_dict output files
|
539 |
+
- ``max_shard_size``: the maximum size for a checkpoint before being sharded, default value is 5GB
|
540 |
+
- ``safe_serialization``: whether to save the model using `safetensors` or the traditional PyTorch way (that uses `pickle`).
|
541 |
+
- ``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``
|
542 |
+
- ``exclude_frozen_parameters``: exclude frozen parameters
|
543 |
+
"""
|
544 |
+
# Dependency pre-check
|
545 |
+
if safe_serialization:
|
546 |
+
try:
|
547 |
+
from safetensors.torch import save_file
|
548 |
+
except ImportError:
|
549 |
+
print('If you want to use `safe_serialization`, please `pip install safetensors`')
|
550 |
+
raise
|
551 |
+
if max_shard_size is not None:
|
552 |
+
try:
|
553 |
+
from huggingface_hub import split_torch_state_dict_into_shards
|
554 |
+
except ImportError:
|
555 |
+
print('If you want to use `max_shard_size`, please `pip install huggingface_hub`')
|
556 |
+
raise
|
557 |
+
|
558 |
+
# Convert zero checkpoint to state_dict
|
559 |
+
state_dict = get_fp32_state_dict_from_zero_checkpoint(checkpoint_dir, tag, exclude_frozen_parameters)
|
560 |
+
|
561 |
+
# Shard the model if it is too big.
|
562 |
+
weights_name = "model.safetensors" if safe_serialization else "pytorch_model.bin"
|
563 |
+
if max_shard_size is not None:
|
564 |
+
filename_pattern = weights_name.replace(".bin", "{suffix}.bin").replace(".safetensors", "{suffix}.safetensors")
|
565 |
+
state_dict_split = split_torch_state_dict_into_shards(state_dict,
|
566 |
+
filename_pattern=filename_pattern,
|
567 |
+
max_shard_size=max_shard_size)
|
568 |
+
else:
|
569 |
+
from collections import namedtuple
|
570 |
+
StateDictSplit = namedtuple("StateDictSplit", ["is_sharded", "filename_to_tensors"])
|
571 |
+
state_dict_split = StateDictSplit(is_sharded=False,
|
572 |
+
filename_to_tensors={weights_name: list(state_dict.keys())})
|
573 |
+
|
574 |
+
# Save the model
|
575 |
+
filename_to_tensors = state_dict_split.filename_to_tensors.items()
|
576 |
+
for shard_file, tensors in tqdm(filename_to_tensors, desc="Saving checkpoint shards"):
|
577 |
+
shard = {tensor: state_dict[tensor].contiguous() for tensor in tensors}
|
578 |
+
output_path = os.path.join(output_dir, shard_file)
|
579 |
+
if safe_serialization:
|
580 |
+
save_file(shard, output_path, metadata={"format": "pt"})
|
581 |
+
else:
|
582 |
+
torch.save(shard, output_path)
|
583 |
+
|
584 |
+
# Save index if sharded
|
585 |
+
if state_dict_split.is_sharded:
|
586 |
+
index = {
|
587 |
+
"metadata": state_dict_split.metadata,
|
588 |
+
"weight_map": state_dict_split.tensor_to_filename,
|
589 |
+
}
|
590 |
+
save_index_file = "model.safetensors.index.json" if safe_serialization else "pytorch_model.bin.index.json"
|
591 |
+
save_index_file = os.path.join(output_dir, save_index_file)
|
592 |
+
with open(save_index_file, "w", encoding="utf-8") as f:
|
593 |
+
content = json.dumps(index, indent=2, sort_keys=True) + "\n"
|
594 |
+
f.write(content)
|
595 |
+
|
596 |
+
|
597 |
+
def load_state_dict_from_zero_checkpoint(model, checkpoint_dir, tag=None):
|
598 |
+
"""
|
599 |
+
1. Put the provided model to cpu
|
600 |
+
2. Convert ZeRO 2 or 3 checkpoint into a single fp32 consolidated ``state_dict``
|
601 |
+
3. Load it into the provided model
|
602 |
+
|
603 |
+
Args:
|
604 |
+
- ``model``: the model object to update
|
605 |
+
- ``checkpoint_dir``: path to the desired checkpoint folder. (one that contains the tag-folder, like ``global_step14``)
|
606 |
+
- ``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``
|
607 |
+
|
608 |
+
Returns:
|
609 |
+
- ``model`: modified model
|
610 |
+
|
611 |
+
Make sure you have plenty of CPU memory available before you call this function. If you don't
|
612 |
+
have enough use the ``zero_to_fp32.py`` utility to do the conversion. You will find it
|
613 |
+
conveniently placed for you in the checkpoint folder.
|
614 |
+
|
615 |
+
A typical usage might be ::
|
616 |
+
|
617 |
+
from deepspeed.utils.zero_to_fp32 import load_state_dict_from_zero_checkpoint
|
618 |
+
model = load_state_dict_from_zero_checkpoint(trainer.model, checkpoint_dir)
|
619 |
+
# submit to model hub or save the model to share with others
|
620 |
+
|
621 |
+
Note, that once this was run, the ``model`` will no longer be usable in the deepspeed context
|
622 |
+
of the same application. i.e. you will need to re-initialize the deepspeed engine, since
|
623 |
+
``model.load_state_dict(state_dict)`` will remove all the deepspeed magic from it.
|
624 |
+
|
625 |
+
"""
|
626 |
+
logger.info(f"Extracting fp32 weights")
|
627 |
+
state_dict = get_fp32_state_dict_from_zero_checkpoint(checkpoint_dir, tag)
|
628 |
+
|
629 |
+
logger.info(f"Overwriting model with fp32 weights")
|
630 |
+
model = model.cpu()
|
631 |
+
model.load_state_dict(state_dict, strict=False)
|
632 |
+
|
633 |
+
return model
|
634 |
+
|
635 |
+
|
636 |
+
if __name__ == "__main__":
|
637 |
+
parser = argparse.ArgumentParser()
|
638 |
+
parser.add_argument("checkpoint_dir",
|
639 |
+
type=str,
|
640 |
+
help="path to the desired checkpoint folder, e.g., path/checkpoint-12")
|
641 |
+
parser.add_argument("output_dir",
|
642 |
+
type=str,
|
643 |
+
help="directory to the pytorch fp32 state_dict output files"
|
644 |
+
"(e.g. path/checkpoint-12-output/)")
|
645 |
+
parser.add_argument(
|
646 |
+
"--max_shard_size",
|
647 |
+
type=str,
|
648 |
+
default="5GB",
|
649 |
+
help="The maximum size for a checkpoint before being sharded. Checkpoints shard will then be each of size"
|
650 |
+
"lower than this size. If expressed as a string, needs to be digits followed by a unit (like `5MB`"
|
651 |
+
"We default it to 5GB in order for models to be able to run easily on free-tier google colab instances"
|
652 |
+
"without CPU OOM issues.")
|
653 |
+
parser.add_argument(
|
654 |
+
"--safe_serialization",
|
655 |
+
default=False,
|
656 |
+
action='store_true',
|
657 |
+
help="Whether to save the model using `safetensors` or the traditional PyTorch way (that uses `pickle`).")
|
658 |
+
parser.add_argument("-t",
|
659 |
+
"--tag",
|
660 |
+
type=str,
|
661 |
+
default=None,
|
662 |
+
help="checkpoint tag used as a unique identifier for checkpoint. e.g., global_step1")
|
663 |
+
parser.add_argument("--exclude_frozen_parameters", action='store_true', help="exclude frozen parameters")
|
664 |
+
parser.add_argument("-d", "--debug", action='store_true', help="enable debug")
|
665 |
+
args = parser.parse_args()
|
666 |
+
|
667 |
+
debug = args.debug
|
668 |
+
|
669 |
+
convert_zero_checkpoint_to_fp32_state_dict(args.checkpoint_dir,
|
670 |
+
args.output_dir,
|
671 |
+
max_shard_size=args.max_shard_size,
|
672 |
+
safe_serialization=args.safe_serialization,
|
673 |
+
tag=args.tag,
|
674 |
+
exclude_frozen_parameters=args.exclude_frozen_parameters)
|