|
|
--- |
|
|
license: mit |
|
|
base_model: uhhlt/am-roberta |
|
|
tags: |
|
|
- generated_from_trainer |
|
|
metrics: |
|
|
- accuracy |
|
|
- precision |
|
|
- recall |
|
|
- f1 |
|
|
model-index: |
|
|
- name: am-roberta-finetuned |
|
|
results: [] |
|
|
--- |
|
|
|
|
|
<!-- This model card has been generated automatically according to the information the Trainer had access to. You |
|
|
should probably proofread and complete it, then remove this comment. --> |
|
|
|
|
|
# amharic-hate-speech |
|
|
|
|
|
This model is a fine-tuned version of [uhhlt/am-roberta](https://huggingface.co/uhhlt/am-roberta) on an [AmahricHateSpeechRANL](https://huggingface.co/datasets/uhhlt/amharichatespeechranlp) dataset. |
|
|
It achieves the following results on the evaluation set: |
|
|
- Loss: 0.6437 |
|
|
- Accuracy: 0.7373 |
|
|
- Precision: 0.7216 |
|
|
- Recall: 0.7149 |
|
|
- F1: 0.7180 |
|
|
|
|
|
## How to use it |
|
|
|
|
|
|
|
|
``` python |
|
|
from transformers import pipeline |
|
|
amhate_classifier = pipeline("text-classification", model="uhhlt/amharic-hate-speech") |
|
|
amhate_classifier(["π³βοΈ π³βοΈααα
αα
α¨αα°ααα ααα α°α»ααͺ α’αα¨α΅α΅ααα΅ !!!π³βοΈ π³βοΈα’", |
|
|
"α αα° α αα αα α¨ααα
αα
? αα‘α α αααͺ α¨ααα α«α΅ααα’ α°αα α«αα αα‘α α₯α¨αα° ααα ααα α«αα αααα α€αααα΅ α ααα΅αα α’ αα 100% α«αΈααα", |
|
|
"α α αα΅α
α°α°α¨α α£αα³ α°αααͺ"]) |
|
|
``` |
|
|
Output |
|
|
|
|
|
``` |
|
|
[{'label': 'normal', 'score': 0.8840981721878052}, |
|
|
{'label': 'hate', 'score': 0.519339382648468}, |
|
|
{'label': 'hate', 'score': 0.9630571007728577}] |
|
|
``` |
|
|
|
|
|
## Model description |
|
|
|
|
|
More information needed |
|
|
|
|
|
## Intended uses & limitations |
|
|
|
|
|
More information needed |
|
|
|
|
|
## Training and evaluation data |
|
|
|
|
|
More information needed |
|
|
|
|
|
## Training procedure |
|
|
|
|
|
### Training hyperparameters |
|
|
|
|
|
The following hyperparameters were used during training: |
|
|
- learning_rate: 2e-05 |
|
|
- train_batch_size: 128 |
|
|
- eval_batch_size: 128 |
|
|
- seed: 16 |
|
|
- optimizer: Adam with betas=(0.9,0.999) and epsilon=1e-08 |
|
|
- lr_scheduler_type: linear |
|
|
- num_epochs: 8 |
|
|
|
|
|
### Training results |
|
|
|
|
|
| Training Loss | Epoch | Step | Validation Loss | Accuracy | Precision | Recall | F1 | |
|
|
|:-------------:|:-----:|:----:|:---------------:|:--------:|:---------:|:------:|:------:| |
|
|
| 0.8441 | 1.0 | 94 | 0.6699 | 0.7053 | 0.6913 | 0.6640 | 0.6737 | |
|
|
| 0.6199 | 2.0 | 188 | 0.6505 | 0.72 | 0.7060 | 0.6995 | 0.6994 | |
|
|
| 0.5295 | 3.0 | 282 | 0.6240 | 0.736 | 0.7201 | 0.7125 | 0.7159 | |
|
|
| 0.4614 | 4.0 | 376 | 0.6437 | 0.7373 | 0.7216 | 0.7149 | 0.7180 | |
|
|
| 0.3955 | 5.0 | 470 | 0.6922 | 0.7207 | 0.7001 | 0.7072 | 0.7031 | |
|
|
| 0.3529 | 6.0 | 564 | 0.6995 | 0.7247 | 0.7050 | 0.7029 | 0.7039 | |
|
|
| 0.3076 | 7.0 | 658 | 0.7352 | 0.7253 | 0.7067 | 0.7000 | 0.7031 | |
|
|
| 0.2863 | 8.0 | 752 | 0.7470 | 0.7227 | 0.7019 | 0.6983 | 0.7000 | |
|
|
|
|
|
|
|
|
### Framework versions |
|
|
|
|
|
- Transformers 4.32.1 |
|
|
- Pytorch 2.0.1+cu117 |
|
|
- Datasets 2.14.4 |
|
|
- Tokenizers 0.13.3 |
|
|
|