Iiro commited on
Commit
40f37ea
·
1 Parent(s): 23f5344

Iiro/bert_reviews

Browse files
Files changed (7) hide show
  1. README.md +16 -73
  2. config.json +4 -20
  3. pytorch_model.bin +2 -2
  4. tokenizer.json +0 -0
  5. tokenizer_config.json +44 -2
  6. training_args.bin +2 -2
  7. vocab.txt +0 -0
README.md CHANGED
@@ -1,27 +1,11 @@
1
  ---
2
- license: apache-2.0
3
  tags:
4
  - generated_from_trainer
5
  datasets:
6
  - amazon_reviews_multi
7
- metrics:
8
- - accuracy
9
  model-index:
10
  - name: bert_reviews
11
- results:
12
- - task:
13
- name: Text Classification
14
- type: text-classification
15
- dataset:
16
- name: amazon_reviews_multi
17
- type: amazon_reviews_multi
18
- config: en
19
- split: test
20
- args: en
21
- metrics:
22
- - name: Accuracy
23
- type: accuracy
24
- value: 0.6408
25
  ---
26
 
27
  <!-- This model card has been generated automatically according to the information the Trainer had access to. You
@@ -29,10 +13,15 @@ should probably proofread and complete it, then remove this comment. -->
29
 
30
  # bert_reviews
31
 
