prompt-violence-binary (moderation)
Collection
Tiny guardrails for 'prompt-violence-binary' trained on https://huggingface.co/datasets/enguard/multi-lingual-prompt-moderation.
•
5 items
•
Updated
This model is a fine-tuned Model2Vec classifier based on minishlab/potion-multilingual-128M for the prompt-violence-binary found in the enguard/multi-lingual-prompt-moderation dataset.
pip install model2vec[inference]
from model2vec.inference import StaticModelPipeline
model = StaticModelPipeline.from_pretrained(
"enguard/medium-guard-128m-xx-prompt-violence-binary-moderation"
)
# Supports single texts. Format input as a single text:
text = "Example sentence"
model.predict([text])
model.predict_proba([text])
Below is a quick overview of the model variant and core metrics.
| Field | Value |
|---|---|
| Classifies | prompt-violence-binary |
| Base Model | minishlab/potion-multilingual-128M |
| Precision | 0.8821 |
| Recall | 0.8406 |
| F1 | 0.8609 |
| True \ Predicted | FAIL | PASS |
|---|---|---|
| FAIL | 233 | 44 |
| PASS | 31 | 246 |
{
"FAIL": {
"precision": 0.8821292775665399,
"recall": 0.8405797101449275,
"f1-score": 0.8608534322820037,
"support": 276.0
},
"PASS": {
"precision": 0.8477508650519031,
"recall": 0.8876811594202898,
"f1-score": 0.8672566371681416,
"support": 276.0
},
"accuracy": 0.8641304347826086,
"macro avg": {
"precision": 0.8649400713092215,
"recall": 0.8641304347826086,
"f1-score": 0.8640550347250726,
"support": 552.0
},
"weighted avg": {
"precision": 0.8649400713092215,
"recall": 0.8641304347826086,
"f1-score": 0.8640550347250726,
"support": 552.0
}
}
| Text | True Label | Predicted Label |
|---|---|---|
| 300 K/D ratio? Fuckin' camper. | PASS | PASS |
| 젠장,꼭 읽 황혼,나중에 gurrlllllllllfrrrrrrrrrennnnnnnnnnn | PASS | PASS |
| Ever heard a boston girl have an orgasm? Oh gawd! Harda! Pepperidge farm! | PASS | PASS |
| RIP that dudes Hamstring | FAIL | FAIL |
| ビリージョエル? まだ少し戸惑...[こ](http://assets.rollingstone.com/assets/images/artists/304x304/billy-joel.jpgはBilly Joel.\n[こ](http://www.greenday.net/bjbio.jpgはビリー-ジョー東京. | PASS | PASS |
| 300 K/D ratio? Fuckin' camper. | PASS | PASS |
| Dataset Size | Time (seconds) | Predictions/Second |
|---|---|---|
| 1 | 0.0003 | 2959.99 |
| 554 | 0.1328 | 4170.52 |
| 554 | 0.0493 | 11227.94 |
Below is a general overview of the best-performing models for each dataset variant.
If you use this model, please cite Model2Vec:
@software{minishlab2024model2vec,
author = {Stephan Tulkens and {van Dongen}, Thomas},
title = {Model2Vec: Fast State-of-the-Art Static Embeddings},
year = {2024},
publisher = {Zenodo},
doi = {10.5281/zenodo.17270888},
url = {https://github.com/MinishLab/model2vec},
license = {MIT}
}
Base model
minishlab/potion-multilingual-128M