CoolFace
Modelpublic

faodl/model_cca_multilabel_MiniLM-L12-50prop

sourceHugging Faceupdated 11mo agoView on Hugging Face
0likes7downloads
Model Card

SetFit with sentence-transformers/paraphrase-multilingual-MiniLM-L12-v2

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

Model Sources

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("faodl/model_cca_multilabel_MiniLM-L12-50prop")
# Run inference
preds = model("School and workplace nutrition programs will promote healthier choices by removing sugar-rich products from regular offerings, expanding water access, and integrating nutrition education that addresses SSBs, portion sizes, and overall diet quality.")

<!--

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

Training Hyperparameters

  • —batch_size: (16, 16)
  • —num_epochs: (2, 2)
  • —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
  • —l2_weight: 0.01
  • —seed: 42
  • —evalmaxsteps: -1
  • —loadbestmodelatend: False

Training Results

EpochStepTraining LossValidation Loss
0.000210.3075-
0.0087500.2066-
0.01731000.1932-
0.02601500.1878-
0.03472000.1824-
0.04342500.1682-
0.05203000.1566-
0.06073500.1487-
0.06944000.1542-
0.07814500.1553-
0.08675000.1513-
0.09545500.1329-
0.10416000.1551-
0.11276500.1428-
0.12147000.1414-
0.13017500.1152-
0.13888000.1283-
0.14748500.1305-
0.15619000.1303-
0.16489500.1257-
0.173510000.1103-
0.182110500.1183-
0.190811000.1151-
0.199511500.1129-
0.208212000.1039-
0.216812500.1126-
0.225513000.1188-
0.234213500.114-
0.242814000.1094-
0.251514500.1078-
0.260215000.1018-
0.268915500.1136-
0.277516000.1004-
0.286216500.1018-
0.294917000.0929-
0.303617500.0986-
0.312218000.0951-
0.320918500.0939-
0.329619000.0898-
0.338219500.095-
0.346920000.0885-
0.355620500.0941-
0.364321000.1028-
0.372921500.0945-
0.381622000.0924-
0.390322500.0846-
0.399023000.0839-
0.407623500.0927-
0.416324000.0839-
0.425024500.0799-
0.433725000.0862-
0.442325500.0872-
0.451026000.0905-
0.459726500.0857-
0.468327000.0791-
0.477027500.0829-
0.485728000.0776-
0.494428500.0775-
0.503029000.088-
0.511729500.0824-
0.520430000.0871-
0.529130500.0731-
0.537731000.0799-
0.546431500.0763-
0.555132000.0725-
0.563732500.0789-
0.572433000.0893-
0.581133500.0714-
0.589834000.0802-
0.598434500.0725-
0.607135000.0756-
0.615835500.0778-
0.624536000.0735-
0.633136500.0738-
0.641837000.0733-
0.650537500.0696-
0.659238000.0732-
0.667838500.0757-
0.676539000.0652-
0.685239500.0662-
0.693840000.0796-
0.702540500.0709-
0.711241000.0678-
0.719941500.0698-
0.728542000.0636-
0.737242500.0679-
0.745943000.073-
0.754643500.0685-
0.763244000.074-
0.771944500.0717-
0.780645000.0615-
0.789245500.0671-
0.797946000.0655-
0.806646500.0658-
0.815347000.0585-
0.823947500.0619-
0.832648000.0615-
0.841348500.0593-
0.850049000.0596-
0.858649500.063-
0.867350000.0591-
0.876050500.0685-
0.884651000.0651-
0.893351500.0623-
0.902052000.0605-
0.910752500.0618-
0.919353000.0683-
0.928053500.0631-
0.936754000.0651-
0.945454500.0578-
0.954055000.0646-
0.962755500.054-
0.971456000.0638-
0.980156500.0592-
0.988757000.0632-
0.997457500.0573-
1.006158000.0568-
1.014758500.0554-
1.023459000.0519-
1.032159500.0555-
1.040860000.0487-
1.049460500.0659-
1.058161000.0463-
1.066861500.0604-
1.075562000.0553-
1.084162500.0484-
1.092863000.0475-
1.101563500.0489-
1.110164000.0544-
1.118864500.051-
1.127565000.05-
1.136265500.0578-
1.144866000.0518-
1.153566500.0499-
1.162267000.0512-
1.170967500.054-
1.179568000.0596-
1.188268500.0445-
1.196969000.0546-
1.205669500.0605-
1.214270000.0518-
1.222970500.0535-
1.231671000.0643-
1.240271500.0509-
1.248972000.0477-
1.257672500.0421-
1.266373000.0558-
1.274973500.0431-
1.283674000.0527-
1.292374500.0512-
1.301075000.049-
1.309675500.0489-
1.318376000.0515-
1.327076500.0537-
1.335677000.0556-
1.344377500.0445-
1.353078000.0509-
1.361778500.0571-
1.370379000.0582-
1.379079500.0488-
1.387780000.0482-
1.396480500.0564-
1.405081000.0487-
1.413781500.0605-
1.422482000.0539-
1.431082500.0463-
1.439783000.0468-
1.448483500.0485-
1.457184000.0569-
1.465784500.0601-
1.474485000.0545-
1.483185500.0471-
1.491886000.0472-
1.500486500.0464-
1.509187000.0511-
1.517887500.0477-
1.526588000.0464-
1.535188500.0497-
1.543889000.0493-
1.552589500.0555-
1.561190000.0523-
1.569890500.0563-
1.578591000.0473-
1.587291500.0455-
1.595892000.0469-
1.604592500.0456-
1.613293000.048-
1.621993500.0498-
1.630594000.0568-
1.639294500.0501-
1.647995000.0509-
1.656595500.0482-
1.665296000.0479-
1.673996500.0442-
1.682697000.0528-
1.691297500.0453-
1.699998000.041-
1.708698500.0507-
1.717399000.0495-
1.725999500.0517-
1.7346100000.052-
1.7433100500.047-
1.7520101000.052-
1.7606101500.0565-
1.7693102000.0458-
1.7780102500.0409-
1.7866103000.0487-
1.7953103500.0516-
1.8040104000.049-
1.8127104500.0511-
1.8213105000.0498-
1.8300105500.0449-
1.8387106000.047-
1.8474106500.0463-
1.8560107000.0457-
1.8647107500.0495-
1.8734108000.0454-
1.8820108500.0486-
1.8907109000.049-
1.8994109500.0502-
1.9081110000.0454-
1.9167110500.0478-
1.9254111000.0509-
1.9341111500.0518-
1.9428112000.0445-
1.9514112500.043-
1.9601113000.0414-
1.9688113500.0452-
1.9775114000.0468-
1.9861114500.0426-
1.9948115000.0457-

Framework Versions

  • —Python: 3.12.12
  • —SetFit: 1.1.3
  • —Sentence Transformers: 5.1.1
  • —Transformers: 4.57.1
  • —PyTorch: 2.8.0+cu126
  • —Datasets: 4.0.0
  • —Tokenizers: 0.22.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. -->