CoolFace
Modelpublic

faodl/20250908_model_g20_multilabel_MiniLM-L12-all-labels

sourceHugging Faceupdated 1y 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

Evaluation

Metrics

LabelAccuracy
all0.3919

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/20250908_model_g20_multilabel_MiniLM-L12-all-labels")
# Run inference
preds = model("4.3.3 Strategies for Comprehensive Sexuality Education and (CSE) Youth-friendly Health Services 1. To promote volunteerism as a tool for fostering active participation of young people in national development; 5. To promote volunteerism as a tool for fostering active participation of young people in national development; 5.")

<!--

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

Training Hyperparameters

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

Training Results

EpochStepTraining LossValidation Loss
0.000510.1435-
0.0241500.1438-
0.04821000.1239-
0.07231500.1073-
0.09642000.0992-
0.12052500.0883-
0.14463000.08-
0.16873500.0801-
0.19284000.073-
0.21694500.0647-
0.24105000.0549-
0.26515500.0575-
0.28926000.0544-
0.31336500.0523-
0.33737000.0506-
0.36147500.0467-
0.38558000.0443-
0.40968500.0385-
0.43379000.0425-
0.45789500.0412-
0.481910000.036-
0.506010500.0323-
0.530111000.0352-
0.554211500.0347-
0.578312000.0319-
0.602412500.0254-
0.626513000.0291-
0.650613500.0253-
0.674714000.0283-
0.698814500.0248-
0.722915000.02-
0.747015500.0249-
0.771116000.0208-
0.795216500.021-
0.819317000.0238-
0.843417500.0196-
0.867518000.0213-
0.891618500.0222-
0.915719000.019-
0.939819500.0226-
0.963920000.0156-
0.988020500.0193-
1.012021000.016-
1.036121500.019-
1.060222000.0154-
1.084322500.0136-
1.108423000.014-
1.132523500.0147-
1.156624000.0126-
1.180724500.0161-
1.204825000.0123-
1.228925500.0151-
1.253026000.0123-
1.277126500.0122-
1.301227000.0084-
1.325327500.0154-
1.349428000.014-
1.373528500.0124-
1.397629000.0146-
1.421729500.0103-
1.445830000.0116-
1.469930500.013-
1.494031000.0104-
1.518131500.0124-
1.542232000.0127-
1.566332500.0122-
1.590433000.0092-
1.614533500.0108-
1.638634000.0121-
1.662734500.0125-
1.686735000.0162-
1.710835500.0105-
1.734936000.0133-
1.759036500.0145-
1.783137000.0113-
1.807237500.009-
1.831338000.0105-
1.855438500.011-
1.879539000.0087-
1.903639500.0159-
1.927740000.0101-
1.951840500.0112-
1.975941000.0111-
2.041500.0124-

Framework Versions

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