prompt-sexual-content-binary (moderation)
Collection
Tiny guardrails for 'prompt-sexual-content-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-4m for the prompt-sexual-content-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-4m-en-prompt-sexual-content-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-sexual-content-binary |
| Base Model | minishlab/potion-base-4m |
| Precision | 0.9371 |
| Recall | 0.8468 |
| F1 | 0.8897 |
| True \ Predicted | FAIL | PASS |
|---|---|---|
| FAIL | 497 | 90 |
| PASS | 33 | 554 |
{
"FAIL": {
"precision": 0.9371428571428572,
"recall": 0.846815834767642,
"f1-score": 0.8896925858951176,
"support": 581.0
},
"PASS": {
"precision": 0.8611544461778471,
"recall": 0.9435897435897436,
"f1-score": 0.9004893964110929,
"support": 585.0
},
"accuracy": 0.8953687821612349,
"macro avg": {
"precision": 0.8991486516603522,
"recall": 0.8952027891786928,
"f1-score": 0.8950909911531053,
"support": 1166.0
},
"weighted avg": {
"precision": 0.8990183113327964,
"recall": 0.8953687821612349,
"f1-score": 0.8951095105536472,
"support": 1166.0
}
}
| Text | True Label | Predicted Label |
|---|---|---|
| "Hey, you Native Americans! Go back to... uh... hm...." | PASS | PASS |
| It might be one of those super douchy denim arm bands. | PASS | PASS |
| What? lol. That's ridiculous. I guess maybe for some people. I can't even ejaculate from a blow job (alone). So, I've had them that last 30-40 minutes.\n\nEDIT: YES!!! My first gilded post is about blow jobs. I'm so stoked. Thanks kind person for the gold! | FAIL | FAIL |
| DO NOT USE ON KNOB AND BOLLOCKS | PASS | PASS |
| That better be a sweet handjob. | FAIL | FAIL |
| "Hey, you Native Americans! Go back to... uh... hm...." | PASS | PASS |
| Dataset Size | Time (seconds) | Predictions/Second |
|---|---|---|
| 1 | 0.0003 | 3472.11 |
| 1000 | 0.0777 | 12867.23 |
| 1174 | 0.072 | 16300.53 |
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}
}