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. Fine-tuning a Sentence Transformer with contrastive learning.
  2. Training a classification head with features from the fine-tuned Sentence Transformer.

Model Details

Model Description

Model Sources

Model Labels

Label Examples
2
  • 'i feel like i am abandoning him in a way but he is so supportive of the move'
  • 'i reckon this is fair enough yes the queen is their monarch but they are so geographically removed from her and her presence that i appreciate that many australians may feel more loyal to their country and own communities than to the queen herself'
  • 'i just think about all the day i chatted with my mom amp also feeling horny and masturbate myself'
5
  • 'i missed about a month combined of classes and was pretty much bed ridden for months of the semester i feel really amazed that i was able to pass'
  • 'i feel surprised because i didnt expect it'
  • 'i read through the ol feefyefo space i feel amazed at how much i could blabber and how transparent i was with my life'
4
  • 'when my relatives and i were in a car going slowly on a frozen road'
  • 'i was feeling doubtful and sad about the relationship i have with this man'
  • 'i feel bashful under his teasing scrutiny'
1
  • 'i don t want to tell people how my first was with you and how you made me feel i don t want to think that you re the most gorgeous guy i ve ever seen and i love how other people disagree because i don t want them to see how truly wonderful you are to me'
  • 'i met you i used to want to lock myself into a vault just to feel precious'
  • 'i feel more content with what i have achieved and i know if i don t write today there ll still be a tomorrow'
0
  • 'i feel like every day i grow stronger and become less needy of someone to fill that role'
  • 'i know intellectually that it s not true but i feel entirely isolated'
  • 'i didn t feel like doing much chris and i mostly just took too many pictures of unimportant stuff'
3
  • 'i was yelling to the group in front and not getting an answer and getting increasingly concerned and feeling increasingly frustrated with those lagging behind despite repeated explanations and pleas from me regarding the need to catch up with the advance group'
  • 'i was feeling annoyed suddenly'
  • 'i didnt even have time to feel jealous i was so busy pinning her pictures and writing down a href http nanashi'

Evaluation

Metrics

Label Accuracy
all 0.44

Uses

Direct Use for Inference

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("DanielTobi0/setfit-emotion-categorization")
# Run inference
preds = model("im updating my blog because i feel shitty")

Training Details

Training Set Metrics

Training set Min Median Max
Word count 5 22.25 58
Label Training Sample Count
0 8
1 8
2 8
3 8
4 8
5 8

Training Hyperparameters

  • batch_size: (16, 2)
  • num_epochs: (1, 16)
  • max_steps: -1
  • sampling_strategy: oversampling
  • body_learning_rate: (2e-05, 1e-05)
  • head_learning_rate: 0.01
  • loss: CosineSimilarityLoss
  • distance_metric: cosine_distance
  • margin: 0.25
  • end_to_end: False
  • use_amp: False
  • warmup_proportion: 0.1
  • l2_weight: 0.01
  • seed: 42
  • eval_max_steps: -1
  • load_best_model_at_end: False

Training Results

Epoch Step Training Loss Validation Loss
0.0083 1 0.2152 -
0.4167 50 0.1962 -
0.8333 100 0.063 -

Framework Versions

  • Python: 3.13.13
  • SetFit: 1.1.3
  • Sentence Transformers: 5.5.1
  • Transformers: 4.57.6
  • PyTorch: 2.12.0+cu130
  • Datasets: 4.8.5
  • Tokenizers: 0.22.2

Citation

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}
}
Downloads last month
16
Safetensors
Model size
0.1B params
Tensor type
F32
·
Inference Providers NEW
This model isn't deployed by any Inference Provider. 🙋 Ask for provider support

Model tree for DanielTobi0/setfit-emotion-categorization

Finetuned
(322)
this model

Paper for DanielTobi0/setfit-emotion-categorization

Evaluation results