32
- This model is a fine-tuned version of [distilbert-base-uncased](https://huggingface.co/distilbert-base-uncased) on the amazon_reviews_multi dataset.
33
  It achieves the following results on the evaluation set:
34
- - Loss: 0.8312
35
- - Accuracy: 0.6408
 
 
 
 
 
36
 
37
  ## Model description
38
 
@@ -51,63 +40,17 @@ More information needed
51
  ### Training hyperparameters
52
 
53
  The following hyperparameters were used during training:
54
- - learning_rate: 0.0001
55
- - train_batch_size: 16
56
- - eval_batch_size: 16
57
  - seed: 42
58
  - optimizer: Adam with betas=(0.9,0.999) and epsilon=1e-08
59
  - lr_scheduler_type: linear
60
  - training_steps: 20000
61
 
62
- ### Training results
63
-
64
- | Training Loss | Epoch | Step | Validation Loss | Accuracy |
65
- |:-------------:|:-----:|:-----:|:---------------:|:--------:|
66
- | 1.1326 | 0.04 | 500 | 1.0019 | 0.5832 |
67
- | 0.9786 | 0.08 | 1000 | 0.9387 | 0.6086 |
68
- | 0.9481 | 0.12 | 1500 | 0.9117 | 0.6132 |
69
- | 0.9334 | 0.16 | 2000 | 0.9440 | 0.5744 |
70
- | 0.9036 | 0.2 | 2500 | 0.9085 | 0.6034 |
71
- | 0.9065 | 0.24 | 3000 | 0.9250 | 0.5982 |
72
- | 0.8821 | 0.28 | 3500 | 0.8917 | 0.6232 |
73
- | 0.9047 | 0.32 | 4000 | 0.8850 | 0.6258 |
74
- | 0.8838 | 0.36 | 4500 | 0.8814 | 0.6236 |
75
- | 0.8732 | 0.4 | 5000 | 0.8874 | 0.6198 |
76
- | 0.8845 | 0.44 | 5500 | 0.8886 | 0.6164 |
77
- | 0.874 | 0.48 | 6000 | 0.8665 | 0.634 |
78
- | 0.8693 | 0.52 | 6500 | 0.8985 | 0.6126 |
79
- | 0.8502 | 0.56 | 7000 | 0.8992 | 0.6248 |
80
- | 0.8752 | 0.6 | 7500 | 0.8620 | 0.6326 |
81
- | 0.8477 | 0.64 | 8000 | 0.8586 | 0.6382 |
82
- | 0.8456 | 0.68 | 8500 | 0.8603 | 0.631 |
83
- | 0.861 | 0.72 | 9000 | 0.8536 | 0.628 |
84
- | 0.8605 | 0.76 | 9500 | 0.8478 | 0.6338 |
85
- | 0.8159 | 0.8 | 10000 | 0.8569 | 0.6324 |
86
- | 0.8397 | 0.84 | 10500 | 0.8519 | 0.626 |
87
- | 0.8424 | 0.88 | 11000 | 0.8753 | 0.6302 |
88
- | 0.8332 | 0.92 | 11500 | 0.8453 | 0.6326 |
89
- | 0.8286 | 0.96 | 12000 | 0.8334 | 0.6414 |
90
- | 0.8166 | 1.0 | 12500 | 0.8508 | 0.633 |
91
- | 0.7656 | 1.04 | 13000 | 0.8393 | 0.646 |
92
- | 0.749 | 1.08 | 13500 | 0.8339 | 0.643 |
93
- | 0.7554 | 1.12 | 14000 | 0.8325 | 0.6486 |
94
- | 0.734 | 1.16 | 14500 | 0.8467 | 0.6524 |
95
- | 0.7581 | 1.2 | 15000 | 0.8228 | 0.6434 |
96
- | 0.7413 | 1.24 | 15500 | 0.8339 | 0.6446 |
97
- | 0.7429 | 1.28 | 16000 | 0.8331 | 0.6448 |
98
- | 0.7436 | 1.32 | 16500 | 0.8285 | 0.6472 |
99
- | 0.7343 | 1.36 | 17000 | 0.8381 | 0.6532 |
100
- | 0.7225 | 1.4 | 17500 | 0.8327 | 0.6476 |
101
- | 0.7311 | 1.44 | 18000 | 0.8281 | 0.6506 |
102
- | 0.7298 | 1.48 | 18500 | 0.8324 | 0.6468 |
103
- | 0.7409 | 1.52 | 19000 | 0.8180 | 0.648 |
104
- | 0.732 | 1.56 | 19500 | 0.8209 | 0.6464 |
105
- | 0.7352 | 1.6 | 20000 | 0.8195 | 0.6468 |
106
-
107
-
108
  ### Framework versions
109
 
110
- - Transformers 4.28.1
111
- - Pytorch 2.0.0+cu118
112
- - Datasets 2.11.0
113
- - Tokenizers 0.13.3
 
1
  ---
 
2
  tags:
3
  - generated_from_trainer
4
  datasets:
5
  - amazon_reviews_multi
 
 
6
  model-index:
7
  - name: bert_reviews
8
+ results: []
 
 
 
 
 
 
 
 
 
 
 
 
 
9
  ---
10
 
11
  <!-- This model card has been generated automatically according to the information the Trainer had access to. You
 
13
 
14
  # bert_reviews
15
 
16
+ This model was trained from scratch on the amazon_reviews_multi dataset.
17
  It achieves the following results on the evaluation set:
18
+ - eval_loss: 0.9163
19
+ - eval_accuracy: 0.622
20
+ - eval_runtime: 40.4603
21
+ - eval_samples_per_second: 123.578
22
+ - eval_steps_per_second: 15.447
23
+ - epoch: 0.04
24
+ - step: 1000
25
 
26
  ## Model description
27
 
 
40
  ### Training hyperparameters
41
 
42
  The following hyperparameters were used during training:
43
+ - learning_rate: 1.2e-05
44
+ - train_batch_size: 8
45
+ - eval_batch_size: 8
46
  - seed: 42
47
  - optimizer: Adam with betas=(0.9,0.999) and epsilon=1e-08
48
  - lr_scheduler_type: linear
49
  - training_steps: 20000
50
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
51
  ### Framework versions
52
 
53
+ - Transformers 4.34.1
54
+ - Pytorch 2.1.0+cu118
55
+ - Datasets 2.14.6
56
+ - Tokenizers 0.14.1
config.json CHANGED
@@ -1,13 +1,9 @@
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": "LABEL_0",
13
  "1": "LABEL_1",
@@ -15,7 +11,6 @@
15
  "3": "LABEL_3",
16
  "4": "LABEL_4"
17
  },
18
- "initializer_range": 0.02,
19
  "label2id": {
20
  "LABEL_0": 0,
21
  "LABEL_1": 1,
@@ -23,17 +18,6 @@
23
  "LABEL_3": 3,
24
  "LABEL_4": 4
25
  },
26
- "max_position_embeddings": 512,
27
- "model_type": "distilbert",
28
- "n_heads": 12,
29
- "n_layers": 6,
30
- "pad_token_id": 0,
31
- "problem_type": "single_label_classification",
32
- "qa_dropout": 0.1,
33
- "seq_classif_dropout": 0.2,
34
- "sinusoidal_pos_embds": false,
35
- "tie_weights_": true,
36
  "torch_dtype": "float32",
