jab11769 commited on
Commit
4a0a1b5
·
verified ·
1 Parent(s): 4797fb6

Sentiment analysis for stock news

Browse files
README.md ADDED
@@ -0,0 +1,75 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ ---
2
+ library_name: transformers
3
+ base_model: airesearch/wangchanberta-base-att-spm-uncased
4
+ tags:
5
+ - generated_from_trainer
6
+ metrics:
7
+ - accuracy
8
+ - precision
9
+ - recall
10
+ - f1
11
+ model-index:
12
+ - name: results
13
+ results: []
14
+ ---
15
+
16
+ <!-- This model card has been generated automatically according to the information the Trainer had access to. You
17
+ should probably proofread and complete it, then remove this comment. -->
18
+
19
+ # results
20
+
21
+ This model is a fine-tuned version of [airesearch/wangchanberta-base-att-spm-uncased](https://huggingface.co/airesearch/wangchanberta-base-att-spm-uncased) on the None dataset.
22
+ It achieves the following results on the evaluation set:
23
+ - Loss: 0.3038
24
+ - Accuracy: 0.9587
25
+ - Precision: 0.9594
26
+ - Recall: 0.9587
27
+ - F1: 0.9589
28
+
29
+ ## Model description
30
+
31
+ More information needed
32
+
33
+ ## Intended uses & limitations
34
+
35
+ More information needed
36
+
37
+ ## Training and evaluation data
38
+
39
+ More information needed
40
+
41
+ ## Training procedure
42
+
43
+ ### Training hyperparameters
44
+
45
+ The following hyperparameters were used during training:
46
+ - learning_rate: 2e-05
47
+ - train_batch_size: 16
48
+ - eval_batch_size: 16
49
+ - seed: 42
50
+ - optimizer: Use OptimizerNames.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: 10
53
+
54
+ ### Training results
55
+
56
+ | Training Loss | Epoch | Step | Validation Loss | Accuracy | Precision | Recall | F1 |
57
+ |:-------------:|:-----:|:-----:|:---------------:|:--------:|:---------:|:------:|:------:|
58
+ | 0.5153 | 1.0 | 1154 | 0.5267 | 0.7811 | 0.8214 | 0.7811 | 0.7825 |
59
+ | 0.2142 | 2.0 | 2308 | 0.2754 | 0.9223 | 0.9285 | 0.9223 | 0.9233 |
60
+ | 0.1629 | 3.0 | 3462 | 0.3064 | 0.9242 | 0.9337 | 0.9242 | 0.9258 |
61
+ | 0.0114 | 4.0 | 4616 | 0.2063 | 0.9546 | 0.9562 | 0.9546 | 0.9547 |
62
+ | 0.0168 | 5.0 | 5770 | 0.2266 | 0.9521 | 0.9540 | 0.9521 | 0.9523 |
63
+ | 0.0166 | 6.0 | 6924 | 0.2503 | 0.9543 | 0.9556 | 0.9543 | 0.9544 |
64
+ | 0.0716 | 7.0 | 8078 | 0.2382 | 0.9607 | 0.9618 | 0.9607 | 0.9609 |
65
+ | 0.0006 | 8.0 | 9232 | 0.2849 | 0.9536 | 0.9551 | 0.9536 | 0.9538 |
66
+ | 0.0001 | 9.0 | 10386 | 0.2501 | 0.9641 | 0.9649 | 0.9641 | 0.9642 |
67
+ | 0.0005 | 10.0 | 11540 | 0.2606 | 0.9610 | 0.9619 | 0.9610 | 0.9611 |
68
+
69
+
70
+ ### Framework versions
71
+
72
+ - Transformers 4.51.3
73
+ - Pytorch 2.6.0+cu124
74
+ - Datasets 3.5.0
75
+ - Tokenizers 0.21.1
config.json ADDED
@@ -0,0 +1,39 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ {
2
+ "architectures": [
3
+ "CamembertForSequenceClassification"
4
+ ],
5
+ "attention_probs_dropout_prob": 0.1,
6
+ "bos_token_id": 0,
7
+ "classifier_dropout": null,
8
+ "eos_token_id": 2,
9
+ "gradient_checkpointing": false,
10
+ "hidden_act": "gelu",
11
+ "hidden_dropout_prob": 0.1,
12
+ "hidden_size": 768,
13
+ "id2label": {
14
+ "0": "Positive",
15
+ "1": "Neutral",
16
+ "2": "Negative"
17
+ },
18
+ "initializer_range": 0.02,
19
+ "intermediate_size": 3072,
20
+ "label2id": {
21
+ "Negative": 2,
22
+ "Neutral": 1,
23
+ "Positive": 0
24
+ },
25
+ "layer_norm_eps": 1e-12,
26
+ "max_position_embeddings": 512,
27
+ "model_type": "camembert",
28
+ "num_attention_head": 12,
29
+ "num_attention_heads": 12,
30
+ "num_hidden_layers": 12,
31
+ "pad_token_id": 1,
32
+ "position_embedding_type": "absolute",
33
+ "problem_type": "single_label_classification",
34
+ "torch_dtype": "float32",
35
+ "transformers_version": "4.51.3",
36
+ "type_vocab_size": 1,
37
+ "use_cache": true,
38
+ "vocab_size": 25005
39
+ }
model.safetensors ADDED
@@ -0,0 +1,3 @@
 
 
 
 
1
+ version https://git-lfs.github.com/spec/v1
2
+ oid sha256:f7515569019d5f0133571388d9637855f3451dbdc5128ccdb63a2db14e978473
3
+ size 421011004
sentencepiece.bpe.model ADDED
@@ -0,0 +1,3 @@
 
 
 
 
1
+ version https://git-lfs.github.com/spec/v1
2
+ oid sha256:49c4ba4e495ddf31eb2fdba7fc6aef3c233091d25d35bc9d24694ccf48ae114c
3
+ size 904693
special_tokens_map.json ADDED
@@ -0,0 +1,20 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ {
2
+ "additional_special_tokens": [
3
+ "<s>NOTUSED",
4
+ "</s>NOTUSED",
5
+ "<_>"
6
+ ],
7
+ "bos_token": "<s>",
8
+ "cls_token": "<s>",
9
+ "eos_token": "</s>",
10
+ "mask_token": {
11
+ "content": "<mask>",
12
+ "lstrip": true,
13
+ "normalized": false,
14
+ "rstrip": false,
15
+ "single_word": false
16
+ },
17
+ "pad_token": "<pad>",
18
+ "sep_token": "</s>",
19
+ "unk_token": "<unk>"
20
+ }
tokenizer.json ADDED
The diff for this file is too large to render. See raw diff
 
tokenizer_config.json ADDED
@@ -0,0 +1,85 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ {
2
+ "added_tokens_decoder": {
3
+ "0": {
4
+ "content": "<s>NOTUSED",
5
+ "lstrip": false,
6
+ "normalized": false,
7
+ "rstrip": false,
8
+ "single_word": false,
9
+ "special": true
10
+ },
11
+ "1": {
12
+ "content": "<pad>",
13
+ "lstrip": false,
14
+ "normalized": false,
15
+ "rstrip": false,
16
+ "single_word": false,
17
+ "special": true
18
+ },
19
+ "2": {
20
+ "content": "</s>NOTUSED",
21
+ "lstrip": false,
22
+ "normalized": false,
23
+ "rstrip": false,
24
+ "single_word": false,
25
+ "special": true
26
+ },
27
+ "3": {
28
+ "content": "<unk>",
29
+ "lstrip": false,
30
+ "normalized": false,
31
+ "rstrip": false,
32
+ "single_word": false,
33
+ "special": true
34
+ },
35
+ "5": {
36
+ "content": "<s>",
37
+ "lstrip": false,
38
+ "normalized": false,
39
+ "rstrip": false,
40
+ "single_word": false,
41
+ "special": true
42
+ },
43
+ "6": {
44
+ "content": "</s>",
45
+ "lstrip": false,
46
+ "normalized": false,
47
+ "rstrip": false,
48
+ "single_word": false,
49
+ "special": true
50
+ },
51
+ "8": {
52
+ "content": "<_>",
53
+ "lstrip": false,
54
+ "normalized": false,
55
+ "rstrip": false,
56
+ "single_word": false,
57
+ "special": false
58
+ },
59
+ "25004": {
60
+ "content": "<mask>",
61
+ "lstrip": true,
62
+ "normalized": false,
63
+ "rstrip": false,
64
+ "single_word": false,
65
+ "special": true
66
+ }
67
+ },
68
+ "additional_special_tokens": [
69
+ "<s>NOTUSED",
70
+ "</s>NOTUSED",
71
+ "<_>"
72
+ ],
73
+ "bos_token": "<s>",
74
+ "clean_up_tokenization_spaces": false,
75
+ "cls_token": "<s>",
76
+ "eos_token": "</s>",
77
+ "extra_special_tokens": {},
78
+ "mask_token": "<mask>",
79
+ "model_max_length": 1000000000000000019884624838656,
80
+ "pad_token": "<pad>",
81
+ "sep_token": "</s>",
82
+ "sp_model_kwargs": {},
83
+ "tokenizer_class": "CamembertTokenizer",
84
+ "unk_token": "<unk>"
85
+ }
training_args.bin ADDED
@@ -0,0 +1,3 @@
 
 
 
 
1
+ version https://git-lfs.github.com/spec/v1
2
+ oid sha256:ccff96e5b734f80c9c49e2ba052f96b72cd5820e6b4274645848c1a7ba99146f
3
+ size 5304