CoolFace
Modelpublic

alexsheiko/setfit-email-model

sourceHugging Faceupdated 1y agoView on Hugging Face
0likes5downloads
Model Card

SetFit with sentence-transformers/all-MiniLM-L6-v2

This is a SetFit model that can be used for Text Classification. This SetFit model uses sentence-transformers/all-MiniLM-L6-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
👨‍⚖️ Legal<ul><li>'Airmoney Expiration Policy Update Hi alex ,\\r\\n\\r\\n \\r\\n\\r\\nFrom February 1, 2025, your Airmoney can expire \\u2014 this will always apply to your total balance, not partial amounts of Airmoney. \\r\\n\\r\\n \\r\\n\\r\\nYour Airmoney balance is set to expire on 1st February 2026.\\r\\n\\r\\nYour current Airmoney balance is 10.88 USD*.\\r\\n\\r\\n \\r\\n\\r\\nBelow, you\\u2019ll find details to help you understand how this change applies to you.\\r\\n\\r\\n \\r\\n\\r\\nDoes my Airmoney balance have to expire?\\r\\n\\r\\n \\r\\n\\r\\nNo, your Air'</li><li>'Meta Privacy Policy update Meta Privacy Policy update\\r\\n \\r\\nHi Alex,\\r\\n \\r\\nWe\\u2019re updating the Meta Privacy Policy to clarify some details.\\r\\n \\r\\nWhat you should know\\r\\n \\r\\nHere are the details that this update clarifies:\\r\\n \\r\\n\\u2022\\tHow we use information from third parties\\r\\n\\u2022\\tLegitimate interests is now our legal basis for using your information to improve Meta Products. Learn what this means for your rights\\r\\n\\u2022\\tWhen your information can be accessible to search engines\\r\\n \\'</li><li>"Google Play Developer Program Policy Update DEVELOPER UPDATE\\r\\nHello Google Play Developer,\\r\\nTo give users more control over their data, we're updating our Health Connect policy to strengthen safeguards regarding the handling of sensitive health record data. Health Connect is an Android platform that allows health and fitness apps to store and share the same on-device data, within a unified ecosystem. It also offers a single place for users to control which apps can read and write health and fitness data"</li></ul>
👮🏽‍♂️ Security<ul><li>"Petcube security: Sign-in notifications Hi, alexeysheiko.\\r\\n\\r\\nWe noticed a recent login to your Petcube account.\\r\\n\\r\\nTimestamp (UTC): 2025-05-04T08:19:58+00:00\\r\\n\\r\\nIP address: 85.114.207.94\\r\\n\\r\\nIf this was you, no action is required. If this wasn't you, follow the link to secure your account. Reset password\\r\\nWags & Purrs,\\r\\nPetcube Team"</li><li>'A new device is using your account A new device is using your account\\r\\nHi Oleksii,\\r\\nA new device signed in to your Netflix account, alexsheikodev@gmail.com.\\r\\n \\r\\nThe details\\r\\nDevice\\r\\nMac Chrome - Web Browser\\r\\nLocation\\r\\nMazovia, Poland\\r\\n(This location may not be exact.)\\r\\nTime\\r\\nJune 19th, 3:21 PM GMT+3\\r\\n \\r\\nIf this was you or someone in your household:\\r\\nEnjoy watching!\\r\\nIf it was someone else:\\r\\nPlease remember that we only allow the people in your household to use your account.\\r'</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("setfit_model_id")
# Run inference
preds = model("\"The Impact of Assessment for 21 st Century Skills in Higher Education Institutions: A Narrative Literature Review\" by Rany Sam You read the paper Assessing 21st century skills: Integrating research findings. We found a related paper on Academia:\r\n\r\nThe Impact of Assessment for 21 st Century Skills in Higher Education Institutions: A Narrative Literature Review\r\nPaper Thumbnail\t\r\nAuthor Photo Rany Sam\r\n2024, Multitech Publisher\r\n23 Views \r\nView PDF \u25B8\r\n \t\t\r\nDownload PDF \u2B07\r\n\r")

<!--

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 count959.87579
LabelTraining Sample Count
👨‍⚖️ Legal6
👮🏽‍♂️ Security2

Training Hyperparameters

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

Training Results

EpochStepTraining LossValidation Loss
0.033310.2806-
1.6667500.038-

Framework Versions

  • —Python: 3.13.5
  • —SetFit: 1.1.2
  • —Sentence Transformers: 4.1.0
  • —Transformers: 4.52.4
  • —PyTorch: 2.7.1
  • —Datasets: 3.6.0
  • —Tokenizers: 0.21.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. -->