CoolFace
Modelpublic

thegenerativegeneration/stay_or_go_conversation_classifier_s

sourceHugging Faceupdated 2y agoView on Hugging Face
0likes10downloads
Model Card

SetFit with intfloat/multilingual-e5-small

This is a SetFit model that can be used for Text Classification. This SetFit model uses intfloat/multilingual-e5-small as the Sentence Transformer embedding model. A SetFitHead 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: intfloat/multilingual-e5-small
  • Classification head: a SetFitHead instance
  • Maximum Sequence Length: 512 tokens
  • Number of Classes: 2 classes <!-- - Training Dataset: Unknown --> <!-- - Language: Unknown --> <!-- - License: Unknown -->

Model Sources

Model Labels

LabelExamples
1<ul><li>'query: ਚੰਗਾ ਜੀ, ਫਿਰ ਮਿਲਦੇ ਹਾਂ.'</li><li>'query: Agur, gero arte.'</li><li>"query: Me'n vaig ara."</li></ul>
0<ul><li>'query: Dobro, hvala. Kaj pa ti?'</li><li>'query: हाँ अगली बार जब तुम जाओ मुझे भी ले चलो मुझे भी प्रकृति में और गतिविधियाँ करनी हैं'</li><li>'query: Mirë, faleminderit. Po ju?'</li></ul>

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("setfit_model_id")
# Run inference
preds = model("query: Ναι, ας πάμε!")

<!--

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 count27.436421
LabelTraining Sample Count
0292
1290

Training Hyperparameters

  • batch_size: (16, 2)
  • num_epochs: (1, 16)
  • max_steps: -1
  • sampling_strategy: undersampling
  • bodylearningrate: (1e-05, 1e-05)
  • headlearningrate: 0.001
  • loss: CosineSimilarityLoss
  • distancemetric: cosinedistance
  • margin: 0.1
  • endtoend: False
  • use_amp: False
  • warmup_proportion: 0.1
  • seed: 42
  • run_name: intfloat/multilingual-e5-small
  • evalmaxsteps: -1
  • loadbestmodelatend: True

Training Results

