CoolFace
Modelpublic

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

sourceHugging Faceupdated 3y agoView on Hugging Face
0likes7downloads
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. 1.Fine-tuning a Sentence Transformer with contrastive learning.
  2. 2.Training a classification head with features from the fine-tuned Sentence Transformer.

Model Details

Model Description

  • —Model Type: SetFit
  • —Sentence Transformer body: lighteternal/stsb-xlm-r-greek-transfer
  • —Classification head: a OneVsRestClassifier instance
  • —Maximum Sequence Length: 400 tokens <!-- - Number of Classes: Unknown --> <!-- - Training Dataset: Unknown --> <!-- - Language: Unknown --> <!-- - License: Unknown -->

Model Sources

Evaluation

Metrics

LabelAccuracy
all0.1589

Uses

Direct Use for Inference

First install the SetFit library:

bash
pip install setfit

Then you can load this model and run inference.

python
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("παστα ατομικη")

<!--

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 setMinMedianMax
Word count18.6048116

Training Hyperparameters

  • —batch_size: (48, 48)
  • —num_epochs: (5, 5)
  • —max_steps: -1
  • —sampling_strategy: oversampling
  • —num_iterations: 10
  • —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

EpochStepTraining LossValidation Loss
0.000810.2009-
0.0377500.1674-
0.07541000.1593-
0.11311500.1793-
0.15082000.176-
0.18852500.1818-
0.22623000.1209-
0.26403500.1546-
0.30174000.0996-
0.33944500.1108-
0.37715000.1163-
0.41485500.1102-
0.45256000.1477-
0.49026500.0973-
0.52797000.1324-
0.56567500.1792-
0.60338000.1026-
0.64108500.1461-
0.67879000.117-
0.71649500.0907-
0.754110000.0904-
0.791910500.1168-
0.829611000.0831-
0.867311500.0623-
0.905012000.0802-
0.942712500.0802-
0.980413000.1212-
1.018113500.0872-
1.055814000.1068-
1.093514500.0975-
1.131215000.096-
1.168915500.0649-
1.206616000.1004-
1.244316500.0818-
1.282117000.0714-
1.319817500.0875-
1.357518000.0893-
1.395218500.1132-
1.432919000.1127-
1.470619500.0707-
1.508320000.0819-
1.546020500.0954-
1.583721000.0948-
1.621421500.0953-
1.659122000.0813-
1.696822500.0974-
1.734523000.0785-
1.772223500.086-
1.810024000.0808-
1.847724500.1014-
1.885425000.112-
1.923125500.0765-
1.960826000.0694-
1.998526500.0915-
2.036227000.087-
2.073927500.0831-
2.111628000.1223-
2.149328500.0897-
2.187029000.0937-
2.224729500.0862-
2.262430000.0977-
2.300230500.0563-
2.337931000.1197-
2.375631500.095-
2.413332000.0702-
2.451032500.0823-
2.488733000.1309-
2.526433500.0612-
2.564134000.0994-
2.601834500.0904-
2.639535000.0678-
2.677235500.0896-
2.714936000.0753-
2.752636500.0997-
2.790337000.0956-
2.828137500.1016-
2.865838000.0784-
2.903538500.0911-
2.941239000.0485-
2.978939500.1078-
3.016640000.0659-
3.054340500.0802-
3.092041000.12-
3.129741500.0519-
3.167442000.047-
3.205142500.0906-
3.242843000.0999-
3.280543500.059-
3.318344000.0533-
3.356044500.1033-
3.393745000.0871-
3.431445500.065-
3.469146000.1487-
3.506846500.0542-
3.544547000.0846-
3.582247500.0756-
3.619948000.0518-
3.657648500.1035-
3.695349000.1129-
3.733049500.1319-
3.770750000.0804-
3.808450500.108-
3.846251000.1246-
3.883951500.0923-
3.921652000.1048-
3.959352500.0951-
3.997053000.1015-
4.034753500.0888-
4.072454000.0917-
4.110154500.0823-
4.147855000.0882-
4.185555500.0807-
4.223256000.0997-
4.260956500.0782-
4.298657000.1165-
4.336357500.0837-
4.374158000.1098-
4.411858500.0564-
4.449559000.0715-
4.487259500.0858-
4.524960000.0889-
4.562660500.0719-
4.600361000.1076-
4.638061500.1044-
4.675762000.0914-
4.713462500.1078-
4.751163000.1137-
4.788863500.0666-
4.826564000.1009-
4.864364500.0537-
4.902065000.0576-
4.939765500.1366-
4.977466000.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

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. -->