Megatron17/setfit-paraphrase-mpnet-base-v2-sst2
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:
- Fine-tuning a Sentence Transformer with contrastive learning.
- 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
- Classification head: a LogisticRegression instance
- Maximum Sequence Length: 512 tokens
- Number of Classes: 2 classes <!-- - Training Dataset: Unknown --> <!-- - Language: Unknown --> <!-- - License: Unknown -->
Model Sources
- Repository: SetFit on GitHub
- Paper: Efficient Few-Shot Learning Without Prompts
- Blogpost: SetFit: Efficient Few-Shot Learning Without Prompts
Model Labels
Evaluation
Metrics
Uses
Direct Use for Inference
First install the SetFit library:
pip install setfitThen you can load this model and run inference.
from setfit import SetFitModel
# Download from the 🤗 Hub
model = SetFitModel.from_pretrained("Megatron17/setfit-paraphrase-mpnet-base-v2-sst2")
# Run inference
preds = model("[0:00:00] null:
[0:00:03] spk_0: good afternoon. Am I speaking to supra Priya, ma'am? ma'am, this is Hi, Krishna. Ma'am, Your A newly appointed as your relationship manager from I D S C Falls Bank.
[0:00:15] spk_1: okay?
[0:00:17] spk_0: Yeah, ma'am. In future. So whenever you have any queries or whenever you have any requirement Okay, you can contact me. So
[0:00:24] spk_1: in terms of
[0:00:25] spk_0: account related information or if you want to go for any kind of loans, even for investment related suggestions for a building. Yeah. Allow me banking and tell on the name.
[0:00:37] spk_1: Yeah, it's
[0:00:39] spk_0: Okay, so every month interest is credit out the number. so whatever the balance you maintaining. Okay. So you'll get interest, ma'am.
[0:00:52] spk_1: Yeah. Yeah, I think I'm getting it.
[0:00:54] spk_0: Okay. And how much rate of interest are you getting at all?
[0:00:59] spk_1: Ah, it's okay. I like. I'm not that much into it. My husband take care of all that.
[0:01:04] spk_0: Okay. Okay, ma'am. I'll give you the information and please inform to your husband as well. Because all banks are giving a quarterly basis. Interest, ma'am. Okay. So that too only maximum 3%. But only our bank is giving a monthly interest. Credit that the minimum 4% per annum.
[0:01:23] spk_1: so
[0:01:24] spk_0: war and about 10 lakhs. If you maintain up to Pike Row, we are providing 7% rate of interest, ma'am. again it monthly. Okay, so if you aware about this definitely will maintain a mobile because you'll get a more interest credit year. And even if you have any idle funds, please do fixed deposits. We are giving 7.5 rate of interest for just one year. One day, ma'am.
[0:01:49] spk_1: Okay.
[0:01:51] spk_0: So your husband also holding account address?
[0:01:53] spk_1: No, I don't think so. He is like I don't know about.
[0:02:01] spk_0: OK, ma'am. Yeah, but please save my number. Okay? You can able to see my details in net banking and mobile app. So there is an option called my relationship ing.
[0:02:10] spk_1: Okay.
[0:02:11] spk_0: Yeah. So just save my number, ma'am, okay? Yeah. Thank you, ma'am. Thanks for your time. Have a nice day.
")<!--
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 Hyperparameters
- batch_size: (4, 4)
- 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
Framework Versions
- Python: 3.10.12
- SetFit: 1.0.3
- Sentence Transformers: 2.7.0
- Transformers: 4.40.0
- PyTorch: 2.2.1+cu121
- Datasets: 2.19.0
- Tokenizers: 0.19.1
Citation
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. -->