EpochStepTraining LossValidation Loss
0.000110.3645-
0.0047500.3527-
0.00941000.34240.3165
0.01421500.3108-
0.01892000.26840.2215
0.02362500.2197-
0.02833000.17070.1792
0.03313500.1501-
0.03784000.08650.1607
0.04254500.0534-
0.04725000.03070.1519
0.05205500.0342-
0.05676000.00780.1478
0.06146500.0144-
0.06617000.06580.1399
0.07097500.0021-
0.07568000.00090.1512
0.08038500.0005-
0.08509000.00180.1516
0.08979500.0011-
0.094510000.00120.1541
0.099210500.0003-
0.103911000.00030.1415
0.108611500.0003-
0.113412000.00020.1442
0.118112500.0006-
0.122813000.00020.1298
0.127513500.0002-
0.132314000.00010.1356
0.137014500.0002-
0.141715000.00030.1493
0.146415500.0003-
0.151216000.00020.15
0.155916500.0002-
0.160617000.00030.1469
0.165317500.0001-
0.170118000.00010.1554
0.174818500.0002-
0.179519000.00010.168
0.184219500.0001-
0.188920000.00040.1568
0.193720500.0001-
0.198421000.00010.1513
0.203121500.0001-
0.207822000.00030.1503
0.212622500.0002-
0.217323000.06040.155
0.222023500.0001-
0.226724000.00020.1739
0.231524500.0006-
0.236225000.00020.1558
0.240925500.0002-
0.245626000.00010.1393
0.250426500.0004-
0.255127000.00030.1642
0.259827500.0002-
0.264528000.00020.1776
0.269228500.0-
0.274029000.00020.1794
0.278729500.0001-
0.283430000.00010.183
0.288130500.0001-
0.292931000.00010.1805
0.297631500.0001-
0.302332000.00010.1757
0.307032500.0001-
0.311833000.00010.1302
0.316533500.0001-
0.321234000.00010.1348
0.325934500.0001-
0.330735000.00050.1623
0.335435500.0-
0.340136000.00.1286
0.344836500.0-
0.349637000.00010.1736
0.354337500.0-
0.359038000.00.127
0.363738500.0-
0.368439000.00010.1231
0.373239500.0-
0.377940000.00010.1261
0.382640500.0001-
0.387341000.00.1216
0.392141500.0-
0.396842000.00.1404
0.401542500.0-
0.406243000.00.1466
0.411043500.0-
0.415744000.00.1482
0.420444500.0-
0.425145000.00.1547
0.429945500.0-
0.434646000.00.1566
0.439346500.0-
0.444047000.00.1684
0.448747500.0-
0.453548000.00.1746
0.458248500.0-
0.462949000.00.167
0.467649500.0-
0.472450000.00010.1683
0.477150500.0-
0.481851000.00.1693
0.486551500.0-
0.491352000.00.1694
0.496052500.0-
0.500753000.00.162
0.505453500.0-
0.510254000.00.1388
0.514954500.0-
0.519655000.00.1353
0.524355500.0-
0.529156000.00.1401
0.533856500.0-
0.538557000.00.1466
0.543257500.0-
0.547958000.00.1529
0.552758500.0-
0.557459000.00.1488
0.562159500.0-
0.566860000.00.147
0.571660500.0-
0.576361000.00.1493
0.581061500.0-
0.585762000.00.1525
0.590562500.0-
0.595263000.00.1505
0.599963500.0-
0.604664000.00.1554
0.609464500.0-
0.614165000.00.1546
0.618865500.0-
0.623566000.00.1598
0.628266500.0-
0.633067000.00.179
0.637767500.0-
0.642468000.00.1719
0.647168500.0001-
0.651969000.00.1812
0.656669500.0-
0.661370000.00.1648
0.666070500.0-
0.670871000.00.1717
0.675571500.0-
0.680272000.00.1793
0.684972500.0-
0.689773000.00.1766
0.694473500.0-
0.699174000.00.177
0.703874500.0-
0.708575000.00.1749
0.713375500.0-
0.718076000.00.1814
0.722776500.0-
0.727477000.00.1742
0.732277500.0-
0.736978000.00.179
0.741678500.0-
0.746379000.00.1767
0.751179500.0-
0.755880000.00.1809
0.760580500.0-
0.765281000.00.1767
0.770081500.0-
0.774782000.00.1698
0.779482500.0-
0.784183000.00.1772
0.788983500.0-
0.793684000.00.1722
0.798384500.0-
0.803085000.00.1671
0.807785500.0-
0.812586000.00.181
0.817286500.0-
0.821987000.00.1788
0.826687500.0-
0.831488000.00.1784
0.836188500.0-
0.840889000.00.1806
0.845589500.0-
0.850390000.00.1783
0.855090500.0-
0.859791000.00.1783
0.864491500.0-
0.869292000.00.1785
0.873992500.0-
0.878693000.00.1772
0.883393500.0-
0.888094000.00.1816
0.892894500.0-
0.897595000.00.1794
0.902295500.0-
0.906996000.00.168
0.911796500.0-
0.916497000.00.1771
0.921197500.0-
0.925898000.00.1675
0.930698500.0-
0.935399000.00.1746
0.940099500.0-
0.9447100000.00.1769
0.9495100500.0-
0.9542101000.00.177
0.9589101500.0-
0.9636102000.00.1771
0.9684102500.0-
0.9731103000.00.1794
0.9778103500.0-
0.9825104000.00.177
0.9872104500.0-
0.9920105000.00.1794
0.9967105500.0-
  • The bold row denotes the saved checkpoint.

Framework Versions

  • Python: 3.10.11
  • SetFit: 1.0.3
  • Sentence Transformers: 2.7.0
  • Transformers: 4.39.0
  • PyTorch: 2.3.1
  • Datasets: 2.20.0
  • Tokenizers: 0.15.2

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