kaustubhgap's picture
Push model using huggingface_hub.
993d0ac verified
---
base_model: sentence-transformers/paraphrase-mpnet-base-v2
library_name: setfit
metrics:
- accuracy
pipeline_tag: text-classification
tags:
- setfit
- sentence-transformers
- text-classification
- generated_from_setfit_trainer
widget:
- text: one piece
- text: tube
- text: heavy weight
- text: track
- text: unitard
inference: true
model-index:
- name: SetFit with sentence-transformers/paraphrase-mpnet-base-v2
results:
- task:
type: text-classification
name: Text Classification
dataset:
name: Unknown
type: unknown
split: test
metrics:
- type: accuracy
value: 0.5493273542600897
name: Accuracy
---
# SetFit with sentence-transformers/paraphrase-mpnet-base-v2
This 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.
The model has been trained using an efficient few-shot learning technique that involves:
1. Fine-tuning a [Sentence Transformer](https://www.sbert.net) with contrastive learning.
2. Training a classification head with features from the fine-tuned Sentence Transformer.
## Model Details
### Model Description
- **Model Type:** SetFit
- **Sentence Transformer body:** [sentence-transformers/paraphrase-mpnet-base-v2](https://huggingface.co/sentence-transformers/paraphrase-mpnet-base-v2)
- **Classification head:** a [LogisticRegression](https://scikit-learn.org/stable/modules/generated/sklearn.linear_model.LogisticRegression.html) instance
- **Maximum Sequence Length:** 512 tokens
- **Number of Classes:** 119 classes
<!-- - **Training Dataset:** [Unknown](https://huggingface.co/datasets/unknown) -->
<!-- - **Language:** Unknown -->
<!-- - **License:** Unknown -->
### Model Sources
- **Repository:** [SetFit on GitHub](https://github.com/huggingface/setfit)
- **Paper:** [Efficient Few-Shot Learning Without Prompts](https://arxiv.org/abs/2209.11055)
- **Blogpost:** [SetFit: Efficient Few-Shot Learning Without Prompts](https://huggingface.co/blog/setfit)
### Model Labels
| Label | Examples |
|:------|:---------------------------------------------------------------------------------------------------|
| 79 | <ul><li>'peony middle notes'</li><li>'lemon middle notes'</li><li>'coconut middle notes'</li></ul> |
| 86 | <ul><li>'no print/no pattern'</li><li>'two tone'</li><li>'diagonal stripe'</li></ul> |
| 37 | <ul><li>'eel skin leather'</li><li>'metal'</li><li>'raffia'</li></ul> |
| 82 | <ul><li>'collarless'</li><li>'peaked lapel'</li><li>'front keyhole'</li></ul> |
| 95 | <ul><li>'standard toe'</li><li>'wide toe'</li><li>'extra wide toe'</li></ul> |
| 83 | <ul><li>'indoor'</li><li>'hike'</li><li>'beach'</li></ul> |
| 107 | <ul><li>'surplice'</li><li>'messenger bag'</li><li>'camera bag'</li></ul> |
| 19 | <ul><li>'mary jane'</li><li>'zip around wallet'</li><li>'tongue buckle'</li></ul> |
| 102 | <ul><li>'slits at knee'</li><li>'slits above hips'</li><li>'front slit at hem'</li></ul> |
| 35 | <ul><li>'tie'</li><li>'gem embellishment'</li><li>'caged'</li></ul> |
| 18 | <ul><li>'rolo chain'</li><li>'cord bracelet'</li><li>'figaro'</li></ul> |
| 65 | <ul><li>'wheat protein'</li><li>'rosemary ingredient'</li><li>'pea protein'</li></ul> |
| 68 | <ul><li>'bath towel'</li><li>'art print'</li><li>'reusable bottle'</li></ul> |
| 40 | <ul><li>'polyfill'</li><li>'silk fill'</li><li>'feather fill'</li></ul> |
| 50 | <ul><li>'palm grip'</li><li>'carpenter hook'</li><li>'storm flap'</li></ul> |
| 113 | <ul><li>'wide waistband'</li><li>'elastic inset'</li><li>'belt loops'</li></ul> |
| 75 | <ul><li>'glass'</li><li>'acrylic'</li><li>'opal'</li></ul> |
| 11 | <ul><li>'foam cups'</li><li>'wire'</li><li>'molded cups'</li></ul> |
| 38 | <ul><li>'dual layer fabric'</li><li>'2 way stretch'</li><li>'4 way stretch'</li></ul> |
| 63 | <ul><li>'light support'</li><li>'medium supprt'</li><li>'high support'</li></ul> |
| 44 | <ul><li>'face'</li><li>'hand'</li><li>'neck/dècolletage'</li></ul> |
| 115 | <ul><li>'soy wax'</li><li>'paraffin wax'</li></ul> |
| 42 | <ul><li>'regular'</li><li>'tailored'</li><li>'fitted'</li></ul> |
| 97 | <ul><li>'king'</li><li>'euro'</li><li>'standard'</li></ul> |
| 70 | <ul><li>'wrist length'</li><li>'above thigh'</li><li>'below bust'</li></ul> |
| 34 | <ul><li>'feminine'</li><li>'religious'</li><li>'boho'</li></ul> |
| 10 | <ul><li>'slim'</li><li>'regular'</li></ul> |
| 15 | <ul><li>'6-10 oz'</li><li>'11-20 oz'</li></ul> |
| 77 | <ul><li>'rose gold metal'</li><li>'gold plated'</li><li>'alloy'</li></ul> |
| 43 | <ul><li>'contrast inner lining'</li><li>'simple seaming'</li><li>'princess seams'</li></ul> |
| 7 | <ul><li>'neroli base notes'</li><li>'amber base notes'</li><li>'musk base notes'</li></ul> |
| 17 | <ul><li>'spot clean'</li><li>'dry clean'</li><li>'microwave safe'</li></ul> |
| 8 | <ul><li>'nourishing'</li><li>'firming'</li><li>'soothing/healing'</li></ul> |
| 103 | <ul><li>'lugged soles'</li><li>'non marking soles'</li></ul> |
| 26 | <ul><li>'wall control'</li><li>'switch control'</li></ul> |
| 99 | <ul><li>'fitted sleeves'</li><li>'fitted sleeve'</li><li>'structured sleeves'</li></ul> |
| 33 | <ul><li>'rim'</li><li>'feet'</li><li>'5 panel construction'</li></ul> |
| 64 | <ul><li>'mineral oil free'</li><li>'propylene glycol free'</li><li>'paraffin free'</li></ul> |
| 96 | <ul><li>'double strap'</li><li>'spaghetti straps'</li><li>'thin straps'</li></ul> |
| 1 | <ul><li>'shoulder back'</li><li>'full coverage'</li><li>'low back'</li></ul> |
| 62 | <ul><li>'rustic'</li><li>'coastal'</li><li>'scandinavian'</li></ul> |
| 39 | <ul><li>'metallic'</li><li>'swiss dot'</li><li>'base layer'</li></ul> |
| 60 | <ul><li>'halloween'</li><li>'christmas holiday'</li></ul> |
| 92 | <ul><li>'seamless'</li><li>'mid rise waist seam'</li><li>'flat seam'</li></ul> |
| 114 | <ul><li>'ultra high rise'</li><li>'mid rise'</li><li>'high waisted'</li></ul> |
| 105 | <ul><li>'top handle'</li><li>'detachable straps'</li><li>'chain strap'</li></ul> |
| 90 | <ul><li>'floral'</li><li>'psychedelic print'</li><li>'paisley'</li></ul> |
| 91 | <ul><li>'night'</li><li>'day'</li></ul> |
| 45 | <ul><li>'serum formulation'</li><li>'cream/creme'</li><li>'solid'</li></ul> |
| 59 | <ul><li>'strong hold'</li><li>'flexible hold'</li></ul> |
| 46 | <ul><li>'leather'</li><li>'fresh aquatic'</li><li>'green aromatic'</li></ul> |
| 21 | <ul><li>'matte'</li><li>'metallic'</li><li>'olive'</li></ul> |
| 69 | <ul><li>'cinnamon key notes'</li><li>'violet key notes'</li><li>'pepper key notes'</li></ul> |
| 101 | <ul><li>'dropped shoulder'</li><li>'puff shoulder'</li><li>'flutter sleeve'</li></ul> |
| 61 | <ul><li>'summer'</li><li>'everyday'</li><li>'indoor'</li></ul> |
| 104 | <ul><li>'wedding guest'</li><li>'bridal'</li><li>'halloween'</li></ul> |
| 32 | <ul><li>'indigo wash'</li><li>'acid wash'</li><li>'stonewash'</li></ul> |
| 51 | <ul><li>'still life graphic'</li><li>'sports graphic'</li><li>'star wars'</li></ul> |
| 48 | <ul><li>'beige'</li><li>'black'</li><li>'rose gold frame'</li></ul> |
| 87 | <ul><li>'medium pile'</li><li>'low pile'</li></ul> |
| 22 | <ul><li>'bright'</li><li>'pastel'</li><li>'light'</li></ul> |
| 41 | <ul><li>'matte finish'</li><li>'shiny finish'</li></ul> |
| 93 | <ul><li>'no buckle'</li><li>'geometric shape'</li><li>'straight silhouette'</li></ul> |
| 71 | <ul><li>'polarized'</li><li>'color tinted'</li><li>'mirrored'</li></ul> |
| 2 | <ul><li>'split back'</li><li>'racer back'</li><li>'open back'</li></ul> |
| 89 | <ul><li>'round stitch pocket'</li><li>'seam pocket'</li><li>'kangaroo pocket'</li></ul> |
| 20 | <ul><li>'removable hoodie'</li><li>'packable hood collar'</li><li>'hooded'</li></ul> |
| 52 | <ul><li>'thick'</li><li>'medium thick'</li></ul> |
| 55 | <ul><li>'amber head notes'</li><li>'lime head notes'</li><li>'musk head notes'</li></ul> |
| 58 | <ul><li>'back curved hem'</li><li>'twist hem'</li><li>'ribbed hem'</li></ul> |
| 118 | <ul><li>'light wood'</li><li>'medium wood'</li></ul> |
| 25 | <ul><li>'gifts for him'</li><li>'apres ski'</li><li>'cozy'</li></ul> |
| 109 | <ul><li>'closed toe'</li><li>'square toe'</li><li>'round toe'</li></ul> |
| 30 | <ul><li>'extended cuffs'</li><li>'storm cuffs'</li><li>'elastic cuff'</li></ul> |
| 24 | <ul><li>'ingrown hairs'</li><li>'frizz'</li><li>'redness'</li></ul> |
| 9 | <ul><li>'high cut'</li><li>'string bikini'</li></ul> |
| 94 | <ul><li>'opaque'</li><li>'sheer'</li></ul> |
| 16 | <ul><li>'2 card slot'</li><li>'card slots'</li></ul> |
| 78 | <ul><li>'gothcore'</li><li>'vanilla girl'</li><li>'dyed out'</li></ul> |
| 4 | <ul><li>'layered'</li><li>'bangle'</li><li>'cuff'</li></ul> |
| 23 | <ul><li>'parfum'</li><li>'eau de toilette'</li></ul> |
| 111 | <ul><li>'delicate'</li><li>'statement'</li></ul> |
| 12 | <ul><li>'flat brim'</li><li>'curved brim'</li><li>'fold over brim'</li></ul> |
| 98 | <ul><li>'dry'</li><li>'acne prone'</li><li>'mature'</li></ul> |
| 57 | <ul><li>'stacked heel'</li><li>'kitten heel'</li><li>'cone heel'</li></ul> |
| 67 | <ul><li>'id slot'</li><li>'interior pocket'</li><li>'interior zipper pocket'</li></ul> |
| 31 | <ul><li>'light wash'</li><li>'medium wash'</li><li>'colored'</li></ul> |
| 85 | <ul><li>'detailed stitching pant'</li><li>'simple seaming'</li></ul> |
| 116 | <ul><li>'knotted'</li><li>'percale'</li><li>'waffle weave'</li></ul> |
| 88 | <ul><li>'shag'</li><li>'cut pile'</li></ul> |
| 74 | <ul><li>'study hall'</li><li>'y2k'</li><li>'enchanted'</li></ul> |
| 72 | <ul><li>'fur'</li><li>'fleece'</li><li>'mesh'</li></ul> |
| 108 | <ul><li>'animal'</li><li>'love'</li></ul> |
| 73 | <ul><li>'unlined'</li><li>'fully lined'</li><li>'partially lined'</li></ul> |
| 13 | <ul><li>'wide brim'</li><li>'medium brim'</li></ul> |
| 76 | <ul><li>'bpa free material'</li><li>'scratch resistant material'</li></ul> |
| 54 | <ul><li>'straight handle'</li><li>'curved handle'</li></ul> |
| 100 | <ul><li>'rolled up sleeves'</li><li>'3/4 sleeve'</li><li>'bracelet length'</li></ul> |
| 84 | <ul><li>'manual open'</li><li>'auto open'</li></ul> |
| 14 | <ul><li>'wide'</li><li>'medium'</li></ul> |
| 27 | <ul><li>'superhero'</li><li>'disney'</li></ul> |
| 49 | <ul><li>'half rim'</li><li>'full rim'</li></ul> |
| 29 | <ul><li>'tall crown'</li><li>'short crown'</li></ul> |
| 106 | <ul><li>'low stretch'</li><li>'non stretch'</li></ul> |
| 112 | <ul><li>'mid vamp'</li><li>'high vamp'</li></ul> |
| 66 | <ul><li>'large interior'</li><li>'medium interior'</li><li>'small interior'</li></ul> |
| 53 | <ul><li>'all hair types'</li><li>'damaged/dry hair'</li></ul> |
| 117 | <ul><li>'light weight'</li><li>'mid weight'</li></ul> |
| 81 | <ul><li>'low cut'</li><li>'mid chest neckline'</li><li>'open front'</li></ul> |
| 5 | <ul><li>'thin band'</li><li>'soft band elastic'</li><li>'elastic band'</li></ul> |
| 28 | <ul><li>'flat top crown'</li><li>'round crown'</li><li>'no crown'</li></ul> |
| 56 | <ul><li>'ultra high heel'</li><li>'mid heel'</li><li>'high heel'</li></ul> |
| 110 | <ul><li>'relaxed'</li><li>'tailored'</li></ul> |
| 47 | <ul><li>'uplifting'</li><li>'bold'</li></ul> |
| 3 | <ul><li>'changing pad'</li><li>'bottle pocket'</li></ul> |
| 0 | <ul><li>'squeeze dispenser'</li><li>'dropper'</li></ul> |
| 80 | <ul><li>'wall mount'</li><li>'ceiling mount'</li></ul> |
| 6 | <ul><li>'medium'</li><li>'wide'</li></ul> |
| 36 | <ul><li>'exterior pocket'</li><li>'exterior snap pocket'</li></ul> |
## Evaluation
### Metrics
| Label | Accuracy |
|:--------|:---------|
| **all** | 0.5493 |
## 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("kaustubhgap/kaustubh_setfit_1iteration")
# Run inference
preds = model("tube")
```
<!--
### 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 set | Min | Median | Max |
|:-------------|:----|:-------|:----|
| Word count | 1 | 1.7047 | 6 |
| Label | Training Sample Count |
|:------|:----------------------|
| 0 | 2 |
| 1 | 5 |
| 2 | 12 |
| 3 | 2 |
| 4 | 6 |
| 5 | 3 |
| 6 | 2 |
| 7 | 12 |
| 8 | 16 |
| 9 | 2 |
| 10 | 2 |
| 11 | 11 |
| 12 | 4 |
| 13 | 2 |
| 14 | 2 |
| 15 | 2 |
| 16 | 2 |
| 17 | 6 |
| 18 | 9 |
| 19 | 63 |
| 20 | 8 |
| 21 | 31 |
| 22 | 6 |
| 23 | 2 |
| 24 | 13 |
| 25 | 5 |
| 26 | 2 |
| 27 | 2 |
| 28 | 3 |
| 29 | 2 |
| 30 | 13 |
| 31 | 3 |
| 32 | 7 |
| 33 | 22 |
| 34 | 12 |
| 35 | 102 |
| 36 | 2 |
| 37 | 119 |
| 38 | 34 |
| 39 | 32 |
| 40 | 6 |
| 41 | 2 |
| 42 | 13 |
| 43 | 17 |
| 44 | 5 |
| 45 | 10 |
| 46 | 6 |
| 47 | 2 |
| 48 | 10 |
| 49 | 2 |
| 50 | 91 |
| 51 | 13 |
| 52 | 2 |
| 53 | 2 |
| 54 | 2 |
| 55 | 12 |
| 56 | 4 |
| 57 | 7 |
| 58 | 17 |
| 59 | 2 |
| 60 | 2 |
| 61 | 7 |
| 62 | 9 |
| 63 | 3 |
| 64 | 14 |
| 65 | 53 |
| 66 | 3 |
| 67 | 6 |
| 68 | 41 |
| 69 | 41 |
| 70 | 33 |
| 71 | 5 |
| 72 | 5 |
| 73 | 4 |
| 74 | 7 |
| 75 | 49 |
| 76 | 2 |
| 77 | 23 |
| 78 | 11 |
| 79 | 12 |
| 80 | 2 |
| 81 | 5 |
| 82 | 33 |
| 83 | 33 |
| 84 | 2 |
| 85 | 2 |
| 86 | 17 |
| 87 | 2 |
| 88 | 2 |
| 89 | 10 |
| 90 | 29 |
| 91 | 2 |
| 92 | 8 |
| 93 | 21 |
| 94 | 2 |
| 95 | 3 |
| 96 | 5 |
| 97 | 10 |
| 98 | 5 |
| 99 | 6 |
| 100 | 6 |
| 101 | 12 |
| 102 | 13 |
| 103 | 2 |
| 104 | 10 |
| 105 | 28 |
| 106 | 2 |
| 107 | 321 |
| 108 | 2 |
| 109 | 10 |
| 110 | 2 |
| 111 | 2 |
| 112 | 2 |
| 113 | 15 |
| 114 | 4 |
| 115 | 2 |
| 116 | 5 |
| 117 | 2 |
| 118 | 2 |
### Training Hyperparameters
- batch_size: (16, 16)
- num_epochs: (1, 1)
- max_steps: -1
- sampling_strategy: oversampling
- num_iterations: 10
- 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
- seed: 42
- eval_max_steps: -1
- load_best_model_at_end: False
### Training Results
| Epoch | Step | Training Loss | Validation Loss |
|:------:|:----:|:-------------:|:---------------:|
| 0.0004 | 1 | 0.2895 | - |
| 0.0225 | 50 | 0.2059 | - |
| 0.0449 | 100 | 0.1794 | - |
| 0.0674 | 150 | 0.1994 | - |
| 0.0898 | 200 | 0.2708 | - |
| 0.1123 | 250 | 0.1355 | - |
| 0.1347 | 300 | 0.0695 | - |
| 0.1572 | 350 | 0.117 | - |
| 0.1796 | 400 | 0.0601 | - |
| 0.2021 | 450 | 0.0873 | - |
| 0.2245 | 500 | 0.07 | - |
| 0.2470 | 550 | 0.0805 | - |
| 0.2694 | 600 | 0.0204 | - |
| 0.2919 | 650 | 0.1059 | - |
| 0.3143 | 700 | 0.1178 | - |
| 0.3368 | 750 | 0.1804 | - |
| 0.3592 | 800 | 0.0979 | - |
| 0.3817 | 850 | 0.1597 | - |
| 0.4041 | 900 | 0.1215 | - |
| 0.4266 | 950 | 0.0188 | - |
| 0.4490 | 1000 | 0.0738 | - |
| 0.4715 | 1050 | 0.0635 | - |
| 0.4939 | 1100 | 0.1439 | - |
| 0.5164 | 1150 | 0.0684 | - |
| 0.5388 | 1200 | 0.0732 | - |
| 0.5613 | 1250 | 0.0401 | - |
| 0.5837 | 1300 | 0.1223 | - |
| 0.6062 | 1350 | 0.1044 | - |
| 0.6286 | 1400 | 0.0717 | - |
| 0.6511 | 1450 | 0.0413 | - |
| 0.6736 | 1500 | 0.0544 | - |
| 0.6960 | 1550 | 0.1419 | - |
| 0.7185 | 1600 | 0.0284 | - |
| 0.7409 | 1650 | 0.0484 | - |
| 0.7634 | 1700 | 0.0049 | - |
| 0.7858 | 1750 | 0.0229 | - |
| 0.8083 | 1800 | 0.0739 | - |
| 0.8307 | 1850 | 0.0371 | - |
| 0.8532 | 1900 | 0.0213 | - |
| 0.8756 | 1950 | 0.0753 | - |
| 0.8981 | 2000 | 0.0359 | - |
| 0.9205 | 2050 | 0.0232 | - |
| 0.9430 | 2100 | 0.0507 | - |
| 0.9654 | 2150 | 0.0258 | - |
| 0.9879 | 2200 | 0.0606 | - |
| 1.0 | 2227 | - | 0.2105 |
### Framework Versions
- Python: 3.10.12
- SetFit: 1.0.3
- Sentence Transformers: 3.0.1
- Transformers: 4.36.1
- PyTorch: 2.0.1+cu118
- Datasets: 2.20.0
- Tokenizers: 0.15.0
## 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.*
-->