SetFit

This is a SetFit model that can be used for Text Classification. A LogisticRegression 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 Type: SetFit
  • Classification head: a LogisticRegression instance
  • Maximum Sequence Length: 512 tokens
  • Number of Classes: 3 classes

Model Sources

Model Labels

Label Examples
comments_assistance
  • 'Can you identify specific areas that need improvement in my text'
  • 'Point out the flaws in my writing style, please'
  • 'Which parts of my draft are the weakest'
chat_assistance
  • "How do I make my character's driving force more compelling"
  • "Any tips to deepen my protagonist's underlying goals"
  • "Suggestions for strengthening the reasons behind my character's actions"
pro_subscription_assistance
  • 'How does the Pro version elevate my writing experience'
  • 'Could you list the premium perks of Quarkle Pro'
  • 'What special advantages come with upgrading to Pro'

Evaluation

Metrics

Label Accuracy
all 1.0

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("Point out any dull descriptions that need more color")

Training Details

Training Set Metrics

Training set Min Median Max
Word count 1 8.9364 15
Label Training Sample Count
chat_assistance 163
comments_assistance 156
pro_subscription_assistance 121

Framework Versions

  • Python: 3.10.15
  • SetFit: 1.2.0.dev0
  • Sentence Transformers: 3.3.1
  • Transformers: 4.47.1
  • PyTorch: 2.5.1
  • Datasets: 3.2.0
  • Tokenizers: 0.21.0

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}
}
Downloads last month
1,081
Safetensors
Model size
33.4M params
Tensor type
F32
·
Inference Examples
This model does not have enough activity to be deployed to Inference API (serverless) yet. Increase its social visibility and check back later, or deploy to Inference Endpoints (dedicated) instead.

Evaluation results