add model
Browse files- .gitignore +1 -0
- README.md +98 -0
- config.json +39 -0
- pytorch_model.bin +3 -0
- special_tokens_map.json +1 -0
- tokenizer.json +0 -0
- tokenizer_config.json +1 -0
- training_args.bin +3 -0
- vocab.txt +0 -0
.gitignore
ADDED
@@ -0,0 +1 @@
|
|
|
|
|
1 |
+
checkpoint-*/
|
README.md
ADDED
@@ -0,0 +1,98 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
1 |
+
---
|
2 |
+
license: apache-2.0
|
3 |
+
tags:
|
4 |
+
- generated_from_trainer
|
5 |
+
datasets:
|
6 |
+
- ag_news
|
7 |
+
metrics:
|
8 |
+
- accuracy
|
9 |
+
model-index:
|
10 |
+
- name: bert-base-uncased-ag_news
|
11 |
+
results:
|
12 |
+
- task:
|
13 |
+
name: Text Classification
|
14 |
+
type: text-classification
|
15 |
+
dataset:
|
16 |
+
name: ag_news
|
17 |
+
type: ag_news
|
18 |
+
args: default
|
19 |
+
metrics:
|
20 |
+
- name: Accuracy
|
21 |
+
type: accuracy
|
22 |
+
value: 0.9375
|
23 |
+
---
|
24 |
+
|
25 |
+
<!-- This model card has been generated automatically according to the information the Trainer had access to. You
|
26 |
+
should probably proofread and complete it, then remove this comment. -->
|
27 |
+
|
28 |
+
# bert-base-uncased-ag_news
|
29 |
+
|
30 |
+
This model is a fine-tuned version of [bert-base-uncased](https://huggingface.co/bert-base-uncased) on the ag_news dataset.
|
31 |
+
It achieves the following results on the evaluation set:
|
32 |
+
- Loss: 0.3284
|
33 |
+
- Accuracy: 0.9375
|
34 |
+
|
35 |
+
## Model description
|
36 |
+
|
37 |
+
More information needed
|
38 |
+
|
39 |
+
## Intended uses & limitations
|
40 |
+
|
41 |
+
More information needed
|
42 |
+
|
43 |
+
## Training and evaluation data
|
44 |
+
|
45 |
+
More information needed
|
46 |
+
|
47 |
+
## Training procedure
|
48 |
+
|
49 |
+
### Training hyperparameters
|
50 |
+
|
51 |
+
The following hyperparameters were used during training:
|
52 |
+
- learning_rate: 5e-05
|
53 |
+
- train_batch_size: 8
|
54 |
+
- eval_batch_size: 16
|
55 |
+
- seed: 42
|
56 |
+
- optimizer: Adam with betas=(0.9,0.999) and epsilon=1e-08
|
57 |
+
- lr_scheduler_type: linear
|
58 |
+
- lr_scheduler_warmup_steps: 7425
|
59 |
+
- training_steps: 74250
|
60 |
+
|
61 |
+
### Training results
|
62 |
+
|
63 |
+
| Training Loss | Epoch | Step | Validation Loss | Accuracy |
|
64 |
+
|:-------------:|:-----:|:-----:|:---------------:|:--------:|
|
65 |
+
| 0.5773 | 0.13 | 2000 | 0.3627 | 0.8875 |
|
66 |
+
| 0.3101 | 0.27 | 4000 | 0.2938 | 0.9208 |
|
67 |
+
| 0.3076 | 0.4 | 6000 | 0.3114 | 0.9092 |
|
68 |
+
| 0.3114 | 0.54 | 8000 | 0.4545 | 0.9008 |
|
69 |
+
| 0.3154 | 0.67 | 10000 | 0.3875 | 0.9083 |
|
70 |
+
| 0.3095 | 0.81 | 12000 | 0.3390 | 0.9142 |
|
71 |
+
| 0.2948 | 0.94 | 14000 | 0.3341 | 0.9133 |
|
72 |
+
| 0.2557 | 1.08 | 16000 | 0.4573 | 0.9092 |
|
73 |
+
| 0.258 | 1.21 | 18000 | 0.3356 | 0.9217 |
|
74 |
+
| 0.2455 | 1.35 | 20000 | 0.3348 | 0.9283 |
|
75 |
+
| 0.2361 | 1.48 | 22000 | 0.3218 | 0.93 |
|
76 |
+
| 0.254 | 1.62 | 24000 | 0.3814 | 0.9033 |
|
77 |
+
| 0.2528 | 1.75 | 26000 | 0.3628 | 0.9158 |
|
78 |
+
| 0.2282 | 1.89 | 28000 | 0.3302 | 0.9308 |
|
79 |
+
| 0.224 | 2.02 | 30000 | 0.3967 | 0.9225 |
|
80 |
+
| 0.174 | 2.15 | 32000 | 0.3669 | 0.9333 |
|
81 |
+
| 0.1848 | 2.29 | 34000 | 0.3435 | 0.9283 |
|
82 |
+
| 0.19 | 2.42 | 36000 | 0.3552 | 0.93 |
|
83 |
+
| 0.1865 | 2.56 | 38000 | 0.3996 | 0.9258 |
|
84 |
+
| 0.1877 | 2.69 | 40000 | 0.3749 | 0.9258 |
|
85 |
+
| 0.1951 | 2.83 | 42000 | 0.3963 | 0.9258 |
|
86 |
+
| 0.1702 | 2.96 | 44000 | 0.3655 | 0.9317 |
|
87 |
+
| 0.1488 | 3.1 | 46000 | 0.3942 | 0.9292 |
|
88 |
+
| 0.1231 | 3.23 | 48000 | 0.3998 | 0.9267 |
|
89 |
+
| 0.1319 | 3.37 | 50000 | 0.4292 | 0.9242 |
|
90 |
+
| 0.1334 | 3.5 | 52000 | 0.4904 | 0.9192 |
|
91 |
+
|
92 |
+
|
93 |
+
### Framework versions
|
94 |
+
|
95 |
+
- Transformers 4.10.2
|
96 |
+
- Pytorch 1.7.1
|
97 |
+
- Datasets 1.6.1
|
98 |
+
- Tokenizers 0.10.3
|
config.json
ADDED
@@ -0,0 +1,39 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
1 |
+
{
|
2 |
+
"_name_or_path": "bert-base-uncased",
|
3 |
+
"architectures": [
|
4 |
+
"BertForSequenceClassification"
|
5 |
+
],
|
6 |
+
"attention_probs_dropout_prob": 0.1,
|
7 |
+
"classifier_dropout": null,
|
8 |
+
"gradient_checkpointing": false,
|
9 |
+
"hidden_act": "gelu",
|
10 |
+
"hidden_dropout_prob": 0.1,
|
11 |
+
"hidden_size": 768,
|
12 |
+
"id2label": {
|
13 |
+
"0": "LABEL_0",
|
14 |
+
"1": "LABEL_1",
|
15 |
+
"2": "LABEL_2",
|
16 |
+
"3": "LABEL_3"
|
17 |
+
},
|
18 |
+
"initializer_range": 0.02,
|
19 |
+
"intermediate_size": 3072,
|
20 |
+
"label2id": {
|
21 |
+
"LABEL_0": 0,
|
22 |
+
"LABEL_1": 1,
|
23 |
+
"LABEL_2": 2,
|
24 |
+
"LABEL_3": 3
|
25 |
+
},
|
26 |
+
"layer_norm_eps": 1e-12,
|
27 |
+
"max_position_embeddings": 512,
|
28 |
+
"model_type": "bert",
|
29 |
+
"num_attention_heads": 12,
|
30 |
+
"num_hidden_layers": 12,
|
31 |
+
"pad_token_id": 0,
|
32 |
+
"position_embedding_type": "absolute",
|
33 |
+
"problem_type": "single_label_classification",
|
34 |
+
"torch_dtype": "float32",
|
35 |
+
"transformers_version": "4.10.2",
|
36 |
+
"type_vocab_size": 2,
|
37 |
+
"use_cache": true,
|
38 |
+
"vocab_size": 30522
|
39 |
+
}
|
pytorch_model.bin
ADDED
@@ -0,0 +1,3 @@
|
|
|
|
|
|
|
|
|
1 |
+
version https://git-lfs.github.com/spec/v1
|
2 |
+
oid sha256:bfce009174c9d46feb9612db1449e800202f4b09ed93d18f0f525e4b84081807
|
3 |
+
size 438030207
|
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": "bert-base-uncased", "tokenizer_class": "BertTokenizer"}
|
training_args.bin
ADDED
@@ -0,0 +1,3 @@
|
|
|
|
|
|
|
|
|
1 |
+
version https://git-lfs.github.com/spec/v1
|
2 |
+
oid sha256:7d6221d25e46c88c787b921c8f49f8cd6f2d7b89294c307b6d4c95548bd83311
|
3 |
+
size 2607
|
vocab.txt
ADDED
The diff for this file is too large to render.
See raw diff
|
|