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-base-2m 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/tiny-guard-2m-en-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-base-2m |
| Precision | 0.9017 |
| Recall | 0.7645 |
| F1 | 0.8275 |
| True \ Predicted | FAIL | PASS |
|---|---|---|
| FAIL | 212 | 65 |
| PASS | 23 | 254 |
{
"FAIL": {
"precision": 0.9017094017094017,
"recall": 0.7644927536231884,
"f1-score": 0.8274509803921568,
"support": 276.0
},
"PASS": {
"precision": 0.7955974842767296,
"recall": 0.9166666666666666,
"f1-score": 0.8518518518518519,
"support": 276.0
},
"accuracy": 0.8405797101449275,
"macro avg": {
"precision": 0.8486534429930657,
"recall": 0.8405797101449275,
"f1-score": 0.8396514161220043,
"support": 552.0
},
"weighted avg": {
"precision": 0.8486534429930657,
"recall": 0.8405797101449275,
"f1-score": 0.8396514161220043,
"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.0002 | 5584.96 |
| 554 | 0.0347 | 15986.66 |
| 554 | 0.0322 | 17202.24 |
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}
}