CoolFace
Modelpublic

Shankhdhar/classifier_woog_arista_vault_combined

sourceHugging Faceupdated 2y agoView on Hugging Face
0likes5downloads
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
product faq<ul><li>'8. What colors are available for the smart wallet?'</li><li>'Is the Shoe Cleaning Brush - Combo of 3 a single product, kit, or combo?'</li><li>'Can you describe the material of the Techbag Fingerlock Laptop Leather Bags in Brown?'</li></ul>
Out of Scope<ul><li>'I like to go swimming in the ocean'</li><li>'The traffic was terrible on my way to work today'</li><li>'Can I visit your physical store?'</li></ul>
order tracking<ul><li>'I need to know the expected delivery date for my order. Can you assist me with that?'</li><li>'How long will it take to deliver the 50 pack of Brown Bakery Boxes to Patna?'</li><li>'I need to know the status of my recent order. Can you check if it has been dispatched?'</li></ul>
general faq<ul><li>'How does hormonal imbalance contribute to acne?'</li><li>'How to identify mashru silk'</li><li>'What makes Purely Yours products different from other Ayurvedic brands?'</li></ul>
product policy<ul><li>'Are there any delivery charges for orders above INR 499?'</li><li>'Do you offer a satisfaction guarantee for sneakers purchased with a store prepaid card?'</li><li>'Do you share my personal information with third parties?'</li></ul>
product discoverability<ul><li>'What body products do you have for body mist?'</li><li>'Are there any products available for female sexual wellness?'</li><li>'Show me all bakery boxes with dividers'</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("What’s the best payment gateway for an online store?")

<!--

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 count410.436124
LabelTraining Sample Count
Out of Scope60
general faq60
order tracking60
product discoverability60
product faq60
product policy60

Training Hyperparameters

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

Training Results

