Model save
Browse files- README.md +86 -0
- config.json +39 -0
- model.safetensors +3 -0
- special_tokens_map.json +7 -0
- tokenizer.json +0 -0
- tokenizer_config.json +55 -0
- training_args.bin +3 -0
- vocab.txt +0 -0
README.md
ADDED
@@ -0,0 +1,86 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
1 |
+
---
|
2 |
+
license: apache-2.0
|
3 |
+
base_model: bert-base-uncased
|
4 |
+
tags:
|
5 |
+
- generated_from_trainer
|
6 |
+
datasets:
|
7 |
+
- ag_news
|
8 |
+
metrics:
|
9 |
+
- f1
|
10 |
+
model-index:
|
11 |
+
- name: ag-news-twitter-4800-bert-base-uncased
|
12 |
+
results:
|
13 |
+
- task:
|
14 |
+
name: Text Classification
|
15 |
+
type: text-classification
|
16 |
+
dataset:
|
17 |
+
name: ag_news
|
18 |
+
type: ag_news
|
19 |
+
config: default
|
20 |
+
split: test
|
21 |
+
args: default
|
22 |
+
metrics:
|
23 |
+
- name: F1
|
24 |
+
type: f1
|
25 |
+
value: 0.9122649070746451
|
26 |
+
---
|
27 |
+
|
28 |
+
<!-- This model card has been generated automatically according to the information the Trainer had access to. You
|
29 |
+
should probably proofread and complete it, then remove this comment. -->
|
30 |
+
|
31 |
+
# ag-news-twitter-4800-bert-base-uncased
|
32 |
+
|
33 |
+
This model is a fine-tuned version of [bert-base-uncased](https://huggingface.co/bert-base-uncased) on the ag_news dataset.
|
34 |
+
It achieves the following results on the evaluation set:
|
35 |
+
- F1: 0.9123
|
36 |
+
- Acc: 0.9126
|
37 |
+
- Loss: 0.6235
|
38 |
+
|
39 |
+
## Model description
|
40 |
+
|
41 |
+
More information needed
|
42 |
+
|
43 |
+
## Intended uses & limitations
|
44 |
+
|
45 |
+
More information needed
|
46 |
+
|
47 |
+
## Training and evaluation data
|
48 |
+
|
49 |
+
More information needed
|
50 |
+
|
51 |
+
## Training procedure
|
52 |
+
|
53 |
+
### Training hyperparameters
|
54 |
+
|
55 |
+
The following hyperparameters were used during training:
|
56 |
+
- learning_rate: 2e-05
|
57 |
+
- train_batch_size: 16
|
58 |
+
- eval_batch_size: 8
|
59 |
+
- seed: 42
|
60 |
+
- optimizer: Adam with betas=(0.9,0.999) and epsilon=1e-08
|
61 |
+
- lr_scheduler_type: linear
|
62 |
+
- lr_scheduler_warmup_ratio: 0.1
|
63 |
+
- num_epochs: 20
|
64 |
+
|
65 |
+
### Training results
|
66 |
+
|
67 |
+
| Training Loss | Epoch | Step | F1 | Acc | Validation Loss |
|
68 |
+
|:-------------:|:-----:|:----:|:------:|:------:|:---------------:|
|
69 |
+
| No log | 1.0 | 300 | 0.8951 | 0.8955 | 0.3460 |
|
70 |
+
| 0.6828 | 2.0 | 600 | 0.8957 | 0.8959 | 0.3295 |
|
71 |
+
| 0.6828 | 3.0 | 900 | 0.9096 | 0.9095 | 0.3196 |
|
72 |
+
| 0.1866 | 4.0 | 1200 | 0.9011 | 0.9018 | 0.4358 |
|
73 |
+
| 0.0804 | 5.0 | 1500 | 0.9116 | 0.9116 | 0.4441 |
|
74 |
+
| 0.0804 | 6.0 | 1800 | 0.9121 | 0.9124 | 0.4983 |
|
75 |
+
| 0.0236 | 7.0 | 2100 | 0.9126 | 0.9128 | 0.5473 |
|
76 |
+
| 0.0236 | 8.0 | 2400 | 0.9082 | 0.9086 | 0.6025 |
|
77 |
+
| 0.0092 | 9.0 | 2700 | 0.9121 | 0.9124 | 0.6057 |
|
78 |
+
| 0.0028 | 10.0 | 3000 | 0.9123 | 0.9126 | 0.6235 |
|
79 |
+
|
80 |
+
|
81 |
+
### Framework versions
|
82 |
+
|
83 |
+
- Transformers 4.35.0
|
84 |
+
- Pytorch 2.1.0+cu121
|
85 |
+
- Datasets 2.14.6
|
86 |
+
- Tokenizers 0.14.1
|
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.35.0",
|
36 |
+
"type_vocab_size": 2,
|
37 |
+
"use_cache": false,
|
38 |
+
"vocab_size": 30522
|
39 |
+
}
|
model.safetensors
ADDED
@@ -0,0 +1,3 @@
|
|
|
|
|
|
|
|
|
1 |
+
version https://git-lfs.github.com/spec/v1
|
2 |
+
oid sha256:9004ed592a74091f6cc691865a60a8ae5938ad669bfce5a27fe6e572d4900b99
|
3 |
+
size 437964800
|
special_tokens_map.json
ADDED
@@ -0,0 +1,7 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
1 |
+
{
|
2 |
+
"cls_token": "[CLS]",
|
3 |
+
"mask_token": "[MASK]",
|
4 |
+
"pad_token": "[PAD]",
|
5 |
+
"sep_token": "[SEP]",
|
6 |
+
"unk_token": "[UNK]"
|
7 |
+
}
|
tokenizer.json
ADDED
The diff for this file is too large to render.
See raw diff
|
|
tokenizer_config.json
ADDED
@@ -0,0 +1,55 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
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": true,
|
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
ADDED
@@ -0,0 +1,3 @@
|
|
|
|
|
|
|
|
|
1 |
+
version https://git-lfs.github.com/spec/v1
|
2 |
+
oid sha256:8581037fba0701f8da08efba2db69c8e570a7c8af9b5c018f0faa52b366a8f6a
|
3 |
+
size 4856
|
vocab.txt
ADDED
The diff for this file is too large to render.
See raw diff
|
|