Lenson commited on
Commit
10f577d
·
1 Parent(s): aa6c187

lebarnon/GPT2-CompareTransformers-Imdb

Browse files
Files changed (4) hide show
  1. README.md +99 -0
  2. config.json +40 -0
  3. pytorch_model.bin +3 -0
  4. training_args.bin +3 -0
README.md ADDED
@@ -0,0 +1,99 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ ---
2
+ license: mit
3
+ base_model: gpt2
4
+ tags:
5
+ - generated_from_trainer
6
+ datasets:
7
+ - imdb
8
+ metrics:
9
+ - accuracy
10
+ - precision
11
+ - recall
12
+ - f1
13
+ model-index:
14
+ - name: results
15
+ results:
16
+ - task:
17
+ name: Text Classification
18
+ type: text-classification
19
+ dataset:
20
+ name: imdb
21
+ type: imdb
22
+ config: plain_text
23
+ split: train
24
+ args: plain_text
25
+ metrics:
26
+ - name: Accuracy
27
+ type: accuracy
28
+ value: 0.9330666661262512
29
+ - name: Precision
30
+ type: precision
31
+ value: 0.9330666661262512
32
+ - name: Recall
33
+ type: recall
34
+ value: 0.9330666661262512
35
+ - name: F1
36
+ type: f1
37
+ value: 0.9330666661262512
38
+ ---
39
+
40
+ <!-- This model card has been generated automatically according to the information the Trainer had access to. You
41
+ should probably proofread and complete it, then remove this comment. -->
42
+
43
+ # results
44
+
45
+ This model is a fine-tuned version of [gpt2](https://huggingface.co/gpt2) on the imdb dataset.
46
+ It achieves the following results on the evaluation set:
47
+ - Loss: 0.2797
48
+ - Accuracy: 0.9331
49
+ - Precision: 0.9331
50
+ - Recall: 0.9331
51
+ - F1: 0.9331
52
+ - Auroc: 0.9810
53
+
54
+ ## Model description
55
+
56
+ More information needed
57
+
58
+ ## Intended uses & limitations
59
+
60
+ More information needed
61
+
62
+ ## Training and evaluation data
63
+
64
+ More information needed
65
+
66
+ ## Training procedure
67
+
68
+ ### Training hyperparameters
69
+
70
+ The following hyperparameters were used during training:
71
+ - learning_rate: 5e-05
72
+ - train_batch_size: 4
73
+ - eval_batch_size: 4
74
+ - seed: 42
75
+ - distributed_type: multi-GPU
76
+ - gradient_accumulation_steps: 4
77
+ - total_train_batch_size: 16
78
+ - optimizer: Adam with betas=(0.9,0.999) and epsilon=1e-08
79
+ - lr_scheduler_type: linear
80
+ - num_epochs: 3
81
+
82
+ ### Training results
83
+
84
+ | Training Loss | Epoch | Step | Accuracy | Auroc | F1 | Validation Loss | Precision | Recall |
85
+ |:-------------:|:-----:|:----:|:--------:|:------:|:------:|:---------------:|:---------:|:------:|
86
+ | 0.1436 | 0.46 | 500 | 0.8935 | 0.9751 | 0.8935 | 0.2923 | 0.8935 | 0.8935 |
87
+ | 0.1621 | 0.91 | 1000 | 0.9261 | 0.9789 | 0.9261 | 0.1984 | 0.9261 | 0.9261 |
88
+ | 0.2196 | 1.37 | 1500 | 0.9289 | 0.9810 | 0.9289 | 0.2082 | 0.9289 | 0.9289 |
89
+ | 0.1457 | 1.83 | 2000 | 0.9325 | 0.9816 | 0.9325 | 0.2282 | 0.9325 | 0.9325 |
90
+ | 0.1103 | 2.29 | 2500 | 0.9305 | 0.9806 | 0.9305 | 0.3201 | 0.9305 | 0.9305 |
91
+ | 0.0679 | 2.74 | 3000 | 0.2797 | 0.9331 | 0.9331 | 0.9331 | 0.9331 | 0.9810 |
92
+
93
+
94
+ ### Framework versions
95
+
96
+ - Transformers 4.34.1
97
+ - Pytorch 2.1.0+cu118
98
+ - Datasets 2.14.6
99
+ - Tokenizers 0.14.1
config.json ADDED
@@ -0,0 +1,40 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ {
2
+ "_name_or_path": "gpt2",
3
+ "activation_function": "gelu_new",
4
+ "architectures": [
5
+ "GPT2ForSequenceClassification"
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
+ "pad_token_id": 50256,
21
+ "reorder_and_upcast_attn": false,
22
+ "resid_pdrop": 0.1,
23
+ "scale_attn_by_inverse_layer_idx": false,
24
+ "scale_attn_weights": true,
25
+ "summary_activation": null,
26
+ "summary_first_dropout": 0.1,
27
+ "summary_proj_to_labels": true,
28
+ "summary_type": "cls_index",
29
+ "summary_use_proj": true,
30
+ "task_specific_params": {
31
+ "text-generation": {
32
+ "do_sample": true,
33
+ "max_length": 50
34
+ }
35
+ },
36
+ "torch_dtype": "float32",
37
+ "transformers_version": "4.34.1",
38
+ "use_cache": true,
39
+ "vocab_size": 50258
40
+ }
pytorch_model.bin ADDED
@@ -0,0 +1,3 @@
 
 
 
 
1
+ version https://git-lfs.github.com/spec/v1
2
+ oid sha256:33e59dd1b1046458811ce6be20c7cf21b931413261435485bcdb93dbfe8ae054
3
+ size 497815006
training_args.bin ADDED
@@ -0,0 +1,3 @@
 
 
 
 
1
+ version https://git-lfs.github.com/spec/v1
2
+ oid sha256:382fe90b4a7a3103650dea0d1e73701b5623c7fba4394872772a8853a60be8d5
3
+ size 5944