AmberYifan commited on
Commit
74b8803
1 Parent(s): 8fb11f5

Model save

Browse files
README.md ADDED
@@ -0,0 +1,70 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ ---
2
+ license: apache-2.0
3
+ base_model: AmberYifan/mistral-safe-sft-full
4
+ tags:
5
+ - generated_from_trainer
6
+ model-index:
7
+ - name: mistral-sft-kcenter-5k
8
+ results: []
9
+ ---
10
+
11
+ <!-- This model card has been generated automatically according to the information the Trainer had access to. You
12
+ should probably proofread and complete it, then remove this comment. -->
13
+
14
+ # mistral-sft-kcenter-5k
15
+
16
+ This model is a fine-tuned version of [AmberYifan/mistral-safe-sft-full](https://huggingface.co/AmberYifan/mistral-safe-sft-full) on an unknown dataset.
17
+ It achieves the following results on the evaluation set:
18
+ - Loss: 1.0181
19
+ - Rewards/real: 1.4812
20
+ - Rewards/generated: 1.4157
21
+ - Rewards/accuracies: 0.0812
22
+ - Rewards/margins: 0.0655
23
+ - Logps/generated: -57.7408
24
+ - Logps/real: -16.8189
25
+ - Logits/generated: -2.6921
26
+ - Logits/real: -2.4190
27
+
28
+ ## Model description
29
+
30
+ More information needed
31
+
32
+ ## Intended uses & limitations
33
+
34
+ More information needed
35
+
36
+ ## Training and evaluation data
37
+
38
+ More information needed
39
+
40
+ ## Training procedure
41
+
42
+ ### Training hyperparameters
43
+
44
+ The following hyperparameters were used during training:
45
+ - learning_rate: 5e-07
46
+ - train_batch_size: 8
47
+ - eval_batch_size: 8
48
+ - seed: 42
49
+ - distributed_type: multi-GPU
50
+ - num_devices: 4
51
+ - total_train_batch_size: 32
52
+ - total_eval_batch_size: 32
53
+ - optimizer: Adam with betas=(0.9,0.999) and epsilon=1e-08
54
+ - lr_scheduler_type: linear
55
+ - lr_scheduler_warmup_ratio: 0.1
56
+ - num_epochs: 1
57
+
58
+ ### Training results
59
+
60
+ | Training Loss | Epoch | Step | Validation Loss | Rewards/real | Rewards/generated | Rewards/accuracies | Rewards/margins | Logps/generated | Logps/real | Logits/generated | Logits/real |
61
+ |:-------------:|:------:|:----:|:---------------:|:------------:|:-----------------:|:------------------:|:---------------:|:---------------:|:----------:|:----------------:|:-----------:|
62
+ | 0.3429 | 0.6369 | 100 | 1.0181 | 1.4812 | 1.4157 | 0.0812 | 0.0655 | -57.7408 | -16.8189 | -2.6921 | -2.4190 |
63
+
64
+
65
+ ### Framework versions
66
+
67
+ - Transformers 4.43.3
68
+ - Pytorch 2.2.2+cu121
69
+ - Datasets 2.20.0
70
+ - Tokenizers 0.19.1
all_results.json ADDED
@@ -0,0 +1,9 @@
 
 
 
 
 
 
 
 
 
 
1
+ {
2
+ "epoch": 1.0,
3
+ "total_flos": 0.0,
4
+ "train_loss": 0.3886139180250229,
5
+ "train_runtime": 1518.6555,
6
+ "train_samples": 5000,
7
+ "train_samples_per_second": 3.292,
8
+ "train_steps_per_second": 0.103
9
+ }
generation_config.json ADDED
@@ -0,0 +1,6 @@
 
 
 
 
 
 
 
1
+ {
2
+ "_from_model_config": true,
3
+ "bos_token_id": 1,
4
+ "eos_token_id": 2,
5
+ "transformers_version": "4.43.3"
6
+ }
train_results.json ADDED
@@ -0,0 +1,9 @@
 
 
 
 
 
 
 
 
 
 
1
+ {
2
+ "epoch": 1.0,
3
+ "total_flos": 0.0,
4
+ "train_loss": 0.3886139180250229,
5
+ "train_runtime": 1518.6555,
6
+ "train_samples": 5000,
7
+ "train_samples_per_second": 3.292,
8
+ "train_steps_per_second": 0.103
9
+ }
trainer_state.json ADDED
@@ -0,0 +1,298 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ {
2
+ "best_metric": null,
3
+ "best_model_checkpoint": null,
4
+ "epoch": 1.0,
5
+ "eval_steps": 100,
6
+ "global_step": 157,
7
+ "is_hyper_param_search": false,
8
+ "is_local_process_zero": true,
9
+ "is_world_process_zero": true,
10
+ "log_history": [
11
+ {
12
+ "epoch": 0.006369426751592357,
13
+ "grad_norm": 436.30790272840835,
14
+ "learning_rate": 3.125e-08,
15
+ "logits/generated": -2.574023723602295,
16
+ "logits/real": -2.507308006286621,
17
+ "logps/generated": -396.6226806640625,
18
+ "logps/real": -228.6820831298828,
19
+ "loss": 1.1036,
20
+ "rewards/accuracies": 0.0,
21
+ "rewards/generated": 0.0,
22
+ "rewards/margins": 0.0,
23
+ "rewards/real": 0.0,
24
+ "step": 1
25
+ },
26
+ {
27
+ "epoch": 0.06369426751592357,
28
+ "grad_norm": 86.39288206954664,
29
+ "learning_rate": 3.1249999999999997e-07,
30
+ "logits/generated": -2.6174476146698,
31
+ "logits/real": -2.577033042907715,
32
+ "logps/generated": -314.8096923828125,
33
+ "logps/real": -233.916259765625,
34
+ "loss": 0.8432,
35
+ "rewards/accuracies": 0.8055555820465088,
36
+ "rewards/generated": -1.1551631689071655,
37
+ "rewards/margins": 1.29329252243042,
38
+ "rewards/real": 0.13812927901744843,
39
+ "step": 10
40
+ },
41
+ {
42
+ "epoch": 0.12738853503184713,
43
+ "grad_norm": 23.096946473336036,
44
+ "learning_rate": 4.858156028368794e-07,
45
+ "logits/generated": -2.934861421585083,
46
+ "logits/real": -2.8925399780273438,
47
+ "logps/generated": -313.32012939453125,
48
+ "logps/real": -235.418701171875,
49
+ "loss": 0.4872,
50
+ "rewards/accuracies": 1.0,
51
+ "rewards/generated": -3.896754741668701,
52
+ "rewards/margins": 6.176419258117676,
53
+ "rewards/real": 2.2796645164489746,
54
+ "step": 20
55
+ },
56
+ {
57
+ "epoch": 0.1910828025477707,
58
+ "grad_norm": 23.454945687282052,
59
+ "learning_rate": 4.50354609929078e-07,
60
+ "logits/generated": -2.9848690032958984,
61
+ "logits/real": -2.9865798950195312,
62
+ "logps/generated": -304.69854736328125,
63
+ "logps/real": -152.80667114257812,
64
+ "loss": 0.3868,
65
+ "rewards/accuracies": 0.987500011920929,
66
+ "rewards/generated": -3.0515201091766357,
67
+ "rewards/margins": 7.164666652679443,
68
+ "rewards/real": 4.113146781921387,
69
+ "step": 30
70
+ },
71
+ {
72
+ "epoch": 0.25477707006369427,
73
+ "grad_norm": 56.59285724233864,
74
+ "learning_rate": 4.148936170212766e-07,
75
+ "logits/generated": -2.821133852005005,
76
+ "logits/real": -2.894505262374878,
77
+ "logps/generated": -349.6683044433594,
78
+ "logps/real": -201.2012176513672,
79
+ "loss": 0.4438,
80
+ "rewards/accuracies": 1.0,
81
+ "rewards/generated": -5.3700079917907715,
82
+ "rewards/margins": 9.444425582885742,
83
+ "rewards/real": 4.074416637420654,
84
+ "step": 40
85
+ },
86
+ {
87
+ "epoch": 0.3184713375796178,
88
+ "grad_norm": 26.344052963980364,
89
+ "learning_rate": 3.7943262411347514e-07,
90
+ "logits/generated": -3.041593074798584,
91
+ "logits/real": -2.9904277324676514,
92
+ "logps/generated": -335.09942626953125,
93
+ "logps/real": -158.0336151123047,
94
+ "loss": 0.37,
95
+ "rewards/accuracies": 0.987500011920929,
96
+ "rewards/generated": -3.180644989013672,
97
+ "rewards/margins": 8.93952751159668,
98
+ "rewards/real": 5.758882999420166,
99
+ "step": 50
100
+ },
101
+ {
102
+ "epoch": 0.3821656050955414,
103
+ "grad_norm": 47.871426260084256,
104
+ "learning_rate": 3.4397163120567375e-07,
105
+ "logits/generated": -2.9896843433380127,
106
+ "logits/real": -3.0180420875549316,
107
+ "logps/generated": -302.9552307128906,
108
+ "logps/real": -140.7099151611328,
109
+ "loss": 0.3324,
110
+ "rewards/accuracies": 0.9750000238418579,
111
+ "rewards/generated": -3.2430217266082764,
112
+ "rewards/margins": 9.301046371459961,
113
+ "rewards/real": 6.0580244064331055,
114
+ "step": 60
115
+ },
116
+ {
117
+ "epoch": 0.445859872611465,
118
+ "grad_norm": 24.288240218254995,
119
+ "learning_rate": 3.085106382978723e-07,
120
+ "logits/generated": -3.0595779418945312,
121
+ "logits/real": -2.9718518257141113,
122
+ "logps/generated": -328.691650390625,
123
+ "logps/real": -140.92660522460938,
124
+ "loss": 0.333,
125
+ "rewards/accuracies": 0.987500011920929,
126
+ "rewards/generated": -3.642324447631836,
127
+ "rewards/margins": 10.118036270141602,
128
+ "rewards/real": 6.47571325302124,
129
+ "step": 70
130
+ },
131
+ {
132
+ "epoch": 0.5095541401273885,
133
+ "grad_norm": 14.83120429808784,
134
+ "learning_rate": 2.730496453900709e-07,
135
+ "logits/generated": -2.996634006500244,
136
+ "logits/real": -3.0401620864868164,
137
+ "logps/generated": -322.6135559082031,
138
+ "logps/real": -159.5257110595703,
139
+ "loss": 0.3328,
140
+ "rewards/accuracies": 0.9624999761581421,
141
+ "rewards/generated": -2.347047805786133,
142
+ "rewards/margins": 10.133938789367676,
143
+ "rewards/real": 7.786890506744385,
144
+ "step": 80
145
+ },
146
+ {
147
+ "epoch": 0.5732484076433121,
148
+ "grad_norm": 16.65278970025503,
149
+ "learning_rate": 2.375886524822695e-07,
150
+ "logits/generated": -3.0264060497283936,
151
+ "logits/real": -2.979038715362549,
152
+ "logps/generated": -360.536376953125,
153
+ "logps/real": -162.26622009277344,
154
+ "loss": 0.3387,
155
+ "rewards/accuracies": 0.987500011920929,
156
+ "rewards/generated": -4.7210164070129395,
157
+ "rewards/margins": 12.409219741821289,
158
+ "rewards/real": 7.68820333480835,
159
+ "step": 90
160
+ },
161
+ {
162
+ "epoch": 0.6369426751592356,
163
+ "grad_norm": 7.324308799399964,
164
+ "learning_rate": 2.0212765957446807e-07,
165
+ "logits/generated": -2.968139410018921,
166
+ "logits/real": -3.0011098384857178,
167
+ "logps/generated": -325.79107666015625,
168
+ "logps/real": -162.4396514892578,
169
+ "loss": 0.3429,
170
+ "rewards/accuracies": 0.987500011920929,
171
+ "rewards/generated": -2.580188512802124,
172
+ "rewards/margins": 10.546457290649414,
173
+ "rewards/real": 7.966268062591553,
174
+ "step": 100
175
+ },
176
+ {
177
+ "epoch": 0.6369426751592356,
178
+ "eval_logits/generated": -2.6921370029449463,
179
+ "eval_logits/real": -2.418954372406006,
180
+ "eval_logps/generated": -57.74082565307617,
181
+ "eval_logps/real": -16.818851470947266,
182
+ "eval_loss": 1.018080234527588,
183
+ "eval_rewards/accuracies": 0.0812101885676384,
184
+ "eval_rewards/generated": 1.4157419204711914,
185
+ "eval_rewards/margins": 0.06545643508434296,
186
+ "eval_rewards/real": 1.4811984300613403,
187
+ "eval_runtime": 325.124,
188
+ "eval_samples_per_second": 15.379,
189
+ "eval_steps_per_second": 0.483,
190
+ "step": 100
191
+ },
192
+ {
193
+ "epoch": 0.7006369426751592,
194
+ "grad_norm": 44.79401383111945,
195
+ "learning_rate": 1.6666666666666665e-07,
196
+ "logits/generated": -2.966001033782959,
197
+ "logits/real": -2.9780120849609375,
198
+ "logps/generated": -347.74993896484375,
199
+ "logps/real": -158.44979858398438,
200
+ "loss": 0.365,
201
+ "rewards/accuracies": 0.987500011920929,
202
+ "rewards/generated": -3.206289768218994,
203
+ "rewards/margins": 11.313484191894531,
204
+ "rewards/real": 8.107194900512695,
205
+ "step": 110
206
+ },
207
+ {
208
+ "epoch": 0.7643312101910829,
209
+ "grad_norm": 7.15542526632935,
210
+ "learning_rate": 1.3120567375886523e-07,
211
+ "logits/generated": -2.9361348152160645,
212
+ "logits/real": -2.991243839263916,
213
+ "logps/generated": -340.3627014160156,
214
+ "logps/real": -145.40615844726562,
215
+ "loss": 0.3243,
216
+ "rewards/accuracies": 1.0,
217
+ "rewards/generated": -3.4838199615478516,
218
+ "rewards/margins": 10.616706848144531,
219
+ "rewards/real": 7.132887363433838,
220
+ "step": 120
221
+ },
222
+ {
223
+ "epoch": 0.8280254777070064,
224
+ "grad_norm": 28.617693401838523,
225
+ "learning_rate": 9.574468085106382e-08,
226
+ "logits/generated": -2.880622386932373,
227
+ "logits/real": -2.873990774154663,
228
+ "logps/generated": -284.91949462890625,
229
+ "logps/real": -130.95306396484375,
230
+ "loss": 0.3022,
231
+ "rewards/accuracies": 0.987500011920929,
232
+ "rewards/generated": -1.7718982696533203,
233
+ "rewards/margins": 8.987956047058105,
234
+ "rewards/real": 7.216057777404785,
235
+ "step": 130
236
+ },
237
+ {
238
+ "epoch": 0.89171974522293,
239
+ "grad_norm": 11.2855453725489,
240
+ "learning_rate": 6.02836879432624e-08,
241
+ "logits/generated": -2.893979549407959,
242
+ "logits/real": -2.919368028640747,
243
+ "logps/generated": -334.3547058105469,
244
+ "logps/real": -154.1964569091797,
245
+ "loss": 0.3389,
246
+ "rewards/accuracies": 0.9750000238418579,
247
+ "rewards/generated": -3.628894090652466,
248
+ "rewards/margins": 11.9329252243042,
249
+ "rewards/real": 8.304032325744629,
250
+ "step": 140
251
+ },
252
+ {
253
+ "epoch": 0.9554140127388535,
254
+ "grad_norm": 31.41907953329688,
255
+ "learning_rate": 2.4822695035460993e-08,
256
+ "logits/generated": -2.864701747894287,
257
+ "logits/real": -2.9138083457946777,
258
+ "logps/generated": -315.903564453125,
259
+ "logps/real": -138.75643920898438,
260
+ "loss": 0.3255,
261
+ "rewards/accuracies": 0.987500011920929,
262
+ "rewards/generated": -2.897620677947998,
263
+ "rewards/margins": 9.965813636779785,
264
+ "rewards/real": 7.068192958831787,
265
+ "step": 150
266
+ },
267
+ {
268
+ "epoch": 1.0,
269
+ "step": 157,
270
+ "total_flos": 0.0,
271
+ "train_loss": 0.3886139180250229,
272
+ "train_runtime": 1518.6555,
273
+ "train_samples_per_second": 3.292,
274
+ "train_steps_per_second": 0.103
275
+ }
276
+ ],
277
+ "logging_steps": 10,
278
+ "max_steps": 157,
279
+ "num_input_tokens_seen": 0,
280
+ "num_train_epochs": 1,
281
+ "save_steps": 100,
282
+ "stateful_callbacks": {
283
+ "TrainerControl": {
284
+ "args": {
285
+ "should_epoch_stop": false,
286
+ "should_evaluate": false,
287
+ "should_log": false,
288
+ "should_save": true,
289
+ "should_training_stop": true
290
+ },
291
+ "attributes": {}
292
+ }
293
+ },
294
+ "total_flos": 0.0,
295
+ "train_batch_size": 8,
296
+ "trial_name": null,
297
+ "trial_params": null
298
+ }