metadata
tags:
- setfit
- sentence-transformers
- text-classification
- generated_from_setfit_trainer
widget:
- text: Also you guys are deducting data so much without using it seems
- text: ඇත්තටම ගහෝල්ඩ් වටිනවා මම 285 පැකේජය පාවිච්චි කරනවා good
- text: Gampola Lebsack chater
- text: >-
Unlimited A2A calls සමඟ අඩුම ගානට වැඩිම data දෙන පට්ට pack එක
smiling_face_with_sunglasses
- text: >-
he shows hw experienced n great he is.. dats da whole turning poi t of da
match..
metrics:
- accuracy
pipeline_tag: text-classification
library_name: setfit
inference: true
base_model: intfloat/multilingual-e5-large
SetFit with intfloat/multilingual-e5-large
This is a SetFit model that can be used for Text Classification. This SetFit model uses intfloat/multilingual-e5-large 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: intfloat/multilingual-e5-large
- Classification head: a LogisticRegression instance
- Maximum Sequence Length: 512 tokens
- Number of Classes: 3 classes
Model Sources
- Repository: SetFit on GitHub
- Paper: Efficient Few-Shot Learning Without Prompts
- Blogpost: SetFit: Efficient Few-Shot Learning Without Prompts
Model Labels
| Label | Examples |
|---|---|
| 0 |
|
| 2 |
|
| 1 |
|
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("vinulacs/sinmix-setfit-sentiment")
# Run inference
preds = model("Gampola Lebsack chater")
Training Details
Training Set Metrics
| Training set | Min | Median | Max |
|---|---|---|---|
| Word count | 1 | 9.7390 | 79 |
| Label | Training Sample Count |
|---|---|
| 0 | 194 |
| 1 | 185 |
| 2 | 165 |
Training Hyperparameters
- batch_size: (16, 16)
- num_epochs: (1, 1)
- max_steps: -1
- sampling_strategy: oversampling
- num_iterations: 40
- body_learning_rate: (2e-05, 1e-05)
- head_learning_rate: 0.01
- loss: CosineSimilarityLoss
- distance_metric: cosine_distance
- margin: 0.25
- end_to_end: False
- use_amp: False
- warmup_proportion: 0.1
- l2_weight: 0.01
- seed: 42
- eval_max_steps: -1
- load_best_model_at_end: False
Training Results
| Epoch | Step | Training Loss | Validation Loss |
|---|---|---|---|
| 0.0004 | 1 | 0.2675 | - |
| 0.0184 | 50 | 0.3054 | - |
| 0.0368 | 100 | 0.219 | - |
| 0.0551 | 150 | 0.1664 | - |
| 0.0735 | 200 | 0.0785 | - |
| 0.0919 | 250 | 0.0256 | - |
| 0.1103 | 300 | 0.009 | - |
| 0.1287 | 350 | 0.0104 | - |
| 0.1471 | 400 | 0.0004 | - |
| 0.1654 | 450 | 0.0003 | - |
| 0.1838 | 500 | 0.0003 | - |
| 0.2022 | 550 | 0.0002 | - |
| 0.2206 | 600 | 0.0002 | - |
| 0.2390 | 650 | 0.0002 | - |
| 0.2574 | 700 | 0.0002 | - |
| 0.2757 | 750 | 0.0002 | - |
| 0.2941 | 800 | 0.0001 | - |
| 0.3125 | 850 | 0.0001 | - |
| 0.3309 | 900 | 0.0001 | - |
| 0.3493 | 950 | 0.0001 | - |
| 0.3676 | 1000 | 0.0001 | - |
| 0.3860 | 1050 | 0.0001 | - |
| 0.4044 | 1100 | 0.0001 | - |
| 0.4228 | 1150 | 0.0001 | - |
| 0.4412 | 1200 | 0.0001 | - |
| 0.4596 | 1250 | 0.0001 | - |
| 0.4779 | 1300 | 0.0001 | - |
| 0.4963 | 1350 | 0.0001 | - |
| 0.5147 | 1400 | 0.0001 | - |
| 0.5331 | 1450 | 0.0001 | - |
| 0.5515 | 1500 | 0.0001 | - |
| 0.5699 | 1550 | 0.0001 | - |
| 0.5882 | 1600 | 0.0001 | - |
| 0.6066 | 1650 | 0.0001 | - |
| 0.625 | 1700 | 0.0001 | - |
| 0.6434 | 1750 | 0.0001 | - |
| 0.6618 | 1800 | 0.0001 | - |
| 0.6801 | 1850 | 0.0001 | - |
| 0.6985 | 1900 | 0.0001 | - |
| 0.7169 | 1950 | 0.0001 | - |
| 0.7353 | 2000 | 0.0001 | - |
| 0.7537 | 2050 | 0.0001 | - |
| 0.7721 | 2100 | 0.0001 | - |
| 0.7904 | 2150 | 0.0001 | - |
| 0.8088 | 2200 | 0.0001 | - |
| 0.8272 | 2250 | 0.0001 | - |
| 0.8456 | 2300 | 0.0001 | - |
| 0.8640 | 2350 | 0.0001 | - |
| 0.8824 | 2400 | 0.0001 | - |
| 0.9007 | 2450 | 0.0001 | - |
| 0.9191 | 2500 | 0.0001 | - |
| 0.9375 | 2550 | 0.0013 | - |
| 0.9559 | 2600 | 0.0001 | - |
| 0.9743 | 2650 | 0.0001 | - |
| 0.9926 | 2700 | 0.0001 | - |
Framework Versions
- Python: 3.12.12
- SetFit: 1.1.3
- Sentence Transformers: 5.2.3
- Transformers: 4.51.3
- PyTorch: 2.10.0+cu128
- Datasets: 4.0.0
- Tokenizers: 0.21.4
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}
}