Luca-Engel
commited on
Commit
•
b24fa95
1
Parent(s):
4f78c42
Training in progress, epoch 0
Browse files- README.md +79 -0
- config.json +39 -0
- generation_config.json +6 -0
- merges.txt +0 -0
- model.safetensors +3 -0
- special_tokens_map.json +6 -0
- tokenizer.json +0 -0
- tokenizer_config.json +20 -0
- training_args.bin +3 -0
- vocab.json +0 -0
README.md
ADDED
@@ -0,0 +1,79 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
1 |
+
---
|
2 |
+
license: mit
|
3 |
+
base_model: mNLP-project/gpt2-finetuned-mcqa
|
4 |
+
tags:
|
5 |
+
- trl
|
6 |
+
- dpo
|
7 |
+
- generated_from_trainer
|
8 |
+
model-index:
|
9 |
+
- name: gpt2-dpo-mcqa
|
10 |
+
results: []
|
11 |
+
---
|
12 |
+
|
13 |
+
<!-- This model card has been generated automatically according to the information the Trainer had access to. You
|
14 |
+
should probably proofread and complete it, then remove this comment. -->
|
15 |
+
|
16 |
+
# gpt2-dpo-mcqa
|
17 |
+
|
18 |
+
This model is a fine-tuned version of [mNLP-project/gpt2-finetuned-mcqa](https://huggingface.co/mNLP-project/gpt2-finetuned-mcqa) on the None dataset.
|
19 |
+
It achieves the following results on the evaluation set:
|
20 |
+
- Loss: 0.6310
|
21 |
+
- Rewards/chosen: 1.4580
|
22 |
+
- Rewards/rejected: 1.1845
|
23 |
+
- Rewards/accuracies: 0.6414
|
24 |
+
- Rewards/margins: 0.2735
|
25 |
+
- Logps/rejected: -659.0944
|
26 |
+
- Logps/chosen: -787.4795
|
27 |
+
- Logits/rejected: -14.9328
|
28 |
+
- Logits/chosen: -11.6364
|
29 |
+
|
30 |
+
## Model description
|
31 |
+
|
32 |
+
More information needed
|
33 |
+
|
34 |
+
## Intended uses & limitations
|
35 |
+
|
36 |
+
More information needed
|
37 |
+
|
38 |
+
## Training and evaluation data
|
39 |
+
|
40 |
+
More information needed
|
41 |
+
|
42 |
+
## Training procedure
|
43 |
+
|
44 |
+
### Training hyperparameters
|
45 |
+
|
46 |
+
The following hyperparameters were used during training:
|
47 |
+
- learning_rate: 1e-07
|
48 |
+
- train_batch_size: 8
|
49 |
+
- eval_batch_size: 8
|
50 |
+
- seed: 42
|
51 |
+
- gradient_accumulation_steps: 4
|
52 |
+
- total_train_batch_size: 32
|
53 |
+
- optimizer: Adam with betas=(0.9,0.999) and epsilon=1e-08
|
54 |
+
- lr_scheduler_type: cosine
|
55 |
+
- lr_scheduler_warmup_ratio: 0.2
|
56 |
+
- num_epochs: 10
|
57 |
+
|
58 |
+
### Training results
|
59 |
+
|
60 |
+
| Training Loss | Epoch | Step | Validation Loss | Rewards/chosen | Rewards/rejected | Rewards/accuracies | Rewards/margins | Logps/rejected | Logps/chosen | Logits/rejected | Logits/chosen |
|
61 |
+
|:-------------:|:------:|:----:|:---------------:|:--------------:|:----------------:|:------------------:|:---------------:|:--------------:|:------------:|:---------------:|:-------------:|
|
62 |
+
| 0.6407 | 0.9993 | 668 | 0.6460 | 0.7721 | 0.6216 | 0.6295 | 0.1505 | -664.7236 | -794.3383 | -15.1273 | -11.7899 |
|
63 |
+
| 0.6498 | 2.0 | 1337 | 0.6374 | 1.2927 | 1.0475 | 0.6325 | 0.2453 | -660.4651 | -789.1318 | -14.9517 | -11.6401 |
|
64 |
+
| 0.6468 | 2.9993 | 2005 | 0.6342 | 1.3734 | 1.1102 | 0.6388 | 0.2632 | -659.8373 | -788.3249 | -14.9535 | -11.6481 |
|
65 |
+
| 0.6113 | 4.0 | 2674 | 0.6332 | 1.3317 | 1.0769 | 0.6444 | 0.2548 | -660.1705 | -788.7426 | -14.9930 | -11.6897 |
|
66 |
+
| 0.5826 | 4.9993 | 3342 | 0.6310 | 1.4580 | 1.1845 | 0.6414 | 0.2735 | -659.0944 | -787.4795 | -14.9328 | -11.6364 |
|
67 |
+
| 0.5613 | 6.0 | 4011 | 0.6317 | 1.4979 | 1.2181 | 0.6407 | 0.2798 | -658.7584 | -787.0804 | -14.9234 | -11.6271 |
|
68 |
+
| 0.581 | 6.9993 | 4679 | 0.6316 | 1.5084 | 1.2260 | 0.6437 | 0.2825 | -658.6798 | -786.9750 | -14.9319 | -11.6377 |
|
69 |
+
| 0.571 | 8.0 | 5348 | 0.6320 | 1.4992 | 1.2184 | 0.6425 | 0.2808 | -658.7557 | -787.0676 | -14.9334 | -11.6373 |
|
70 |
+
| 0.5943 | 8.9993 | 6016 | 0.6317 | 1.5126 | 1.2294 | 0.6437 | 0.2832 | -658.6454 | -786.9331 | -14.9226 | -11.6269 |
|
71 |
+
| 0.5635 | 9.9925 | 6680 | 0.6317 | 1.5142 | 1.2308 | 0.6433 | 0.2835 | -658.6317 | -786.9168 | -14.9211 | -11.6256 |
|
72 |
+
|
73 |
+
|
74 |
+
### Framework versions
|
75 |
+
|
76 |
+
- Transformers 4.40.2
|
77 |
+
- Pytorch 2.1.0+cu118
|
78 |
+
- Datasets 2.19.1
|
79 |
+
- Tokenizers 0.19.1
|
config.json
ADDED
@@ -0,0 +1,39 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
1 |
+
{
|
2 |
+
"_name_or_path": "openai-community/gpt2",
|
3 |
+
"activation_function": "gelu_new",
|
4 |
+
"architectures": [
|
5 |
+
"GPT2LMHeadModel"
|
6 |
+
],
|
7 |
+
"attn_pdrop": 0.1,
|
8 |
+
"bos_token_id": 50256,
|
9 |
+
"embd_pdrop": 0.1,
|
10 |
+
"eos_token_id": 50256,
|
11 |
+
"initializer_range": 0.02,
|
12 |
+
"layer_norm_epsilon": 1e-05,
|
13 |
+
"model_type": "gpt2",
|
14 |
+
"n_ctx": 1024,
|
15 |
+
"n_embd": 768,
|
16 |
+
"n_head": 12,
|
17 |
+
"n_inner": null,
|
18 |
+
"n_layer": 12,
|
19 |
+
"n_positions": 1024,
|
20 |
+
"reorder_and_upcast_attn": false,
|
21 |
+
"resid_pdrop": 0.1,
|
22 |
+
"scale_attn_by_inverse_layer_idx": false,
|
23 |
+
"scale_attn_weights": true,
|
24 |
+
"summary_activation": null,
|
25 |
+
"summary_first_dropout": 0.1,
|
26 |
+
"summary_proj_to_labels": true,
|
27 |
+
"summary_type": "cls_index",
|
28 |
+
"summary_use_proj": true,
|
29 |
+
"task_specific_params": {
|
30 |
+
"text-generation": {
|
31 |
+
"do_sample": true,
|
32 |
+
"max_length": 50
|
33 |
+
}
|
34 |
+
},
|
35 |
+
"torch_dtype": "float32",
|
36 |
+
"transformers_version": "4.40.2",
|
37 |
+
"use_cache": true,
|
38 |
+
"vocab_size": 50257
|
39 |
+
}
|
generation_config.json
ADDED
@@ -0,0 +1,6 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
1 |
+
{
|
2 |
+
"_from_model_config": true,
|
3 |
+
"bos_token_id": 50256,
|
4 |
+
"eos_token_id": 50256,
|
5 |
+
"transformers_version": "4.40.2"
|
6 |
+
}
|
merges.txt
ADDED
The diff for this file is too large to render.
See raw diff
|
|
model.safetensors
ADDED
@@ -0,0 +1,3 @@
|
|
|
|
|
|
|
|
|
1 |
+
version https://git-lfs.github.com/spec/v1
|
2 |
+
oid sha256:ee83c2ec1382bfc2e617c64341c99ba00a011543c111fa6f9cb5689a184d0e2f
|
3 |
+
size 497774208
|
special_tokens_map.json
ADDED
@@ -0,0 +1,6 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
1 |
+
{
|
2 |
+
"bos_token": "<|endoftext|>",
|
3 |
+
"eos_token": "<|endoftext|>",
|
4 |
+
"pad_token": "<|endoftext|>",
|
5 |
+
"unk_token": "<|endoftext|>"
|
6 |
+
}
|
tokenizer.json
ADDED
The diff for this file is too large to render.
See raw diff
|
|
tokenizer_config.json
ADDED
@@ -0,0 +1,20 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
1 |
+
{
|
2 |
+
"add_prefix_space": false,
|
3 |
+
"added_tokens_decoder": {
|
4 |
+
"50256": {
|
5 |
+
"content": "<|endoftext|>",
|
6 |
+
"lstrip": false,
|
7 |
+
"normalized": true,
|
8 |
+
"rstrip": false,
|
9 |
+
"single_word": false,
|
10 |
+
"special": true
|
11 |
+
}
|
12 |
+
},
|
13 |
+
"bos_token": "<|endoftext|>",
|
14 |
+
"clean_up_tokenization_spaces": true,
|
15 |
+
"eos_token": "<|endoftext|>",
|
16 |
+
"model_max_length": 1024,
|
17 |
+
"pad_token": "<|endoftext|>",
|
18 |
+
"tokenizer_class": "GPT2Tokenizer",
|
19 |
+
"unk_token": "<|endoftext|>"
|
20 |
+
}
|
training_args.bin
ADDED
@@ -0,0 +1,3 @@
|
|
|
|
|
|
|
|
|
1 |
+
version https://git-lfs.github.com/spec/v1
|
2 |
+
oid sha256:f1cdc18b900985d443ca0c50a149729cf6fb9e5bc8a155ff4190f72b3c318da3
|
3 |
+
size 4984
|
vocab.json
ADDED
The diff for this file is too large to render.
See raw diff
|
|