metatext_models / README.md
rafaelsandroni's picture
Add SetFit model
a21b79a verified
|
raw
history blame
No virus
4.72 kB
metadata
library_name: setfit
tags:
  - setfit
  - sentence-transformers
  - text-classification
  - generated_from_setfit_trainer
base_model: sentence-transformers/paraphrase-mpnet-base-v2
metrics:
  - accuracy
widget:
  - text: Can you let me know if my claim has been approved?
  - text: Can you provide an update on the progress of my claim?
  - text: >-
      Thank you for your outreach. Currently, our priorities are focused
      elsewhere, and we are not considering new solutions. I would be open to
      revisiting this conversation in [insert timeframe, e.g., 6 months]. Please
      follow up then.
  - text: >-
      Appreciate your email. However, I'm not actively looking into [product
      category] right now. Please check back with me in [insert timeframe, e.g.,
      6 months] for a reassessment.
  - text: >-
      I recently moved to a new apartment. How can I update my address for my
      renter's insurance policy?
pipeline_tag: text-classification
inference: false

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 MultiOutputClassifier 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 with contrastive learning.
  2. Training a classification head with features from the fine-tuned Sentence Transformer.

Model Details

Model Description

Model Sources

Uses

Direct Use for Inference

First install the SetFit library:

pip install setfit

Then you can load this model and run inference.

from setfit import SetFitModel

# Download from the 🤗 Hub
model = SetFitModel.from_pretrained("setfit_model_id")
# Run inference
preds = model("Can you let me know if my claim has been approved?")

Training Details

Training Set Metrics

Training set Min Median Max
Word count 1 14.3077 37

Framework Versions

  • Python: 3.8.4
  • SetFit: 1.0.3
  • Sentence Transformers: 2.2.2
  • Transformers: 4.40.2
  • PyTorch: 2.2.2
  • Datasets: 2.16.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}
}