37
- "transformers_version": "4.28.1",
38
- "vocab_size": 30522
39
  }
 
1
  {
 
 
2
  "architectures": [
3
+ "Bert"
4
  ],
5
+ "hidden_bert": 768,
6
+ "hidden_size": 50,
 
 
7
  "id2label": {
8
  "0": "LABEL_0",
9
  "1": "LABEL_1",
 
11
  "3": "LABEL_3",
12
  "4": "LABEL_4"
13
  },
 
14
  "label2id": {
15
  "LABEL_0": 0,
16
  "LABEL_1": 1,
 
18
  "LABEL_3": 3,
19
  "LABEL_4": 4
20
  },
 
 
 
 
 
 
 
 
 
 
21
  "torch_dtype": "float32",
22
+ "transformers_version": "4.34.1"
 
23
  }
pytorch_model.bin CHANGED
@@ -1,3 +1,3 @@
1
  version https://git-lfs.github.com/spec/v1
2
- oid sha256:db3f7957c028e5a0e259ef9e717f10ed1768ef64b574c4d3583b43775558ebb8
3
- size 267864749
 
1
  version https://git-lfs.github.com/spec/v1
2
+ oid sha256:cc9b7adfcf1b7423c3f58feb4fe3fb41bf427fc20a537453a536f99bfce7b39b
3
+ size 433465270
tokenizer.json CHANGED
The diff for this file is too large to render. See raw diff
 
tokenizer_config.json CHANGED
@@ -1,13 +1,55 @@
1
  {
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
2
  "clean_up_tokenization_spaces": true,
3
  "cls_token": "[CLS]",
4
- "do_lower_case": true,
5
  "mask_token": "[MASK]",
6
  "model_max_length": 512,
7
  "pad_token": "[PAD]",
8
  "sep_token": "[SEP]",
9
  "strip_accents": null,
10
  "tokenize_chinese_chars": true,
11
- "tokenizer_class": "DistilBertTokenizer",
12
  "unk_token": "[UNK]"
13
  }
 
1
  {
2
+ "added_tokens_decoder": {
3
+ "0": {
4
+ "content": "[PAD]",
5
+ "lstrip": false,
6
+ "normalized": false,
7
+ "rstrip": false,
8
+ "single_word": false,
9
+ "special": true
10
+ },
11
+ "100": {
12
+ "content": "[UNK]",
13
+ "lstrip": false,
14
+ "normalized": false,
15
+ "rstrip": false,
16
+ "single_word": false,
17
+ "special": true
18
+ },
19
+ "101": {
20
+ "content": "[CLS]",
21
+ "lstrip": false,
22
+ "normalized": false,
23
+ "rstrip": false,
24
+ "single_word": false,
25
+ "special": true
26
+ },
27
+ "102": {
28
+ "content": "[SEP]",
29
+ "lstrip": false,
30
+ "normalized": false,
31
+ "rstrip": false,
32
+ "single_word": false,
33
+ "special": true
34
+ },
35
+ "103": {
36
+ "content": "[MASK]",
37
+ "lstrip": false,
38
+ "normalized": false,
39
+ "rstrip": false,
40
+ "single_word": false,
41
+ "special": true
42
+ }
43
+ },
44
  "clean_up_tokenization_spaces": true,
45
  "cls_token": "[CLS]",
46
+ "do_lower_case": false,
47
  "mask_token": "[MASK]",
48
  "model_max_length": 512,
49
  "pad_token": "[PAD]",
50
  "sep_token": "[SEP]",
51
  "strip_accents": null,
52
  "tokenize_chinese_chars": true,
53
+ "tokenizer_class": "BertTokenizer",
54
  "unk_token": "[UNK]"
55
  }
training_args.bin CHANGED
@@ -1,3 +1,3 @@
1
  version https://git-lfs.github.com/spec/v1
2
- oid sha256:74bad4d69ffc58615dab2bdadb1a39e5447b3514ce6da70b99101db4db76d29b
3
- size 3579
 
1
  version https://git-lfs.github.com/spec/v1
2
+ oid sha256:8aed5972a1a70530610473db50619f0469b4eaa95f2008e246fb192c9061beb0
3
+ size 4472
vocab.txt CHANGED
The diff for this file is too large to render. See raw diff