CoolFace
Modelpublic

msullivan/topic_temporary_setfitv2

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

SetFit with sentence-transformers/paraphrase-mpnet-base-v2

This is a SetFit model that can be used for Text Classification. This SetFit model uses sentence-transformers/paraphrase-mpnet-base-v2 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: sentence-transformers/paraphrase-mpnet-base-v2
  • —Classification head: a OneVsRestClassifier instance
  • —Maximum Sequence Length: 512 tokens <!-- - Number of Classes: Unknown --> <!-- - Training Dataset: Unknown --> <!-- - Language: Unknown --> <!-- - License: Unknown -->

Model Sources

Evaluation

Metrics

LabelAccuracy
all0.5230

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("The report explores the market opportunities available in the Cigarettes market. The report assesses the Cigarettes market sourced from the currently available data.")

<!--

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

Training Hyperparameters

  • —batch_size: (16, 16)
  • —num_epochs: (1, 1)
  • —max_steps: -1
  • —sampling_strategy: oversampling
  • —bodylearningrate: (2e-05, 1e-05)
  • —headlearningrate: 0.01
  • —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.000010.1748-
0.0019500.2248-
0.00371000.1837-
0.00561500.2427-
0.00752000.1714-
0.00932500.2171-
0.01123000.2275-
0.01313500.0966-
0.01504000.116-
0.01684500.1661-
0.01875000.1621-
0.02065500.1784-
0.02246000.1709-
0.02436500.242-
0.02627000.1666-
0.02807500.1074-
0.02998000.1741-
0.03188500.1216-
0.03369000.1136-
0.03559500.1471-
0.037410000.1455-
0.039210500.1264-
0.041111000.1935-
0.043011500.0673-
0.044912000.1642-
0.046712500.0696-
0.048613000.1728-
0.050513500.1318-
0.052314000.082-
0.054214500.1227-
0.056115000.0785-
0.057915500.0404-
0.059816000.2339-
0.061716500.1441-
0.063517000.0591-
0.065417500.036-
0.067318000.1338-
0.069218500.1022-
0.071019000.0599-
0.072919500.0773-
0.074820000.1626-
0.076620500.0641-
0.078521000.1689-
0.080421500.1218-
0.082222000.0717-
0.084122500.1212-
0.086023000.1057-
0.087823500.1191-
0.089724000.051-
0.091624500.037-
0.093525000.0757-
0.095325500.0882-
0.097226000.1194-
0.099126500.1038-
0.100927000.1802-
0.102827500.042-
0.104728000.1177-
0.106528500.1029-
0.108429000.1261-
0.110329500.0768-
0.112130000.0615-
0.114030500.0839-
0.115931000.1526-
0.117731500.0661-
0.119632000.0837-
0.121532500.0989-
0.123433000.0425-
0.125233500.097-
0.127134000.0655-
0.129034500.0458-
0.130835000.083-
0.132735500.0823-
0.134636000.0818-
0.136436500.0813-
0.138337000.0821-
0.140237500.0705-
0.142038000.0834-
0.143938500.1141-
0.145839000.1017-
0.147739500.1026-
0.149540000.0536-
0.151440500.0633-
0.153341000.0951-
0.155141500.073-
0.157042000.0608-
0.158942500.1137-
0.160743000.0759-
0.162643500.1163-
0.164544000.0528-
0.166344500.1073-
0.168245000.0926-
0.170145500.0857-
0.171946000.1002-
0.173846500.0786-
0.175747000.0478-
0.177647500.0488-
0.179448000.1055-
0.181348500.0682-
0.183249000.1001-
0.185049500.0847-
0.186950000.0744-
0.188850500.0455-
0.190651000.1027-
0.192551500.0882-
0.194452000.1114-
0.196252500.0512-
0.198153000.0698-
0.200053500.0695-
0.201954000.1881-
0.203754500.0512-
0.205655000.0765-
0.207555500.0795-
0.209356000.1218-
0.211256500.0782-
0.213157000.06-
0.214957500.0538-
0.216858000.082-
0.218758500.0587-
0.220559000.097-
0.222459500.0807-
0.224360000.0547-
0.226260500.0718-
0.228061000.0922-
0.229961500.1215-
0.231862000.0282-
0.233662500.0771-
0.235563000.0618-
0.237463500.0934-
0.239264000.0447-
0.241164500.0525-
0.243065000.0864-
0.244865500.0724-
0.246766000.0661-
0.248666500.0539-
0.250467000.0886-
0.252367500.0495-
0.254268000.0991-
0.256168500.0626-
0.257969000.0557-
0.259869500.0691-
0.261770000.106-
0.263570500.076-
0.265471000.1192-
0.267371500.0676-
0.269172000.0904-
0.271072500.0894-
0.272973000.0656-
0.274773500.0855-
0.276674000.0848-
0.278574500.082-
0.280475000.1127-
0.282275500.0759-
0.284176000.048-
0.286076500.0685-
0.287877000.0965-
0.289777500.0585-
0.291678000.0746-
0.293478500.0604-
0.295379000.0499-
0.297279500.057-
0.299080000.0756-
0.300980500.0763-
0.302881000.0612-
0.304781500.0656-
0.306582000.0289-
0.308482500.0882-
0.310383000.0786-
0.312183500.0635-
0.314084000.0729-
0.315984500.1735-
0.317785000.0989-
0.319685500.0857-
0.321586000.0733-
0.323386500.098-
0.325287000.0561-
0.327187500.0396-
0.328988000.0567-
0.330888500.0566-
0.332789000.0545-
0.334689500.0572-
0.336490000.1116-
0.338390500.132-
0.340291000.0769-
0.342091500.0772-
0.343992000.0886-
0.345892500.0822-
0.347693000.0554-
0.349593500.0797-
0.351494000.048-
0.353294500.0339-
0.355195000.099-
0.357095500.0725-
0.358996000.1131-
0.360796500.0315-
0.362697000.0659-
0.364597500.043-
0.366398000.0745-
0.368298500.1236-
0.370199000.0779-
0.371999500.0654-
0.3738100000.0583-
0.3757100500.0821-
0.3775101000.0524-
0.3794101500.064-
0.3813102000.0451-
0.3831102500.0735-
0.3850103000.0443-
0.3869103500.044-
0.3888104000.0587-
0.3906104500.078-
0.3925105000.1261-
0.3944105500.0247-
0.3962106000.0789-
0.3981106500.0642-
0.4000107000.067-
0.4018107500.0436-
0.4037108000.0737-
0.4056108500.064-
0.4074109000.0476-
0.4093109500.1154-
0.4112110000.0601-
0.4131110500.1012-
0.4149111000.0936-
0.4168111500.055-
0.4187112000.0838-
0.4205112500.0785-
0.4224113000.0553-
0.4243113500.0614-
0.4261114000.1269-
0.4280114500.0619-
0.4299115000.0898-
0.4317115500.068-
0.4336116000.0609-
0.4355116500.0771-
0.4374117000.0695-
0.4392117500.0477-
0.4411118000.0724-
0.4430118500.0779-
0.4448119000.039-
0.4467119500.0471-
0.4486120000.0615-
0.4504120500.0641-
0.4523121000.0552-
0.4542121500.0842-
0.4560122000.0492-
0.4579122500.0711-
0.4598123000.0541-
0.4616123500.0506-
0.4635124000.0642-
0.4654124500.0663-
0.4673125000.0496-
0.4691125500.0926-
0.4710126000.0584-
0.4729126500.0613-
0.4747127000.0768-
0.4766127500.0714-
0.4785128000.068-
0.4803128500.0329-
0.4822129000.0873-
0.4841129500.0602-
0.4859130000.0857-
0.4878130500.0563-
0.4897131000.0461-
0.4916131500.0822-
0.4934132000.0591-
0.4953132500.0349-
0.4972133000.0486-
0.4990133500.0636-
0.5009134000.1146-
0.5028134500.0567-
0.5046135000.0325-
0.5065135500.0755-
0.5084136000.0922-
0.5102136500.0674-
0.5121137000.0805-
0.5140137500.0671-
0.5158138000.0939-
0.5177138500.1056-
0.5196139000.0825-
0.5215139500.0741-
0.5233140000.0425-
0.5252140500.051-
0.5271141000.0852-
0.5289141500.0454-
0.5308142000.0902-
0.5327142500.0863-
0.5345143000.0717-
0.5364143500.1116-
0.5383144000.0915-
0.5401144500.0681-
0.5420145000.0559-
0.5439145500.063-
0.5458146000.0856-
0.5476146500.0661-
0.5495147000.1111-
0.5514147500.0983-
0.5532148000.0885-
0.5551148500.0612-
0.5570149000.0764-
0.5588149500.0693-
0.5607150000.0839-
0.5626150500.0872-
0.5644151000.1113-
0.5663151500.0576-
0.5682152000.0645-
0.5701152500.0471-
0.5719153000.0376-
0.5738153500.0798-
0.5757154000.0996-
0.5775154500.0497-
0.5794155000.0579-
0.5813155500.066-
0.5831156000.1259-
0.5850156500.0936-
0.5869157000.0954-
0.5887157500.0543-
0.5906158000.0268-
0.5925158500.0362-
0.5943159000.0635-
0.5962159500.0497-
0.5981160000.0808-
0.6000160500.0759-
0.6018161000.0663-
0.6037161500.0418-
0.6056162000.0656-
0.6074162500.053-
0.6093163000.0763-
0.6112163500.0663-
0.6130164000.0651-
0.6149164500.0774-
0.6168165000.069-
0.6186165500.0647-
0.6205166000.0459-
0.6224166500.0639-
0.6243167000.0526-
0.6261167500.0758-
0.6280168000.04-
0.6299168500.0758-
0.6317169000.0421-
0.6336169500.0557-
0.6355170000.0733-
0.6373170500.0467-
0.6392171000.052-
0.6411171500.1272-
0.6429172000.081-
0.6448172500.0396-
0.6467173000.0494-
0.6485173500.0934-
0.6504174000.0745-
0.6523174500.055-
0.6542175000.065-
0.6560175500.0407-
0.6579176000.0409-
0.6598176500.0317-
0.6616177000.0433-
0.6635177500.0512-
0.6654178000.0731-
0.6672178500.0296-
0.6691179000.059-
0.6710179500.0727-
0.6728180000.0672-
0.6747180500.0661-
0.6766181000.0572-
0.6785181500.0499-
0.6803182000.0839-
0.6822182500.054-
0.6841183000.0754-
0.6859183500.1177-
0.6878184000.0772-
0.6897184500.063-
0.6915185000.0705-
0.6934185500.0653-
0.6953186000.085-
0.6971186500.0668-
0.6990187000.0788-
0.7009187500.0673-
0.7028188000.0606-
0.7046188500.0553-
0.7065189000.0435-
0.7084189500.071-
0.7102190000.0679-
0.7121190500.0632-
0.7140191000.0651-
0.7158191500.092-
0.7177192000.0626-
0.7196192500.0643-
0.7214193000.0242-
0.7233193500.0632-
0.7252194000.0638-
0.7270194500.0543-
0.7289195000.0312-
0.7308195500.1124-
0.7327196000.0432-
0.7345196500.0868-
0.7364197000.0493-
0.7383197500.0301-
0.7401198000.048-
0.7420198500.0594-
0.7439199000.0391-
0.7457199500.0523-
0.7476200000.0951-
0.7495200500.0954-
0.7513201000.0716-
0.7532201500.0366-
0.7551202000.0751-
0.7570202500.0516-
0.7588203000.1157-
0.7607203500.0645-
0.7626204000.065-
0.7644204500.0469-
0.7663205000.0943-
0.7682205500.0884-
0.7700206000.106-
0.7719206500.0783-
0.7738207000.0382-
0.7756207500.0686-
0.7775208000.0689-
0.7794208500.0721-
0.7812209000.0652-
0.7831209500.0994-
0.7850210000.0713-
0.7869210500.0612-
0.7887211000.0664-
0.7906211500.0514-
0.7925212000.0801-
0.7943212500.0469-
0.7962213000.0976-
0.7981213500.0998-
0.7999214000.0495-
0.8018214500.0625-
0.8037215000.0775-
0.8055215500.049-
0.8074216000.0816-
0.8093216500.0644-
0.8112217000.071-
0.8130217500.052-
0.8149218000.0267-
0.8168218500.0598-
0.8186219000.0402-
0.8205219500.0525-
0.8224220000.0745-
0.8242220500.061-
0.8261221000.0623-
0.8280221500.0823-
0.8298222000.0413-
0.8317222500.0679-
0.8336223000.0684-
0.8355223500.0372-
0.8373224000.0754-
0.8392224500.0714-
0.8411225000.089-
0.8429225500.0614-
0.8448226000.0584-
0.8467226500.0978-
0.8485227000.0639-
0.8504227500.0849-
0.8523228000.069-
0.8541228500.0533-
0.8560229000.0655-
0.8579229500.0516-
0.8597230000.0684-
0.8616230500.0471-
0.8635231000.0514-
0.8654231500.0665-
0.8672232000.0475-
0.8691232500.0915-
0.8710233000.0757-
0.8728233500.0549-
0.8747234000.0468-
0.8766234500.0961-
0.8784235000.0659-
0.8803235500.0544-
0.8822236000.1077-
0.8840236500.0527-
0.8859237000.0617-
0.8878237500.0547-
0.8897238000.0336-
0.8915238500.0567-
0.8934239000.0601-
0.8953239500.0577-
0.8971240000.0884-
0.8990240500.0614-
0.9009241000.0382-
0.9027241500.0506-
0.9046242000.0341-
0.9065242500.0534-
0.9083243000.0814-
0.9102243500.0874-
0.9121244000.0621-
0.9140244500.0793-
0.9158245000.0831-
0.9177245500.0564-
0.9196246000.0487-
0.9214246500.1-
0.9233247000.0852-
0.9252247500.054-
0.9270248000.046-
0.9289248500.0523-
0.9308249000.0661-
0.9326249500.0682-
0.9345250000.0418-
0.9364250500.0608-
0.9382251000.0951-
0.9401251500.052-
0.9420252000.0464-
0.9439252500.0874-
0.9457253000.033-
0.9476253500.0492-
0.9495254000.0735-
0.9513254500.0659-
0.9532255000.0936-
0.9551255500.085-
0.9569256000.0607-
0.9588256500.0646-
0.9607257000.0835-
0.9625257500.0641-
0.9644258000.0603-
0.9663258500.0857-
0.9682259000.0605-
0.9700259500.0614-
0.9719260000.0617-
0.9738260500.0639-
0.9756261000.0502-
0.9775261500.089-
0.9794262000.0604-
0.9812262500.0867-
0.9831263000.0597-
0.9850263500.0755-
0.9868264000.0628-
0.9887264500.0685-
0.9906265000.0794-
0.9924265500.0892-
0.9943266000.0716-
0.9962266500.0397-
0.9981267000.0933-
0.9999267500.0663-

Framework Versions

  • —Python: 3.10.6
  • —SetFit: 1.0.3
  • —Sentence Transformers: 2.3.1
  • —Transformers: 4.35.2
  • —PyTorch: 2.2.0
  • —Datasets: 2.21.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. -->