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-32m 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/small-guard-32m-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-32m |
| Precision | 0.9077 |
| Recall | 0.8913 |
| F1 | 0.8995 |
| True \ Predicted | FAIL | PASS |
|---|---|---|
| FAIL | 246 | 31 |
| PASS | 26 | 251 |
{
"FAIL": {
"precision": 0.9077490774907749,
"recall": 0.8913043478260869,
"f1-score": 0.8994515539305301,
"support": 276.0
},
"PASS": {
"precision": 0.8932384341637011,
"recall": 0.9094202898550725,
"f1-score": 0.9012567324955116,
"support": 276.0
},
"accuracy": 0.9003623188405797,
"macro avg": {
"precision": 0.900493755827238,
"recall": 0.9003623188405797,
"f1-score": 0.9003541432130209,
"support": 552.0
},
"weighted avg": {
"precision": 0.900493755827238,
"recall": 0.9003623188405797,
"f1-score": 0.9003541432130209,
"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.0004 | 2746.76 |
| 554 | 0.0409 | 13528.75 |
| 554 | 0.0376 | 14727.02 |
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}
}