CoolFace
Modelpublic

Shankhdhar/classifier_woog_botnal

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>'9. Is this product effective for pimples and acne?'</li><li>'What are the key features of the Hydration Combo Kit?'</li><li>'What are the main ingredients in the Daily Spread Moisturiser + Mineral Suncreen SPF 30?'</li></ul>
order tracking<ul><li>'What is the delivery status for my order placed using email address test@example.com?'</li><li>'I ordered the Cupcake Cases 3 days ago with order no 34567 how long will it take to deliver?'</li><li>'I need to return an item, what is the return policy for online orders?'</li></ul>
general faq<ul><li>'What ingredients in K-beauty products help with sensitive skin?'</li><li>'What inspired your founder to start Botnal?'</li><li>'How can I adapt K-beauty routines for dry weather?'</li></ul>
product policy<ul><li>'What makes BOTNAL skincare products clean and effective?'</li><li>'What is your return policy duration?'</li><li>'What are the accepted payment methods for purchasing BOTNAL products?'</li></ul>
product discoverability<ul><li>'Do you have any products specifically for targeting aging?'</li><li>'Which products are best for acne?'</li><li>'What products do you have for wrinkles?'</li></ul>

Evaluation

Metrics

LabelAccuracy
all1.0

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 products do you have for the body?")

<!--

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 count610.712624
LabelTraining Sample Count
general faq16
order tracking24
product discoverability16
product faq23
product policy8

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.002710.0657-
0.1359500.0053-
0.27171000.0002-
0.40761500.0001-
0.54352000.0003-
0.67932500.0002-
0.81523000.0001-
0.95113500.0001-
1.08704000.0004-
1.22284500.0001-
1.35875000.0001-
1.49465500.0001-
1.63046000.0001-
1.76636500.0001-
1.90227000.0001-

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. -->