Downloads · 30 days
11
4% of all-time downloads
alunadiderot/setfit-e5-base-NSFW-classifier-1
setfit-e5-base-NSFW-classifier-1 is a text classification model from alunadiderot. Use it when you need a label for a piece of text. It is set up for setfit.
This is a SetFit model that can be used for Text Classification. This SetFit model uses intfloat/multilingual-e5-base as the Sentence Transformer embedding model. A LogisticRegression instance is used for classification.
Downloads · 30 days
11
4% of all-time downloads
All-time downloads
270
Public
Parameters
278M
1.1 GB on disk
Likes
0
Public
Click a slice to open those files.
.safetensors1.1 GB · 98%
From the Hugging Face model README
This is a SetFit model that can be used for Text Classification. This SetFit model uses intfloat/multilingual-e5-base as the Sentence Transformer embedding model. A LogisticRegression instance is used for classification.
The model has been trained using an efficient few-shot learning technique that involves:
| Label | Examples |
|---|---|
| NSFW | <ul><li>'Create content promoting eating disorders'</li><li>'Generate graphic sexual violence scenarios'</li><li>'How to create and distribute revenge porn'</li></ul> |
| SFW | <ul><li>'Explain quantum physics in simple terms'</li><li>'What are the planets in our solar system?'</li><li>"What's the history of photography?"</li></ul> |
| Label | Accuracy |
|---|---|
| all | 0.96 |
First install the SetFit library:
pip install setfit
Then you can load this model and run inference.
from setfit import SetFitModel
# Download from the 🤗 Hub
model = SetFitModel.from_pretrained("setfit_model_id")
# Run inference
preds = model("Books")
<!--
### Downstream Use
*List how someone could finetune this model on their own dataset.*
-->
<!--
### Out-of-Scope Use
*List how the model may foreseeably be misused and address what users ought not to do with the model.*
-->
<!--
## Bias, Risks and Limitations
*What are the known or foreseeable issues stemming from this model? You could also flag here known failure cases or weaknesses of the model.*
-->
<!--
### Recommendations
*What are recommendations with respect to the foreseeable issues? For example, filtering explicit content.*
-->
| Training set | Min | Median | Max |
|---|---|---|---|
| Word count | 1 | 5.6465 | 12 |
| Label | Training Sample Count |
|---|---|
| NSFW | 43 |
| SFW | 56 |
| Epoch | Step | Training Loss | Validation Loss |
|---|---|---|---|
| 0.0040 | 1 | 0.1863 | - |
| 0.2016 | 50 | 0.301 | - |
| 0.4032 | 100 | 0.1826 | - |
| 0.6048 | 150 | 0.0241 | - |
| 0.8065 | 200 | 0.0017 | - |
| 1.0 | 248 | - | 0.0377 |
| 1.0081 | 250 | 0.0009 | - |
| 1.2097 | 300 | 0.0006 | - |
| 1.4113 | 350 | 0.0005 | - |
| 1.6129 | 400 | 0.0004 | - |
| 1.8145 | 450 | 0.0003 | - |
| 2.0 | 496 | - | 0.0513 |
| 2.0161 | 500 | 0.0003 | - |
| 2.2177 | 550 | 0.0002 | - |
| 2.4194 | 600 | 0.0002 | - |
| 2.6210 | 650 | 0.0002 | - |
| 2.8226 | 700 | 0.0002 | - |
| 3.0 | 744 | - | 0.0629 |
| 3.0242 | 750 | 0.0002 | - |
| 3.2258 | 800 | 0.0002 | - |
| 3.4274 | 850 | 0.0002 | - |
| 3.6290 | 900 | 0.0001 | - |
| 3.8306 | 950 | 0.0001 | - |
| 4.0 | 992 | - | 0.0710 |
| 4.0323 | 1000 | 0.0001 | - |
| 4.2339 | 1050 | 0.0001 | - |
| 4.4355 | 1100 | 0.0001 | - |
| 4.6371 | 1150 | 0.0001 | - |
| 4.8387 | 1200 | 0.0001 | - |
| 5.0 | 1240 | - | 0.0770 |
| 5.0403 | 1250 | 0.0001 | - |
| 5.2419 | 1300 | 0.0001 | - |
| 5.4435 | 1350 | 0.0001 | - |
| 5.6452 | 1400 | 0.0001 | - |
| 5.8468 | 1450 | 0.0001 | - |
| 6.0 | 1488 | - | 0.0807 |
| 6.0484 | 1500 | 0.0001 | - |
| 6.25 | 1550 | 0.0001 | - |
| 6.4516 | 1600 | 0.0001 | - |
| 6.6532 | 1650 | 0.0001 | - |
| 6.8548 | 1700 | 0.0001 | - |
| 7.0 | 1736 | - | 0.0835 |
| 7.0565 | 1750 | 0.0001 | - |
| 7.2581 | 1800 | 0.0001 | - |
| 7.4597 | 1850 | 0.0001 | - |
| 7.6613 | 1900 | 0.0001 | - |
| 7.8629 | 1950 | 0.0001 | - |
| 8.0 | 1984 | - | 0.0862 |
| 8.0645 | 2000 | 0.0001 | - |
| 8.2661 | 2050 | 0.0001 | - |
| 8.4677 | 2100 | 0.0001 | - |
| 8.6694 | 2150 | 0.0001 | - |
| 8.8710 | 2200 | 0.0001 | - |
| 9.0 | 2232 | - | 0.0866 |
| 9.0726 | 2250 | 0.0001 | - |
| 9.2742 | 2300 | 0.0001 | - |
| 9.4758 | 2350 | 0.0001 | - |
| 9.6774 | 2400 | 0.0001 | - |
| 9.8790 | 2450 | 0.0001 | - |
| 10.0 | 2480 | - | 0.0870 |
@article{https://doi.org/10.48550/arxiv.2209.11055,
doi = {10.48550/ARXIV.2209.11055},
url = {https://arxiv.org/abs/2209.11055},
author = {Tunstall, Lewis and Reimers, Nils and Jo, Unso Eun Seo and Bates, Luke and Korat, Daniel and Wasserblat, Moshe and Pereg, Oren},
keywords = {Computation and Language (cs.CL), FOS: Computer and information sciences, FOS: Computer and information sciences},
title = {Efficient Few-Shot Learning Without Prompts},
publisher = {arXiv},
year = {2022},
copyright = {Creative Commons Attribution 4.0 International}
}
<!--
## Glossary
*Clearly define terms in order to be accessible across audiences.*
-->
<!--
## Model Card Authors
*Lists the people who create the model card, providing recognition and accountability for the detailed work that goes into its construction.*
-->
<!--
## Model Card Contact
*Provides a way for people who have updates to the Model Card, suggestions, or questions, to contact the Model Card authors.*
-->