|
--- |
|
language: |
|
- ms |
|
library_name: transformers |
|
--- |
|
|
|
Safe for Work Classifier Model for Malaysian Data |
|
|
|
Current version supports Malay. We are working towards supporting malay, english and indo. |
|
|
|
Base Model finetuned from https://huggingface.co/mesolitica/malaysian-mistral-191M-MLM-512 with Malaysian NSFW data. |
|
|
|
Data Source: https://huggingface.co/datasets/malaysia-ai/Malaysian-NSFW |
|
|
|
Github Repo: https://github.com/malaysia-ai/sfw-classifier |
|
|
|
Project Board: https://github.com/orgs/malaysia-ai/projects/6 |
|
|
|
 |
|
|
|
Current Labels Available: |
|
|
|
- religion insult |
|
- sexist |
|
- racist |
|
- psychiatric or mental illness |
|
- harassment |
|
- safe for work |
|
- porn |
|
- self-harm |
|
|
|
|
|
|
|
### How to use |
|
|
|
```python |
|
from classifier import MistralForSequenceClassification |
|
model = MistralForSequenceClassification.from_pretrained('malaysia-ai/malaysian-sfw-classifier') |
|
``` |
|
|
|
|
|
``` |
|
precision recall f1-score support |
|
|
|
racist 0.88481 0.91264 0.89851 1717 |
|
religion insult 0.86248 0.86753 0.86500 3246 |
|
psychiatric or mental illness 0.92863 0.83983 0.88200 5825 |
|
sexist 0.76152 0.74819 0.75480 1656 |
|
harassment 0.59621 0.86080 0.70448 1717 |
|
porn 0.96332 0.97697 0.97010 1129 |
|
safe for work 0.90178 0.83741 0.86840 3881 |
|
self-harm 0.89489 0.92647 0.91040 340 |
|
|
|
accuracy 0.85388 19511 |
|
macro avg 0.84920 0.87123 0.85671 19511 |
|
weighted avg 0.86641 0.85388 0.85709 19511 |
|
|
|
``` |