YYYYYYibo commited on
Commit
4325609
1 Parent(s): 0ceaf70

Model save

Browse files
README.md ADDED
@@ -0,0 +1,75 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ ---
2
+ license: apache-2.0
3
+ library_name: peft
4
+ tags:
5
+ - trl
6
+ - dpo
7
+ - generated_from_trainer
8
+ base_model: alignment-handbook/zephyr-7b-sft-full
9
+ model-index:
10
+ - name: vanilla_doff_dpo_iter_2
11
+ results: []
12
+ ---
13
+
14
+ <!-- This model card has been generated automatically according to the information the Trainer had access to. You
15
+ should probably proofread and complete it, then remove this comment. -->
16
+
17
+ # vanilla_doff_dpo_iter_2
18
+
19
+ This model is a fine-tuned version of [alignment-handbook/zephyr-7b-sft-full](https://huggingface.co/alignment-handbook/zephyr-7b-sft-full) on the None dataset.
20
+ It achieves the following results on the evaluation set:
21
+ - Loss: 0.6693
22
+ - Rewards/chosen: -0.1884
23
+ - Rewards/rejected: -0.2428
24
+ - Rewards/accuracies: 0.5520
25
+ - Rewards/margins: 0.0543
26
+ - Logps/rejected: -294.6735
27
+ - Logps/chosen: -310.7413
28
+ - Logits/rejected: -2.5815
29
+ - Logits/chosen: -2.6792
30
+
31
+ ## Model description
32
+
33
+ More information needed
34
+
35
+ ## Intended uses & limitations
36
+
37
+ More information needed
38
+
39
+ ## Training and evaluation data
40
+
41
+ More information needed
42
+
43
+ ## Training procedure
44
+
45
+ ### Training hyperparameters
46
+
47
+ The following hyperparameters were used during training:
48
+ - learning_rate: 5e-06
49
+ - train_batch_size: 2
50
+ - eval_batch_size: 2
51
+ - seed: 42
52
+ - distributed_type: multi-GPU
53
+ - num_devices: 4
54
+ - gradient_accumulation_steps: 16
55
+ - total_train_batch_size: 128
56
+ - total_eval_batch_size: 8
57
+ - optimizer: Adam with betas=(0.9,0.999) and epsilon=1e-08
58
+ - lr_scheduler_type: cosine
59
+ - lr_scheduler_warmup_ratio: 0.1
60
+ - num_epochs: 1
61
+
62
+ ### Training results
63
+
64
+ | Training Loss | Epoch | Step | Validation Loss | Rewards/chosen | Rewards/rejected | Rewards/accuracies | Rewards/margins | Logps/rejected | Logps/chosen | Logits/rejected | Logits/chosen |
65
+ |:-------------:|:-----:|:----:|:---------------:|:--------------:|:----------------:|:------------------:|:---------------:|:--------------:|:------------:|:---------------:|:-------------:|
66
+ | 0.6615 | 0.65 | 100 | 0.6693 | -0.1884 | -0.2428 | 0.5520 | 0.0543 | -294.6735 | -310.7413 | -2.5815 | -2.6792 |
67
+
68
+
69
+ ### Framework versions
70
+
71
+ - PEFT 0.7.1
72
+ - Transformers 4.36.2
73
+ - Pytorch 2.1.2+cu121
74
+ - Datasets 2.14.6
75
+ - Tokenizers 0.15.2
adapter_config.json ADDED
@@ -0,0 +1,31 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ {
2
+ "alpha_pattern": {},
3
+ "auto_mapping": null,
4
+ "base_model_name_or_path": "alignment-handbook/zephyr-7b-sft-full",
5
+ "bias": "none",
6
+ "fan_in_fan_out": false,
7
+ "inference_mode": true,
8
+ "init_lora_weights": true,
9
+ "layers_pattern": null,
10
+ "layers_to_transform": null,
11
+ "loftq_config": {},
12
+ "lora_alpha": 128,
13
+ "lora_dropout": 0.05,
14
+ "megatron_config": null,
15
+ "megatron_core": "megatron.core",
16
+ "modules_to_save": null,
17
+ "peft_type": "LORA",
18
+ "r": 64,
19
+ "rank_pattern": {},
20
+ "revision": null,
21
+ "target_modules": [
22
+ "o_proj",
23
+ "v_proj",
24
+ "up_proj",
25
+ "k_proj",
26
+ "q_proj",
27
+ "down_proj",
28
+ "gate_proj"
29
+ ],
30
+ "task_type": "CAUSAL_LM"
31
+ }
adapter_model.safetensors ADDED
@@ -0,0 +1,3 @@
 
 
 
 
1
+ version https://git-lfs.github.com/spec/v1
2
+ oid sha256:f439d277e5de0aca5ba584bd9e529c229c43f88fd16961d87699f0a8616ffbee
3
+ size 335605144
all_results.json ADDED
@@ -0,0 +1,8 @@
 
 
 
 
 
 
 
 
 
1
+ {
2
+ "epoch": 1.0,
3
+ "train_loss": 0.6705375785141988,
4
+ "train_runtime": 6538.0645,
5
+ "train_samples": 19600,
6
+ "train_samples_per_second": 2.998,
7
+ "train_steps_per_second": 0.023
8
+ }
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": "</s>",
11
+ "lstrip": false,
12
+ "normalized": false,
13
+ "rstrip": false,
14
+ "single_word": false
15
+ },
16
+ "pad_token": {
17
+ "content": "</s>",
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
+ }
tokenizer.json ADDED
The diff for this file is too large to render. See raw diff
 
