Edit model card

SetFit with lighteternal/stsb-xlm-r-greek-transfer

This is a SetFit model that can be used for Text Classification. This SetFit model uses lighteternal/stsb-xlm-r-greek-transfer as the Sentence Transformer embedding model. A OneVsRestClassifier 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

Evaluation

Metrics

Label Accuracy
all 0.1589

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("st-karlos-efood/setfit-multilabel-one-vs-rest-feb-2024")
# Run inference
preds = model("παστα ατομικη")

Training Details

Training Set Metrics

Training set Min Median Max
Word count 1 8.6048 116

Training Hyperparameters

  • batch_size: (48, 48)
  • num_epochs: (5, 5)
  • max_steps: -1
  • sampling_strategy: oversampling
  • num_iterations: 10
  • body_learning_rate: (2e-05, 2e-05)
  • head_learning_rate: 2e-05
  • loss: CosineSimilarityLoss
  • distance_metric: cosine_distance
  • margin: 0.25
  • end_to_end: False
  • use_amp: False
  • warmup_proportion: 0.1
  • seed: 42
  • eval_max_steps: -1
  • load_best_model_at_end: False

Training Results

Epoch Step Training Loss Validation Loss
0.0008 1 0.2009 -
0.0377 50 0.1674 -
0.0754 100 0.1593 -
0.1131 150 0.1793 -
0.1508 200 0.176 -
0.1885 250 0.1818 -
0.2262 300 0.1209 -
0.2640 350 0.1546 -
0.3017 400 0.0996 -
0.3394 450 0.1108 -
0.3771 500 0.1163 -
0.4148 550 0.1102 -
0.4525 600 0.1477 -
0.4902 650 0.0973 -
0.5279 700 0.1324 -
0.5656 750 0.1792 -
0.6033 800 0.1026 -
0.6410 850 0.1461 -
0.6787 900 0.117 -
0.7164 950 0.0907 -
0.7541 1000 0.0904 -
0.7919 1050 0.1168 -
0.8296 1100 0.0831 -
0.8673 1150 0.0623 -
0.9050 1200 0.0802 -
0.9427 1250 0.0802 -
0.9804 1300 0.1212 -
1.0181 1350 0.0872 -
1.0558 1400 0.1068 -
1.0935 1450 0.0975 -
1.1312 1500 0.096 -
1.1689 1550 0.0649 -
1.2066 1600 0.1004 -
1.2443 1650 0.0818 -
1.2821 1700 0.0714 -
1.3198 1750 0.0875 -
1.3575 1800 0.0893 -
1.3952 1850 0.1132 -
1.4329 1900 0.1127 -
1.4706 1950 0.0707 -
1.5083 2000 0.0819 -
1.5460 2050 0.0954 -
1.5837 2100 0.0948 -
1.6214 2150 0.0953 -
1.6591 2200 0.0813 -
1.6968 2250 0.0974 -
1.7345 2300 0.0785 -
1.7722 2350 0.086 -
1.8100 2400 0.0808 -
1.8477 2450 0.1014 -
1.8854 2500 0.112 -
1.9231 2550 0.0765 -
1.9608 2600 0.0694 -
1.9985 2650 0.0915 -
2.0362 2700 0.087 -
2.0739 2750 0.0831 -
2.1116 2800 0.1223 -
2.1493 2850 0.0897 -
2.1870 2900 0.0937 -
2.2247 2950 0.0862 -
2.2624 3000 0.0977 -
2.3002 3050 0.0563 -
2.3379 3100 0.1197 -
2.3756 3150 0.095 -
2.4133 3200 0.0702 -
2.4510 3250 0.0823 -
2.4887 3300 0.1309 -
2.5264 3350 0.0612 -
2.5641 3400 0.0994 -
2.6018 3450 0.0904 -
2.6395 3500 0.0678 -
2.6772 3550 0.0896 -
2.7149 3600 0.0753 -
2.7526 3650 0.0997 -
2.7903 3700 0.0956 -
2.8281 3750 0.1016 -
2.8658 3800 0.0784 -
2.9035 3850 0.0911 -
2.9412 3900 0.0485 -
2.9789 3950 0.1078 -
3.0166 4000 0.0659 -
3.0543 4050 0.0802 -
3.0920 4100 0.12 -
3.1297 4150 0.0519 -
3.1674 4200 0.047 -
3.2051 4250 0.0906 -
3.2428 4300 0.0999 -
3.2805 4350 0.059 -
3.3183 4400 0.0533 -
3.3560 4450 0.1033 -
3.3937 4500 0.0871 -
3.4314 4550 0.065 -
3.4691 4600 0.1487 -
3.5068 4650 0.0542 -
3.5445 4700 0.0846 -
3.5822 4750 0.0756 -
3.6199 4800 0.0518 -
3.6576 4850 0.1035 -
3.6953 4900 0.1129 -
3.7330 4950 0.1319 -
3.7707 5000 0.0804 -
3.8084 5050 0.108 -
3.8462 5100 0.1246 -
3.8839 5150 0.0923 -
3.9216 5200 0.1048 -
3.9593 5250 0.0951 -
3.9970 5300 0.1015 -
4.0347 5350 0.0888 -
4.0724 5400 0.0917 -
4.1101 5450 0.0823 -
4.1478 5500 0.0882 -
4.1855 5550 0.0807 -
4.2232 5600 0.0997 -
4.2609 5650 0.0782 -
4.2986 5700 0.1165 -
4.3363 5750 0.0837 -
4.3741 5800 0.1098 -
4.4118 5850 0.0564 -
4.4495 5900 0.0715 -
4.4872 5950 0.0858 -
4.5249 6000 0.0889 -
4.5626 6050 0.0719 -
4.6003 6100 0.1076 -
4.6380 6150 0.1044 -
4.6757 6200 0.0914 -
4.7134 6250 0.1078 -
4.7511 6300 0.1137 -
4.7888 6350 0.0666 -
4.8265 6400 0.1009 -
4.8643 6450 0.0537 -
4.9020 6500 0.0576 -
4.9397 6550 0.1366 -
4.9774 6600 0.1009 -

Framework Versions

  • Python: 3.10.12
  • SetFit: 1.0.3
  • Sentence Transformers: 2.3.1
  • Transformers: 4.35.2
  • PyTorch: 2.1.0+cu121
  • Datasets: 2.17.0
  • Tokenizers: 0.15.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}
}
Downloads last month
3
Safetensors
Model size
278M params
Tensor type
F32
·
Inference Examples
Inference API (serverless) has been turned off for this model.

Model tree for st-karlos-efood/setfit-multilabel-one-vs-rest-feb-2024

Finetuned
(5)
this model

Evaluation results