Text Classification
Transformers
PyTorch
Safetensors
Arabic
bert
hate-speech
gender-based-violence
arabic
binary-classification
pilot
Eval Results (legacy)
text-embeddings-inference
Instructions to use thejosango/nuha-ajp-binary with libraries, inference providers, notebooks, and local apps. Follow these links to get started.
- Libraries
- Transformers
How to use thejosango/nuha-ajp-binary with Transformers:
# Use a pipeline as a high-level helper from transformers import pipeline pipe = pipeline("text-classification", model="thejosango/nuha-ajp-binary")# Load model directly from transformers import AutoTokenizer, AutoModelForSequenceClassification tokenizer = AutoTokenizer.from_pretrained("thejosango/nuha-ajp-binary") model = AutoModelForSequenceClassification.from_pretrained("thejosango/nuha-ajp-binary") - Notebooks
- Google Colab
- Kaggle
binary-34
Browse files- README.md +19 -18
- config.json +1 -1
- config.toml +8 -8
- pytorch_model.bin +2 -2
- tokenizer.json +1 -8
- tokenizer_config.json +0 -7
- training_args.bin +1 -1
README.md
CHANGED
|
@@ -23,13 +23,13 @@ model-index:
|
|
| 23 |
metrics:
|
| 24 |
- name: F1
|
| 25 |
type: f1
|
| 26 |
-
value: 0.
|
| 27 |
- name: Precision
|
| 28 |
type: precision
|
| 29 |
-
value: 0.
|
| 30 |
- name: Recall
|
| 31 |
type: recall
|
| 32 |
-
value: 0.
|
| 33 |
---
|
| 34 |
|
| 35 |
<!-- This model card has been generated automatically according to the information the Trainer had access to. You
|
|
@@ -39,10 +39,10 @@ should probably proofread and complete it, then remove this comment. -->
|
|
| 39 |
|
| 40 |
This model is a fine-tuned version of [thejosango/nuha-mlm](https://huggingface.co/thejosango/nuha-mlm) on the nuha-dataset dataset.
|
| 41 |
It achieves the following results on the evaluation set:
|
| 42 |
-
- Loss: 0.
|
| 43 |
-
- F1: 0.
|
| 44 |
-
- Precision: 0.
|
| 45 |
-
- Recall: 0.
|
| 46 |
- Support: None
|
| 47 |
|
| 48 |
## Model description
|
|
@@ -63,11 +63,9 @@ More information needed
|
|
| 63 |
|
| 64 |
The following hyperparameters were used during training:
|
| 65 |
- learning_rate: 5e-05
|
| 66 |
-
- train_batch_size:
|
| 67 |
-
- eval_batch_size:
|
| 68 |
- seed: 42
|
| 69 |
-
- gradient_accumulation_steps: 2
|
| 70 |
-
- total_train_batch_size: 64
|
| 71 |
- optimizer: Adam with betas=(0.9,0.999) and epsilon=1e-08
|
| 72 |
- lr_scheduler_type: linear
|
| 73 |
- num_epochs: 30
|
|
@@ -77,13 +75,16 @@ The following hyperparameters were used during training:
|
|
| 77 |
|
| 78 |
| Training Loss | Epoch | Step | Validation Loss | F1 | Precision | Recall | Support |
|
| 79 |
|:-------------:|:-----:|:----:|:---------------:|:------:|:---------:|:------:|:-------:|
|
| 80 |
-
| 0.
|
| 81 |
-
| 0.
|
| 82 |
-
| 0.
|
| 83 |
-
| 0.
|
| 84 |
-
| 0.
|
| 85 |
-
| 0.
|
| 86 |
-
| 0.
|
|
|
|
|
|
|
|
|
|
| 87 |
|
| 88 |
|
| 89 |
### Framework versions
|
|
|
|
| 23 |
metrics:
|
| 24 |
- name: F1
|
| 25 |
type: f1
|
| 26 |
+
value: 0.6843479680104456
|
| 27 |
- name: Precision
|
| 28 |
type: precision
|
| 29 |
+
value: 0.6129220874141208
|
| 30 |
- name: Recall
|
| 31 |
type: recall
|
| 32 |
+
value: 0.7746166635876593
|
| 33 |
---
|
| 34 |
|
| 35 |
<!-- This model card has been generated automatically according to the information the Trainer had access to. You
|
|
|
|
| 39 |
|
| 40 |
This model is a fine-tuned version of [thejosango/nuha-mlm](https://huggingface.co/thejosango/nuha-mlm) on the nuha-dataset dataset.
|
| 41 |
It achieves the following results on the evaluation set:
|
| 42 |
+
- Loss: 0.6703
|
| 43 |
+
- F1: 0.6843
|
| 44 |
+
- Precision: 0.6129
|
| 45 |
+
- Recall: 0.7746
|
| 46 |
- Support: None
|
| 47 |
|
| 48 |
## Model description
|
|
|
|
| 63 |
|
| 64 |
The following hyperparameters were used during training:
|
| 65 |
- learning_rate: 5e-05
|
| 66 |
+
- train_batch_size: 64
|
| 67 |
+
- eval_batch_size: 64
|
| 68 |
- seed: 42
|
|
|
|
|
|
|
| 69 |
- optimizer: Adam with betas=(0.9,0.999) and epsilon=1e-08
|
| 70 |
- lr_scheduler_type: linear
|
| 71 |
- num_epochs: 30
|
|
|
|
| 75 |
|
| 76 |
| Training Loss | Epoch | Step | Validation Loss | F1 | Precision | Recall | Support |
|
| 77 |
|:-------------:|:-----:|:----:|:---------------:|:------:|:---------:|:------:|:-------:|
|
| 78 |
+
| 0.5719 | 0.37 | 500 | 0.5269 | 0.6734 | 0.6553 | 0.6926 | None |
|
| 79 |
+
| 0.546 | 0.74 | 1000 | 0.5745 | 0.6825 | 0.5624 | 0.8679 | None |
|
| 80 |
+
| 0.5263 | 1.11 | 1500 | 0.5165 | 0.6978 | 0.6526 | 0.7497 | None |
|
| 81 |
+
| 0.4871 | 1.48 | 2000 | 0.5864 | 0.6893 | 0.5803 | 0.8489 | None |
|
| 82 |
+
| 0.4888 | 1.85 | 2500 | 0.5491 | 0.7030 | 0.6296 | 0.7957 | None |
|
| 83 |
+
| 0.4133 | 2.22 | 3000 | 0.5504 | 0.6946 | 0.6394 | 0.7602 | None |
|
| 84 |
+
| 0.4146 | 2.58 | 3500 | 0.5977 | 0.6898 | 0.6076 | 0.7977 | None |
|
| 85 |
+
| 0.4132 | 2.95 | 4000 | 0.6111 | 0.6906 | 0.5994 | 0.8145 | None |
|
| 86 |
+
| 0.353 | 3.32 | 4500 | 0.6571 | 0.6853 | 0.6047 | 0.7907 | None |
|
| 87 |
+
| 0.3524 | 3.69 | 5000 | 0.6703 | 0.6843 | 0.6129 | 0.7746 | None |
|
| 88 |
|
| 89 |
|
| 90 |
### Framework versions
|
config.json
CHANGED
|
@@ -23,7 +23,7 @@
|
|
| 23 |
"max_position_embeddings": 512,
|
| 24 |
"model_type": "bert",
|
| 25 |
"num_attention_heads": 12,
|
| 26 |
-
"num_hidden_layers":
|
| 27 |
"pad_token_id": 0,
|
| 28 |
"position_embedding_type": "absolute",
|
| 29 |
"problem_type": "single_label_classification",
|
|
|
|
| 23 |
"max_position_embeddings": 512,
|
| 24 |
"model_type": "bert",
|
| 25 |
"num_attention_heads": 12,
|
| 26 |
+
"num_hidden_layers": 12,
|
| 27 |
"pad_token_id": 0,
|
| 28 |
"position_embedding_type": "absolute",
|
| 29 |
"problem_type": "single_label_classification",
|
config.toml
CHANGED
|
@@ -1,5 +1,5 @@
|
|
| 1 |
[experiment]
|
| 2 |
-
name = "binary-
|
| 3 |
type = "binary"
|
| 4 |
|
| 5 |
|
|
@@ -12,19 +12,19 @@ undersampling_strategy = "majority"
|
|
| 12 |
|
| 13 |
[model]
|
| 14 |
pretrained_model_name_or_path = "thejosango/nuha-mlm"
|
| 15 |
-
revision = "
|
| 16 |
|
| 17 |
|
| 18 |
[training]
|
| 19 |
-
num_train_epochs = 30
|
| 20 |
-
warmup_steps = 0
|
| 21 |
lr_scheduler_type = "linear"
|
| 22 |
learning_rate = 5e-5
|
| 23 |
-
per_device_train_batch_size =
|
| 24 |
-
per_device_eval_batch_size =
|
| 25 |
-
gradient_accumulation_steps =
|
| 26 |
weight_decay = 0.01
|
| 27 |
label_smoothing_factor = 0.1
|
| 28 |
-
weighted_loss = false
|
| 29 |
early_stopping_patience = 5
|
| 30 |
early_stopping_threshold = 0.005
|
|
|
|
| 1 |
[experiment]
|
| 2 |
+
name = "binary-34"
|
| 3 |
type = "binary"
|
| 4 |
|
| 5 |
|
|
|
|
| 12 |
|
| 13 |
[model]
|
| 14 |
pretrained_model_name_or_path = "thejosango/nuha-mlm"
|
| 15 |
+
revision = "main"
|
| 16 |
|
| 17 |
|
| 18 |
[training]
|
| 19 |
+
num_train_epochs = 30
|
| 20 |
+
warmup_steps = 0
|
| 21 |
lr_scheduler_type = "linear"
|
| 22 |
learning_rate = 5e-5
|
| 23 |
+
per_device_train_batch_size = 64
|
| 24 |
+
per_device_eval_batch_size = 64
|
| 25 |
+
gradient_accumulation_steps = 1
|
| 26 |
weight_decay = 0.01
|
| 27 |
label_smoothing_factor = 0.1
|
| 28 |
+
weighted_loss = false
|
| 29 |
early_stopping_patience = 5
|
| 30 |
early_stopping_threshold = 0.005
|
pytorch_model.bin
CHANGED
|
@@ -1,3 +1,3 @@
|
|
| 1 |
version https://git-lfs.github.com/spec/v1
|
| 2 |
-
oid sha256:
|
| 3 |
-
size
|
|
|
|
| 1 |
version https://git-lfs.github.com/spec/v1
|
| 2 |
+
oid sha256:124dde1bf6384539fd41ca2c0139a1f484f4ceab637056c26ad7e72c20d7e148
|
| 3 |
+
size 540847921
|
tokenizer.json
CHANGED
|
@@ -6,14 +6,7 @@
|
|
| 6 |
"strategy": "LongestFirst",
|
| 7 |
"stride": 0
|
| 8 |
},
|
| 9 |
-
"padding":
|
| 10 |
-
"strategy": "BatchLongest",
|
| 11 |
-
"direction": "Right",
|
| 12 |
-
"pad_to_multiple_of": null,
|
| 13 |
-
"pad_id": 0,
|
| 14 |
-
"pad_type_id": 0,
|
| 15 |
-
"pad_token": "[PAD]"
|
| 16 |
-
},
|
| 17 |
"added_tokens": [
|
| 18 |
{
|
| 19 |
"id": 0,
|
|
|
|
| 6 |
"strategy": "LongestFirst",
|
| 7 |
"stride": 0
|
| 8 |
},
|
| 9 |
+
"padding": null,
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 10 |
"added_tokens": [
|
| 11 |
{
|
| 12 |
"id": 0,
|
tokenizer_config.json
CHANGED
|
@@ -5,24 +5,17 @@
|
|
| 5 |
"do_lower_case": false,
|
| 6 |
"mask_token": "[MASK]",
|
| 7 |
"max_len": 512,
|
| 8 |
-
"max_length": 512,
|
| 9 |
"model_max_length": 512,
|
| 10 |
"never_split": [
|
| 11 |
"[بريد]",
|
| 12 |
"[مستخدم]",
|
| 13 |
"[رابط]"
|
| 14 |
],
|
| 15 |
-
"pad_to_multiple_of": null,
|
| 16 |
"pad_token": "[PAD]",
|
| 17 |
-
"pad_token_type_id": 0,
|
| 18 |
-
"padding_side": "right",
|
| 19 |
"sep_token": "[SEP]",
|
| 20 |
-
"stride": 0,
|
| 21 |
"strip_accents": null,
|
| 22 |
"tokenize_chinese_chars": true,
|
| 23 |
"tokenizer_class": "BertTokenizer",
|
| 24 |
-
"truncation_side": "right",
|
| 25 |
-
"truncation_strategy": "longest_first",
|
| 26 |
"unk_token": "[UNK]",
|
| 27 |
"use_fast": true
|
| 28 |
}
|
|
|
|
| 5 |
"do_lower_case": false,
|
| 6 |
"mask_token": "[MASK]",
|
| 7 |
"max_len": 512,
|
|
|
|
| 8 |
"model_max_length": 512,
|
| 9 |
"never_split": [
|
| 10 |
"[بريد]",
|
| 11 |
"[مستخدم]",
|
| 12 |
"[رابط]"
|
| 13 |
],
|
|
|
|
| 14 |
"pad_token": "[PAD]",
|
|
|
|
|
|
|
| 15 |
"sep_token": "[SEP]",
|
|
|
|
| 16 |
"strip_accents": null,
|
| 17 |
"tokenize_chinese_chars": true,
|
| 18 |
"tokenizer_class": "BertTokenizer",
|
|
|
|
|
|
|
| 19 |
"unk_token": "[UNK]",
|
| 20 |
"use_fast": true
|
| 21 |
}
|
training_args.bin
CHANGED
|
@@ -1,3 +1,3 @@
|
|
| 1 |
version https://git-lfs.github.com/spec/v1
|
| 2 |
-
oid sha256:
|
| 3 |
size 4091
|
|
|
|
| 1 |
version https://git-lfs.github.com/spec/v1
|
| 2 |
+
oid sha256:c00b37a67e5dfc7f98a1ae7c6cc19fa8db64609170e8d2528fe98804c957eec8
|
| 3 |
size 4091
|