CoolFace
Modelpublic

spaly99/my-setfit-model-dataset-PG-OCR

sourceHugging Faceupdated 2y agoView on Hugging Face
0likes4downloads
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
False<ul><li>'Persistent'</li><li>'Forensic Contract'</li><li>'View Vendor List'</li></ul>
True<ul><li>'winming camp at Taj Deccan. Morning and evening batches. Start today. Become a champ. Monday to Friday till 3 Ist march '</li><li>'您的反馈已记录,我们将努力改善您的浏览体验。'</li><li>'Ve ConcerrualL DESIGNER '</li></ul>

Evaluation

Metrics

LabelAccuracyPrecisionRecallF1
all0.50030.00.00.0

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("Google Maps")

<!--

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.5055706
LabelTraining Sample Count
False6399
True6401

Training Hyperparameters

  • —batch_size: (16, 2)
  • —num_epochs: (1, 16)
  • —max_steps: -1
  • —sampling_strategy: oversampling
  • —num_iterations: 20
  • —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
  • —run_name: PG-OCR-test-1
  • —evalmaxsteps: -1
  • —loadbestmodelatend: False

Training Results

EpochStepTraining LossValidation Loss
0.000010.5-
0.0016500.5-
0.00311000.5-
0.00471500.5-
0.00632000.5-
0.00782500.5-
0.00943000.5-
0.01093500.5-
0.01254000.5-
0.01414500.5-
0.01565000.5-
0.01725500.5-
0.01876000.5-
0.02036500.5-
0.02197000.5-
0.02347500.5-
0.0258000.5-
0.02668500.5-
0.02819000.5-
0.02979500.5-
0.031210000.5-
0.032810500.5-
0.034411000.5-
0.035911500.5-
0.037512000.5-
0.039112500.5-
0.040613000.5-
0.042213500.5-
0.043714000.5-
0.045314500.5-
0.046915000.5-
0.048415500.5-
0.0516000.5-
0.051616500.5-
0.053117000.5-
0.054717500.5-
0.056318000.5-
0.057818500.5-
0.059419000.5-
0.060919500.5-
0.062520000.5-
0.064120500.5-
0.065621000.5-
0.067221500.5-
0.068822000.5-
0.070322500.5-
0.071923000.5-
0.073423500.5-
0.07524000.5-
0.076624500.5-
0.078125000.5-
0.079725500.5-
0.081326000.5-
0.082826500.5-
0.084427000.5-
0.085927500.5-
0.087528000.5-
0.089128500.5-
0.090629000.5-
0.092229500.5-
0.093830000.5-
0.095330500.5-
0.096931000.5-
0.098431500.5-
0.132000.5-
0.101632500.5-
0.103133000.5-
0.104733500.5-
0.106234000.5-
0.107834500.5-
0.109435000.5-
0.110935500.5-
0.112536000.5-
0.114136500.5-
0.115637000.5-
0.117237500.5-
0.118738000.5-
0.120338500.5-
0.121939000.5-
0.123439500.5-
0.12540000.5-
0.126640500.5-
0.128141000.5-
0.129741500.5-
0.131342000.5-
0.132842500.5-
0.134443000.5-
0.135943500.5-
0.137544000.5-
0.139144500.5-
0.140645000.5-
0.142245500.5-
0.143746000.5-
0.145346500.5-
0.146947000.5-
0.148447500.5-
0.1548000.5-
0.151648500.5-
0.153149000.5-
0.154749500.5-
0.156250000.50.5
0.157850500.5-
0.159451000.5-
0.160951500.5-
0.162552000.5-
0.164152500.5-
0.165653000.5-
0.167253500.5-
0.168854000.5-
0.170354500.5-
0.171955000.5-
0.173455500.5-
0.17556000.5-
0.176656500.5-
0.178157000.5-
0.179757500.5-
0.181258000.5-
0.182858500.5-
0.184459000.5-
0.185959500.5-
0.187560000.5-
0.189160500.5-
0.190661000.5-
0.192261500.5-
0.193862000.5-
0.195362500.5-
0.196963000.5-
0.198463500.5-
0.264000.5-
0.201664500.5-
0.203165000.5-
0.204765500.5-
0.206266000.5-
0.207866500.5-
0.209467000.5-
0.210967500.5-
0.212568000.5-
0.214168500.5-
0.215669000.5-
0.217269500.5-
0.218870000.5-
0.220370500.5-
0.221971000.5-
0.223471500.5-
0.22572000.5-
0.226672500.5-
0.228173000.5-
0.229773500.5-
0.231374000.5-
0.232874500.5-
0.234475000.5-
0.235975500.5-
0.237576000.5-
0.239176500.5-
0.240677000.5-
0.242277500.5-
0.243778000.5-
0.245378500.5-
0.246979000.5-
0.248479500.5-
0.2580000.5-
0.251680500.5-
0.253181000.5-
0.254781500.5-
0.256282000.5-
0.257882500.5-
0.259483000.5-
0.260983500.5-
0.262584000.5-
0.264184500.5-
0.265685000.5-
0.267285500.5-
0.268786000.5-
0.270386500.5-
0.271987000.5-
0.273487500.5-
0.27588000.5-
0.276688500.5-
0.278189000.5-
0.279789500.5-
0.281290000.5-
0.282890500.5-
0.284491000.5-
0.285991500.5-
0.287592000.5-
0.289192500.5-
0.290693000.5-
0.292293500.5-
0.293894000.5-
0.295394500.5-
0.296995000.5-
0.298495500.5-
0.396000.5-
0.301696500.5-
0.303197000.5-
0.304797500.5-
0.306398000.5-
0.307898500.5-
0.309499000.5-
0.310999500.5-
0.3125100000.50.5
0.3141100500.5-
0.3156101000.5-
0.3172101500.5-
0.3187102000.5-
0.3203102500.5-
0.3219103000.5-
0.3234103500.5-
0.325104000.5-
0.3266104500.5-
0.3281105000.5-
0.3297105500.5-
0.3312106000.5-
0.3328106500.5-
0.3344107000.5-
0.3359107500.5-
0.3375108000.5-
0.3391108500.5-
0.3406109000.5-
0.3422109500.5-
0.3438110000.5-
0.3453110500.5-
0.3469111000.5-
0.3484111500.5-
0.35112000.5-
0.3516112500.5-
0.3531113000.5-
0.3547113500.5-
0.3563114000.5-
0.3578114500.5-
0.3594115000.5-
0.3609115500.5-
0.3625116000.5-
0.3641116500.5-
0.3656117000.5-
0.3672117500.5-
0.3688118000.5-
0.3703118500.5-
0.3719119000.5-
0.3734119500.5-
0.375120000.5-
0.3766120500.5-
0.3781121000.5-
0.3797121500.5-
0.3812122000.5-
0.3828122500.5-
0.3844123000.5-
0.3859123500.5-
0.3875124000.5-
0.3891124500.5-
0.3906125000.5-
0.3922125500.5-
0.3937126000.5-
0.3953126500.5-
0.3969127000.5-
0.3984127500.5-
0.4128000.5-
0.4016128500.5-
0.4031129000.5-
0.4047129500.5-
0.4062130000.5-
0.4078130500.5-
0.4094131000.5-
0.4109131500.5-
0.4125132000.5-
0.4141132500.5-
0.4156133000.5-
0.4172133500.5-
0.4188134000.5-
0.4203134500.5-
0.4219135000.5-
0.4234135500.5-
0.425136000.5-
0.4266136500.5-
0.4281137000.5-
0.4297137500.5-
0.4313138000.5-
0.4328138500.5-
0.4344139000.5-
0.4359139500.5-
0.4375140000.5-
0.4391140500.5-
0.4406141000.5-
0.4422141500.5-
0.4437142000.5-
0.4453142500.5-
0.4469143000.5-
0.4484143500.5-
0.45144000.5-
0.4516144500.5-
0.4531145000.5-
0.4547145500.5-
0.4562146000.5-
0.4578146500.5-
0.4594147000.5-
0.4609147500.5-
0.4625148000.5-
0.4641148500.5-
0.4656149000.5-
0.4672149500.5-
0.4688150000.50.5
0.4703150500.5-
0.4719151000.5-
0.4734151500.5-
0.475152000.5-
0.4766152500.5-
0.4781153000.5-
0.4797153500.5-
0.4813154000.5-
0.4828154500.5-
0.4844155000.5-
0.4859155500.5-
0.4875156000.5-
0.4891156500.5-
0.4906157000.5-
0.4922157500.5-
0.4938158000.5-
0.4953158500.5-
0.4969159000.5-
0.4984159500.5-
0.5160000.5-
0.5016160500.5-
0.5031161000.5-
0.5047161500.5-
0.5062162000.5-
0.5078162500.5-
0.5094163000.5-
0.5109163500.5-
0.5125164000.5-
0.5141164500.5-
0.5156165000.5-
0.5172165500.5-
0.5188166000.5-
0.5203166500.5-
0.5219167000.5-
0.5234167500.5-
0.525168000.5-
0.5266168500.5-
0.5281169000.5-
0.5297169500.5-
0.5312170000.5-
0.5328170500.5-
0.5344171000.5-
0.5359171500.5-
0.5375172000.5-
0.5391172500.5-
0.5406173000.5-
0.5422173500.5-
0.5437174000.5-
0.5453174500.5-
0.5469175000.5-
0.5484175500.5-
0.55176000.5-
0.5516176500.5-
0.5531177000.5-
0.5547177500.5-
0.5563178000.5-
0.5578178500.5-
0.5594179000.5-
0.5609179500.5-
0.5625180000.5-
0.5641180500.5-
0.5656181000.5-
0.5672181500.5-
0.5687182000.5-
0.5703182500.5-
0.5719183000.5-
0.5734183500.5-
0.575184000.5-
0.5766184500.5-
0.5781185000.5-
0.5797185500.5-
0.5813186000.5-
0.5828186500.5-
0.5844187000.5-
0.5859187500.5-
0.5875188000.5-
0.5891188500.5-
0.5906189000.5-
0.5922189500.5-
0.5938190000.5-
0.5953190500.5-
0.5969191000.5-
0.5984191500.5-
0.6192000.5-
0.6016192500.5-
0.6031193000.5-
0.6047193500.5-
0.6062194000.5-
0.6078194500.5-
0.6094195000.5-
0.6109195500.5-
0.6125196000.5-
0.6141196500.5-
0.6156197000.5-
0.6172197500.5-
0.6188198000.5-
0.6203198500.5-
0.6219199000.5-
0.6234199500.5-
0.625200000.50.5
0.6266200500.5-
0.6281201000.5-
0.6297201500.5-
0.6312202000.5-
0.6328202500.5-
0.6344203000.5-
0.6359203500.5-
0.6375204000.5-
0.6391204500.5-
0.6406205000.5-
0.6422205500.5-
0.6438206000.5-
0.6453206500.5-
0.6469207000.5-
0.6484207500.5-
0.65208000.5-
0.6516208500.5-
0.6531209000.5-
0.6547209500.5-
0.6562210000.5-
0.6578210500.5-
0.6594211000.5-
0.6609211500.5-
0.6625212000.5-
0.6641212500.5-
0.6656213000.5-
0.6672213500.5-
0.6687214000.5-
0.6703214500.5-
0.6719215000.5-
0.6734215500.5-
0.675216000.5-
0.6766216500.5-
0.6781217000.5-
0.6797217500.5-
0.6813218000.5-
0.6828218500.5-
0.6844219000.5-
0.6859219500.5-
0.6875220000.5-
0.6891220500.5-
0.6906221000.5-
0.6922221500.5-
0.6937222000.5-
0.6953222500.5-
0.6969223000.5-
0.6984223500.5-
0.7224000.5-
0.7016224500.5-
0.7031225000.5-
0.7047225500.5-
0.7063226000.5-
0.7078226500.5-
0.7094227000.5-
0.7109227500.5-
0.7125228000.5-
0.7141228500.5-
0.7156229000.5-
0.7172229500.5-
0.7188230000.5-
0.7203230500.5-
0.7219231000.5-
0.7234231500.5-
0.725232000.5-
0.7266232500.5-
0.7281233000.5-
0.7297233500.5-
0.7312234000.5-
0.7328234500.5-
0.7344235000.5-
0.7359235500.5-
0.7375236000.5-
0.7391236500.5-
0.7406237000.5-
0.7422237500.5-
0.7438238000.5-
0.7453238500.5-
0.7469239000.5-
0.7484239500.5-
0.75240000.5-
0.7516240500.5-
0.7531241000.5-
0.7547241500.5-
0.7562242000.5-
0.7578242500.5-
0.7594243000.5-
0.7609243500.5-
0.7625244000.5-
0.7641244500.5-
0.7656245000.5-
0.7672245500.5-
0.7688246000.5-
0.7703246500.5-
0.7719247000.5-
0.7734247500.5-
0.775248000.5-
0.7766248500.5-
0.7781249000.5-
0.7797249500.5-
0.7812250000.50.5
0.7828250500.5-
0.7844251000.5-
0.7859251500.5-
0.7875252000.5-
0.7891252500.5-
0.7906253000.5-
0.7922253500.5-
0.7937254000.5-
0.7953254500.5-
0.7969255000.5-
0.7984255500.5-
0.8256000.5-
0.8016256500.5-
0.8031257000.5-
0.8047257500.5-
0.8063258000.5-
0.8078258500.5-
0.8094259000.5-
0.8109259500.5-
0.8125260000.5-
0.8141260500.5-
0.8156261000.5-
0.8172261500.5-
0.8187262000.5-
0.8203262500.5-
0.8219263000.5-
0.8234263500.5-
0.825264000.5-
0.8266264500.5-
0.8281265000.5-
0.8297265500.5-
0.8313266000.5-
0.8328266500.5-
0.8344267000.5-
0.8359267500.5-
0.8375268000.5-
0.8391268500.5-
0.8406269000.5-
0.8422269500.5-
0.8438270000.5-
0.8453270500.5-
0.8469271000.5-
0.8484271500.5-
0.85272000.5-
0.8516272500.5-
0.8531273000.5-
0.8547273500.5-
0.8562274000.5-
0.8578274500.5-
0.8594275000.5-
0.8609275500.5-
0.8625276000.5-
0.8641276500.5-
0.8656277000.5-
0.8672277500.5-
0.8688278000.5-
0.8703278500.5-
0.8719279000.5-
0.8734279500.5-
0.875280000.5-
0.8766280500.5-
0.8781281000.5-
0.8797281500.5-
0.8812282000.5-
0.8828282500.5-
0.8844283000.5-
0.8859283500.5-
0.8875284000.5-
0.8891284500.5-
0.8906285000.5-
0.8922285500.5-
0.8938286000.5-
0.8953286500.5-
0.8969287000.5-
0.8984287500.5-
0.9288000.5-
0.9016288500.5-
0.9031289000.5-
0.9047289500.5-
0.9062290000.5-
0.9078290500.5-
0.9094291000.5-
0.9109291500.5-
0.9125292000.5-
0.9141292500.5-
0.9156293000.5-
0.9172293500.5-
0.9187294000.5-
0.9203294500.5-
0.9219295000.5-
0.9234295500.5-
0.925296000.5-
0.9266296500.5-
0.9281297000.5-
0.9297297500.5-
0.9313298000.5-
0.9328298500.5-
0.9344299000.5-
0.9359299500.5-
0.9375300000.50.5
0.9391300500.5-
0.9406301000.5-
0.9422301500.5-
0.9437302000.5-
0.9453302500.5-
0.9469303000.5-
0.9484303500.5-
0.95304000.5-
0.9516304500.5-
0.9531305000.5-
0.9547305500.5-
0.9563306000.5-
0.9578306500.5-
0.9594307000.5-
0.9609307500.5-
0.9625308000.5-
0.9641308500.5-
0.9656309000.5-
0.9672309500.5-
0.9688310000.5-
0.9703310500.5-
0.9719311000.5-
0.9734311500.5-
0.975312000.5-
0.9766312500.5-
0.9781313000.5-
0.9797313500.5-
0.9812314000.5-
0.9828314500.5-
0.9844315000.5-
0.9859315500.5-
0.9875316000.5-
0.9891316500.5-
0.9906317000.5-
0.9922317500.5-
0.9938318000.5-
0.9953318500.5-
0.9969319000.5-
0.9984319500.5-
1.0320000.5-

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