YYYYYYibo commited on
Commit
570dd6b
1 Parent(s): 27195e0

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: nash_dpo_doff_real_no_golden_iter_1
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
+ # nash_dpo_doff_real_no_golden_iter_1
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.6749
22
+ - Rewards/chosen: -0.0411
23
+ - Rewards/rejected: -0.0904
24
+ - Rewards/accuracies: 0.6100
25
+ - Rewards/margins: 0.0493
26
+ - Logps/rejected: -266.5563
27
+ - Logps/chosen: -288.1525
28
+ - Logits/rejected: -2.6646
29
+ - Logits/chosen: -2.7444
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.6794 | 0.65 | 100 | 0.6749 | -0.0411 | -0.0904 | 0.6100 | 0.0493 | -266.5563 | -288.1525 | -2.6646 | -2.7444 |
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
+ "v_proj",
23
+ "o_proj",
24
+ "k_proj",
25
+ "up_proj",
26
+ "gate_proj",
27
+ "q_proj",
28
+ "down_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:2cedc24544d143369339e6ac940b89bf8953c50f64cf0eb78e125a9d54d0ba01
3
+ size 335605144
all_results.json ADDED
@@ -0,0 +1,8 @@
 
 
 
 
 
 
 
 
 
1
+ {
2
+ "epoch": 1.0,
3
+ "train_loss": 0.682184520889731,
4
+ "train_runtime": 6549.791,
5
+ "train_samples": 19600,
6
+ "train_samples_per_second": 2.992,
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.682184520889731,
4
+ "train_runtime": 6549.791,
5
+ "train_samples": 19600,
6
+ "train_samples_per_second": 2.992,
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.8246347904205322,
15
+ "logits/rejected": -2.7856249809265137,
16
+ "logps/chosen": -238.8000030517578,
17
+ "logps/rejected": -252.79095458984375,
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.786410331726074,
29
+ "logits/rejected": -2.722076177597046,
30
+ "logps/chosen": -234.3753204345703,
31
+ "logps/rejected": -252.82334899902344,
32
+ "loss": 0.6931,
33
+ "rewards/accuracies": 0.4340277910232544,
34
+ "rewards/chosen": 0.00016520876670256257,
35
+ "rewards/margins": 0.00022823104518465698,
36
+ "rewards/rejected": -6.302232213784009e-05,
37
+ "step": 10
38
+ },
39
+ {
40
+ "epoch": 0.13,
41
+ "learning_rate": 4.989490450759331e-06,
42
+ "logits/chosen": -2.761898994445801,
43
+ "logits/rejected": -2.750577926635742,
44
+ "logps/chosen": -254.90945434570312,
45
+ "logps/rejected": -267.8478088378906,
46
+ "loss": 0.6927,
47
+ "rewards/accuracies": 0.581250011920929,
48
+ "rewards/chosen": 0.008927298709750175,
49
+ "rewards/margins": 0.0008864253759384155,
50
+ "rewards/rejected": 0.00804087333381176,
51
+ "step": 20
52
+ },
53
+ {
54
+ "epoch": 0.2,
55
+ "learning_rate": 4.872270441827174e-06,
56
+ "logits/chosen": -2.714113235473633,
57
+ "logits/rejected": -2.7077224254608154,
58
+ "logps/chosen": -241.08413696289062,
59
+ "logps/rejected": -277.0527038574219,
60
+ "loss": 0.6915,
61
+ "rewards/accuracies": 0.550000011920929,
62
+ "rewards/chosen": 0.03635140508413315,
63
+ "rewards/margins": 0.0032049957662820816,
64
+ "rewards/rejected": 0.03314640372991562,
65
+ "step": 30
66
+ },
67
+ {
68
+ "epoch": 0.26,
69
+ "learning_rate": 4.630851211353007e-06,
70
+ "logits/chosen": -2.719871997833252,
71
+ "logits/rejected": -2.692225694656372,
72
+ "logps/chosen": -238.7860870361328,
73
+ "logps/rejected": -257.0961608886719,
74
+ "loss": 0.6899,
75
+ "rewards/accuracies": 0.640625,
76
+ "rewards/chosen": 0.05657622963190079,
77
+ "rewards/margins": 0.00868198275566101,
78
+ "rewards/rejected": 0.04789424687623978,
79
+ "step": 40
80
+ },
81
+ {
82
+ "epoch": 0.33,
83
+ "learning_rate": 4.277872161641682e-06,
84
+ "logits/chosen": -2.706775665283203,
85
+ "logits/rejected": -2.682394504547119,
86
+ "logps/chosen": -214.5376434326172,
87
+ "logps/rejected": -231.01980590820312,
88
+ "loss": 0.6874,
89
+ "rewards/accuracies": 0.578125,
90
+ "rewards/chosen": 0.04568081349134445,
91
+ "rewards/margins": 0.007289577275514603,
92
+ "rewards/rejected": 0.03839123994112015,
93
+ "step": 50
94
+ },
95
+ {
96
+ "epoch": 0.39,
97
+ "learning_rate": 3.831813362428005e-06,
98
+ "logits/chosen": -2.743227481842041,
99
+ "logits/rejected": -2.7235677242279053,
100
+ "logps/chosen": -239.521728515625,
101
+ "logps/rejected": -274.9012451171875,
102
+ "loss": 0.6861,
103
+ "rewards/accuracies": 0.65625,
104
+ "rewards/chosen": 0.010201004333794117,
105
+ "rewards/margins": 0.016733800992369652,
106
+ "rewards/rejected": -0.006532798055559397,
107
+ "step": 60
108
+ },
109
+ {
110
+ "epoch": 0.46,
111
+ "learning_rate": 3.3160280345958614e-06,
112
+ "logits/chosen": -2.720754623413086,
113
+ "logits/rejected": -2.7016873359680176,
114
+ "logps/chosen": -247.5521697998047,
115
+ "logps/rejected": -262.7969665527344,
116
+ "loss": 0.6839,
117
+ "rewards/accuracies": 0.6000000238418579,
118
+ "rewards/chosen": 0.01951005309820175,
119
+ "rewards/margins": 0.02022537961602211,
120
+ "rewards/rejected": -0.0007153252372518182,
121
+ "step": 70
122
+ },
123
+ {
124
+ "epoch": 0.52,
125
+ "learning_rate": 2.757519902117886e-06,
126
+ "logits/chosen": -2.649031162261963,
127
+ "logits/rejected": -2.644374132156372,
128
+ "logps/chosen": -229.58657836914062,
129
+ "logps/rejected": -238.00997924804688,
130
+ "loss": 0.6811,
131
+ "rewards/accuracies": 0.609375,
132
+ "rewards/chosen": -0.00663757836446166,
133
+ "rewards/margins": 0.023349270224571228,
134
+ "rewards/rejected": -0.029986849054694176,
135
+ "step": 80
136
+ },
137
+ {
138
+ "epoch": 0.59,
139
+ "learning_rate": 2.185529423440807e-06,
140
+ "logits/chosen": -2.718346357345581,
141
+ "logits/rejected": -2.676443576812744,
142
+ "logps/chosen": -231.41738891601562,
143
+ "logps/rejected": -247.0604248046875,
144
+ "loss": 0.6793,
145
+ "rewards/accuracies": 0.612500011920929,
146
+ "rewards/chosen": -0.029531260952353477,
147
+ "rewards/margins": 0.027696972712874413,
148
+ "rewards/rejected": -0.05722822993993759,
149
+ "step": 90
150
+ },
151
+ {
152
+ "epoch": 0.65,
153
+ "learning_rate": 1.6300029195778454e-06,
154
+ "logits/chosen": -2.6499805450439453,
155
+ "logits/rejected": -2.648062229156494,
156
+ "logps/chosen": -232.34140014648438,
157
+ "logps/rejected": -263.8648986816406,
158
+ "loss": 0.6794,
159
+ "rewards/accuracies": 0.609375,
160
+ "rewards/chosen": -0.014353279955685139,
161
+ "rewards/margins": 0.034331899136304855,
162
+ "rewards/rejected": -0.04868517816066742,
163
+ "step": 100
164
+ },
165
+ {
166
+ "epoch": 0.65,
167
+ "eval_logits/chosen": -2.744441270828247,
168
+ "eval_logits/rejected": -2.664565324783325,
169
+ "eval_logps/chosen": -288.15252685546875,
170
+ "eval_logps/rejected": -266.5563049316406,
171
+ "eval_loss": 0.6748670935630798,
172
+ "eval_rewards/accuracies": 0.6100000143051147,
173
+ "eval_rewards/chosen": -0.04112808406352997,
174
+ "eval_rewards/margins": 0.049276191741228104,
175
+ "eval_rewards/rejected": -0.09040427207946777,
176
+ "eval_runtime": 398.4688,
177
+ "eval_samples_per_second": 5.019,
178
+ "eval_steps_per_second": 0.627,
179
+ "step": 100
180
+ },
181
+ {
182
+ "epoch": 0.72,
183
+ "learning_rate": 1.1200247470632394e-06,
184
+ "logits/chosen": -2.6374545097351074,
185
+ "logits/rejected": -2.621342897415161,
186
+ "logps/chosen": -241.2566680908203,
187
+ "logps/rejected": -255.6346435546875,
188
+ "loss": 0.677,
189
+ "rewards/accuracies": 0.5687500238418579,
190
+ "rewards/chosen": -0.05732475966215134,
191
+ "rewards/margins": 0.021493583917617798,
192
+ "rewards/rejected": -0.07881833612918854,
193
+ "step": 110
194
+ },
195
+ {
196
+ "epoch": 0.78,
197
+ "learning_rate": 6.822945986946386e-07,
198
+ "logits/chosen": -2.725903272628784,
199
+ "logits/rejected": -2.6800780296325684,
200
+ "logps/chosen": -255.1395721435547,
201
+ "logps/rejected": -279.15704345703125,
202
+ "loss": 0.6751,
203
+ "rewards/accuracies": 0.606249988079071,
204
+ "rewards/chosen": -0.055112093687057495,
205
+ "rewards/margins": 0.03783201053738594,
206
+ "rewards/rejected": -0.09294410794973373,
207
+ "step": 120
208
+ },
209
+ {
210
+ "epoch": 0.85,
211
+ "learning_rate": 3.397296523427807e-07,
212
+ "logits/chosen": -2.6524956226348877,
213
+ "logits/rejected": -2.644578695297241,
214
+ "logps/chosen": -262.2508850097656,
215
+ "logps/rejected": -293.28948974609375,
216
+ "loss": 0.67,
217
+ "rewards/accuracies": 0.659375011920929,
218
+ "rewards/chosen": -0.057227589190006256,
219
+ "rewards/margins": 0.054884664714336395,
220
+ "rewards/rejected": -0.11211224645376205,
221
+ "step": 130
222
+ },
223
+ {
224
+ "epoch": 0.91,
225
+ "learning_rate": 1.102647517397798e-07,
226
+ "logits/chosen": -2.7097370624542236,
227
+ "logits/rejected": -2.6917481422424316,
228
+ "logps/chosen": -232.8185272216797,
229
+ "logps/rejected": -257.655029296875,
230
+ "loss": 0.6737,
231
+ "rewards/accuracies": 0.6031249761581421,
232
+ "rewards/chosen": -0.06133182719349861,
233
+ "rewards/margins": 0.038163263350725174,
234
+ "rewards/rejected": -0.09949509054422379,
235
+ "step": 140
236
+ },
237
+ {
238
+ "epoch": 0.98,
239
+ "learning_rate": 5.9134352763748345e-09,
240
+ "logits/chosen": -2.65732479095459,
241
+ "logits/rejected": -2.6523807048797607,
242
+ "logps/chosen": -237.37509155273438,
243
+ "logps/rejected": -260.47747802734375,
244
+ "loss": 0.6725,
245
+ "rewards/accuracies": 0.59375,
246
+ "rewards/chosen": -0.04952359199523926,
247
+ "rewards/margins": 0.044595662504434586,
248
+ "rewards/rejected": -0.09411924332380295,
249
+ "step": 150
250
+ },
251
+ {
252
+ "epoch": 1.0,
253
+ "step": 153,
254
+ "total_flos": 0.0,
255
+ "train_loss": 0.682184520889731,
256
+ "train_runtime": 6549.791,
257
+ "train_samples_per_second": 2.992,
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:8299e70588962162fc51efb1a3461a9b183c551958cd13ce7317dcdb7ebc767d
3
+ size 4920