Upload 12 files
Browse files- README.md +33 -0
- config.json +33 -0
- model.safetensors +3 -0
- optimizer.pt +3 -0
- rng_state.pth +3 -0
- scheduler.pt +3 -0
- special_tokens_map.json +7 -0
- tokenizer.json +0 -0
- tokenizer_config.json +57 -0
- trainer_state.json +63 -0
- training_args.bin +3 -0
- vocab.txt +0 -0
README.md
ADDED
@@ -0,0 +1,33 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
1 |
+
### Model Summary
|
2 |
+
|
3 |
+
This model is a sentiment classification model fine-tuned on top of mBERTu, a state-of-the-art Maltese language model based on multilingual BERT. It is designed to analyze the sentiment of text in the Maltese language and classify it into different sentiment categories.
|
4 |
+
|
5 |
+
### Dataset
|
6 |
+
|
7 |
+
The model was fine-tuned on a dataset containing Maltese text with sentiment labels. The dataset consists of text samples in the Maltese language, each labeled with one of the following sentiment categories:
|
8 |
+
- Positive
|
9 |
+
- Neutral
|
10 |
+
|
11 |
+
### Model Architecture
|
12 |
+
|
13 |
+
The model utilizes the mBERTu architecture, which is a variant of BERT (Bidirectional Encoder Representations from Transformers) specifically optimized for the Maltese language. BERTu is known for its ability to capture contextual information from text and is pre-trained on a large corpus of Maltese text.
|
14 |
+
|
15 |
+
### Fine-Tuning
|
16 |
+
|
17 |
+
Fine-tuning is the process of adapting a pre-trained model to a specific task, in this case, sentiment classification. The model was fine-tuned on the sentiment-labeled Maltese text dataset using transfer learning. The fine-tuning process involves updating the model's weights and parameters to make it proficient at sentiment analysis.
|
18 |
+
|
19 |
+
### Performance
|
20 |
+
|
21 |
+
The model's performance can be assessed through various evaluation metrics, including accuracy, precision, recall, and F1-score. It has been fine-tuned to achieve high accuracy in classifying text into the sentiment categories.
|
22 |
+
|
23 |
+
### Usage
|
24 |
+
|
25 |
+
You can use this model for sentiment analysis of Maltese text. Given a text input, the model can predict whether the sentiment is positive, negative, or neutral. It can be integrated into applications, chatbots, or services to automatically assess the sentiment of user-generated content.
|
26 |
+
|
27 |
+
### License
|
28 |
+
|
29 |
+
The model is made available under a specific license, and it's important to refer to the terms and conditions of use provided by the model's creator.
|
30 |
+
|
31 |
+
### Creator
|
32 |
+
|
33 |
+
This fine-tuned sentiment classification model on mBERTu for Maltese is the work of [Daniil Gurgurov].
|
config.json
ADDED
@@ -0,0 +1,33 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
1 |
+
{
|
2 |
+
"_name_or_path": "MLRS/mBERTu",
|
3 |
+
"architectures": [
|
4 |
+
"BertForSequenceClassification"
|
5 |
+
],
|
6 |
+
"attention_probs_dropout_prob": 0.1,
|
7 |
+
"classifier_dropout": null,
|
8 |
+
"directionality": "bidi",
|
9 |
+
"gradient_checkpointing": false,
|
10 |
+
"hidden_act": "gelu",
|
11 |
+
"hidden_dropout_prob": 0.1,
|
12 |
+
"hidden_size": 768,
|
13 |
+
"initializer_range": 0.02,
|
14 |
+
"intermediate_size": 3072,
|
15 |
+
"layer_norm_eps": 1e-12,
|
16 |
+
"max_position_embeddings": 512,
|
17 |
+
"model_type": "bert",
|
18 |
+
"num_attention_heads": 12,
|
19 |
+
"num_hidden_layers": 12,
|
20 |
+
"pad_token_id": 0,
|
21 |
+
"pooler_fc_size": 768,
|
22 |
+
"pooler_num_attention_heads": 12,
|
23 |
+
"pooler_num_fc_layers": 3,
|
24 |
+
"pooler_size_per_head": 128,
|
25 |
+
"pooler_type": "first_token_transform",
|
26 |
+
"position_embedding_type": "absolute",
|
27 |
+
"problem_type": "single_label_classification",
|
28 |
+
"torch_dtype": "float32",
|
29 |
+
"transformers_version": "4.35.2",
|
30 |
+
"type_vocab_size": 2,
|
31 |
+
"use_cache": true,
|
32 |
+
"vocab_size": 119547
|
33 |
+
}
|
model.safetensors
ADDED
@@ -0,0 +1,3 @@
|
|
|
|
|
|
|
|
|
1 |
+
version https://git-lfs.github.com/spec/v1
|
2 |
+
oid sha256:855ee6d29e7371cfdef92bceae93ae41c5b71066d03a66a0a56a314666973291
|
3 |
+
size 711443456
|
optimizer.pt
ADDED
@@ -0,0 +1,3 @@
|
|
|
|
|
|
|
|
|
1 |
+
version https://git-lfs.github.com/spec/v1
|
2 |
+
oid sha256:dcae910d692681a683d7b648f5c97d10434e8fe891e014d05615407e12e05616
|
3 |
+
size 1423007930
|
rng_state.pth
ADDED
@@ -0,0 +1,3 @@
|
|
|
|
|
|
|
|
|
1 |
+
version https://git-lfs.github.com/spec/v1
|
2 |
+
oid sha256:992edea9e6cdc72c09e6a348a5bc78e90ae15b52eb7c15095de9744c0fee8ebb
|
3 |
+
size 14244
|
scheduler.pt
ADDED
@@ -0,0 +1,3 @@
|
|
|
|
|
|
|
|
|
1 |
+
version https://git-lfs.github.com/spec/v1
|
2 |
+
oid sha256:f6a1e3232c9dd0558d3b582345b4a537ca2d63d9ae2df7d7189cbdc92c4e384f
|
3 |
+
size 1064
|
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,57 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
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_basic_tokenize": true,
|
47 |
+
"do_lower_case": false,
|
48 |
+
"mask_token": "[MASK]",
|
49 |
+
"model_max_length": 512,
|
50 |
+
"never_split": null,
|
51 |
+
"pad_token": "[PAD]",
|
52 |
+
"sep_token": "[SEP]",
|
53 |
+
"strip_accents": null,
|
54 |
+
"tokenize_chinese_chars": true,
|
55 |
+
"tokenizer_class": "BertTokenizer",
|
56 |
+
"unk_token": "[UNK]"
|
57 |
+
}
|
trainer_state.json
ADDED
@@ -0,0 +1,63 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
1 |
+
{
|
2 |
+
"best_metric": 1.4215906858444214,
|
3 |
+
"best_model_checkpoint": "./bertu_sentiment_finetuned/checkpoint-1000",
|
4 |
+
"epoch": 200.0,
|
5 |
+
"eval_steps": 1000,
|
6 |
+
"global_step": 2000,
|
7 |
+
"is_hyper_param_search": false,
|
8 |
+
"is_local_process_zero": true,
|
9 |
+
"is_world_process_zero": true,
|
10 |
+
"log_history": [
|
11 |
+
{
|
12 |
+
"epoch": 50.0,
|
13 |
+
"learning_rate": 7.500000000000001e-05,
|
14 |
+
"loss": 0.0306,
|
15 |
+
"step": 500
|
16 |
+
},
|
17 |
+
{
|
18 |
+
"epoch": 100.0,
|
19 |
+
"learning_rate": 5e-05,
|
20 |
+
"loss": 0.0,
|
21 |
+
"step": 1000
|
22 |
+
},
|
23 |
+
{
|
24 |
+
"epoch": 100.0,
|
25 |
+
"eval_accuracy": 0.8352941176470589,
|
26 |
+
"eval_f1": 0.7666666666666667,
|
27 |
+
"eval_loss": 1.4215906858444214,
|
28 |
+
"eval_runtime": 1.8326,
|
29 |
+
"eval_samples_per_second": 46.383,
|
30 |
+
"eval_steps_per_second": 1.091,
|
31 |
+
"step": 1000
|
32 |
+
},
|
33 |
+
{
|
34 |
+
"epoch": 150.0,
|
35 |
+
"learning_rate": 2.5e-05,
|
36 |
+
"loss": 0.0,
|
37 |
+
"step": 1500
|
38 |
+
},
|
39 |
+
{
|
40 |
+
"epoch": 200.0,
|
41 |
+
"learning_rate": 0.0,
|
42 |
+
"loss": 0.0,
|
43 |
+
"step": 2000
|
44 |
+
},
|
45 |
+
{
|
46 |
+
"epoch": 200.0,
|
47 |
+
"eval_accuracy": 0.8470588235294118,
|
48 |
+
"eval_f1": 0.7796610169491527,
|
49 |
+
"eval_loss": 1.4892604351043701,
|
50 |
+
"eval_runtime": 1.6492,
|
51 |
+
"eval_samples_per_second": 51.542,
|
52 |
+
"eval_steps_per_second": 1.213,
|
53 |
+
"step": 2000
|
54 |
+
}
|
55 |
+
],
|
56 |
+
"logging_steps": 500,
|
57 |
+
"max_steps": 2000,
|
58 |
+
"num_train_epochs": 200,
|
59 |
+
"save_steps": 1000,
|
60 |
+
"total_flos": 3.131021558784e+16,
|
61 |
+
"trial_name": null,
|
62 |
+
"trial_params": null
|
63 |
+
}
|
training_args.bin
ADDED
@@ -0,0 +1,3 @@
|
|
|
|
|
|
|
|
|
1 |
+
version https://git-lfs.github.com/spec/v1
|
2 |
+
oid sha256:4bba5e508e8e53a8d73456214b0ff323aa896d83ec3467ffee358edda490febb
|
3 |
+
size 4536
|
vocab.txt
ADDED
The diff for this file is too large to render.
See raw diff
|
|