tokenizer_config.json ADDED
@@ -0,0 +1,43 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ {
2
+ "add_bos_token": true,
3
+ "add_eos_token": false,
4
+ "added_tokens_decoder": {
5
+ "0": {
6
+ "content": "<unk>",
7
+ "lstrip": false,
8
+ "normalized": false,
9
+ "rstrip": false,
10
+ "single_word": false,
11
+ "special": true
12
+ },
13
+ "1": {
14
+ "content": "<s>",
15
+ "lstrip": false,
16
+ "normalized": false,
17
+ "rstrip": false,
18
+ "single_word": false,
19
+ "special": true
20
+ },
21
+ "2": {
22
+ "content": "</s>",
23
+ "lstrip": false,
24
+ "normalized": false,
25
+ "rstrip": false,
26
+ "single_word": false,
27
+ "special": true
28
+ }
29
+ },
30
+ "additional_special_tokens": [],
31
+ "bos_token": "<s>",
32
+ "chat_template": "{% for message in messages %}\n{% if message['role'] == 'user' %}\n{{ '<|user|>\n' + message['content'] + eos_token }}\n{% elif message['role'] == 'system' %}\n{{ '<|system|>\n' + message['content'] + eos_token }}\n{% elif message['role'] == 'assistant' %}\n{{ '<|assistant|>\n' + message['content'] + eos_token }}\n{% endif %}\n{% if loop.last and add_generation_prompt %}\n{{ '<|assistant|>' }}\n{% endif %}\n{% endfor %}",
33
+ "clean_up_tokenization_spaces": false,
34
+ "eos_token": "</s>",
35
+ "legacy": true,
36
+ "model_max_length": 2048,
37
+ "pad_token": "</s>",
38
+ "sp_model_kwargs": {},
39
+ "spaces_between_special_tokens": false,
40
+ "tokenizer_class": "LlamaTokenizer",
41
+ "unk_token": "<unk>",
42
+ "use_default_system_prompt": false
43
+ }
train_results.json ADDED
@@ -0,0 +1,8 @@
 
 
 
 
 
 
 
 
 
