CoolFace
Modelpublic

waterabbit114/my-setfit-classifier_identity_hate

sourceHugging Faceupdated 2y agoView on Hugging Face
0likes6downloads
Model Card

SetFit with sentence-transformers/paraphrase-mpnet-base-v2

This is a SetFit model that can be used for Text Classification. This SetFit model uses sentence-transformers/paraphrase-mpnet-base-v2 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:

  1. 1.Fine-tuning a Sentence Transformer with contrastive learning.
  2. 2.Training a classification head with features from the fine-tuned Sentence Transformer.

Model Details

Model Description

Model Sources

Model Labels

LabelExamples
0<ul><li>', metal unless it was 70s oldskool'</li><li>"do whichever you think would be best then: if you rename the account, just let me know, and i'll go over there to recreate it; but if you'd prefer to rename the account, recreate it, and send me the password which i can then change, that's fine with me."</li><li>'" no, it was a far-too-much-of-an-in-joke on the fact that principle→principal is usually one of the first things the fa regulars jump on (along with the dreaded spaced em dash)\xa0–\xa0scent "'</li></ul>
1<ul><li>'fuck you!!!!!!!!!!!! you fuck nigger bag of shit i hope you die in a horrible fire with your gay ass kids i will slit their throat you motherfucker dont you ever think of banning me again or i will rape you anally!!!!!'</li><li>"meeeeeeeeooowww!!!! shhhhhhhhhhhhhhhh!!!! uh, there are two ways, why you do erased my comment about ww2, that holocaust was brutally slaying of jews and not gays/gypsys/slavs/anyone... 1 - if you are anti-semitian, than shave your head bald and go to the skinhead meetings! 2 - if you doubt words of the bible, that homosexuality is a deadly sin, make a pentagram tatoo on your forehead go to the satanistic masses with your gay pals! 3 - first and last warning, you fuck gay - i won't appreciate if any more nazi shwain would write in my page! i don't wish to talk to you anymore! beware of the dark side!"</li><li>'fuck you you ass and gay bastard who thinls you are cool. go to hell!'</li></ul>

Uses

Direct Use for Inference

First install the SetFit library:

bash
pip install setfit

Then you can load this model and run inference.

python
from setfit import SetFitModel

# Download from the 🤗 Hub
model = SetFitModel.from_pretrained("waterabbit114/my-setfit-classifier_identity_hate")
# Run inference
preds = model("\"   link   thanks for fixing that disambiguation link on usher's album ) flash; \"")

<!--

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 Details

Training Set Metrics

Training setMinMedianMax
Word count354.6426
LabelTraining Sample Count
010
110

Training Hyperparameters

  • batch_size: (1, 1)
  • num_epochs: (10, 10)
  • max_steps: -1
  • sampling_strategy: oversampling
  • num_iterations: 20
  • bodylearningrate: (2e-05, 2e-05)
  • headlearningrate: 2e-05
  • loss: CosineSimilarityLoss
  • distancemetric: cosinedistance
  • margin: 0.25
  • endtoend: False
  • use_amp: False
  • warmup_proportion: 0.1
  • seed: 42
  • evalmaxsteps: -1
  • loadbestmodelatend: False

Training Results

EpochStepTraining LossValidation Loss
0.001310.4215-
0.0625500.0041-
0.1251000.0001-
0.18751500.0086-
0.252000.0-
0.31252500.0082-
0.3753000.0-
0.43753500.0003-
0.54000.0004-
0.56254500.0005-
0.6255000.0-
0.68755500.0-
0.756000.0005-
0.81256500.0001-
0.8757000.0-
0.93757500.0002-
1.08000.0022-
1.06258500.0002-
1.1259000.0001-
1.18759500.0002-
1.2510000.0-
1.312510500.0002-
1.37511000.0-
1.437511500.0004-
1.512000.0001-
1.562512500.0-
1.62513000.0-
1.687513500.0-
1.7514000.0-
1.812514500.0-
1.87515000.0-
1.937515500.0001-
2.016000.0-
2.062516500.0-
2.12517000.0001-
2.187517500.0-
2.2518000.0-
2.312518500.0-
2.37519000.0001-
2.437519500.0-
2.520000.0001-
2.562520500.0001-
2.62521000.0-
2.687521500.0001-
2.7522000.0-
2.812522500.0-
2.87523000.0-
2.937523500.0-
3.024000.0001-
3.062524500.0-
3.12525000.0-
3.187525500.0-
3.2526000.0-
3.312526500.0-
3.37527000.0-
3.437527500.0-
3.528000.0002-
3.562528500.0-
3.62529000.0-
3.687529500.0001-
3.7530000.0-
3.812530500.0001-
3.87531000.0-
3.937531500.0001-
4.032000.0-
4.062532500.0-
4.12533000.0-
4.187533500.0003-
4.2534000.0-
4.312534500.0-
4.37535000.0001-
4.437535500.0-
4.536000.0-
4.562536500.0-
4.62537000.0001-
4.687537500.0-
4.7538000.0-
4.812538500.0-
4.87539000.0-
4.937539500.0-
5.040000.0-
5.062540500.0-
5.12541000.0-
5.187541500.0-
5.2542000.0-
5.312542500.0-
5.37543000.0-
5.437543500.0-
5.544000.0002-
5.562544500.0-
5.62545000.0-
5.687545500.0001-
5.7546000.0001-
5.812546500.0-
5.87547000.0-
5.937547500.0-
6.048000.0-
6.062548500.0-
6.12549000.0-
6.187549500.0-
6.2550000.0-
6.312550500.0002-
6.37551000.0-
6.437551500.0-
6.552000.0002-
6.562552500.0-
6.62553000.0-
6.687553500.0-
6.7554000.0001-
6.812554500.0-
6.87555000.0001-
6.937555500.0-
7.056000.0-
7.062556500.0-
7.12557000.0-
7.187557500.0-
7.2558000.0-
7.312558500.0-
7.37559000.0-
7.437559500.0-
7.560000.0-
7.562560500.0-
7.62561000.0-
7.687561500.0-
7.7562000.0-
7.812562500.0-
7.87563000.0-
7.937563500.0-
8.064000.0-
8.062564500.0-
8.12565000.0-
8.187565500.0-
8.2566000.0-
8.312566500.0-
8.37567000.0-
8.437567500.0-
8.568000.0-
8.562568500.0-
8.62569000.0-
8.687569500.0001-
8.7570000.0-
8.812570500.0-
8.87571000.0-
8.937571500.0-
9.072000.0-
9.062572500.0-
9.12573000.0-
9.187573500.0-
9.2574000.0-
9.312574500.0-
9.37575000.0-
9.437575500.0-
9.576000.0-
9.562576500.0-
9.62577000.0-
9.687577500.0-
9.7578000.0-
9.812578500.0-
9.87579000.0-
9.937579500.0-
10.080000.0-

Framework Versions

  • Python: 3.11.7
  • SetFit: 1.0.3
  • Sentence Transformers: 2.2.2
  • Transformers: 4.35.2
  • PyTorch: 2.1.1+cu121
  • Datasets: 2.14.5
  • Tokenizers: 0.15.1

Citation

BibTeX

bibtex
@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. -->