EC2 Default User commited on
Commit
2832236
1 Parent(s): 860cd98
.gitignore ADDED
@@ -0,0 +1 @@
 
 
1
+ checkpoint-*/
README.md ADDED
@@ -0,0 +1,73 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ ---
2
+ language:
3
+ - en
4
+ license: apache-2.0
5
+ tags:
6
+ - generated_from_trainer
7
+ datasets:
8
+ - ag_news
9
+ metrics:
10
+ - accuracy
11
+ model_index:
12
+ - name: distilbert-base-uncased-agnews
13
+ results:
14
+ - dataset:
15
+ name: ag_news
16
+ type: ag_news
17
+ args: default
18
+ metric:
19
+ name: Accuracy
20
+ type: accuracy
21
+ value: 0.9473684210526315
22
+ ---
23
+
24
+ <!-- This model card has been generated automatically according to the information the Trainer had access to. You
25
+ should probably proofread and complete it, then remove this comment. -->
26
+
27
+ # distilbert-base-uncased-agnews
28
+
29
+ This model is a fine-tuned version of [distilbert-base-uncased](https://huggingface.co/distilbert-base-uncased) on the ag_news dataset.
30
+ It achieves the following results on the evaluation set:
31
+ - Loss: 0.1652
32
+ - Accuracy: 0.9474
33
+
34
+ ## Model description
35
+
36
+ More information needed
37
+
38
+ ## Intended uses & limitations
39
+
40
+ More information needed
41
+
42
+ ## Training and evaluation data
43
+
44
+ More information needed
45
+
46
+ ## Training procedure
47
+
48
+ ### Training hyperparameters
49
+
50
+ The following hyperparameters were used during training:
51
+ - learning_rate: 3e-05
52
+ - train_batch_size: 32
53
+ - eval_batch_size: 8
54
+ - seed: 42
55
+ - optimizer: Adam with betas=(0.9,0.999) and epsilon=1e-08
56
+ - lr_scheduler_type: linear
57
+ - lr_scheduler_warmup_steps: 1000
58
+ - num_epochs: 2.0
59
+
60
+ ### Training results
61
+
62
+ | Training Loss | Epoch | Step | Validation Loss | Accuracy |
63
+ |:-------------:|:-----:|:----:|:---------------:|:--------:|
64
+ | 0.1916 | 1.0 | 3375 | 0.1741 | 0.9412 |
65
+ | 0.123 | 2.0 | 6750 | 0.1631 | 0.9483 |
66
+
67
+
68
+ ### Framework versions
69
+
70
+ - Transformers 4.8.2
71
+ - Pytorch 1.8.1+cu111
72
+ - Datasets 1.8.0
73
+ - Tokenizers 0.10.3
all_results.json ADDED
@@ -0,0 +1,8 @@
 
 
 
 
 
 
 
 
 
1
+ {
2
+ "epoch": 2.0,
3
+ "eval_accuracy": 0.9473684210526315,
4
+ "eval_loss": 0.16520710289478302,
5
+ "eval_runtime": 10.786,
6
+ "eval_samples_per_second": 704.618,
7
+ "eval_steps_per_second": 88.077
8
+ }
config.json ADDED
@@ -0,0 +1,36 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ {
2
+ "_name_or_path": "distilbert-base-uncased",
3
+ "activation": "gelu",
4
+ "architectures": [
5
+ "DistilBertForSequenceClassification"
6
+ ],
7
+ "attention_dropout": 0.1,
8
+ "dim": 768,
9
+ "dropout": 0.1,
10
+ "hidden_dim": 3072,
11
+ "id2label": {
12
+ "0": "World",
13
+ "1": "Sports",
14
+ "2": "Business",
15
+ "3": "Sci/Tech"
16
+ },
17
+ "initializer_range": 0.02,
18
+ "label2id": {
19
+ "Business": 2,
20
+ "Sci/Tech": 3,
21
+ "Sports": 1,
22
+ "World": 0
23
+ },
24
+ "max_position_embeddings": 512,
25
+ "model_type": "distilbert",
26
+ "n_heads": 12,
27
+ "n_layers": 6,
28
+ "pad_token_id": 0,
29
+ "problem_type": "single_label_classification",
30
+ "qa_dropout": 0.1,
31
+ "seq_classif_dropout": 0.2,
32
+ "sinusoidal_pos_embds": false,
33
+ "tie_weights_": true,
34
+ "transformers_version": "4.8.2",
35
+ "vocab_size": 30522
36
+ }
log.log ADDED
@@ -0,0 +1,18 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ Training dataset length:
2
+ 108000
3
+ Validation dataset length:
4
+ 12000
5
+ Test dataset length:
6
+ 7600
7
+ Current performance:
8
+ Eval:
9
+ {'eval_loss': 1.3898906707763672, 'eval_accuracy': 0.21558333333333332, 'eval_runtime': 17.4618, 'eval_samples_per_second': 687.213, 'eval_steps_per_second': 85.902}
10
+ Test:
11
+ {'eval_loss': 1.3894953727722168, 'eval_accuracy': 0.21947368421052632, 'eval_runtime': 10.7033, 'eval_samples_per_second': 710.062, 'eval_steps_per_second': 88.758}
12
+ Best trial:
13
+ BestRun(run_id='0', objective=0.9483333333333334, hyperparameters={'learning_rate': 3e-05, 'num_train_epochs': 2, 'per_device_train_batch_size': 32, 'warmup_steps': 1000})
14
+ Training complete performance:
15
+ Eval:
16
+ {'eval_loss': 0.16314448416233063, 'eval_accuracy': 0.9483333333333334, 'eval_runtime': 17.4366, 'eval_samples_per_second': 688.209, 'eval_steps_per_second': 86.026, 'epoch': 2.0}
17
+ Test:
18
+ {'eval_loss': 0.16520710289478302, 'eval_accuracy': 0.9473684210526315, 'eval_runtime': 10.786, 'eval_samples_per_second': 704.618, 'eval_steps_per_second': 88.077, 'epoch': 2.0}
pytorch_model.bin ADDED
@@ -0,0 +1,3 @@
 
 
 
 
1
+ version https://git-lfs.github.com/spec/v1
2
+ oid sha256:40a8f0e24751f591a63839b7f462428c62c58378130bb47db3dddfbe0c96abf0
3
+ size 267869335
special_tokens_map.json ADDED
@@ -0,0 +1 @@
 
 
1
+ {"unk_token": "[UNK]", "sep_token": "[SEP]", "pad_token": "[PAD]", "cls_token": "[CLS]", "mask_token": "[MASK]"}
tokenizer.json ADDED
The diff for this file is too large to render. See raw diff
 
tokenizer_config.json ADDED
@@ -0,0 +1 @@
 
 
1
+ {"do_lower_case": true, "unk_token": "[UNK]", "sep_token": "[SEP]", "pad_token": "[PAD]", "cls_token": "[CLS]", "mask_token": "[MASK]", "tokenize_chinese_chars": true, "strip_accents": null, "model_max_length": 512, "special_tokens_map_file": null, "name_or_path": "distilbert-base-uncased", "tokenizer_class": "DistilBertTokenizer"}
train_results.json ADDED
@@ -0,0 +1,8 @@
 
 
 
 
 
 
 
 
 
1
+ {
2
+ "epoch": 2.0,
3
+ "eval_accuracy": 0.9473684210526315,
4
+ "eval_loss": 0.16520710289478302,
5
+ "eval_runtime": 10.786,
6
+ "eval_samples_per_second": 704.618,
7
+ "eval_steps_per_second": 88.077
8
+ }
trainer_state.json ADDED
@@ -0,0 +1,144 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ {
2
+ "best_metric": 0.16314448416233063,
3
+ "best_model_checkpoint": "../results/distilbert-base-uncased-agnews/run-31/checkpoint-6750",
4
+ "epoch": 2.0,
5
+ "global_step": 6750,
6
+ "is_hyper_param_search": true,
7
+ "is_local_process_zero": true,
8
+ "is_world_process_zero": true,
9
+ "log_history": [
10
+ {
11
+ "epoch": 0.15,
12
+ "learning_rate": 1.5e-05,
13
+ "loss": 0.6831,
14
+ "step": 500
15
+ },
16
+ {
17
+ "epoch": 0.3,
18
+ "learning_rate": 3e-05,
19
+ "loss": 0.27,
20
+ "step": 1000
21
+ },
22
+ {
23
+ "epoch": 0.44,
24
+ "learning_rate": 2.7391304347826085e-05,
25
+ "loss": 0.2275,
26
+ "step": 1500
27
+ },
28
+ {
29
+ "epoch": 0.59,
30
+ "learning_rate": 2.4782608695652175e-05,
31
+ "loss": 0.2233,
32
+ "step": 2000
33
+ },
34
+ {
35
+ "epoch": 0.74,
36
+ "learning_rate": 2.217391304347826e-05,
37
+ "loss": 0.2019,
38
+ "step": 2500
39
+ },
40
+ {
41
+ "epoch": 0.89,
42
+ "learning_rate": 1.956521739130435e-05,
43
+ "loss": 0.1916,
44
+ "step": 3000
45
+ },
46
+ {
47
+ "epoch": 1.0,
48
+ "eval_accuracy": 0.9411666666666667,
49
+ "eval_loss": 0.17406368255615234,
50
+ "eval_runtime": 17.0218,
51
+ "eval_samples_per_second": 704.977,
52
+ "eval_steps_per_second": 88.122,
53
+ "step": 3375
54
+ },
55
+ {
56
+ "epoch": 1.04,
57
+ "learning_rate": 1.6956521739130433e-05,
58
+ "loss": 0.1747,
59
+ "step": 3500
60
+ },
61
+ {
62
+ "epoch": 1.19,
63
+ "learning_rate": 1.4347826086956522e-05,
64
+ "loss": 0.1382,
65
+ "step": 4000
66
+ },
67
+ {
68
+ "epoch": 1.33,
69
+ "learning_rate": 1.173913043478261e-05,
70
+ "loss": 0.1389,
71
+ "step": 4500
72
+ },
73
+ {
74
+ "epoch": 1.48,
75
+ "learning_rate": 9.130434782608697e-06,
76
+ "loss": 0.1269,
77
+ "step": 5000
78
+ },
79
+ {
80
+ "epoch": 1.63,
81
+ "learning_rate": 6.521739130434783e-06,
82
+ "loss": 0.1299,
83
+ "step": 5500
84
+ },
85
+ {
86
+ "epoch": 1.78,
87
+ "learning_rate": 3.913043478260869e-06,
88
+ "loss": 0.1328,
89
+ "step": 6000
90
+ },
91
+ {
92
+ "epoch": 1.93,
93
+ "learning_rate": 1.3043478260869566e-06,
94
+ "loss": 0.123,
95
+ "step": 6500
96
+ },
97
+ {
98
+ "epoch": 2.0,
99
+ "eval_accuracy": 0.9483333333333334,
100
+ "eval_loss": 0.16314448416233063,
101
+ "eval_runtime": 16.9602,
102
+ "eval_samples_per_second": 707.537,
103
+ "eval_steps_per_second": 88.442,
104
+ "step": 6750
105
+ },
106
+ {
107
+ "epoch": 2.0,
108
+ "step": 6750,
109
+ "total_flos": 1.0849763309273088e+16,
110
+ "train_loss": 0.20914978592484085,
111
+ "train_runtime": 832.6813,
112
+ "train_samples_per_second": 259.403,
113
+ "train_steps_per_second": 8.106
114
+ },
115
+ {
116
+ "epoch": 2.0,
117
+ "eval_accuracy": 0.9483333333333334,
118
+ "eval_loss": 0.16314448416233063,
119
+ "eval_runtime": 17.4366,
120
+ "eval_samples_per_second": 688.209,
121
+ "eval_steps_per_second": 86.026,
122
+ "step": 6750
123
+ },
124
+ {
125
+ "epoch": 2.0,
126
+ "eval_accuracy": 0.9473684210526315,
127
+ "eval_loss": 0.16520710289478302,
128
+ "eval_runtime": 10.786,
129
+ "eval_samples_per_second": 704.618,
130
+ "eval_steps_per_second": 88.077,
131
+ "step": 6750
132
+ }
133
+ ],
134
+ "max_steps": 6750,
135
+ "num_train_epochs": 2,
136
+ "total_flos": 1.0849763309273088e+16,
137
+ "trial_name": null,
138
+ "trial_params": {
139
+ "learning_rate": 3e-05,
140
+ "num_train_epochs": 2,
141
+ "per_device_train_batch_size": 32,
142
+ "warmup_steps": 1000
143
+ }
144
+ }
training_args.bin ADDED
@@ -0,0 +1,3 @@
 
 
 
 
1
+ version https://git-lfs.github.com/spec/v1
2
+ oid sha256:c27892004ed1c4922eb92e0f06efecef465902cd27c4bccaa474412b62545b03
3
+ size 2799
vocab.txt ADDED
The diff for this file is too large to render. See raw diff