Team Ai
Modelpublic

st-karlos-efood/setfit-multilabel-example-classifier-chain

sourceHugging Faceupdated 3y agoView on Hugging Face
0likes9downloads
Model Card

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

This is a SetFit model trained on the ethos dataset that can be used for Text Classification. This SetFit model uses lighteternal/stsb-xlm-r-greek-transfer as the Sentence Transformer embedding model. A ClassifierChain 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 ClassifierChain instance
  • —Maximum Sequence Length: 400 tokens <!-- - Number of Classes: Unknown -->
  • —Training Dataset: ethos <!-- - Language: Unknown --> <!-- - License: Unknown -->

Model Sources

Evaluation

Metrics

LabelAccuracy
all0.192

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-example-classifier-chain")
# Run inference
preds = model("Hindus take my ass please")

<!--

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

Training Hyperparameters

  • —batch_size: (32, 32)
  • —num_epochs: (10, 10)
  • —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.000610.2027-
0.0305500.2092-
0.06091000.1605-
0.09141500.1726-
0.12192000.1322-
0.15232500.1252-
0.18283000.1404-
0.21333500.0927-
0.24384000.1039-
0.27424500.0904-
0.30475000.1194-
0.33525500.1024-
0.36566000.151-
0.39616500.0842-
0.42667000.1158-
0.45707500.214-
0.48758000.1167-
0.51808500.1174-
0.54849000.1567-
0.57899500.0726-
0.609410000.0741-
0.639910500.0841-
0.670311000.0606-
0.700811500.1005-
0.731312000.1236-
0.761712500.141-
0.792213000.1611-
0.822713500.1068-
0.853114000.0542-
0.883614500.1635-
0.914115000.106-
0.944515500.0817-
0.975016000.1157-
1.005516500.1031-
1.036017000.0969-
1.066417500.0742-
1.096918000.0697-
1.127418500.1072-
1.157819000.0593-
1.188319500.1102-
1.218820000.1586-
1.249220500.1523-
1.279721000.0921-
1.310221500.0634-
1.340622000.073-
1.371122500.1131-
1.401623000.0493-
1.432123500.106-
1.462524000.0585-
1.493024500.1058-
1.523525000.0892-
1.553925500.0649-
1.584426000.0481-
1.614926500.1359-
1.645327000.0734-
1.675827500.0762-
1.706328000.1082-
1.736728500.1274-
1.767229000.0724-
1.797729500.0842-
1.828230000.1558-
1.858630500.071-
1.889131000.1716-
1.919631500.1078-
1.950032000.1037-
1.980532500.0773-
2.011033000.0706-
2.041433500.1577-
2.071934000.0825-
2.102434500.1227-
2.132835000.1069-
2.163335500.1037-
2.193836000.0595-
2.224336500.0569-
2.254737000.0967-
2.285237500.0632-
2.315738000.1014-
2.346138500.0868-
2.376639000.0986-
2.407139500.0585-
2.437540000.063-
2.468040500.1124-
2.498541000.0444-
2.528941500.1547-
2.559442000.1087-
2.589942500.0946-
2.620443000.0261-
2.650843500.0414-
2.681344000.0715-
2.711844500.0831-
2.742245000.0779-
2.772745500.1049-
2.803246000.1224-
2.833646500.0926-
2.864147000.0745-
2.894647500.0642-
2.925048000.0536-
2.955548500.1296-
2.986049000.0596-
3.016549500.0361-
3.046950000.0592-
3.077450500.0656-
3.107951000.0584-
3.138351500.0729-
3.168852000.1037-
3.199352500.0685-
3.229753000.0511-
3.260253500.0427-
3.290754000.1067-
3.321154500.0807-
3.351655000.0815-
3.382155500.1016-
3.412656000.1034-
3.443056500.1257-
3.473557000.0877-
3.504057500.0808-
3.534458000.0926-
3.564958500.0967-
3.595459000.0401-
3.625859500.0547-
3.656360000.0872-
3.686860500.0808-
3.717261000.1125-
3.747761500.1431-
3.778262000.1039-
3.808762500.061-
3.839163000.1022-
3.869663500.0394-
3.900164000.0892-
3.930564500.0535-
3.961065000.0793-
3.991565500.0462-
4.021966000.0686-
4.052466500.0506-
4.082967000.1012-
4.113367500.0852-
4.143868000.0729-
4.174368500.1007-
4.204869000.0431-
4.235269500.0683-
4.265770000.0712-
4.296270500.0732-
4.326671000.0374-
4.357171500.1015-
4.387672000.15-
4.418072500.0852-
4.448573000.0714-
4.479073500.0587-
4.509474000.1335-
4.539974500.1123-
4.570475000.0538-
4.600975500.0989-
4.631376000.0878-
4.661876500.0963-
4.692377000.0991-
4.722777500.0776-
4.753278000.0663-
4.783778500.0696-
4.814179000.0704-
4.844679500.0626-
4.875180000.0657-
4.905580500.0567-
4.936081000.0619-
4.966581500.0792-
4.997082000.0671-
5.027482500.1068-
5.057983000.1111-
5.088483500.0968-
5.118884000.0577-
5.149384500.0934-
5.179885000.0854-
5.210285500.0587-
5.240786000.048-
5.271286500.0829-
5.301687000.0985-
5.332187500.107-
5.362688000.0662-
5.393188500.0799-
5.423589000.0948-
5.454089500.087-
5.484590000.0429-
5.514990500.0699-
5.545491000.0911-
5.575991500.1268-
5.606392000.1042-
5.636892500.0642-
5.667393000.0736-
5.697793500.0329-
5.728294000.126-
5.758794500.0991-
5.789295000.1038-
5.819695500.0842-
5.850196000.0623-
5.880696500.0642-
5.911097000.0902-
5.941597500.0994-
5.972098000.0685-
6.002498500.0573-
6.032999000.0537-
6.063499500.0478-
6.0938100000.0513-
6.1243100500.0529-
6.1548101000.095-
6.1853101500.0578-
6.2157102000.0918-
6.2462102500.0594-
6.2767103000.1015-
6.3071103500.036-
6.3376104000.0524-
6.3681104500.0927-
6.3985105000.0934-
6.4290105500.0788-
6.4595106000.0842-
6.4899106500.0703-
6.5204107000.0684-
6.5509107500.0759-
6.5814108000.0271-
6.6118108500.0391-
6.6423109000.0895-
6.6728109500.054-
6.7032110000.0987-
6.7337110500.0577-
6.7642111000.0822-
6.7946111500.0986-
6.8251112000.0423-
6.8556112500.0672-
6.8860113000.0747-
6.9165113500.0873-
6.9470114000.106-
6.9775114500.0975-
7.0079115000.0957-
7.0384115500.0487-
7.0689116000.0698-
7.0993116500.0317-
7.1298117000.0732-
7.1603117500.1114-
7.1907118000.0689-
7.2212118500.1211-
7.2517119000.0753-
7.2821119500.062-
7.3126120000.075-
7.3431120500.0494-
7.3736121000.0724-
7.4040121500.0605-
7.4345122000.0508-
7.4650122500.0828-
7.4954123000.0512-
7.5259123500.1291-
7.5564124000.0459-
7.5868124500.0869-
7.6173125000.0379-
7.6478125500.1878-
7.6782126000.0824-
7.7087126500.0945-
7.7392127000.0763-
7.7697127500.0602-
7.8001128000.0342-
7.8306128500.0746-
7.8611129000.065-
7.8915129500.0749-
7.9220130000.0618-
7.9525130500.0567-
7.9829131000.069-
8.0134131500.0487-
8.0439132000.0578-
8.0743132500.0876-
8.1048133000.0942-
8.1353133500.0774-
8.1658134000.0557-
8.1962134500.0872-
8.2267135000.0652-
8.2572135500.088-
8.2876136000.05-
8.3181136500.0572-
8.3486137000.053-
8.3790137500.0745-
8.4095138000.1119-
8.4400138500.0909-
8.4704139000.0374-
8.5009139500.0515-
8.5314140000.0827-
8.5619140500.0925-
8.5923141000.0793-
8.6228141500.1123-
8.6533142000.0387-
8.6837142500.0898-
8.7142143000.0627-
8.7447143500.0863-
8.7751144000.1257-
8.8056144500.0553-
8.8361145000.0664-
8.8665145500.0641-
8.8970146000.0577-
8.9275146500.0672-
8.9580147000.0776-
8.9884147500.0951-
9.0189148000.0721-
9.0494148500.0609-
9.0798149000.0821-
9.1103149500.0477-
9.1408150000.0974-
9.1712150500.0534-
9.2017151000.0673-
9.2322151500.0549-
9.2626152000.0833-
9.2931152500.0957-
9.3236153000.0601-
9.3541153500.0702-
9.3845154000.0852-
9.4150154500.0576-
9.4455155000.1006-
9.4759155500.0697-
9.5064156000.0778-
9.5369156500.0778-
9.5673157000.0844-
9.5978157500.0724-
9.6283158000.0988-
9.6587158500.0699-
9.6892159000.0772-
9.7197159500.0757-
9.7502160000.0671-
9.7806160500.1057-
9.8111161000.075-
9.8416161500.0475-
9.8720162000.0572-
9.9025162500.1176-
9.9330163000.0552-
9.9634163500.1032-
9.9939164000.0935-
0.000610.0579-
0.0305500.0231-
0.06091000.0598-
0.09141500.0541-
0.12192000.0534-
0.15232500.048-
0.18283000.0912-
0.21333500.0447-
0.24384000.0442-
0.27424500.0579-
0.000610.0585-
0.0305500.0204-
0.06091000.0653-
0.09141500.0599-
0.12192000.0577-
0.15232500.0468-
0.18283000.0911-
0.21333500.0423-
0.24384000.0405-
0.27424500.0561-
0.30475000.0925-
0.33525500.0771-
0.36566000.0718-
0.39616500.0708-
0.42667000.0673-
0.45707500.1501-
0.48758000.0849-
0.51808500.1132-
0.54849000.0865-
0.57899500.0527-
0.609410000.0552-
0.639910500.0656-
0.670311000.0648-
0.700811500.0884-
0.731312000.0803-
0.761712500.083-
0.792213000.0863-
0.822713500.0731-
0.853114000.0504-
0.883614500.1039-
0.914115000.0817-
0.944515500.0655-
0.975016000.0987-
1.005516500.0905-
1.036017000.088-
1.066417500.0767-
1.096918000.0574-
1.127418500.0741-
1.157819000.0529-
1.188319500.0758-
1.218820000.1253-
1.249220500.1129-
1.279721000.0852-
1.310221500.0475-
1.340622000.063-
1.371122500.0893-
1.401623000.0494-
1.432123500.1083-
1.462524000.0468-
1.493024500.0902-
1.523525000.0607-
1.553925500.0571-
1.584426000.0395-
1.614926500.1184-
1.645327000.0735-
1.675827500.06-
1.706328000.0646-
1.736728500.1055-
1.767229000.0592-
1.797729500.0522-
1.828230000.1025-
1.858630500.0615-
1.889131000.1491-
1.919631500.0796-
1.950032000.0768-
1.980532500.0601-
2.011033000.0543-
2.041433500.1128-
2.071934000.06-
2.102434500.0994-
2.132835000.1018-
2.163335500.0915-
2.193836000.0626-
2.224336500.0454-
2.254737000.0915-
2.285237500.0334-
2.315738000.0827-
2.346138500.0709-
2.376639000.0806-
2.407139500.055-
2.437540000.0571-
2.468040500.1002-
2.498541000.0492-
2.528941500.1322-
2.559442000.0961-
2.589942500.0788-
2.620443000.0243-
2.650843500.0406-
2.681344000.0786-
2.711844500.0852-
2.742245000.0789-
2.772745500.0787-
2.803246000.1152-
2.833646500.0992-
2.864147000.0599-
2.894647500.0496-
2.925048000.0444-
2.955548500.0898-
2.986049000.0422-
3.016549500.0328-
3.046950000.0584-
3.077450500.052-
3.107951000.0485-
3.138351500.0542-
3.168852000.0854-
3.199352500.048-
3.229753000.0417-
3.260253500.0497-
3.290754000.0809-
3.321154500.074-
3.351655000.0761-
3.382155500.0768-
3.412656000.0954-
3.443056500.0955-
3.473557000.0906-
3.504057500.0916-
3.534458000.0915-
3.564958500.107-
3.595459000.0327-
3.625859500.0534-
3.656360000.059-
3.686860500.0806-
3.717261000.0941-
3.747761500.1368-
3.778262000.0848-
3.808762500.0625-
3.839163000.103-
3.869663500.0307-
3.900164000.0716-
3.930564500.0518-
3.961065000.0645-
3.991565500.0417-
4.021966000.0588-
4.052466500.047-
4.082967000.0951-
4.113367500.0689-
4.143868000.0731-
4.174368500.0785-
4.204869000.0411-
4.235269500.0568-
4.265770000.0688-
4.296270500.066-
4.326671000.0313-
4.357171500.1127-
4.387672000.1347-
4.418072500.0685-
4.448573000.0693-
4.479073500.053-
4.509474000.1353-
4.539974500.1057-
4.570475000.0467-
4.600975500.1059-
4.631376000.0791-
4.661876500.0928-
4.692377000.0989-
4.722777500.0619-
4.753278000.0572-
4.783778500.06-
4.814179000.0711-
4.844679500.0595-
4.875180000.0675-
4.905580500.0487-
4.936081000.0569-
4.966581500.0637-
4.997082000.0634-
5.027482500.093-
5.057983000.1107-
5.088483500.0883-
5.118884000.051-
5.149384500.1034-
5.179885000.0832-
5.210285500.0463-
5.240786000.0596-
5.271286500.078-
5.301687000.0686-
5.332187500.1053-
5.362688000.0684-
5.393188500.0684-
5.423589000.092-
5.454089500.088-
5.484590000.0503-
5.514990500.0752-
5.545491000.0975-
5.575991500.1306-
5.606392000.1038-
5.636892500.0573-
5.667393000.0584-
5.697793500.0309-
5.728294000.1232-
5.758794500.0991-
5.789295000.1111-
5.819695500.0845-
5.850196000.0587-
5.880696500.0589-
5.911097000.0751-
5.941597500.0929-
5.972098000.0613-
6.002498500.0578-
6.032999000.0499-
6.063499500.0435-
6.0938100000.0547-
6.1243100500.0549-
6.1548101000.0872-
6.1853101500.0509-
6.2157102000.0913-
6.2462102500.0581-
6.2767103000.0942-
6.3071103500.0273-
6.3376104000.0426-
6.3681104500.0825-
6.3985105000.0713-
6.4290105500.0698-
6.4595106000.0679-
6.4899106500.0631-
6.5204107000.0489-
6.5509107500.0599-
6.5814108000.033-
6.6118108500.0401-
6.6423109000.0782-
6.6728109500.0512-
6.7032110000.0939-
6.7337110500.0523-
6.7642111000.0784-
6.7946111500.0898-
6.8251112000.042-
6.8556112500.0616-
6.8860113000.0667-
6.9165113500.0807-
6.9470114000.1054-
6.9775114500.0961-
7.0079115000.0896-
7.0384115500.0463-
7.0689116000.065-
7.0993116500.0318-
7.1298117000.0692-
7.1603117500.1055-
7.1907118000.0619-
7.2212118500.1234-
7.2517119000.0698-
7.2821119500.0526-
7.3126120000.0695-
7.3431120500.051-
7.3736121000.0759-
7.4040121500.062-
7.4345122000.0509-
7.4650122500.0874-
7.4954123000.0534-
7.5259123500.1089-
7.5564124000.0516-
7.5868124500.0755-
7.6173125000.0295-
7.6478125500.1767-
7.6782126000.0744-
7.7087126500.0875-
7.7392127000.075-
7.7697127500.0583-
7.8001128000.0353-
7.8306128500.0638-
7.8611129000.045-
7.8915129500.0647-
7.9220130000.0593-
7.9525130500.0515-
7.9829131000.0705-
8.0134131500.0521-
8.0439132000.059-
8.0743132500.0758-
8.1048133000.0922-
8.1353133500.0859-
8.1658134000.0526-
8.1962134500.0892-
8.2267135000.0665-
8.2572135500.0711-
8.2876136000.0535-
8.3181136500.055-
8.3486137000.0516-
8.3790137500.0683-
8.4095138000.0959-
8.4400138500.0901-
8.4704139000.041-
8.5009139500.0464-
8.5314140000.0726-
8.5619140500.0959-
8.5923141000.0739-
8.6228141500.1083-
8.6533142000.0374-
8.6837142500.0767-
8.7142143000.0626-
8.7447143500.0847-
8.7751144000.1211-
8.8056144500.0457-
8.8361145000.0705-
8.8665145500.06-
8.8970146000.052-
8.9275146500.0677-
8.9580147000.0747-
8.9884147500.0877-
9.0189148000.0791-
9.0494148500.0573-
9.0798149000.0786-
9.1103149500.0376-
9.1408150000.0964-
9.1712150500.0542-
9.2017151000.0568-
9.2322151500.0583-
9.2626152000.0861-
9.2931152500.0994-
9.3236153000.0614-
9.3541153500.0689-
9.3845154000.0803-
9.4150154500.0599-
9.4455155000.0952-
9.4759155500.0597-
9.5064156000.0762-
9.5369156500.0718-
9.5673157000.0794-
9.5978157500.0721-
9.6283158000.0966-
9.6587158500.0604-
9.6892159000.0764-
9.7197159500.0707-
9.7502160000.0724-
9.7806160500.1072-
9.8111161000.0728-
9.8416161500.0516-
9.8720162000.0519-
9.9025162500.1077-
9.9330163000.0539-
9.9634163500.095-
9.9939164000.0957-

Framework Versions

  • —Python: 3.10.12
  • —SetFit: 1.0.3
  • —Sentence Transformers: 2.2.2
  • —Transformers: 4.35.2
  • —PyTorch: 2.1.0+cu121
  • —Datasets: 2.16.1
  • —Tokenizers: 0.15.0

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