Nikita Pavlichenko commited on
Commit
77dd825
1 Parent(s): 29392c3

Calc loss only on prompts, add special tokens, remove grouping

Browse files
README.md CHANGED
@@ -5,19 +5,19 @@ tags:
5
  metrics:
6
  - accuracy
7
  model-index:
8
- - name: gpt2-large-finetuned
9
  results: []
10
  ---
11
 
12
  <!-- This model card has been generated automatically according to the information the Trainer had access to. You
13
  should probably proofread and complete it, then remove this comment. -->
14
 
15
- # gpt2-large-finetuned
16
 
17
- This model is a fine-tuned version of [gpt2-large](https://huggingface.co/gpt2-large) on an unknown dataset.
18
  It achieves the following results on the evaluation set:
19
- - Loss: 2.2374
20
- - Accuracy: 0.5978
21
 
22
  ## Model description
23
 
@@ -36,48 +36,34 @@ More information needed
36
  ### Training hyperparameters
37
 
38
  The following hyperparameters were used during training:
39
- - learning_rate: 2.294e-05
40
- - train_batch_size: 4
41
- - eval_batch_size: 4
42
  - seed: 42
43
  - optimizer: Adam with betas=(0.9,0.999) and epsilon=1e-08
44
  - lr_scheduler_type: linear
45
- - num_epochs: 6.0
 
46
 
47
  ### Training results
48
 
49
- | Training Loss | Epoch | Step | Validation Loss | Accuracy |
50
- |:-------------:|:-----:|:----:|:---------------:|:--------:|
51
- | 2.5507 | 0.23 | 100 | 2.5061 | 0.5568 |
52
- | 2.465 | 0.46 | 200 | 2.4254 | 0.5672 |
53
- | 2.3919 | 0.7 | 300 | 2.3827 | 0.5726 |
54
- | 2.4222 | 0.93 | 400 | 2.3489 | 0.5760 |
55
- | 2.1958 | 1.16 | 500 | 2.3302 | 0.5793 |
56
- | 2.2087 | 1.39 | 600 | 2.3123 | 0.5818 |
57
- | 2.2436 | 1.62 | 700 | 2.2960 | 0.5841 |
58
- | 2.1737 | 1.86 | 800 | 2.2810 | 0.5866 |
59
- | 2.0763 | 2.09 | 900 | 2.2779 | 0.5876 |
60
- | 2.0852 | 2.32 | 1000 | 2.2678 | 0.5894 |
61
- | 2.0946 | 2.55 | 1100 | 2.2594 | 0.5906 |
62
- | 2.0497 | 2.78 | 1200 | 2.2516 | 0.5920 |
63
- | 2.0141 | 3.02 | 1300 | 2.2513 | 0.5928 |
64
- | 2.0316 | 3.25 | 1400 | 2.2505 | 0.5932 |
65
- | 1.9783 | 3.48 | 1500 | 2.2430 | 0.5938 |
66
- | 1.9917 | 3.71 | 1600 | 2.2386 | 0.5948 |
67
- | 2.0152 | 3.94 | 1700 | 2.2315 | 0.5960 |
68
- | 1.886 | 4.18 | 1800 | 2.2420 | 0.5957 |
69
- | 1.9151 | 4.41 | 1900 | 2.2409 | 0.5967 |
70
- | 1.9538 | 4.64 | 2000 | 2.2379 | 0.5971 |
71
- | 1.8886 | 4.87 | 2100 | 2.2349 | 0.5976 |
72
- | 1.9408 | 5.1 | 2200 | 2.2410 | 0.5975 |
73
- | 1.9168 | 5.34 | 2300 | 2.2394 | 0.5976 |
74
- | 1.8002 | 5.57 | 2400 | 2.2381 | 0.5977 |
75
- | 1.8888 | 5.8 | 2500 | 2.2367 | 0.5978 |
76
 
77
 
78
  ### Framework versions
79
 
80
  - Transformers 4.26.0
81
- - Pytorch 1.13.1
82
  - Datasets 2.9.0
83
  - Tokenizers 0.13.2
 
5
  metrics:
6
  - accuracy
7
  model-index:
8
+ - name: gpt2-sweep
9
  results: []
10
  ---
11
 
12
  <!-- This model card has been generated automatically according to the information the Trainer had access to. You
13
  should probably proofread and complete it, then remove this comment. -->
14
 
15
+ # gpt2-sweep
16
 
17
+ This model is a fine-tuned version of [gpt2-large](https://huggingface.co/gpt2-large) on the None dataset.
18
  It achieves the following results on the evaluation set:
19
+ - Loss: 2.0773
20
+ - Accuracy: 0.8482
21
 
22
  ## Model description
23
 
 
36
  ### Training hyperparameters
37
 
38
  The following hyperparameters were used during training:
39
+ - learning_rate: 2.294477077303931e-05
40
+ - train_batch_size: 8
41
+ - eval_batch_size: 8
42
  - seed: 42
43
  - optimizer: Adam with betas=(0.9,0.999) and epsilon=1e-08
44
  - lr_scheduler_type: linear
45
+ - lr_scheduler_warmup_steps: 1000
46
+ - num_epochs: 2.0
47
 
48
  ### Training results
49
 
50
+ | Training Loss | Epoch | Step | Validation Loss | Accuracy |
51
+ |:-------------:|:-----:|:-----:|:---------------:|:--------:|
52
+ | 2.4891 | 0.19 | 1000 | 2.4467 | 0.8446 |
53
+ | 2.7019 | 0.37 | 2000 | 2.3208 | 0.8456 |
54
+ | 2.5278 | 0.56 | 3000 | 2.2470 | 0.8464 |
55
+ | 2.0687 | 0.74 | 4000 | 2.1953 | 0.8468 |
56
+ | 2.1738 | 0.93 | 5000 | 2.1543 | 0.8472 |
57
+ | 1.8554 | 1.12 | 6000 | 2.1500 | 0.8475 |
58
+ | 1.9276 | 1.3 | 7000 | 2.1223 | 0.8477 |
59
+ | 1.7988 | 1.49 | 8000 | 2.1120 | 0.8479 |
60
+ | 2.0632 | 1.67 | 9000 | 2.0973 | 0.8480 |
61
+ | 1.9586 | 1.86 | 10000 | 2.0826 | 0.8481 |
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
62
 
63
 
64
  ### Framework versions
65
 
66
  - Transformers 4.26.0
67
+ - Pytorch 2.0.0+cu117
68
  - Datasets 2.9.0
69
  - Tokenizers 0.13.2
added_tokens.json ADDED
@@ -0,0 +1,4 @@
 
 
 
 
 
1
+ {
2
+ "</s>": 50258,
3
+ "[PAD]": 50257
4
+ }
all_results.json CHANGED
@@ -1,15 +1,15 @@
1
  {
2
- "epoch": 6.0,
3
- "eval_accuracy": 0.5978312760008184,
4
- "eval_loss": 2.2373838424682617,
5
- "eval_runtime": 58.1232,
6
- "eval_samples": 430,
7
- "eval_samples_per_second": 7.398,
8
- "eval_steps_per_second": 1.858,
9
- "perplexity": 9.368788970328781,
10
- "train_loss": 2.103886123784088,
11
- "train_runtime": 6222.0683,
12
- "train_samples": 1723,
13
- "train_samples_per_second": 1.662,
14
- "train_steps_per_second": 0.416
15
  }
 
1
  {
2
+ "epoch": 2.0,
3
+ "eval_accuracy": 0.8481798046914326,
4
+ "eval_loss": 2.0772647857666016,
5
+ "eval_runtime": 129.398,
6
+ "eval_samples": 10750,
7
+ "eval_samples_per_second": 83.077,
8
+ "eval_steps_per_second": 10.387,
9
+ "perplexity": 7.982604892014763,
10
+ "train_loss": 2.1184611846914603,
11
+ "train_runtime": 4663.4223,
12
+ "train_samples": 43003,
13
+ "train_samples_per_second": 18.443,
14
+ "train_steps_per_second": 2.306
15
  }
config.json CHANGED
@@ -35,5 +35,5 @@
35
  "torch_dtype": "float32",
36
  "transformers_version": "4.26.0",
37
  "use_cache": true,
38
- "vocab_size": 50257
39
  }
 
35
  "torch_dtype": "float32",
36
  "transformers_version": "4.26.0",
37
  "use_cache": true,
38
+ "vocab_size": 50259
39
  }
