noobiebuilder
commited on
Commit
•
72c74c4
1
Parent(s):
562b75f
bert-finetuned-classification-hatespeech
Browse files- README.md +62 -0
- config.json +37 -0
- model.safetensors +3 -0
- runs/Jul16_10-34-22_ip-10-192-12-104/events.out.tfevents.1721126115.ip-10-192-12-104.2815.0 +3 -0
- runs/Jul16_10-41-11_ip-10-192-12-104/events.out.tfevents.1721126472.ip-10-192-12-104.2815.1 +3 -0
- runs/Jul16_10-43-51_ip-10-192-12-104/events.out.tfevents.1721126633.ip-10-192-12-104.2815.2 +3 -0
- runs/Jul16_10-45-39_ip-10-192-12-104/events.out.tfevents.1721126761.ip-10-192-12-104.2815.3 +3 -0
- runs/Jul16_10-45-39_ip-10-192-12-104/events.out.tfevents.1721126793.ip-10-192-12-104.2815.4 +3 -0
- runs/Jul16_10-45-39_ip-10-192-12-104/events.out.tfevents.1721126856.ip-10-192-12-104.2815.5 +3 -0
- runs/Jul16_10-45-39_ip-10-192-12-104/events.out.tfevents.1721126869.ip-10-192-12-104.2815.6 +3 -0
- runs/Jul16_10-45-39_ip-10-192-12-104/events.out.tfevents.1721126882.ip-10-192-12-104.2815.7 +3 -0
- runs/Jul16_10-45-39_ip-10-192-12-104/events.out.tfevents.1721126913.ip-10-192-12-104.2815.8 +3 -0
- runs/Jul16_10-45-39_ip-10-192-12-104/events.out.tfevents.1721127076.ip-10-192-12-104.2815.9 +3 -0
- runs/Jul16_11-01-21_ip-10-192-12-104/events.out.tfevents.1721127698.ip-10-192-12-104.2815.10 +3 -0
- runs/Jul16_11-03-07_ip-10-192-12-104/events.out.tfevents.1721127789.ip-10-192-12-104.2815.11 +3 -0
- runs/Jul16_18-51-37_ip-10-192-12-10/events.out.tfevents.1721155902.ip-10-192-12-10.1725.0 +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,62 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
1 |
+
---
|
2 |
+
license: apache-2.0
|
3 |
+
base_model: bert-base-cased
|
4 |
+
tags:
|
5 |
+
- generated_from_trainer
|
6 |
+
metrics:
|
7 |
+
- accuracy
|
8 |
+
model-index:
|
9 |
+
- name: bert-fintuned-classification
|
10 |
+
results: []
|
11 |
+
---
|
12 |
+
|
13 |
+
<!-- This model card has been generated automatically according to the information the Trainer had access to. You
|
14 |
+
should probably proofread and complete it, then remove this comment. -->
|
15 |
+
|
16 |
+
# bert-fintuned-classification
|
17 |
+
|
18 |
+
This model is a fine-tuned version of [bert-base-cased](https://huggingface.co/bert-base-cased) on an unknown dataset.
|
19 |
+
It achieves the following results on the evaluation set:
|
20 |
+
- Loss: 1.8246
|
21 |
+
- Accuracy: 0.6533
|
22 |
+
|
23 |
+
## Model description
|
24 |
+
|
25 |
+
More information needed
|
26 |
+
|
27 |
+
## Intended uses & limitations
|
28 |
+
|
29 |
+
More information needed
|
30 |
+
|
31 |
+
## Training and evaluation data
|
32 |
+
|
33 |
+
More information needed
|
34 |
+
|
35 |
+
## Training procedure
|
36 |
+
|
37 |
+
### Training hyperparameters
|
38 |
+
|
39 |
+
The following hyperparameters were used during training:
|
40 |
+
- learning_rate: 2e-05
|
41 |
+
- train_batch_size: 4
|
42 |
+
- eval_batch_size: 8
|
43 |
+
- seed: 42
|
44 |
+
- optimizer: Adam with betas=(0.9,0.999) and epsilon=1e-08
|
45 |
+
- lr_scheduler_type: linear
|
46 |
+
- num_epochs: 3
|
47 |
+
|
48 |
+
### Training results
|
49 |
+
|
50 |
+
| Training Loss | Epoch | Step | Validation Loss | Accuracy |
|
51 |
+
|:-------------:|:-----:|:-----:|:---------------:|:--------:|
|
52 |
+
| 0.7446 | 1.0 | 4030 | 0.8818 | 0.6436 |
|
53 |
+
| 0.6034 | 2.0 | 8060 | 1.2037 | 0.6589 |
|
54 |
+
| 0.4216 | 3.0 | 12090 | 1.8246 | 0.6533 |
|
55 |
+
|
56 |
+
|
57 |
+
### Framework versions
|
58 |
+
|
59 |
+
- Transformers 4.42.4
|
60 |
+
- Pytorch 2.2.1+cu121
|
61 |
+
- Datasets 2.20.0
|
62 |
+
- Tokenizers 0.19.1
|
config.json
ADDED
@@ -0,0 +1,37 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
1 |
+
{
|
2 |
+
"_name_or_path": "bert-base-cased",
|
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": "normal",
|
14 |
+
"1": "offensive",
|
15 |
+
"2": "hatespeech"
|
16 |
+
},
|
17 |
+
"initializer_range": 0.02,
|
18 |
+
"intermediate_size": 3072,
|
19 |
+
"label2id": {
|
20 |
+
"hatespeech": 2,
|
21 |
+
"normal": 0,
|
22 |
+
"offensive": 1
|
23 |
+
},
|
24 |
+
"layer_norm_eps": 1e-12,
|
25 |
+
"max_position_embeddings": 512,
|
26 |
+
"model_type": "bert",
|
27 |
+
"num_attention_heads": 12,
|
28 |
+
"num_hidden_layers": 12,
|
29 |
+
"pad_token_id": 0,
|
30 |
+
"position_embedding_type": "absolute",
|
31 |
+
"problem_type": "single_label_classification",
|
32 |
+
"torch_dtype": "float32",
|
33 |
+
"transformers_version": "4.42.4",
|
34 |
+
"type_vocab_size": 2,
|
35 |
+
"use_cache": true,
|
36 |
+
"vocab_size": 28996
|
37 |
+
}
|
model.safetensors
ADDED
@@ -0,0 +1,3 @@
|
|
|
|
|
|
|
|
|
1 |
+
version https://git-lfs.github.com/spec/v1
|
2 |
+
oid sha256:e941f063b794cbac43701a82364a4e52776c303d303450362733998023d89561
|
3 |
+
size 433273844
|
runs/Jul16_10-34-22_ip-10-192-12-104/events.out.tfevents.1721126115.ip-10-192-12-104.2815.0
ADDED
@@ -0,0 +1,3 @@
|
|
|
|
|
|
|
|
|
1 |
+
version https://git-lfs.github.com/spec/v1
|
2 |
+
oid sha256:f42dc04c17cff6e6134a7da10dcb6e4f8078b0a7c26587cf0712ec8ea83b39f5
|
3 |
+
size 4928
|
runs/Jul16_10-41-11_ip-10-192-12-104/events.out.tfevents.1721126472.ip-10-192-12-104.2815.1
ADDED
@@ -0,0 +1,3 @@
|
|
|
|
|
|
|
|
|
1 |
+
version https://git-lfs.github.com/spec/v1
|
2 |
+
oid sha256:b6bed8624a1e541affe12779c33b579fa768a2b761baf03882124273618c55a2
|
3 |
+
size 5027
|
runs/Jul16_10-43-51_ip-10-192-12-104/events.out.tfevents.1721126633.ip-10-192-12-104.2815.2
ADDED
@@ -0,0 +1,3 @@
|
|
|
|
|
|
|
|
|
1 |
+
version https://git-lfs.github.com/spec/v1
|
2 |
+
oid sha256:dfc041249185ee6d0e5073c847875de5779b19cc6d766b632911c232bbb5166e
|
3 |
+
size 5027
|
runs/Jul16_10-45-39_ip-10-192-12-104/events.out.tfevents.1721126761.ip-10-192-12-104.2815.3
ADDED
@@ -0,0 +1,3 @@
|
|
|
|
|
|
|
|
|
1 |
+
version https://git-lfs.github.com/spec/v1
|
2 |
+
oid sha256:b0accc74f5ba12e441cda5993f007b938ceb02c747233033cbbeea9a81242cbc
|
3 |
+
size 5027
|
runs/Jul16_10-45-39_ip-10-192-12-104/events.out.tfevents.1721126793.ip-10-192-12-104.2815.4
ADDED
@@ -0,0 +1,3 @@
|
|
|
|
|
|
|
|
|
1 |
+
version https://git-lfs.github.com/spec/v1
|
2 |
+
oid sha256:aa27a74e24b52be4ad1103e293b05c5add6ba4580baf20b8cfb1fb3dbfe60d0e
|
3 |
+
size 5076
|
runs/Jul16_10-45-39_ip-10-192-12-104/events.out.tfevents.1721126856.ip-10-192-12-104.2815.5
ADDED
@@ -0,0 +1,3 @@
|
|
|
|
|
|
|
|
|
1 |
+
version https://git-lfs.github.com/spec/v1
|
2 |
+
oid sha256:9df46cce004c104ea9ed784ee8b8cd8b2bc024ea1b2330834936d86e9eee61de
|
3 |
+
size 5076
|
runs/Jul16_10-45-39_ip-10-192-12-104/events.out.tfevents.1721126869.ip-10-192-12-104.2815.6
ADDED
@@ -0,0 +1,3 @@
|
|
|
|
|
|
|
|
|
1 |
+
version https://git-lfs.github.com/spec/v1
|
2 |
+
oid sha256:cf2652e3ea854314b5c6573a0732aa9eb6a5e89bcca7c89735a3fba337cae6df
|
3 |
+
size 5076
|
runs/Jul16_10-45-39_ip-10-192-12-104/events.out.tfevents.1721126882.ip-10-192-12-104.2815.7
ADDED
@@ -0,0 +1,3 @@
|
|
|
|
|
|
|
|
|
1 |
+
version https://git-lfs.github.com/spec/v1
|
2 |
+
oid sha256:db11287447e7c253a6fc5dcaaf69b73720a5a6d0b819a5335071749eb4928b51
|
3 |
+
size 5076
|
runs/Jul16_10-45-39_ip-10-192-12-104/events.out.tfevents.1721126913.ip-10-192-12-104.2815.8
ADDED
@@ -0,0 +1,3 @@
|
|
|
|
|
|
|
|
|
1 |
+
version https://git-lfs.github.com/spec/v1
|
2 |
+
oid sha256:d9c9867e6bd63a2c5c2e6bb5c83f79a938b935e54c01cef56d8654cfde4efc5c
|
3 |
+
size 5076
|
runs/Jul16_10-45-39_ip-10-192-12-104/events.out.tfevents.1721127076.ip-10-192-12-104.2815.9
ADDED
@@ -0,0 +1,3 @@
|
|
|
|
|
|
|
|
|
1 |
+
version https://git-lfs.github.com/spec/v1
|
2 |
+
oid sha256:17603136fefb1d1a6f15187e51b57b7c7c1d5afd4942ec52bf1590fbe3e2c277
|
3 |
+
size 5076
|
runs/Jul16_11-01-21_ip-10-192-12-104/events.out.tfevents.1721127698.ip-10-192-12-104.2815.10
ADDED
@@ -0,0 +1,3 @@
|
|
|
|
|
|
|
|
|
1 |
+
version https://git-lfs.github.com/spec/v1
|
2 |
+
oid sha256:54244da79e2d25e1680a517f8427a7a8d298a1d414aca9ee2bc9803a0411e120
|
3 |
+
size 5027
|
runs/Jul16_11-03-07_ip-10-192-12-104/events.out.tfevents.1721127789.ip-10-192-12-104.2815.11
ADDED
@@ -0,0 +1,3 @@
|
|
|
|
|
|
|
|
|
1 |
+
version https://git-lfs.github.com/spec/v1
|
2 |
+
oid sha256:5ab37d67529e835d82bd7422c74b0a7f64a60a454f99d360779e770f7e558a12
|
3 |
+
size 7616
|
runs/Jul16_18-51-37_ip-10-192-12-10/events.out.tfevents.1721155902.ip-10-192-12-10.1725.0
ADDED
@@ -0,0 +1,3 @@
|
|
|
|
|
|
|
|
|
1 |
+
version https://git-lfs.github.com/spec/v1
|
2 |
+
oid sha256:082d27cab73c8ed45a85623e161cb3bf7da325507375119c0d59dace4a5df186
|
3 |
+
size 11411
|
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": 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
ADDED
@@ -0,0 +1,3 @@
|
|
|
|
|
|
|
|
|
1 |
+
version https://git-lfs.github.com/spec/v1
|
2 |
+
oid sha256:4e29423ad850f53a47242d903223e8c6b44c4ca015b0d32f1e9203ba1e4506e5
|
3 |
+
size 5176
|
vocab.txt
ADDED
The diff for this file is too large to render.
See raw diff
|
|