ndsanjana commited on
Commit
affcb13
·
verified ·
1 Parent(s): bd9bd3d

Bert fine tuned model for twitter sentiment analysis

Browse files
README.md ADDED
@@ -0,0 +1,70 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ ---
2
+ library_name: transformers
3
+ license: apache-2.0
4
+ base_model: bert-base-uncased
5
+ tags:
6
+ - generated_from_trainer
7
+ metrics:
8
+ - f1
9
+ - accuracy
10
+ model-index:
11
+ - name: bert-finetuned-twitter_sentiment_analysis
12
+ results: []
13
+ ---
14
+
15
+ <!-- This model card has been generated automatically according to the information the Trainer had access to. You
16
+ should probably proofread and complete it, then remove this comment. -->
17
+
18
+ # bert-finetuned-twitter_sentiment_analysis
19
+
20
+ This model is a fine-tuned version of [bert-base-uncased](https://huggingface.co/bert-base-uncased) on the None dataset.
21
+ It achieves the following results on the evaluation set:
22
+ - Loss: 0.4175
23
+ - F1: 0.7741
24
+ - Roc Auc: 0.8301
25
+ - Accuracy: 0.7639
26
+
27
+ ## Model description
28
+
29
+ More information needed
30
+
31
+ ## Intended uses & limitations
32
+
33
+ More information needed
34
+
35
+ ## Training and evaluation data
36
+
37
+ More information needed
38
+
39
+ ## Training procedure
40
+
41
+ ### Training hyperparameters
42
+
43
+ The following hyperparameters were used during training:
44
+ - learning_rate: 3e-05
45
+ - train_batch_size: 16
46
+ - eval_batch_size: 16
47
+ - seed: 42
48
+ - gradient_accumulation_steps: 2
49
+ - total_train_batch_size: 32
50
+ - optimizer: Use adamw_torch with betas=(0.9,0.999) and epsilon=1e-08 and optimizer_args=No additional optimizer arguments
51
+ - lr_scheduler_type: linear
52
+ - num_epochs: 5
53
+
54
+ ### Training results
55
+
56
+ | Training Loss | Epoch | Step | Validation Loss | F1 | Roc Auc | Accuracy |
57
+ |:-------------:|:-----:|:----:|:---------------:|:------:|:-------:|:--------:|
58
+ | No log | 1.0 | 197 | 0.3546 | 0.7613 | 0.8172 | 0.7210 |
59
+ | No log | 2.0 | 394 | 0.3312 | 0.7622 | 0.8151 | 0.6924 |
60
+ | 0.3121 | 3.0 | 591 | 0.3511 | 0.7699 | 0.8244 | 0.7368 |
61
+ | 0.3121 | 4.0 | 788 | 0.4018 | 0.7833 | 0.8355 | 0.7654 |
62
+ | 0.3121 | 5.0 | 985 | 0.4175 | 0.7741 | 0.8301 | 0.7639 |
63
+
64
+
65
+ ### Framework versions
66
+
67
+ - Transformers 4.46.3
68
+ - Pytorch 2.4.1+cu121
69
+ - Datasets 3.2.0
70
+ - Tokenizers 0.20.3
config.json ADDED
@@ -0,0 +1,37 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
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": "Right",
14
+ "1": "Left",
15
+ "2": "Neutral"
16
+ },
17
+ "initializer_range": 0.02,
18
+ "intermediate_size": 3072,
19
+ "label2id": {
20
+ "Left": 1,
21
+ "Neutral": 2,
22
+ "Right": 0
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": "multi_label_classification",
32
+ "torch_dtype": "float32",
33
+ "transformers_version": "4.46.3",
34
+ "type_vocab_size": 2,
35
+ "use_cache": true,
36
+ "vocab_size": 30522
37
+ }
model.safetensors ADDED
@@ -0,0 +1,3 @@
 
 
 
 
1
+ version https://git-lfs.github.com/spec/v1
2
+ oid sha256:8c7416b73ce1bc8e79f948790cc125e23a27e48db70aba071b78ee3e202f2412
3
+ size 437961724
runs/Jan12_13-30-57_90b8ee4f6ada/events.out.tfevents.1736688658.90b8ee4f6ada.40.0 ADDED
@@ -0,0 +1,3 @@
 
 
 
 
1
+ version https://git-lfs.github.com/spec/v1
2
+ oid sha256:1a0e168a7f9c6e36e86c2b261adbdfee01213a4f324e68f746cea3956a671931
3
+ size 7763
runs/Jan12_14-15-24_90b8ee4f6ada/events.out.tfevents.1736691325.90b8ee4f6ada.40.1 ADDED
@@ -0,0 +1,3 @@
 
 
 
 
1
+ version https://git-lfs.github.com/spec/v1
2
+ oid sha256:37cb949d0e9de9eff40bd1684c4393880af6ada2a989b9b1c07384b4de8e7459
3
+ size 7982
runs/Jan12_14-34-42_90b8ee4f6ada/events.out.tfevents.1736692483.90b8ee4f6ada.40.2 ADDED
@@ -0,0 +1,3 @@
 
 
 
 
1
+ version https://git-lfs.github.com/spec/v1
2
+ oid sha256:d23b50e592635c9a3ddfeaabefbac943bb250b318a5d4fc5dc87e32e46d0b2ca
3
+ size 4184
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": false,
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:f94c41f2943b6b3ca6dfee60bb1063b05d5d44d200567737876ef37ff9a195dd
3
+ size 5368
vocab.txt ADDED
The diff for this file is too large to render. See raw diff