prompt-toxicity-binary (jigsaw)
Collection
Tiny guardrails for 'prompt-toxicity-binary' trained on https://huggingface.co/datasets/google/jigsaw_toxicity_pred.
•
5 items
•
Updated
This model is a fine-tuned Model2Vec classifier based on minishlab/potion-base-4m for the prompt-toxicity-binary found in the google/jigsaw_toxicity_pred dataset.
pip install model2vec[inference]
from model2vec.inference import StaticModelPipeline
model = StaticModelPipeline.from_pretrained(
"enguard/tiny-guard-4m-en-prompt-toxicity-binary-jigsaw"
)
# 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-toxicity-binary |
| Base Model | minishlab/potion-base-4m |
| Precision | 0.9507 |
| Recall | 0.8303 |
| F1 | 0.8864 |
| True \ Predicted | FAIL | PASS |
|---|---|---|
| FAIL | 1292 | 264 |
| PASS | 67 | 1436 |
{
"FAIL": {
"precision": 0.9506990434142752,
"recall": 0.8303341902313625,
"f1-score": 0.8864493996569468,
"support": 1556.0
},
"PASS": {
"precision": 0.8447058823529412,
"recall": 0.9554224883566201,
"f1-score": 0.8966593818295349,
"support": 1503.0
},
"accuracy": 0.8917947041516836,
"macro avg": {
"precision": 0.8977024628836082,
"recall": 0.8928783392939913,
"f1-score": 0.8915543907432408,
"support": 3059.0
},
"weighted avg": {
"precision": 0.898620677583878,
"recall": 0.8917947041516836,
"f1-score": 0.8914659420581891,
"support": 3059.0
}
}
| Text | True Label | Predicted Label |
|---|---|---|
| ":::SLR Chronology bibliography is complete Hi, MurderWatcher1. This is Paul1513 again. This is to let you know that I have completed the SLR Chronology bibliography for you and that I am going to try to upload a PDF copy to your Talk page as soon as I finish this note. This may take a while, because I've never uploaded a PDF before. You're absolutely right; it would be great if some of the old Modern Photography stuff could be added to Wikipedia. However, you can be sure that they're still under copyright. (Pre-1978 American ""work-for-hire"" copyrights are generally 75 years; 1978 and on, 95 years.) The real question is: Who OWNS the copyright today? Since Modern went under, there have been many media company sales and resales - the present copyright holder would be hell to uncover and ask permission. In fact, the current owner might not even know that it owns Modern's copyrights. ""Orphaned"" copyrights are a major unresolved ""fair use"" issue in the information age. Speaking of first cameras: mine was a simple Vivitar 110 point-and-shoot. My parents gave it to me for getting straight A's in the 5th grade. It was, of course, a bad camera, but it opened up a world of possibilities. From the Vivitar, I eventually learned about the existence of the Pentax Auto 110 SLR. It was then one step to 35 mm SLRs and I got a Nikon FE2 in 1983. The FE2 is also the reason why the bulk of my Modern Photography magazine citations begin around 1983. I'm sorry to hear about your disputes with the Admins over your non-photography Wkipedia entries. It would be unfortunate if you felt compelled to end your Wikipedia activities over them. Perhaps you could start a blog or create a MySpace or Facebook page to air these issues without worrying about what the Admins want. However, I will respect whatever your decision is, as I fully understand that the most sophisticated machine is nothing next to a human life. You can reach me on my Talk page. Thanks Muchly " |
PASS | PASS |
| Are you deaf or blind? I repeat. It started in late 2009, and collapsed in mid 2010, as supported by cites and polls. | FAIL | PASS |
| " Thanks for your note. I've been reporting accounts like these for over a year now and they all almost always get an indefinite block since they are vandalism only accounts. Blocks are necessary in these cases as it is not known when any person behind these accounts may come back and vandalize again. I see you have again removed these reports from the noticeboard which I have to again disagree with. therefore I kindly request you to put them back on the noticeboard for another administrator to review. ~ (talk) " |
PASS | PASS |
| SOMEGUY1221 LIKES TO SUCK LARGE HARD PENIS. | FAIL | FAIL |
| " Well, you're using criteria that you have decided constitute a legitimate decision procedure for establishing whether something is Israeli. Content decisions can't be made that way here. I have a decision procedure that enables me to decide who is an idiot and yet annoyingly I am not allowed to deploy it in articles about living people who clearly meet the criteria. ''' - talk''' " |
FAIL | PASS |
| ":::SLR Chronology bibliography is complete Hi, MurderWatcher1. This is Paul1513 again. This is to let you know that I have completed the SLR Chronology bibliography for you and that I am going to try to upload a PDF copy to your Talk page as soon as I finish this note. This may take a while, because I've never uploaded a PDF before. You're absolutely right; it would be great if some of the old Modern Photography stuff could be added to Wikipedia. However, you can be sure that they're still under copyright. (Pre-1978 American ""work-for-hire"" copyrights are generally 75 years; 1978 and on, 95 years.) The real question is: Who OWNS the copyright today? Since Modern went under, there have been many media company sales and resales - the present copyright holder would be hell to uncover and ask permission. In fact, the current owner might not even know that it owns Modern's copyrights. ""Orphaned"" copyrights are a major unresolved ""fair use"" issue in the information age. Speaking of first cameras: mine was a simple Vivitar 110 point-and-shoot. My parents gave it to me for getting straight A's in the 5th grade. It was, of course, a bad camera, but it opened up a world of possibilities. From the Vivitar, I eventually learned about the existence of the Pentax Auto 110 SLR. It was then one step to 35 mm SLRs and I got a Nikon FE2 in 1983. The FE2 is also the reason why the bulk of my Modern Photography magazine citations begin around 1983. I'm sorry to hear about your disputes with the Admins over your non-photography Wkipedia entries. It would be unfortunate if you felt compelled to end your Wikipedia activities over them. Perhaps you could start a blog or create a MySpace or Facebook page to air these issues without worrying about what the Admins want. However, I will respect whatever your decision is, as I fully understand that the most sophisticated machine is nothing next to a human life. You can reach me on my Talk page. Thanks Muchly " |
PASS | PASS |
| Dataset Size | Time (seconds) | Predictions/Second |
|---|---|---|
| 1 | 0.0007 | 1379.71 |
| 1000 | 0.1195 | 8371.56 |
| 3059 | 0.3376 | 9061.23 |
Below is a general overview of the best-performing models for each dataset variant.
| Classifies | Model | Precision | Recall | F1 |
|---|---|---|---|---|
| prompt-toxicity-binary | enguard/tiny-guard-2m-en-prompt-toxicity-binary-jigsaw | 0.9531 | 0.7699 | 0.8518 |
| prompt-toxicity-binary | enguard/tiny-guard-4m-en-prompt-toxicity-binary-jigsaw | 0.9507 | 0.8303 | 0.8864 |
| prompt-toxicity-binary | enguard/tiny-guard-8m-en-prompt-toxicity-binary-jigsaw | 0.9514 | 0.8297 | 0.8864 |
| prompt-toxicity-binary | enguard/small-guard-32m-en-prompt-toxicity-binary-jigsaw | 0.9403 | 0.8605 | 0.8987 |
| prompt-toxicity-binary | enguard/medium-guard-128m-xx-prompt-toxicity-binary-jigsaw | 0.9111 | 0.8625 | 0.8861 |
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}
}