eval_results.json CHANGED
@@ -1,10 +1,10 @@
1
  {
2
- "epoch": 6.0,
3
- "eval_accuracy": 0.5978312760008184,
4
- "eval_loss": 2.2373838424682617,
5
- "eval_runtime": 58.1232,
6
- "eval_samples": 430,
7
- "eval_samples_per_second": 7.398,
8
- "eval_steps_per_second": 1.858,
9
- "perplexity": 9.368788970328781
10
  }
 
1
  {
2
+ "epoch": 2.0,
3
+ "eval_accuracy": 0.8481798046914326,
4
+ "eval_loss": 2.0772647857666016,
5
+ "eval_runtime": 129.398,
6
+ "eval_samples": 10750,
7
+ "eval_samples_per_second": 83.077,
8
+ "eval_steps_per_second": 10.387,
9
+ "perplexity": 7.982604892014763
10
  }
pytorch_model.bin CHANGED
@@ -1,3 +1,3 @@
1
  version https://git-lfs.github.com/spec/v1
2
- oid sha256:1ec777bb140f4ef1ab2fd98a9c3619d22b5b322b3ca101fbb85dbb1169259bdc
3
- size 3134035005
 
1
  version https://git-lfs.github.com/spec/v1
2
+ oid sha256:4c68c6a4031f800eda2b9d1b40fe6faa1bd0d8c017a068f2c3c79fc7f83d4eca
3
+ size 3134045245
special_tokens_map.json CHANGED
@@ -1,5 +1,7 @@
1
  {
2
  "bos_token": "<|endoftext|>",
3
  "eos_token": "<|endoftext|>",
 
 
4
  "unk_token": "<|endoftext|>"
5
  }
 
