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-52
Browse files- README.md +15 -15
- config.json +1 -1
- config.toml +4 -4
- pytorch_model.bin +2 -2
- special_tokens_map.json +0 -3
- tokenizer.json +0 -0
- tokenizer_config.json +10 -5
- training_args.bin +1 -1
- vocab.txt +0 -0
README.md
CHANGED
|
@@ -24,13 +24,13 @@ model-index:
|
|
| 24 |
metrics:
|
| 25 |
- name: F1
|
| 26 |
type: f1
|
| 27 |
-
value: 0.
|
| 28 |
- name: Precision
|
| 29 |
type: precision
|
| 30 |
-
value: 0.
|
| 31 |
- name: Recall
|
| 32 |
type: recall
|
| 33 |
-
value: 0.
|
| 34 |
---
|
| 35 |
|
| 36 |
<!-- This model card has been generated automatically according to the information the Trainer had access to. You
|
|
@@ -40,10 +40,10 @@ should probably proofread and complete it, then remove this comment. -->
|
|
| 40 |
|
| 41 |
This model is a fine-tuned version of [thejosango/nuha-mlm](https://huggingface.co/thejosango/nuha-mlm) on the nuha-dataset dataset.
|
| 42 |
It achieves the following results on the evaluation set:
|
| 43 |
-
- Loss: 0.
|
| 44 |
-
- F1: 0.
|
| 45 |
-
- Precision: 0.
|
| 46 |
-
- Recall: 0.
|
| 47 |
- Support: None
|
| 48 |
|
| 49 |
## Model description
|
|
@@ -76,14 +76,14 @@ The following hyperparameters were used during training:
|
|
| 76 |
|
| 77 |
| Training Loss | Epoch | Step | Validation Loss | F1 | Precision | Recall | Support |
|
| 78 |
|:-------------:|:-----:|:----:|:---------------:|:------:|:---------:|:------:|:-------:|
|
| 79 |
-
| 0.
|
| 80 |
-
| 0.
|
| 81 |
-
| 0.
|
| 82 |
-
| 0.
|
| 83 |
-
| 0.
|
| 84 |
-
| 0.
|
| 85 |
-
| 0.
|
| 86 |
-
| 0.
|
| 87 |
|
| 88 |
|
| 89 |
### Framework versions
|
|
|
|
| 24 |
metrics:
|
| 25 |
- name: F1
|
| 26 |
type: f1
|
| 27 |
+
value: 0.6902334758303189
|
| 28 |
- name: Precision
|
| 29 |
type: precision
|
| 30 |
+
value: 0.6218338023996445
|
| 31 |
- name: Recall
|
| 32 |
type: recall
|
| 33 |
+
value: 0.7755403657860706
|
| 34 |
---
|
| 35 |
|
| 36 |
<!-- This model card has been generated automatically according to the information the Trainer had access to. You
|
|
|
|
| 40 |
|
| 41 |
This model is a fine-tuned version of [thejosango/nuha-mlm](https://huggingface.co/thejosango/nuha-mlm) on the nuha-dataset dataset.
|
| 42 |
It achieves the following results on the evaluation set:
|
| 43 |
+
- Loss: 0.5773
|
| 44 |
+
- F1: 0.6902
|
| 45 |
+
- Precision: 0.6218
|
| 46 |
+
- Recall: 0.7755
|
| 47 |
- Support: None
|
| 48 |
|
| 49 |
## Model description
|
|
|
|
| 76 |
|
| 77 |
| Training Loss | Epoch | Step | Validation Loss | F1 | Precision | Recall | Support |
|
| 78 |
|:-------------:|:-----:|:----:|:---------------:|:------:|:---------:|:------:|:-------:|
|
| 79 |
+
| 0.5531 | 0.37 | 500 | 0.5324 | 0.6866 | 0.6190 | 0.7707 | None |
|
| 80 |
+
| 0.5346 | 0.74 | 1000 | 0.5675 | 0.6920 | 0.5862 | 0.8444 | None |
|
| 81 |
+
| 0.5142 | 1.11 | 1500 | 0.5444 | 0.6980 | 0.6032 | 0.8280 | None |
|
| 82 |
+
| 0.472 | 1.48 | 2000 | 0.5466 | 0.6993 | 0.6165 | 0.8079 | None |
|
| 83 |
+
| 0.4704 | 1.85 | 2500 | 0.5346 | 0.7020 | 0.6274 | 0.7968 | None |
|
| 84 |
+
| 0.3858 | 2.22 | 3000 | 0.5762 | 0.6989 | 0.6292 | 0.7861 | None |
|
| 85 |
+
| 0.3912 | 2.58 | 3500 | 0.5676 | 0.6929 | 0.6372 | 0.7593 | None |
|
| 86 |
+
| 0.3966 | 2.95 | 4000 | 0.5773 | 0.6902 | 0.6218 | 0.7755 | None |
|
| 87 |
|
| 88 |
|
| 89 |
### Framework versions
|
config.json
CHANGED
|
@@ -31,5 +31,5 @@
|
|
| 31 |
"transformers_version": "4.32.1",
|
| 32 |
"type_vocab_size": 2,
|
| 33 |
"use_cache": true,
|
| 34 |
-
"vocab_size":
|
| 35 |
}
|
|
|
|
| 31 |
"transformers_version": "4.32.1",
|
| 32 |
"type_vocab_size": 2,
|
| 33 |
"use_cache": true,
|
| 34 |
+
"vocab_size": 64000
|
| 35 |
}
|
config.toml
CHANGED
|
@@ -1,5 +1,5 @@
|
|
| 1 |
[experiment]
|
| 2 |
-
name = "binary-
|
| 3 |
type = "binary"
|
| 4 |
|
| 5 |
|
|
@@ -12,7 +12,7 @@ undersampling_strategy = true
|
|
| 12 |
|
| 13 |
[model]
|
| 14 |
pretrained_model_name_or_path = "thejosango/nuha-mlm"
|
| 15 |
-
revision = "
|
| 16 |
num_hidden_layers = 6
|
| 17 |
classifier_dropout = 0.25
|
| 18 |
|
|
@@ -24,8 +24,8 @@ learning_rate = 5e-5
|
|
| 24 |
per_device_train_batch_size = 64
|
| 25 |
per_device_eval_batch_size = 64
|
| 26 |
gradient_accumulation_steps = 1
|
| 27 |
-
weight_decay =
|
| 28 |
label_smoothing_factor = 0.1
|
| 29 |
-
weighted_loss = false
|
| 30 |
early_stopping_patience = 5
|
| 31 |
early_stopping_threshold = 0.005
|
|
|
|
| 1 |
[experiment]
|
| 2 |
+
name = "binary-52"
|
| 3 |
type = "binary"
|
| 4 |
|
| 5 |
|
|
|
|
| 12 |
|
| 13 |
[model]
|
| 14 |
pretrained_model_name_or_path = "thejosango/nuha-mlm"
|
| 15 |
+
revision = "ce20f497544665775129f9ff5b3cd2a3e350dce8"
|
| 16 |
num_hidden_layers = 6
|
| 17 |
classifier_dropout = 0.25
|
| 18 |
|
|
|
|
| 24 |
per_device_train_batch_size = 64
|
| 25 |
per_device_eval_batch_size = 64
|
| 26 |
gradient_accumulation_steps = 1
|
| 27 |
+
weight_decay = 1e-3
|
| 28 |
label_smoothing_factor = 0.1
|
| 29 |
+
weighted_loss = false
|
| 30 |
early_stopping_patience = 5
|
| 31 |
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:77854de095531e646b72ad7d6a9d3323b85a5652cee4d8a587558eaf19f4b5f4
|
| 3 |
+
size 370706033
|
special_tokens_map.json
CHANGED
|
@@ -1,7 +1,4 @@
|
|
| 1 |
{
|
| 2 |
-
"additional_special_tokens": [
|
| 3 |
-
"[URL]"
|
| 4 |
-
],
|
| 5 |
"cls_token": "[CLS]",
|
| 6 |
"mask_token": "[MASK]",
|
| 7 |
"pad_token": "[PAD]",
|
|
|
|
| 1 |
{
|
|
|
|
|
|
|
|
|
|
| 2 |
"cls_token": "[CLS]",
|
| 3 |
"mask_token": "[MASK]",
|
| 4 |
"pad_token": "[PAD]",
|
tokenizer.json
CHANGED
|
The diff for this file is too large to render.
See raw diff
|
|
|
tokenizer_config.json
CHANGED
|
@@ -1,13 +1,17 @@
|
|
| 1 |
{
|
| 2 |
-
"additional_special_tokens": [
|
| 3 |
-
"[URL]"
|
| 4 |
-
],
|
| 5 |
"clean_up_tokenization_spaces": true,
|
| 6 |
"cls_token": "[CLS]",
|
| 7 |
-
"
|
|
|
|
| 8 |
"mask_token": "[MASK]",
|
|
|
|
| 9 |
"max_length": 512,
|
| 10 |
"model_max_length": 512,
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 11 |
"pad_to_multiple_of": null,
|
| 12 |
"pad_token": "[PAD]",
|
| 13 |
"pad_token_type_id": 0,
|
|
@@ -19,5 +23,6 @@
|
|
| 19 |
"tokenizer_class": "BertTokenizer",
|
| 20 |
"truncation_side": "right",
|
| 21 |
"truncation_strategy": "longest_first",
|
| 22 |
-
"unk_token": "[UNK]"
|
|
|
|
| 23 |
}
|
|
|
|
| 1 |
{
|
|
|
|
|
|
|
|
|
|
| 2 |
"clean_up_tokenization_spaces": true,
|
| 3 |
"cls_token": "[CLS]",
|
| 4 |
+
"do_basic_tokenize": true,
|
| 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,
|
|
|
|
| 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:21f5bef3aca0c3c13753416b32c9243167e3d497cac8c70cb0b7b3354d422cb3
|
| 3 |
size 4091
|
vocab.txt
CHANGED
|
The diff for this file is too large to render.
See raw diff
|
|
|