CoolFace
Modelpublic

spaly99/my-setfit-model

sourceHugging Faceupdated 3y agoView on Hugging Face
0likes7downloads
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 LogisticRegression 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 Sources

Model Labels

LabelExamples
True<ul><li>'Pug (1×1)'</li><li>'Pug (1×1)'</li><li>'/ 0:31'</li></ul>
False<ul><li>'Forum FAQ'</li><li>'Hearthstone'</li><li>'NVIDIA GeForce GTX 670MX (Mobile) 3072 MB'</li></ul>

Evaluation

Metrics

LabelAccuracy
all0.9035

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("Sign in")

<!--

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 count15.4853301
LabelTraining Sample Count
False6755
True6757

Training Hyperparameters

  • batch_size: (16, 16)
  • num_epochs: (1, 1)
  • max_steps: -1
  • sampling_strategy: oversampling
  • num_iterations: 20
  • 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.000010.3555-
0.0015500.3874-
0.00301000.3422-
0.00441500.3148-
0.00592000.2496-
0.00742500.2681-
0.00893000.2412-
0.01043500.2927-
0.01184000.2389-
0.01334500.2559-
0.01485000.204-
0.01635500.158-
0.01786000.1479-
0.01926500.1958-
0.02077000.2173-
0.02227500.1231-
0.02378000.1966-
0.02528500.1599-
0.02669000.1373-
0.02819500.2491-
0.029610000.0951-
0.031110500.2253-
0.032611000.2046-
0.034011500.2174-
0.035512000.1401-
0.037012500.1549-
0.038513000.1872-
0.040013500.2262-
0.041414000.1277-
0.042914500.1653-
0.044415000.1355-
0.045915500.1235-
0.047416000.0947-
0.048816500.11-
0.050317000.1149-
0.051817500.1823-
0.053318000.2104-
0.054818500.0871-
0.056219000.1275-
0.057719500.0977-
0.059220000.2031-
0.060720500.1872-
0.062221000.0996-
0.063621500.1487-
0.065122000.1647-
0.066622500.0861-
0.068123000.0464-
0.069623500.1026-
0.071024000.2031-
0.072524500.1815-
0.074025000.0644-
0.075525500.1039-
0.077026000.0115-
0.078426500.0426-
0.079927000.0895-
0.081427500.1562-
0.082928000.0835-
0.084428500.1681-
0.085829000.1159-
0.087329500.0162-
0.088830000.0634-
0.090330500.1161-
0.091831000.1086-
0.093331500.0548-
0.094732000.1209-
0.096232500.0425-
0.097733000.0157-
0.099233500.1293-
0.100734000.1847-
0.102134500.1965-
0.103635000.1286-
0.105135500.104-
0.106636000.0899-
0.108136500.1513-
0.109537000.0443-
0.111037500.053-
0.112538000.0096-
0.114038500.0399-
0.115539000.068-
0.116939500.0537-
0.118440000.0235-
0.119940500.0625-
0.121441000.1303-
0.122941500.1208-
0.124342000.0041-
0.125842500.059-
0.127343000.0543-
0.128843500.1664-
0.130344000.0591-
0.131744500.0631-
0.133245000.2538-
0.134745500.0484-
0.136246000.003-
0.137746500.0849-
0.139147000.1109-
0.140647500.0403-
0.142148000.0481-
0.143648500.0172-
0.145149000.0049-
0.146549500.006-
0.148050000.0009-
0.149550500.0712-
0.151051000.1076-
0.152551500.1123-
0.153952000.0029-
0.155452500.0519-
0.156953000.0523-
0.158453500.097-
0.159954000.0471-
0.161354500.0371-
0.162855000.1127-
0.164355500.0535-
0.165856000.0067-
0.167356500.01-
0.168757000.0085-
0.170257500.0739-
0.171758000.0019-
0.173258500.0045-
0.174759000.1316-
0.176159500.0623-
0.177660000.088-
0.179160500.0498-
0.180661000.0028-
0.182161500.1206-
0.183562000.0041-
0.185062500.0849-
0.186563000.247-
0.188063500.0042-
0.189564000.0944-
0.190964500.1046-
0.192465000.0481-
0.193965500.0034-
0.195466000.0066-
0.196966500.0015-
0.198367000.0816-
0.199867500.0511-
0.201368000.0739-
0.202868500.0024-
0.204369000.0221-
0.205769500.0678-
0.207270000.0838-
0.208770500.0023-
0.210271000.0043-
0.211771500.0551-
0.213172000.0167-
0.214672500.0033-
0.216173000.008-
0.217673500.0259-
0.219174000.0078-
0.220574500.0113-
0.222075000.0153-
0.223575500.059-
0.225076000.0401-
0.226576500.0015-
0.227977000.0102-
0.229477500.0489-
0.230978000.1319-
0.232478500.0128-
0.233979000.0234-
0.235379500.0105-
0.236880000.0008-
0.238380500.1118-
0.239881000.0076-
0.241381500.1399-
0.242782000.0042-
0.244282500.0579-
0.245783000.0533-
0.247283500.0271-
0.248784000.0461-
0.250184500.0052-
0.251685000.0661-
0.253185500.0407-
0.254686000.0208-
0.256186500.0527-
0.257587000.0065-
0.259087500.0051-
0.260588000.0179-
0.262088500.0332-
0.263589000.0625-
0.264989500.1035-
0.266490000.129-
0.267990500.0988-
0.269491000.0035-
0.270991500.0045-
0.272492000.0277-
0.273892500.0291-
0.275393000.0307-
0.276893500.0844-
0.278394000.0036-
0.279894500.0807-
0.281295000.0619-
0.282795500.0675-
0.284296000.0008-
0.285796500.0134-
0.287297000.0027-
0.288697500.0009-
0.290198000.0119-
0.291698500.0165-
0.293199000.0242-
0.294699500.1022-
0.2960100000.0288-
0.2975100500.0016-
0.2990101000.0027-
0.3005101500.0237-
0.3020102000.0014-
0.3034102500.0129-
0.3049103000.0023-
0.3064103500.0038-
0.3079104000.0005-
0.3094104500.0448-
0.3108105000.0334-
0.3123105500.1215-
0.3138106000.0021-
0.3153106500.0433-
0.3168107000.0106-
0.3182107500.0574-
0.3197108000.0421-
0.3212108500.0676-
0.3227109000.0358-
0.3242109500.1207-
0.3256110000.0154-
0.3271110500.0078-
0.3286111000.0475-
0.3301111500.0697-
0.3316112000.0016-
0.3330112500.012-
0.3345113000.0252-
0.3360113500.003-
0.3375114000.0323-
0.3390114500.0782-
0.3404115000.0661-
0.3419115500.0473-
0.3434116000.1388-
0.3449116500.0092-
0.3464117000.0055-
0.3478117500.0636-
0.3493118000.0301-
0.3508118500.02-
0.3523119000.091-
0.3538119500.0645-
0.3552120000.0131-
0.3567120500.0302-
0.3582121000.0434-
0.3597121500.0007-
0.3612122000.0195-
0.3626122500.0779-
0.3641123000.0794-
0.3656123500.0586-
0.3671124000.0966-
0.3686124500.0289-
0.3700125000.0014-
0.3715125500.0008-
0.3730126000.0174-
0.3745126500.0151-
0.3760127000.0223-
0.3774127500.0034-
0.3789128000.0621-
0.3804128500.0585-
0.3819129000.1385-
0.3834129500.1086-
0.3848130000.0005-
0.3863130500.0178-
0.3878131000.1447-
0.3893131500.1267-
0.3908132000.0823-
0.3922132500.0223-
0.3937133000.0029-
0.3952133500.0273-
0.3967134000.0807-
0.3982134500.0042-
0.3996135000.0023-
0.4011135500.0528-
0.4026136000.0013-
0.4041136500.0413-
0.4056137000.1404-
0.4070137500.1508-
0.4085138000.0214-
0.4100138500.0737-
0.4115139000.0962-
0.4130139500.0536-
0.4144140000.0075-
0.4159140500.0401-
0.4174141000.0268-
0.4189141500.0104-
0.4204142000.0066-
0.4218142500.006-
0.4233143000.0053-
0.4248143500.0367-
0.4263144000.0041-
0.4278144500.0245-
0.4292145000.0351-
0.4307145500.0794-
0.4322146000.0771-
0.4337146500.0172-
0.4352147000.0137-
0.4366147500.044-
0.4381148000.0042-
0.4396148500.0554-
0.4411149000.0794-
0.4426149500.0404-
0.4440150000.0461-
0.4455150500.0176-
0.4470151000.0973-
0.4485151500.0034-
0.4500152000.0056-
0.4515152500.039-
0.4529153000.0136-
0.4544153500.0292-
0.4559154000.0023-
0.4574154500.0709-
0.4589155000.1226-
0.4603155500.0847-
0.4618156000.1088-
0.4633156500.0605-
0.4648157000.0151-
0.4663157500.0475-
0.4677158000.0173-
0.4692158500.0085-
0.4707159000.0491-
0.4722159500.0349-
0.4737160000.0571-
0.4751160500.0867-
0.4766161000.0138-
0.4781161500.015-
0.4796162000.0556-
0.4811162500.0149-
0.4825163000.0598-
0.4840163500.0032-
0.4855164000.0006-
0.4870164500.0479-
0.4885165000.0491-
0.4899165500.1069-
0.4914166000.0164-
0.4929166500.013-
0.4944167000.0123-
0.4959167500.0151-
0.4973168000.0014-
0.4988168500.0028-
0.5003169000.0108-
0.5018169500.0023-
0.5033170000.0495-
0.5047170500.0171-
0.5062171000.0014-
0.5077171500.1108-
0.5092172000.0309-
0.5107172500.0085-
0.5121173000.1128-
0.5136173500.0548-
0.5151174000.034-
0.5166174500.0788-
0.5181175000.072-
0.5195175500.0498-
0.5210176000.0109-
0.5225176500.0738-
0.5240177000.021-
0.5255177500.0364-
0.5269178000.0611-
0.5284178500.0138-
0.5299179000.0109-
0.5314179500.0572-
0.5329180000.0095-
0.5343180500.0501-
0.5358181000.0546-
0.5373181500.0446-
0.5388182000.0645-
0.5403182500.0107-
0.5417183000.0069-
0.5432183500.0235-
0.5447184000.0014-
0.5462184500.0337-
0.5477185000.0142-
0.5491185500.0142-
0.5506186000.0503-
0.5521186500.0015-
0.5536187000.0242-
0.5551187500.0007-
0.5565188000.0529-
0.5580188500.0313-
0.5595189000.0886-
0.5610189500.0335-
0.5625190000.0311-
0.5639190500.0105-
0.5654191000.0116-
0.5669191500.0559-
0.5684192000.0945-
0.5699192500.0826-
0.5713193000.0266-
0.5728193500.0769-
0.5743194000.0912-
0.5758194500.0641-
0.5773195000.0541-
0.5787195500.0769-
0.5802196000.0411-
0.5817196500.115-
0.5832197000.0819-
0.5847197500.071-
0.5861198000.0066-
0.5876198500.0659-
0.5891199000.07-
0.5906199500.0607-
0.5921200000.0474-
0.5935200500.016-
0.5950201000.0122-
0.5965201500.0333-
0.5980202000.0155-
0.5995202500.0005-
0.6009203000.015-
0.6024203500.0014-
0.6039204000.0459-
0.6054204500.0808-
0.6069205000.1034-
0.6083205500.0846-
0.6098206000.071-
0.6113206500.0486-
0.6128207000.022-
0.6143207500.0016-
0.6157208000.0666-
0.6172208500.0461-
0.6187209000.022-
0.6202209500.0449-
0.6217210000.0844-
0.6231210500.0888-
0.6246211000.0219-
0.6261211500.0005-
0.6276212000.025-
0.6291212500.1285-
0.6306213000.0224-
0.6320213500.0444-
0.6335214000.0133-
0.6350214500.0317-
0.6365215000.0457-
0.6380215500.0997-
0.6394216000.0689-
0.6409216500.0275-
0.6424217000.014-
0.6439217500.0304-
0.6454218000.072-
0.6468218500.0556-
0.6483219000.0902-
0.6498219500.0153-
0.6513220000.0759-
0.6528220500.0905-
0.6542221000.1058-
0.6557221500.0524-
0.6572222000.0711-
0.6587222500.0201-
0.6602223000.0367-
0.6616223500.0513-
0.6631224000.0187-
0.6646224500.027-
0.6661225000.0643-
0.6676225500.0334-
0.6690226000.023-
0.6705226500.1438-
0.6720227000.0051-
0.6735227500.0335-
0.6750228000.0879-
0.6764228500.003-
0.6779229000.0061-
0.6794229500.104-
0.6809230000.0575-
0.6824230500.0009-
0.6838231000.001-
0.6853231500.01-
0.6868232000.0018-
0.6883232500.036-
0.6898233000.0011-
0.6912233500.0033-
0.6927234000.117-
0.6942234500.0177-
0.6957235000.0547-
0.6972235500.061-
0.6986236000.06-
0.7001236500.0259-
0.7016237000.1325-
0.7031237500.0298-
0.7046238000.0046-
0.7060238500.0129-
0.7075239000.0085-
0.7090239500.015-
0.7105240000.0205-
0.7120240500.0135-
0.7134241000.0408-
0.7149241500.0014-
0.7164242000.0305-
0.7179242500.0241-
0.7194243000.0621-
0.7208243500.0014-
0.7223244000.0522-
0.7238244500.1001-
0.7253245000.0007-
0.7268245500.0045-
0.7282246000.0282-
0.7297246500.022-
0.7312247000.107-
0.7327247500.0363-
0.7342248000.0943-
0.7356248500.0015-
0.7371249000.0266-
0.7386249500.0113-
0.7401250000.0283-
0.7416250500.1304-
0.7430251000.0199-
0.7445251500.0014-
0.7460252000.0594-
0.7475252500.1188-
0.7490253000.0325-
0.7504253500.0715-
0.7519254000.0352-
0.7534254500.0165-
0.7549255000.0025-
0.7564255500.0017-
0.7578256000.0584-
0.7593256500.0251-
0.7608257000.0155-
0.7623257500.0304-
0.7638258000.0461-
0.7652258500.0347-
0.7667259000.1044-
0.7682259500.0174-
0.7697260000.0077-
0.7712260500.0264-
0.7726261000.0437-
0.7741261500.053-
0.7756262000.0721-
0.7771262500.0278-
0.7786263000.0107-
0.7800263500.0237-
0.7815264000.035-
0.7830264500.0322-
0.7845265000.0641-
0.7860265500.0219-
0.7874266000.0256-
0.7889266500.0559-
0.7904267000.0463-
0.7919267500.0992-
0.7934268000.062-
0.7948268500.0038-
0.7963269000.0521-
0.7978269500.011-
0.7993270000.0109-
0.8008270500.0483-
0.8022271000.0379-
0.8037271500.0231-
0.8052272000.0888-
0.8067272500.0197-
0.8082273000.0003-
0.8097273500.0157-
0.8111274000.0192-
0.8126274500.0802-
0.8141275000.0407-
0.8156275500.0351-
0.8171276000.001-
0.8185276500.0007-
0.8200277000.021-
0.8215277500.0548-
0.8230278000.0442-
0.8245278500.0561-
0.8259279000.0181-
0.8274279500.0669-
0.8289280000.016-
0.8304280500.0817-
0.8319281000.0221-
0.8333281500.0014-
0.8348282000.0195-
0.8363282500.0735-
0.8378283000.002-
0.8393283500.0269-
0.8407284000.0365-
0.8422284500.0825-
0.8437285000.0382-
0.8452285500.0144-
0.8467286000.0529-
0.8481286500.0042-
0.8496287000.0532-
0.8511287500.0195-
0.8526288000.018-
0.8541288500.005-
0.8555289000.0694-
0.8570289500.0006-
0.8585290000.0169-
0.8600290500.0188-
0.8615291000.0002-
0.8629291500.0246-
0.8644292000.001-
0.8659292500.0017-
0.8674293000.0169-
0.8689293500.0621-
0.8703294000.0017-
0.8718294500.0008-
0.8733295000.0086-
0.8748295500.0214-
0.8763296000.0495-
0.8777296500.0864-
0.8792297000.0844-
0.8807297500.0738-
0.8822298000.0007-
0.8837298500.0408-
0.8851299000.0025-
0.8866299500.0313-
0.8881300000.0178-
0.8896300500.0123-
0.8911301000.0001-
0.8925301500.0031-
0.8940302000.0035-
0.8955302500.0278-
0.8970303000.034-
0.8985303500.0255-
0.8999304000.0012-
0.9014304500.0756-
0.9029305000.0813-
0.9044305500.0024-
0.9059306000.1491-
0.9073306500.0009-
0.9088307000.0299-
0.9103307500.0226-
0.9118308000.0198-
0.9133308500.0019-
0.9147309000.0406-
0.9162309500.0168-
0.9177310000.0409-
0.9192310500.0016-
0.9207311000.0172-
0.9221311500.0131-
0.9236312000.1433-
0.9251312500.0316-
0.9266313000.0774-
0.9281313500.1256-
0.9295314000.0257-
0.9310314500.2166-
0.9325315000.0023-
0.9340315500.0261-
0.9355316000.0143-
0.9369316500.0005-
0.9384317000.0522-
0.9399317500.024-
0.9414318000.0353-
0.9429318500.0022-
0.9443319000.0006-
0.9458319500.0321-
0.9473320000.0879-
0.9488320500.0007-
0.9503321000.003-
0.9517321500.0295-
0.9532322000.0817-
0.9547322500.0345-
0.9562323000.0004-
0.9577323500.0112-
0.9591324000.0284-
0.9606324500.0654-
0.9621325000.036-
0.9636325500.0181-
0.9651326000.0374-
0.9665326500.0022-
0.9680327000.0706-
0.9695327500.0009-
0.9710328000.0077-
0.9725328500.0016-
0.9739329000.0586-
0.9754329500.0134-
0.9769330000.0108-
0.9784330500.0839-
0.9799331000.0032-
0.9813331500.0152-
0.9828332000.049-
0.9843332500.038-
0.9858333000.0302-
0.9873333500.0193-
0.9888334000.0291-
0.9902334500.0083-
0.9917335000.0014-
0.9932335500.0223-
0.9947336000.0154-
0.9962336500.0788-
0.9976337000.0567-
0.9991337500.0207-

Framework Versions

  • Python: 3.11.0
  • SetFit: 1.0.3
  • Sentence Transformers: 2.3.0
  • Transformers: 4.37.2
  • PyTorch: 2.2.1+cu121
  • Datasets: 2.16.1
  • 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. -->