EpochStepTraining LossValidation Loss
0.000110.3001-
0.0074500.2362-
0.01481000.2573-
0.02221500.223-
0.02962000.2201-
0.03702500.1694-
0.04443000.0765-
0.05193500.0828-
0.05934000.0514-
0.06674500.0482-
0.07415000.0435-
0.08155500.006-
0.08896000.0071-
0.09636500.0049-
0.10377000.0023-
0.11117500.0007-
0.11858000.0011-
0.12598500.0007-
0.13339000.001-
0.14079500.0004-
0.148110000.0006-
0.155610500.001-
0.163011000.0006-
0.170411500.0006-
0.177812000.0003-
0.185212500.0003-
0.192613000.0003-
0.213500.0003-
0.207414000.0003-
0.214814500.0002-
0.222215000.0004-
0.229615500.0001-
0.237016000.0002-
0.244416500.0001-
0.251917000.0002-
0.259317500.0002-
0.266718000.0002-
0.274118500.0006-
0.281519000.0024-
0.288919500.0012-
0.296320000.0002-
0.303720500.0003-
0.311121000.0002-
0.318521500.0002-
0.325922000.0001-
0.333322500.0001-
0.340723000.0001-
0.348123500.0002-
0.355624000.0001-
0.363024500.0002-
0.370425000.0001-
0.377825500.0001-
0.385226000.0019-
0.392626500.0001-
0.427000.0003-
0.407427500.0001-
0.414828000.0001-
0.422228500.0001-
0.429629000.0001-
0.437029500.0002-
0.444430000.0001-
0.451930500.0001-
0.459331000.0001-
0.466731500.0001-
0.474132000.0001-
0.481532500.0001-
0.488933000.0001-
0.496333500.0001-
0.503734000.0001-
0.511134500.0001-
0.518535000.0001-
0.525935500.0001-
0.533336000.0-
0.540736500.0001-
0.548137000.0001-
0.555637500.0001-
0.563038000.0001-
0.570438500.0001-
0.577839000.0-
0.585239500.0001-
0.592640000.0-
0.640500.0001-
0.607441000.0-
0.614841500.0001-
0.622242000.0001-
0.629642500.0001-
0.637043000.0001-
0.644443500.0-
0.651944000.0001-
0.659344500.0001-
0.666745000.0-
0.674145500.0001-
0.681546000.0001-
0.688946500.0001-
0.696347000.0001-
0.703747500.0001-
0.711148000.0001-
0.718548500.0001-
0.725949000.0001-
0.733349500.0-
0.740750000.0-
0.748150500.0-
0.755651000.0001-
0.763051500.0001-
0.770452000.0001-
0.777852500.0001-
0.785253000.0001-
0.792653500.0-
0.854000.0001-
0.807454500.0-
0.814855000.0001-
0.822255500.0001-
0.829656000.0-
0.837056500.0-
0.844457000.0-
0.851957500.0001-
0.859358000.0001-
0.866758500.0001-
0.874159000.0001-
0.881559500.0001-
0.888960000.0-
0.896360500.0-
0.903761000.0-
0.911161500.0-
0.918562000.0-
0.925962500.0-
0.933363000.0001-
0.940763500.0-
0.948164000.0-
0.955664500.0-
0.963065000.0-
0.970465500.0-
0.977866000.0-
0.985266500.0001-
0.992667000.0001-
1.067500.0-
1.007468000.0-
1.014868500.0-
1.022269000.0-
1.029669500.0-
1.037070000.0-
1.044470500.0-
1.051971000.0001-
1.059371500.0-
1.066772000.0-
1.074172500.0003-
1.081573000.0001-
1.088973500.059-
1.096374000.0002-
1.103774500.0001-
1.111175000.0001-
1.118575500.0001-
1.125976000.0001-
1.133376500.0-
1.140777000.0001-
1.148177500.0-
1.155678000.0001-
1.163078500.0-
1.170479000.0-
1.177879500.0001-
1.185280000.0001-
1.192680500.0001-
1.281000.0-
1.207481500.0001-
1.214882000.0001-
1.222282500.0-
1.229683000.0-
1.237083500.0-
1.244484000.0-
1.251984500.0-
1.259385000.0-
1.266785500.0-
1.274186000.0-
1.281586500.0001-
1.288987000.0-
1.296387500.0-
1.303788000.0-
1.311188500.0-
1.318589000.0-
1.325989500.0-
1.333390000.0-
1.340790500.0-
1.348191000.0-
1.355691500.0-
1.363092000.0-
1.370492500.0-
1.377893000.0-
1.385293500.0-
1.392694000.0-
1.494500.0001-
1.407495000.0-
1.414895500.0-
1.422296000.0-
1.429696500.0-
1.437097000.0-
1.444497500.0-
1.451998000.0-
1.459398500.0-
1.466799000.0-
1.474199500.0-
1.4815100000.0-
1.4889100500.0-
1.4963101000.0-
1.5037101500.0-
1.5111102000.0-
1.5185102500.0-
1.5259103000.0-
1.5333103500.0-
1.5407104000.0-
1.5481104500.0-
1.5556105000.0-
1.5630105500.0-
1.5704106000.0-
1.5778106500.0-
1.5852107000.0-
1.5926107500.0-
1.6108000.0-
1.6074108500.0-
1.6148109000.0-
1.6222109500.0-
1.6296110000.0-
1.6370110500.0-
1.6444111000.0-
1.6519111500.0-
1.6593112000.0-
1.6667112500.0-
1.6741113000.0-
1.6815113500.0-
1.6889114000.0-
1.6963114500.0-
1.7037115000.0-
1.7111115500.0-
1.7185116000.0-
1.7259116500.0001-
1.7333117000.0-
1.7407117500.0-
1.7481118000.0-
1.7556118500.0-
1.7630119000.0-
1.7704119500.0-
1.7778120000.0-
1.7852120500.0-
1.7926121000.0-
1.8121500.0-
1.8074122000.0-
1.8148122500.0-
1.8222123000.0-
1.8296123500.0-
1.8370124000.0-
1.8444124500.0-
1.8519125000.0-
1.8593125500.0-
1.8667126000.0-
1.8741126500.0-
1.8815127000.0-
1.8889127500.0-
1.8963128000.0-
1.9037128500.0-
1.9111129000.0-
1.9185129500.0-
1.9259130000.0-
1.9333130500.0-
1.9407131000.0-
1.9481131500.0-
1.9556132000.0-
1.9630132500.0-
1.9704133000.0-
1.9778133500.0-
1.9852134000.0-
1.9926134500.0-
2.0135000.0-

Framework Versions

  • —Python: 3.10.16
  • —SetFit: 1.0.3
  • —Sentence Transformers: 2.7.0
  • —Transformers: 4.40.2
  • —PyTorch: 2.2.2
  • —Datasets: 2.19.1
  • —Tokenizers: 0.19.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. -->