1
+ {
2
+ "epoch": 1.0,
3
+ "train_loss": 0.6705375785141988,
4
+ "train_runtime": 6538.0645,
5
+ "train_samples": 19600,
6
+ "train_samples_per_second": 2.998,
7
+ "train_steps_per_second": 0.023
8
+ }
trainer_state.json ADDED
@@ -0,0 +1,270 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ {
2
+ "best_metric": null,
3
+ "best_model_checkpoint": null,
4
+ "epoch": 0.9991836734693877,
5
+ "eval_steps": 100,
6
+ "global_step": 153,
7
+ "is_hyper_param_search": false,
8
+ "is_local_process_zero": true,
9
+ "is_world_process_zero": true,
10
+ "log_history": [
11
+ {
12
+ "epoch": 0.01,
13
+ "learning_rate": 3.125e-07,
14
+ "logits/chosen": -2.6383626461029053,
15
+ "logits/rejected": -2.6590394973754883,
16
+ "logps/chosen": -263.8804626464844,
17
+ "logps/rejected": -342.5028381347656,
18
+ "loss": 0.6931,
19
+ "rewards/accuracies": 0.0,
20
+ "rewards/chosen": 0.0,
21
+ "rewards/margins": 0.0,
22
+ "rewards/rejected": 0.0,
23
+ "step": 1
24
+ },
25
+ {
26
+ "epoch": 0.07,
27
+ "learning_rate": 3.125e-06,
28
+ "logits/chosen": -2.692108392715454,
29
+ "logits/rejected": -2.6769356727600098,
30
+ "logps/chosen": -251.55091857910156,
31
+ "logps/rejected": -279.13623046875,
32
+ "loss": 0.693,
33
+ "rewards/accuracies": 0.4444444477558136,
34
+ "rewards/chosen": 0.006078645121306181,
35
+ "rewards/margins": 0.001292299828492105,
36
+ "rewards/rejected": 0.004786345642060041,
37
+ "step": 10
38
+ },
39
+ {
40
+ "epoch": 0.13,
41
+ "learning_rate": 4.989490450759331e-06,
42
+ "logits/chosen": -2.7136893272399902,
43
+ "logits/rejected": -2.6634609699249268,
44
+ "logps/chosen": -246.88778686523438,
45
+ "logps/rejected": -270.17083740234375,
46
+ "loss": 0.6909,
47
+ "rewards/accuracies": 0.5625,
48
+ "rewards/chosen": 0.009861673228442669,
49
+ "rewards/margins": 0.002566133625805378,
50
+ "rewards/rejected": 0.007295539136976004,
51
+ "step": 20
52
+ },
53
+ {
54
+ "epoch": 0.2,
55
+ "learning_rate": 4.872270441827174e-06,
56
+ "logits/chosen": -2.7332160472869873,
57
+ "logits/rejected": -2.6656548976898193,
58
+ "logps/chosen": -276.451416015625,
59
+ "logps/rejected": -291.919189453125,
60
+ "loss": 0.6845,
61
+ "rewards/accuracies": 0.578125,
62
+ "rewards/chosen": -0.0339818000793457,
63
+ "rewards/margins": 0.020258868113160133,
64
+ "rewards/rejected": -0.05424066632986069,
65
+ "step": 30
66
+ },
67
+ {
68
+ "epoch": 0.26,
69
+ "learning_rate": 4.630851211353007e-06,
70
+ "logits/chosen": -2.623366117477417,
71
+ "logits/rejected": -2.5993411540985107,
72
+ "logps/chosen": -253.49966430664062,
73
+ "logps/rejected": -300.6990966796875,
74
+ "loss": 0.6794,
75
+ "rewards/accuracies": 0.590624988079071,
76
+ "rewards/chosen": -0.047824542969465256,
77
+ "rewards/margins": 0.032587505877017975,
78
+ "rewards/rejected": -0.08041204512119293,
79
+ "step": 40
80
+ },
81
+ {
82
+ "epoch": 0.33,
83
+ "learning_rate": 4.277872161641682e-06,
84
+ "logits/chosen": -2.695284366607666,
85
+ "logits/rejected": -2.6641030311584473,
86
+ "logps/chosen": -250.3493194580078,
87
+ "logps/rejected": -272.2112731933594,
88
+ "loss": 0.6766,
89
+ "rewards/accuracies": 0.581250011920929,
90
+ "rewards/chosen": -0.006258129142224789,
91
+ "rewards/margins": 0.02742757275700569,
92
+ "rewards/rejected": -0.033685702830553055,
93
+ "step": 50
94
+ },
95
+ {
96
+ "epoch": 0.39,
97
+ "learning_rate": 3.831813362428005e-06,
98
+ "logits/chosen": -2.6273930072784424,
99
+ "logits/rejected": -2.5842039585113525,
100
+ "logps/chosen": -262.25286865234375,
101
+ "logps/rejected": -298.41510009765625,
102
+ "loss": 0.667,
103
+ "rewards/accuracies": 0.6312500238418579,
104
+ "rewards/chosen": -0.15569987893104553,
105
+ "rewards/margins": 0.06216084957122803,
106
+ "rewards/rejected": -0.21786072850227356,
107
+ "step": 60
108
+ },
109
+ {
110
+ "epoch": 0.46,
111
+ "learning_rate": 3.3160280345958614e-06,
112
+ "logits/chosen": -2.6327927112579346,
113
+ "logits/rejected": -2.5868000984191895,
114
+ "logps/chosen": -278.89703369140625,
115
+ "logps/rejected": -314.3589172363281,
116
+ "loss": 0.6649,
117
+ "rewards/accuracies": 0.609375,
118
+ "rewards/chosen": -0.1321047842502594,
119
+ "rewards/margins": 0.05293331667780876,
120
+ "rewards/rejected": -0.18503807485103607,
121
+ "step": 70
122
+ },
123
+ {
124
+ "epoch": 0.52,
125
+ "learning_rate": 2.757519902117886e-06,
126
+ "logits/chosen": -2.6241769790649414,
127
+ "logits/rejected": -2.61041522026062,
128
+ "logps/chosen": -260.6992492675781,
129
+ "logps/rejected": -272.4108581542969,
130
+ "loss": 0.6678,
131
+ "rewards/accuracies": 0.6031249761581421,
132
+ "rewards/chosen": -0.16336451470851898,
133
+ "rewards/margins": 0.07086249440908432,
134
+ "rewards/rejected": -0.2342270165681839,
135
+ "step": 80
136
+ },
137
+ {
138
+ "epoch": 0.59,
139
+ "learning_rate": 2.185529423440807e-06,
140
+ "logits/chosen": -2.6284656524658203,
141
+ "logits/rejected": -2.6176791191101074,
142
+ "logps/chosen": -282.1419372558594,
143
+ "logps/rejected": -331.07354736328125,
144
+ "loss": 0.6629,
145
+ "rewards/accuracies": 0.625,
146
+ "rewards/chosen": -0.29410403966903687,
147
+ "rewards/margins": 0.06631916761398315,
148
+ "rewards/rejected": -0.3604232370853424,
149
+ "step": 90
150
+ },
151
+ {
152
+ "epoch": 0.65,
153
+ "learning_rate": 1.6300029195778454e-06,
154
+ "logits/chosen": -2.631556749343872,
155
+ "logits/rejected": -2.61484956741333,
156
+ "logps/chosen": -280.27362060546875,
157
+ "logps/rejected": -321.37884521484375,
158
+ "loss": 0.6615,
159
+ "rewards/accuracies": 0.637499988079071,
160
+ "rewards/chosen": -0.21054717898368835,
161
+ "rewards/margins": 0.08309625834226608,
162
+ "rewards/rejected": -0.2936434745788574,
163
+ "step": 100
164
+ },
165
+ {
166
+ "epoch": 0.65,
167
+ "eval_logits/chosen": -2.6791629791259766,
168
+ "eval_logits/rejected": -2.5814735889434814,
169
+ "eval_logps/chosen": -310.7413024902344,
170
+ "eval_logps/rejected": -294.6734619140625,
171
+ "eval_loss": 0.6692679524421692,
172
+ "eval_rewards/accuracies": 0.5519999861717224,
173
+ "eval_rewards/chosen": -0.1884314864873886,
174
+ "eval_rewards/margins": 0.05432567000389099,
175
+ "eval_rewards/rejected": -0.2427571415901184,
176
+ "eval_runtime": 395.8034,
177
+ "eval_samples_per_second": 5.053,
178
+ "eval_steps_per_second": 0.632,
179
+ "step": 100
180
+ },
181
+ {
182
+ "epoch": 0.72,
183
+ "learning_rate": 1.1200247470632394e-06,
184
+ "logits/chosen": -2.6365230083465576,
185
+ "logits/rejected": -2.636570453643799,
186
+ "logps/chosen": -262.6191711425781,
187
+ "logps/rejected": -310.3700256347656,
188
+ "loss": 0.6646,
189
+ "rewards/accuracies": 0.6343749761581421,
190
+ "rewards/chosen": -0.22685377299785614,
191
+ "rewards/margins": 0.07261677831411362,
192
+ "rewards/rejected": -0.29947060346603394,
193
+ "step": 110
194
+ },
195
+ {
196
+ "epoch": 0.78,
197
+ "learning_rate": 6.822945986946386e-07,
198
+ "logits/chosen": -2.6256182193756104,
199
+ "logits/rejected": -2.5980124473571777,
200
+ "logps/chosen": -246.5704803466797,
201
+ "logps/rejected": -282.092529296875,
202
+ "loss": 0.6621,
203
+ "rewards/accuracies": 0.625,
204
+ "rewards/chosen": -0.20391853153705597,
205
+ "rewards/margins": 0.08593297004699707,
206
+ "rewards/rejected": -0.28985148668289185,
207
+ "step": 120
208
+ },
209
+ {
210
+ "epoch": 0.85,
211
+ "learning_rate": 3.397296523427807e-07,
212
+ "logits/chosen": -2.584958553314209,
213
+ "logits/rejected": -2.562863349914551,
214
+ "logps/chosen": -262.963134765625,
215
+ "logps/rejected": -306.772216796875,
216
+ "loss": 0.6598,
217
+ "rewards/accuracies": 0.6187499761581421,
218
+ "rewards/chosen": -0.21135267615318298,
219
+ "rewards/margins": 0.08709158003330231,
220
+ "rewards/rejected": -0.2984442710876465,
221
+ "step": 130
222
+ },
223
+ {
224
+ "epoch": 0.91,
225
+ "learning_rate": 1.102647517397798e-07,
226
+ "logits/chosen": -2.6206483840942383,
227
+ "logits/rejected": -2.604473352432251,
228
+ "logps/chosen": -272.1588439941406,
229
+ "logps/rejected": -318.1951599121094,
230
+ "loss": 0.6636,
231
+ "rewards/accuracies": 0.65625,
232
+ "rewards/chosen": -0.21283432841300964,
233
+ "rewards/margins": 0.10337638854980469,
234
+ "rewards/rejected": -0.3162107467651367,
235
+ "step": 140
236
+ },
237
+ {
238
+ "epoch": 0.98,
239
+ "learning_rate": 5.9134352763748345e-09,
240
+ "logits/chosen": -2.6338722705841064,
241
+ "logits/rejected": -2.62086820602417,
242
+ "logps/chosen": -296.335205078125,
243
+ "logps/rejected": -331.77777099609375,
244
+ "loss": 0.6594,
245
+ "rewards/accuracies": 0.606249988079071,
246
+ "rewards/chosen": -0.23208002746105194,
247
+ "rewards/margins": 0.08073471486568451,
248
+ "rewards/rejected": -0.31281474232673645,
249
+ "step": 150
250
+ },
251
+ {
252
+ "epoch": 1.0,
253
+ "step": 153,
254
+ "total_flos": 0.0,
255
+ "train_loss": 0.6705375785141988,
256
+ "train_runtime": 6538.0645,
257
+ "train_samples_per_second": 2.998,
258
+ "train_steps_per_second": 0.023
259
+ }
260
+ ],
261
+ "logging_steps": 10,
262
+ "max_steps": 153,
263
+ "num_input_tokens_seen": 0,
264
+ "num_train_epochs": 1,
265
+ "save_steps": 100,
266
+ "total_flos": 0.0,
267
+ "train_batch_size": 2,
268
+ "trial_name": null,
269
+ "trial_params": null
270
+ }
training_args.bin ADDED
@@ -0,0 +1,3 @@
 
 
 
 
1
+ version https://git-lfs.github.com/spec/v1
2
+ oid sha256:e22a0334fe869d5a4a437ba251347eaf56623bd312c1d86d0813dc5f397d0fc6
3
+ size 4920