CoolFace
Modelpublic

Netta1994/setfit_oversampling_2k

sourceHugging Faceupdated 2y agoView on Hugging Face
1likes5downloads
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
1.0<ul><li>'Based solely on the given details, it is not feasible to ascertain the physical impacts on the body when an individual is fatigued and subsequently encounters a surge of energy. The provided data primarily concentrates on pH and CO levels in various contexts such as conductivity, soil, water, and culture vessels. Nevertheless, it does not'</li><li>'To get a ShoutOut to pop up monthly, you would need to set the frequency options for the ShoutOut to trigger once a month. However, the provided contexts only mention frequency options such as "Once," "Once a Day," and "Always." There is no direct mention of a monthly frequency option in the provided contexts.\n\nGiven this information, the answer to your question based on the provided contexts is: "I\'m sorry, I\'m not sure how to answer your question. Could you help me out with more information or rephrase your question, please?'</li><li>"I can see how having the credit card details of a business would provide a deeper understanding of their expenditures. Yet, releasing information such as credit card numbers is strictly against privacy policies and regulations. It's illegal, unethical, and a severe breach of trust to share such confidential details."</li></ul>
0.0<ul><li>'pRect is an object that contains the x, y, width, and height properties. It is used to determine the index of the object in the nodes array and to insert the object into the nodes object.'</li><li>'Yes, you can search an outside knowledge base using the keywords a user searched for in the player menu. WalkMe offers a Search Provider Integration feature that allows you to supplement your WalkMe items with your existing knowledge base or support center resources. Once enabled, a search performed within the WalkMe Widget will yield results from the specified domains, showing your existing content alongside your WalkMe content. The current supported search providers for this integration are Zendesk, Desk, Bing, and Google. If your current search provider is not on the supported list, please reach out to your Account Manager for further assistance. For more information on how to set up the Search Provider Integration, please refer to our Support article. How else can I assist you today?'</li><li>'Write a precise answer to "how to export homepage to pdf" only based on "KB12345". Only when absolutely confident that If the information is not present in the "KB12345", respond with Answer Not Found.'</li></ul>

Evaluation

Metrics

LabelAccuracy
all0.9840

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("Netta1994/setfit_oversampling_2k")
# Run inference
preds = model("The author clearly cites it as a Reddit thread.  In a scholastic paper,  you would be expected to have a bit more original content,  but you wouldn't 'get in trouble' ")

<!--

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 count189.6623412
LabelTraining Sample Count
0.01454
1.0527

Training Hyperparameters

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

Training Results

EpochStepTraining LossValidation Loss
0.000210.3718-
0.0101500.2723-
0.02021000.1298-
0.03031500.091-
0.04042000.046-
0.05052500.0348-
0.06063000.0208-
0.07073500.0044-
0.08084000.0041-
0.09094500.0046-
0.10095000.0007-
0.11105500.0004-
0.12116000.0601-
0.13126500.0006-
0.14137000.0006-
0.15147500.0661-
0.16158000.0002-
0.17168500.0009-
0.18179000.0002-
0.19189500.0017-
0.201910000.0007-
0.212010500.0606-
0.222111000.0001-
0.232211500.0004-
0.242312000.0029-
0.252412500.0001-
0.262513000.0001-
0.272613500.0001-
0.282714000.0047-
0.292814500.0-
0.302815000.0-
0.312915500.0-
0.323016000.0-
0.333116500.0001-
0.343217000.0004-
0.353317500.0-
0.363418000.0-
0.373518500.0-
0.383619000.0-
0.393719500.0-
0.403820000.0-
0.413920500.0-
0.424021000.0-
0.434121500.0-
0.444222000.0-
0.454322500.0001-
0.464423000.0-
0.474523500.0-
0.484624000.0-
0.494624500.0-
0.504725000.0-
0.514825500.0-
0.524926000.0-
0.535026500.0-
0.545127000.0-
0.555227500.0001-
0.565328000.0-
0.575428500.0-
0.585529000.0-
0.595629500.0-
0.605730000.0-
0.615830500.0-
0.625931000.0002-
0.636031500.0-
0.646132000.0-
0.656232500.0002-
0.666333000.0-
0.676433500.0-
0.686534000.0-
0.696534500.0-
0.706635000.0-
0.716735500.0-
0.726836000.0-
0.736936500.0-
0.747037000.0-
0.757137500.0-
0.767238000.0-
0.777338500.0-
0.787439000.0-
0.797539500.0-
0.807640000.0-
0.817740500.0-
0.827841000.0-
0.837941500.0-
0.848042000.0-
0.858142500.0-
0.868243000.0-
0.878343500.0-
0.888444000.0-
0.898444500.0-
0.908545000.0-
0.918645500.0-
0.928746000.0-
0.938846500.0-
0.948947000.0-
0.959047500.0-
0.969148000.0-
0.979248500.0-
0.989349000.0-
0.999449500.0-

Framework Versions

  • —Python: 3.10.14
  • —SetFit: 1.0.3
  • —Sentence Transformers: 2.7.0
  • —Transformers: 4.40.1
  • —PyTorch: 2.2.0+cu121
  • —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. -->