Text Classification
Transformers
PyTorch
Arabic
bert
hate-speech
gender-based-violence
arabic
binary-classification
pilot
Eval Results (legacy)
text-embeddings-inference
Instructions to use thejosango/nuha-binary with libraries, inference providers, notebooks, and local apps. Follow these links to get started.
- Libraries
- Transformers
How to use thejosango/nuha-binary with Transformers:
# Use a pipeline as a high-level helper from transformers import pipeline pipe = pipeline("text-classification", model="thejosango/nuha-binary")# Load model directly from transformers import AutoTokenizer, AutoModelForSequenceClassification tokenizer = AutoTokenizer.from_pretrained("thejosango/nuha-binary") model = AutoModelForSequenceClassification.from_pretrained("thejosango/nuha-binary") - Notebooks
- Google Colab
- Kaggle
binary-38
Browse files- README.md +25 -21
- config.json +1 -1
- config.toml +12 -12
- pytorch_model.bin +2 -2
- tokenizer.json +6 -1
- tokenizer_config.json +7 -0
- 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
|
|
@@ -62,28 +62,32 @@ More information needed
|
|
| 62 |
### Training hyperparameters
|
| 63 |
|
| 64 |
The following hyperparameters were used during training:
|
| 65 |
-
- learning_rate:
|
| 66 |
-
- train_batch_size:
|
| 67 |
-
- eval_batch_size:
|
| 68 |
- seed: 42
|
|
|
|
|
|
|
| 69 |
- optimizer: Adam with betas=(0.9,0.999) and epsilon=1e-08
|
| 70 |
-
- lr_scheduler_type:
|
| 71 |
-
- num_epochs:
|
| 72 |
- label_smoothing_factor: 0.1
|
| 73 |
|
| 74 |
### Training results
|
| 75 |
|
| 76 |
| Training Loss | Epoch | Step | Validation Loss | F1 | Precision | Recall | Support |
|
| 77 |
|:-------------:|:-----:|:----:|:---------------:|:------:|:---------:|:------:|:-------:|
|
| 78 |
-
| 0.
|
| 79 |
-
| 0.
|
| 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.6928497604059006
|
| 27 |
- name: Precision
|
| 28 |
type: precision
|
| 29 |
+
value: 0.7049713193116635
|
| 30 |
- name: Recall
|
| 31 |
type: recall
|
| 32 |
+
value: 0.6811380011084427
|
| 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.4966
|
| 43 |
+
- F1: 0.6928
|
| 44 |
+
- Precision: 0.7050
|
| 45 |
+
- Recall: 0.6811
|
| 46 |
- Support: None
|
| 47 |
|
| 48 |
## Model description
|
|
|
|
| 62 |
### Training hyperparameters
|
| 63 |
|
| 64 |
The following hyperparameters were used during training:
|
| 65 |
+
- learning_rate: 1e-05
|
| 66 |
+
- train_batch_size: 32
|
| 67 |
+
- eval_batch_size: 32
|
| 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: constant
|
| 73 |
+
- num_epochs: 5
|
| 74 |
- label_smoothing_factor: 0.1
|
| 75 |
|
| 76 |
### Training results
|
| 77 |
|
| 78 |
| Training Loss | Epoch | Step | Validation Loss | F1 | Precision | Recall | Support |
|
| 79 |
|:-------------:|:-----:|:----:|:---------------:|:------:|:---------:|:------:|:-------:|
|
| 80 |
+
| 0.5537 | 0.25 | 500 | 0.5298 | 0.6135 | 0.6830 | 0.5568 | None |
|
| 81 |
+
| 0.5294 | 0.5 | 1000 | 0.5174 | 0.6260 | 0.7106 | 0.5594 | None |
|
| 82 |
+
| 0.5236 | 0.75 | 1500 | 0.5129 | 0.6751 | 0.6752 | 0.6750 | None |
|
| 83 |
+
| 0.5211 | 1.0 | 2000 | 0.5038 | 0.6656 | 0.7084 | 0.6277 | None |
|
| 84 |
+
| 0.4972 | 1.26 | 2500 | 0.5034 | 0.6486 | 0.7288 | 0.5843 | None |
|
| 85 |
+
| 0.4926 | 1.51 | 3000 | 0.5058 | 0.6944 | 0.6755 | 0.7144 | None |
|
| 86 |
+
| 0.4914 | 1.76 | 3500 | 0.5006 | 0.6936 | 0.6901 | 0.6970 | None |
|
| 87 |
+
| 0.4899 | 2.01 | 4000 | 0.5019 | 0.6881 | 0.7036 | 0.6732 | None |
|
| 88 |
+
| 0.4715 | 2.26 | 4500 | 0.4987 | 0.6949 | 0.6977 | 0.6920 | None |
|
| 89 |
+
| 0.474 | 2.51 | 5000 | 0.4990 | 0.6998 | 0.6922 | 0.7076 | None |
|
| 90 |
+
| 0.4729 | 2.76 | 5500 | 0.4966 | 0.6928 | 0.7050 | 0.6811 | None |
|
| 91 |
|
| 92 |
|
| 93 |
### 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,29 +1,29 @@
|
|
| 1 |
[experiment]
|
| 2 |
-
name = "binary-
|
| 3 |
type = "binary"
|
| 4 |
|
| 5 |
|
| 6 |
[dataset]
|
| 7 |
path = "thejosango/nuha-dataset"
|
| 8 |
dataset_revision = "main"
|
| 9 |
-
augment_ratio = 0.
|
| 10 |
-
undersampling_strategy =
|
| 11 |
|
| 12 |
|
| 13 |
[model]
|
| 14 |
pretrained_model_name_or_path = "thejosango/nuha-mlm"
|
| 15 |
-
revision = "
|
| 16 |
-
|
| 17 |
|
| 18 |
[training]
|
| 19 |
-
num_train_epochs =
|
| 20 |
warmup_steps = 0
|
| 21 |
-
lr_scheduler_type = "
|
| 22 |
-
learning_rate =
|
| 23 |
-
per_device_train_batch_size =
|
| 24 |
-
per_device_eval_batch_size =
|
| 25 |
-
gradient_accumulation_steps =
|
| 26 |
-
weight_decay = 0.
|
| 27 |
label_smoothing_factor = 0.1
|
| 28 |
weighted_loss = false
|
| 29 |
early_stopping_patience = 5
|
|
|
|
| 1 |
[experiment]
|
| 2 |
+
name = "binary-38"
|
| 3 |
type = "binary"
|
| 4 |
|
| 5 |
|
| 6 |
[dataset]
|
| 7 |
path = "thejosango/nuha-dataset"
|
| 8 |
dataset_revision = "main"
|
| 9 |
+
augment_ratio = 0.0
|
| 10 |
+
undersampling_strategy = false
|
| 11 |
|
| 12 |
|
| 13 |
[model]
|
| 14 |
pretrained_model_name_or_path = "thejosango/nuha-mlm"
|
| 15 |
+
revision = "ce20f497544665775129f9ff5b3cd2a3e350dce8"
|
| 16 |
+
|
| 17 |
|
| 18 |
[training]
|
| 19 |
+
num_train_epochs = 5
|
| 20 |
warmup_steps = 0
|
| 21 |
+
lr_scheduler_type = "constant"
|
| 22 |
+
learning_rate = 1e-5
|
| 23 |
+
per_device_train_batch_size = 32
|
| 24 |
+
per_device_eval_batch_size = 32
|
| 25 |
+
gradient_accumulation_steps = 2
|
| 26 |
+
weight_decay = 0.00
|
| 27 |
label_smoothing_factor = 0.1
|
| 28 |
weighted_loss = false
|
| 29 |
early_stopping_patience = 5
|
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:c3eceddd77e5a00819ab30f4f9f90180c97198b12fefd284d24ecf49c2b80ce5
|
| 3 |
+
size 540847921
|
tokenizer.json
CHANGED
|
@@ -1,6 +1,11 @@
|
|
| 1 |
{
|
| 2 |
"version": "1.0",
|
| 3 |
-
"truncation":
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 4 |
"padding": null,
|
| 5 |
"added_tokens": [
|
| 6 |
{
|
|
|
|
| 1 |
{
|
| 2 |
"version": "1.0",
|
| 3 |
+
"truncation": {
|
| 4 |
+
"direction": "Right",
|
| 5 |
+
"max_length": 512,
|
| 6 |
+
"strategy": "LongestFirst",
|
| 7 |
+
"stride": 0
|
| 8 |
+
},
|
| 9 |
"padding": null,
|
| 10 |
"added_tokens": [
|
| 11 |
{
|
tokenizer_config.json
CHANGED
|
@@ -5,17 +5,24 @@
|
|
| 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 |
}
|
|
|
|
| 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 |
}
|
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:08daaa9929d5ac6d9774c9e26f13cc06d212873de4e3172ec8b81ea97d9d5d6b
|
| 3 |
size 4091
|