CoolFace
Modelpublic

faodl/model_cca_multilabel_MiniLM-L12-v03

sourceHugging Faceupdated 11mo agoView on Hugging Face
0likes8downloads
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 MultiOutputClassifier 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 MultiOutputClassifier 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-v03")
# Run inference
preds = model("To monitor market dynamics and inform policy responses, the government will track the retail value of ultra-processed foods and analyze shifts in consumption in relation to labeling and advertising reforms. Data from these analyses will feed annual dashboards that link labeling density, promotional intensity, and dietary outcomes to guide targeted interventions and budget planning.")

<!--

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

Training Hyperparameters

  • —batch_size: (32, 32)
  • —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.000610.1914-
0.0283500.1948-
0.05661000.1824-
0.08491500.1661-
0.11322000.1523-
0.14152500.1383-
0.16983000.1368-
0.19813500.1267-
0.22644000.124-
0.25474500.127-
0.28305000.1201-
0.31135500.1206-
0.33966000.1153-
0.36796500.1105-
0.39627000.1071-
0.42447500.1067-
0.45278000.1037-
0.48108500.1072-
0.50939000.1076-
0.53769500.1072-
0.565910000.0984-
0.594210500.0972-
0.622511000.1023-
0.650811500.0993-
0.679112000.0959-
0.707412500.0989-
0.735713000.0918-
0.764013500.099-
0.792314000.0924-
0.820614500.0889-
0.848915000.092-
0.877215500.0908-
0.905516000.0891-
0.933816500.0876-
0.962117000.0931-
0.990417500.0798-
1.018718000.0811-
1.047018500.0785-
1.075319000.0796-
1.103619500.0849-
1.131920000.0805-
1.160220500.08-
1.188521000.0776-
1.216821500.0837-
1.245022000.0793-
1.273322500.0754-
1.301623000.078-
1.329923500.0796-
1.358224000.0777-
1.386524500.0787-
1.414825000.0752-
1.443125500.0775-
1.471426000.0749-
1.499726500.0722-
1.528027000.0832-
1.556327500.0738-
1.584628000.0863-
1.612928500.0754-
1.641229000.0855-
1.669529500.0767-
1.697830000.081-
1.726130500.075-
1.754431000.0754-
1.782731500.0689-
1.811032000.0758-
1.839332500.0734-
1.867633000.0718-
1.895933500.0784-
1.924234000.0776-
1.952534500.0773-
1.980835000.071-

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