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-8m 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-8m-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-8m |
| Precision | 0.9042 |
| Recall | 0.8551 |
| F1 | 0.8790 |
| True \ Predicted | FAIL | PASS |
|---|---|---|
| FAIL | 238 | 39 |
| PASS | 25 | 252 |
{
"FAIL": {
"precision": 0.9042145593869731,
"recall": 0.855072463768116,
"f1-score": 0.8789571694599627,
"support": 276.0
},
"PASS": {
"precision": 0.8625429553264605,
"recall": 0.9094202898550725,
"f1-score": 0.8853615520282186,
"support": 276.0
},
"accuracy": 0.8822463768115942,
"macro avg": {
"precision": 0.8833787573567169,
"recall": 0.8822463768115942,
"f1-score": 0.8821593607440907,
"support": 552.0
},
"weighted avg": {
"precision": 0.8833787573567169,
"recall": 0.8822463768115942,
"f1-score": 0.8821593607440907,
"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 | 5433.04 |
| 554 | 0.0427 | 12985.53 |
| 554 | 0.0344 | 16116.39 |
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}
}