Downloads · 30 days
7
5% of all-time downloads
enguard/tiny-guard-4m-en-prompt-harassment-binary-moderation
tiny-guard-4m-en-prompt-harassment-binary-moderation is a text classification model from enguard. Use it when you need a label for a piece of text. It is set up for model2vec. The card lists the license as mit.
This model is a fine-tuned Model2Vec classifier based on minishlab/potion-base-4m for the prompt-harassment-binary found in the enguard/multi-lingual-prompt-moderation dataset.
Downloads · 30 days
7
5% of all-time downloads
All-time downloads
142
Public
Parameters
3.8M
38.7 MB on disk
Likes
0
Public
Click a slice to open those files.
.safetensors15.5 MB · 87%
How the weights are stored.
F323.8M · 99%
From the Hugging Face model README
This model is a fine-tuned Model2Vec classifier based on minishlab/potion-base-4m for the prompt-harassment-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-harassment-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-harassment-binary |
| Base Model | minishlab/potion-base-4m |
| Precision | 0.8895 |
| Recall | 0.7160 |
| F1 | 0.7934 |
| True \ Predicted | FAIL | PASS |
|---|---|---|
| FAIL | 1417 | 567 |
| PASS | 177 | 1807 |
{
"FAIL": {
"precision": 0.8895166352793471,
"recall": 0.7160181910055584,
"f1-score": 0.7933930571108623,
"support": 1979.0
},
"PASS": {
"precision": 0.7612574341546304,
"recall": 0.9105691056910569,
"f1-score": 0.8292457195742712,
"support": 1968.0
},
"accuracy": 0.8130225487712186,
"macro avg": {
"precision": 0.8253870347169887,
"recall": 0.8132936483483076,
"f1-score": 0.8113193883425667,
"support": 3947.0
},
"weighted avg": {
"precision": 0.825565759218176,
"recall": 0.8130225487712186,
"f1-score": 0.8112694289699929,
"support": 3947.0
}
}
</details>
<details>
<summary><b>Sample Predictions</b></summary>
| Text | True Label | Predicted Label |
|---|---|---|
| you don't have much experience with european gypsies, do you? <br><br>Touch one, and they spawn cousins all around you like an RPG boss. | FAIL | PASS |
| 良い、悪天候時butthole! | FAIL | FAIL |
| I know what you are thinking....but where will he build the fire for the smoke signals? | PASS | PASS |
| Not really even an "unnatural" disaster. Oil comes from the earth, water comes from the earth. Its inevitable that they will find each other. | PASS | PASS |
| You don't even know what you were quoting, do you? You just saw it on the internet somewhere and decided to parrot it here on reddit for karma. <br><br>Nicely done, I'll give you a C for effort, but you should try harder next time.<br><br> | FAIL | PASS |
| you don't have much experience with european gypsies, do you? <br><br>Touch one, and they spawn cousins all around you like an RPG boss. | FAIL | PASS |
| Dataset Size | Time (seconds) | Predictions/Second |
|---|---|---|
| 1 | 0.0002 | 5706.54 |
| 1000 | 0.0583 | 17139.13 |
| 3968 | 0.2108 | 18824.51 |
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}
}