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", device_map="auto") - Notebooks
- Google Colab
- Kaggle
binary-13
Browse files- README.md +18 -18
- config.json +1 -1
- config.toml +3 -3
- pytorch_model.bin +2 -2
- tokenizer.json +1 -6
- 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 [aubmindlab/bert-base-arabertv02-twitter](https://huggingface.co/aubmindlab/bert-base-arabertv02-twitter) on the nuha-dataset dataset.
|
| 41 |
It achieves the following results on the evaluation set:
|
| 42 |
-
- Loss:
|
| 43 |
-
- F1: 0.
|
| 44 |
-
- Precision: 0.
|
| 45 |
-
- Recall: 0.
|
| 46 |
- Support: None
|
| 47 |
|
| 48 |
## Model description
|
|
@@ -67,7 +67,7 @@ The following hyperparameters were used during training:
|
|
| 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:
|
| 71 |
- lr_scheduler_warmup_steps: 2000.0
|
| 72 |
- num_epochs: 5
|
| 73 |
- label_smoothing_factor: 0.1
|
|
@@ -76,16 +76,16 @@ The following hyperparameters were used during training:
|
|
| 76 |
|
| 77 |
| Training Loss | Epoch | Step | Validation Loss | F1 | Precision | Recall | Support |
|
| 78 |
|:-------------:|:-----:|:----:|:---------------:|:------:|:---------:|:------:|:-------:|
|
| 79 |
-
|
|
| 80 |
-
|
|
| 81 |
-
|
|
| 82 |
-
|
|
| 83 |
-
|
|
| 84 |
-
|
|
| 85 |
-
|
|
| 86 |
-
|
|
| 87 |
-
|
|
| 88 |
-
|
|
| 89 |
|
| 90 |
|
| 91 |
### Framework versions
|
|
|
|
| 23 |
metrics:
|
| 24 |
- name: F1
|
| 25 |
type: f1
|
| 26 |
+
value: 0.6555940023068051
|
| 27 |
- name: Precision
|
| 28 |
type: precision
|
| 29 |
+
value: 0.6194420226678291
|
| 30 |
- name: Recall
|
| 31 |
type: recall
|
| 32 |
+
value: 0.6962273395394415
|
| 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 [aubmindlab/bert-base-arabertv02-twitter](https://huggingface.co/aubmindlab/bert-base-arabertv02-twitter) on the nuha-dataset dataset.
|
| 41 |
It achieves the following results on the evaluation set:
|
| 42 |
+
- Loss: 0.5987
|
| 43 |
+
- F1: 0.6556
|
| 44 |
+
- Precision: 0.6194
|
| 45 |
+
- Recall: 0.6962
|
| 46 |
- Support: None
|
| 47 |
|
| 48 |
## Model description
|
|
|
|
| 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: constant_with_warmup
|
| 71 |
- lr_scheduler_warmup_steps: 2000.0
|
| 72 |
- num_epochs: 5
|
| 73 |
- label_smoothing_factor: 0.1
|
|
|
|
| 76 |
|
| 77 |
| Training Loss | Epoch | Step | Validation Loss | F1 | Precision | Recall | Support |
|
| 78 |
|:-------------:|:-----:|:----:|:---------------:|:------:|:---------:|:------:|:-------:|
|
| 79 |
+
| 2.5085 | 0.49 | 500 | 1.0583 | 0.5122 | 0.5269 | 0.4983 | None |
|
| 80 |
+
| 1.5593 | 0.98 | 1000 | 0.7585 | 0.6006 | 0.4928 | 0.7687 | None |
|
| 81 |
+
| 1.198 | 1.47 | 1500 | 0.6285 | 0.5762 | 0.6121 | 0.5443 | None |
|
| 82 |
+
| 0.984 | 1.96 | 2000 | 0.6197 | 0.6279 | 0.5648 | 0.7070 | None |
|
| 83 |
+
| 0.9388 | 2.45 | 2500 | 0.5948 | 0.5851 | 0.6627 | 0.5238 | None |
|
| 84 |
+
| 0.8417 | 2.94 | 3000 | 0.6793 | 0.6428 | 0.5259 | 0.8266 | None |
|
| 85 |
+
| 0.804 | 3.43 | 3500 | 0.5996 | 0.6548 | 0.5716 | 0.7663 | None |
|
| 86 |
+
| 0.7546 | 3.92 | 4000 | 0.6484 | 0.6584 | 0.5763 | 0.7678 | None |
|
| 87 |
+
| 0.7425 | 4.41 | 4500 | 0.5629 | 0.6503 | 0.6181 | 0.6859 | None |
|
| 88 |
+
| 0.712 | 4.9 | 5000 | 0.5987 | 0.6556 | 0.6194 | 0.6962 | None |
|
| 89 |
|
| 90 |
|
| 91 |
### 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": 6,
|
| 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 |
|
|
@@ -16,7 +16,7 @@ revision = "main"
|
|
| 16 |
hidden_dropout_prob = 0.3
|
| 17 |
attention_probs_dropout_prob = 0.3
|
| 18 |
classifier_dropout = 0.3
|
| 19 |
-
|
| 20 |
#num_attention_heads = 12
|
| 21 |
#hidden_size = 768
|
| 22 |
#intermediate_size= null
|
|
@@ -25,7 +25,7 @@ classifier_dropout = 0.3
|
|
| 25 |
[training]
|
| 26 |
num_train_epochs = 5
|
| 27 |
warmup_steps = 2e3
|
| 28 |
-
lr_scheduler_type = "
|
| 29 |
learning_rate = 3e-5
|
| 30 |
per_device_train_batch_size = 32
|
| 31 |
per_device_eval_batch_size = 64
|
|
|
|
| 1 |
[experiment]
|
| 2 |
+
name = "binary-13"
|
| 3 |
type = "binary"
|
| 4 |
|
| 5 |
|
|
|
|
| 16 |
hidden_dropout_prob = 0.3
|
| 17 |
attention_probs_dropout_prob = 0.3
|
| 18 |
classifier_dropout = 0.3
|
| 19 |
+
num_hidden_layers = 6
|
| 20 |
#num_attention_heads = 12
|
| 21 |
#hidden_size = 768
|
| 22 |
#intermediate_size= null
|
|
|
|
| 25 |
[training]
|
| 26 |
num_train_epochs = 5
|
| 27 |
warmup_steps = 2e3
|
| 28 |
+
lr_scheduler_type = "constant_with_warmup"
|
| 29 |
learning_rate = 3e-5
|
| 30 |
per_device_train_batch_size = 32
|
| 31 |
per_device_eval_batch_size = 64
|
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:faa1c66eb99660799297ea153e0e9e220570a7f4cfecb2788c95651352c486bc
|
| 3 |
+
size 370706033
|
tokenizer.json
CHANGED
|
@@ -1,11 +1,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 |
{
|
|
|
|
| 1 |
{
|
| 2 |
"version": "1.0",
|
| 3 |
+
"truncation": null,
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 4 |
"padding": null,
|
| 5 |
"added_tokens": [
|
| 6 |
{
|
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:f764a8af81060b173458702e69fbe2eb16017942aa78b88adb5be4f2f5e0ea9b
|
| 3 |
size 4091
|