dendimaki/emotionSample
013
1---2library_name: setfit3tags:4- setfit5- sentence-transformers6- text-classification7- generated_from_setfit_trainer8metrics:9- accuracy10widget:11- text: i miss our talks our cuddling our kissing and the feelings that you can only12 share with your beloved13- text: i feel that i m so pathetic and downright dumb to let people in let them toy14 with my feelings and then leaving me to clean up this pile of sadness inside me15- text: i told her that i woke up feeling mad that i am a woman and that i am probably16 always going to have to worry about being raped17- text: i try to share what i bake with a lot of people is because i love people and18 i want them to feel loved19- text: i feel for you despite the bitterness and longing20pipeline_tag: text-classification21inference: true22base_model: sentence-transformers/paraphrase-mpnet-base-v223model-index:24- name: SetFit with sentence-transformers/paraphrase-mpnet-base-v225 results:26 - task:27 type: text-classification28 name: Text Classification29 dataset:30 name: Unknown31 type: unknown32 split: test33 metrics:34 - type: accuracy35 value: 0.4584210526315789536 name: Accuracy37---38 39# SetFit with sentence-transformers/paraphrase-mpnet-base-v240 41This is a [SetFit](https://github.com/huggingface/setfit) model that can be used for Text Classification. This SetFit model uses [sentence-transformers/paraphrase-mpnet-base-v2](https://huggingface.co/sentence-transformers/paraphrase-mpnet-base-v2) as the Sentence Transformer embedding model. A [LogisticRegression](https://scikit-learn.org/stable/modules/generated/sklearn.linear_model.LogisticRegression.html) instance is used for classification.42 43The model has been trained using an efficient few-shot learning technique that involves:44 451. Fine-tuning a [Sentence Transformer](https://www.sbert.net) with contrastive learning.462. Training a classification head with features from the fine-tuned Sentence Transformer.47 48## Model Details49 50### Model Description51- **Model Type:** SetFit52- **Sentence Transformer body:** [sentence-transformers/paraphrase-mpnet-base-v2](https://huggingface.co/sentence-transformers/paraphrase-mpnet-base-v2)53- **Classification head:** a [LogisticRegression](https://scikit-learn.org/stable/modules/generated/sklearn.linear_model.LogisticRegression.html) instance54- **Maximum Sequence Length:** 512 tokens55- **Number of Classes:** 6 classes56<!-- - **Training Dataset:** [Unknown](https://huggingface.co/datasets/unknown) -->57<!-- - **Language:** Unknown -->58<!-- - **License:** Unknown -->59 60### Model Sources61 62- **Repository:** [SetFit on GitHub](https://github.com/huggingface/setfit)63- **Paper:** [Efficient Few-Shot Learning Without Prompts](https://arxiv.org/abs/2209.11055)64- **Blogpost:** [SetFit: Efficient Few-Shot Learning Without Prompts](https://huggingface.co/blog/setfit)65 66### Model Labels67| Label | Examples |68|:---------|:---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------|69| sadness | <ul><li>'i am from new jersey and this first drink was consumed at a post prom party so i feel it s appropriately lame'</li><li>'i am the one feeling punished'</li><li>'i wouldn t feel submissive which has it s place but not in the work environment'</li></ul> |70| love | <ul><li>'i would rather take my chances on keeping my heart and getting it broken again and again then to stop feeling to stop caring to be bitter cross cynical'</li><li>'i still love to run and plan to keep it up but i don t want to once again register for so many races that i feel like every exercise moment needs to be devoted to running'</li><li>'i suddenly feel that this is more than a sweet love song that every girls could sing in front of their boyfriends'</li></ul> |71| surprise | <ul><li>'i was feeling an act of god at work in my life and it was an amazing feeling'</li><li>'i tween sat for my moms boss year old and year old boys this weekend id say babysit but that feels weird considering there were n'</li><li>'i started feeling funny and then friday i woke up sick as a dog'</li></ul> |72| anger | <ul><li>'i could of course go on with it feeling resentful of him with him being blissfully unaware of anything being wrong'</li><li>'i feel tortured because i am not allowed to enjoy food the way my friend can'</li><li>'i feel like i should be offended but yawwwn'</li></ul> |73| joy | <ul><li>'i was feeling over eager and hopped on to the tube to ride the eye of london'</li><li>'i am not feeling particularly creative'</li><li>'i woke on saturday feeling a little brighter and was very keen to get outdoors after spending all day friday wallowing in self pity'</li></ul> |74| fear | <ul><li>'im feeling pretty shaken at the moment'</li><li>'i know he is totally trainable and can be free of his arm chewing habits i feel that the kids would be too nervous around him during the training process'</li><li>'i am feeling pretty restless right now while typing this'</li></ul> |75 76## Evaluation77 78### Metrics79| Label | Accuracy |80|:--------|:---------|81| **all** | 0.4584 |82 83## Uses84 85### Direct Use for Inference86 87First install the SetFit library:88 89```bash90pip install setfit91```92 93Then you can load this model and run inference.94 95```python96from setfit import SetFitModel97 98# Download from the 🤗 Hub99model = SetFitModel.from_pretrained("dendimaki/apeiron-v4")100# Run inference101preds = model("i feel for you despite the bitterness and longing")102```103 104<!--105### Downstream Use106 107*List how someone could finetune this model on their own dataset.*108-->109 110<!--111### Out-of-Scope Use112 113*List how the model may foreseeably be misused and address what users ought not to do with the model.*114-->115 116<!--117## Bias, Risks and Limitations118 119*What are the known or foreseeable issues stemming from this model? You could also flag here known failure cases or weaknesses of the model.*120-->121 122<!--123### Recommendations124 125*What are recommendations with respect to the foreseeable issues? For example, filtering explicit content.*126-->127 128## Training Details129 130### Training Set Metrics131| Training set | Min | Median | Max |132|:-------------|:----|:--------|:----|133| Word count | 4 | 17.6458 | 55 |134 135| Label | Training Sample Count |136|:---------|:----------------------|137| sadness | 8 |138| joy | 8 |139| love | 8 |140| anger | 8 |141| fear | 8 |142| surprise | 8 |143 144### Training Hyperparameters145- batch_size: (16, 16)146- num_epochs: (4, 4)147- max_steps: -1148- sampling_strategy: oversampling149- body_learning_rate: (2e-05, 1e-05)150- head_learning_rate: 0.01151- loss: CosineSimilarityLoss152- distance_metric: cosine_distance153- margin: 0.25154- end_to_end: False155- use_amp: False156- warmup_proportion: 0.1157- seed: 42158- eval_max_steps: -1159- load_best_model_at_end: True160 161### Training Results162| Epoch | Step | Training Loss | Validation Loss |163|:-------:|:-------:|:-------------:|:---------------:|164| 0.0083 | 1 | 0.2802 | - |165| 0.4167 | 50 | 0.1302 | - |166| 0.8333 | 100 | 0.0121 | - |167| 1.0 | 120 | - | 0.2668 |168| 1.25 | 150 | 0.003 | - |169| 1.6667 | 200 | 0.0007 | - |170| **2.0** | **240** | **-** | **0.2562** |171| 2.0833 | 250 | 0.0008 | - |172| 2.5 | 300 | 0.0009 | - |173| 2.9167 | 350 | 0.0007 | - |174| 3.0 | 360 | - | 0.2572 |175| 3.3333 | 400 | 0.0005 | - |176| 3.75 | 450 | 0.0005 | - |177| 4.0 | 480 | - | 0.2571 |178 179* The bold row denotes the saved checkpoint.180### Framework Versions181- Python: 3.10.12182- SetFit: 1.0.1183- Sentence Transformers: 2.2.2184- Transformers: 4.35.2185- PyTorch: 2.1.0+cu121186- Datasets: 2.16.0187- Tokenizers: 0.15.0188 189## Citation190 191### BibTeX192```bibtex193@article{https://doi.org/10.48550/arxiv.2209.11055,194 doi = {10.48550/ARXIV.2209.11055},195 url = {https://arxiv.org/abs/2209.11055},196 author = {Tunstall, Lewis and Reimers, Nils and Jo, Unso Eun Seo and Bates, Luke and Korat, Daniel and Wasserblat, Moshe and Pereg, Oren},197 keywords = {Computation and Language (cs.CL), FOS: Computer and information sciences, FOS: Computer and information sciences},198 title = {Efficient Few-Shot Learning Without Prompts},199 publisher = {arXiv},200 year = {2022},201 copyright = {Creative Commons Attribution 4.0 International}202}203```204 205<!--206## Glossary207 208*Clearly define terms in order to be accessible across audiences.*209-->210 211<!--212## Model Card Authors213 214*Lists the people who create the model card, providing recognition and accountability for the detailed work that goes into its construction.*215-->216 217<!--218## Model Card Contact219 220*Provides a way for people who have updates to the Model Card, suggestions, or questions, to contact the Model Card authors.*221-->