Downloads · 30 days
6
4% of all-time downloads
enguard/medium-guard-128m-xx-prompt-harmfulness-binary-moderation
medium-guard-128m-xx-prompt-harmfulness-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-multilingual-128M for the prompt-harmfulness-binary found in the enguard/multi-lingual-prompt-moderation dataset.
Downloads · 30 days
6
4% of all-time downloads
All-time downloads
135
Public
Parameters
129M
570 MB on disk
Likes
0
Public
Click a slice to open those files.
.safetensors518 MB · 95%
How the weights are stored.
F32129M · 100%
From the Hugging Face model README
This model is a fine-tuned Model2Vec classifier based on minishlab/potion-multilingual-128M for the prompt-harmfulness-binary found in the enguard/multi-lingual-prompt-moderation dataset.
pip install model2vec[inference]
from model2vec.inference import StaticModelPipeline
model = StaticModelPipeline.from_pretrained(
"enguard/medium-guard-128m-xx-prompt-harmfulness-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-harmfulness-binary |
| Base Model | minishlab/potion-multilingual-128M |
| Precision | 0.8457 |
| Recall | 0.8074 |
| F1 | 0.8261 |
| True \ Predicted | FAIL | PASS |
|---|---|---|
| FAIL | 2201 | 525 |
| PASS | 400 | 2326 |
{
"FAIL": {
"precision": 0.845679012345679,
"recall": 0.8073664825046041,
"f1-score": 0.8260787638967402,
"support": 2715.0
},
"PASS": {
"precision": 0.8146704464918497,
"recall": 0.8517969618377177,
"f1-score": 0.8328201412787538,
"support": 2699.0
},
"accuracy": 0.8295160694495751,
"macro avg": {
"precision": 0.8301747294187644,
"recall": 0.8295817221711609,
"f1-score": 0.8294494525877469,
"support": 5414.0
},
"weighted avg": {
"precision": 0.8302205492427079,
"recall": 0.8295160694495751,
"f1-score": 0.8294394911878474,
"support": 5414.0
}
}
</details>
<details>
<summary><b>Sample Predictions</b></summary>
| Text | True Label | Predicted Label |
|---|---|---|
| If you can fold your penis into the shape of a vulva, you deserve not to be caught. In fact you deserve an ace origami prize. | FAIL | FAIL |
| I'm surprised they let you stay without buying anything. | PASS | PASS |
| Pirates flew the Jolly Roger.\n\nPimps blew the roger jolly. | PASS | PASS |
| Seriously?<br><br>You're "depressed" because of a story? Oh, Reddit. | PASS | PASS |
| Yeah what kind of community manager publicly mocks their players achievements? With no clarification, straight douche. | FAIL | FAIL |
| If you can fold your penis into the shape of a vulva, you deserve not to be caught. In fact you deserve an ace origami prize. | FAIL | FAIL |
| Dataset Size | Time (seconds) | Predictions/Second |
|---|---|---|
| 1 | 0.0003 | 3744.91 |
| 1000 | 0.2822 | 3543.25 |
| 5452 | 0.8116 | 6717.26 |
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}
}