1
  {
2
  "bos_token": "<|endoftext|>",
3
  "eos_token": "<|endoftext|>",
4
+ "pad_token": "[PAD]",
5
+ "sep_token": "</s>",
6
  "unk_token": "<|endoftext|>"
7
  }
tokenizer.json CHANGED
@@ -11,6 +11,24 @@
11
  "rstrip": false,
12
  "normalized": false,
13
  "special": true
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
14
  }
15
  ],
16
  "normalizer": null,
 
11
  "rstrip": false,
12
  "normalized": false,
13
  "special": true
14
+ },
15
+ {
16
+ "id": 50257,
17
+ "content": "[PAD]",
18
+ "single_word": false,
19
+ "lstrip": false,
20
+ "rstrip": false,
21
+ "normalized": false,
22
+ "special": true
23
+ },
24
+ {
25
+ "id": 50258,
26
+ "content": "</s>",
27
+ "single_word": false,
28
+ "lstrip": false,
29
+ "rstrip": false,
30
+ "normalized": false,
31
+ "special": true
32
  }
33
  ],
34
  "normalizer": null,
train_results.json CHANGED
@@ -1,8 +1,8 @@
1
  {
2
- "epoch": 6.0,
3
- "train_loss": 2.103886123784088,
4
- "train_runtime": 6222.0683,
5
- "train_samples": 1723,
6
- "train_samples_per_second": 1.662,
7
- "train_steps_per_second": 0.416
8
  }
 
1
  {
2
+ "epoch": 2.0,
3
+ "train_loss": 2.1184611846914603,
4
+ "train_runtime": 4663.4223,
5
+ "train_samples": 43003,
6
+ "train_samples_per_second": 18.443,
7
+ "train_steps_per_second": 2.306
8
  }
trainer_state.json CHANGED
The diff for this file is too large to render. See raw diff
 
training_args.bin CHANGED
@@ -1,3 +1,3 @@
1
  version https://git-lfs.github.com/spec/v1
2
- oid sha256:f6b5dab74e476d5b6df53fd4c78148028a02e2501b93ecd2e51ad20482829c3e
3
  size 3451
 
1
  version https://git-lfs.github.com/spec/v1
2
+ oid sha256:2354ff3ec9e59058b3289218560a957a3cbc5faa14c40080e2daf94d9e8c0c3f
3
  size 3451