CoolFace
Modelpublic

waterabbit114/my-setfit-classifier_toxic

sourceHugging Faceupdated 2y agoView on Hugging Face
0likes1.2kdownloads
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>"hey , you are a chicken shit coward i told you that everytime you had one of your administrator buddies block me, i would quickly be back on with a new ip address editing your vandalism of this article. i meant it!!! why don't you stop masturbating to wikipedia and get a real life? i told you that you don't know who you're fuck with!!!"</li><li>'and you are a motherfucking asshole,suck your dick,you dirty son of a dicks'</li><li>'" you are actually trying to goad me into an arguement. how cute. when you just said on your cute ani post that we are wearing you out with our arguements. as for that diff of your prefer versions, it would be the one before i reverted you...this one. you didn\'t like the comprimise, so you revert it to what you feel is best, not to what was there before. try reading up on wp:own, cause you are trying to own this article and that ain\'t gonna happen. oh, and for someone ""standing by"" their statement that it is good for people to believe ase had a friend that was a murder victim. you sir are a callous asshole (and i stand by that term) and nothing you do will make me believe otherwise. if you can\'t see what you wrote was unthinkably wrong, rude and cold...you don\'t deserve to be on wikipedia, not alone the internet....or this planet. - • talk • "'</li></ul>

Evaluation

Metrics

LabelAccuracy
all0.9221

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_toxic")
# 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 count398.8898
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.0656-
0.0625500.0046-
0.1251000.0018-
0.18751500.0003-
0.252000.0062-
0.31252500.0011-
0.3753000.0009-
0.43753500.0-
0.54000.0008-
0.56254500.0001-
0.6255000.0002-
0.68755500.0-
0.756000.0-
0.81256500.0002-
0.8757000.0001-
0.93757500.0001-
1.08000.0002-
1.06258500.0002-
1.1259000.0001-
1.18759500.0001-
1.2510000.0003-
1.312510500.0001-
1.37511000.0001-
1.437511500.0002-
1.512000.0001-
1.562512500.0005-
1.62513000.0001-
1.687513500.0-
1.7514000.0001-
1.812514500.0001-
1.87515000.0001-
1.937515500.0001-
2.016000.0-
2.062516500.0-
2.12517000.0003-
2.187517500.0-
2.2518000.0004-
2.312518500.0004-
2.37519000.0-
2.437519500.0-
2.520000.0-
2.562520500.0-
2.62521000.0003-
2.687521500.0-
2.7522000.0001-
2.812522500.0-
2.87523000.0-
2.937523500.0001-
3.024000.0-
3.062524500.0-
3.12525000.0002-
3.187525500.0-
3.2526000.0001-
3.312526500.0-
3.37527000.0-
3.437527500.0001-
3.528000.0-
3.562528500.0-
3.62529000.0001-
3.687529500.0-
3.7530000.0-
3.812530500.0-
3.87531000.0-
3.937531500.0-
4.032000.0-
4.062532500.0001-
4.12533000.0-
4.187533500.0-
4.2534000.0-
4.312534500.0-
4.37535000.0-
4.437535500.0-
4.536000.0-
4.562536500.0-
4.62537000.0002-
4.687537500.0-
4.7538000.0-
4.812538500.0-
4.87539000.0-
4.937539500.0-
5.040000.0001-
5.062540500.0-
5.12541000.0-
5.187541500.0-
5.2542000.0-
5.312542500.0-
5.37543000.0-
5.437543500.0-
5.544000.0-
5.562544500.0-
5.62545000.0-
5.687545500.0-
5.7546000.0-
5.812546500.0-
5.87547000.0-
5.937547500.0-
6.048000.0001-
6.062548500.0-
6.12549000.0003-
6.187549500.0002-
6.2550000.0-
6.312550500.0-
6.37551000.0-
6.437551500.0001-
6.552000.0-
6.562552500.0-
6.62553000.0-
6.687553500.0001-
6.7554000.0001-
6.812554500.0-
6.87555000.0-
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.0001-
7.812562500.0-
7.87563000.0-
7.937563500.0001-
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.0001-
8.687569500.0-
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. -->