CoolFace
Modelpublic

faodl/model_g20_multilabel

sourceHugging Faceupdated 1y 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 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_g20_multilabel")
# Run inference
preds = model("Training infrastructure will be adapted to accommodate 
new	programmes.")

<!--

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

Training Hyperparameters

  • —batch_size: (16, 16)
  • —num_epochs: (1, 1)
  • —max_steps: -1
  • —sampling_strategy: oversampling
  • —num_iterations: 50
  • —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.2348-
0.0119500.1747-
0.02371000.153-
0.03561500.1314-
0.04752000.1263-
0.05932500.1168-
0.07123000.116-
0.08313500.098-
0.09494000.1085-
0.10684500.0975-
0.11875000.094-
0.13055500.082-
0.14246000.0856-
0.15436500.0838-
0.16627000.0762-
0.17807500.0722-
0.18998000.0722-
0.20188500.0634-
0.21369000.0584-
0.22559500.0664-
0.237410000.0688-
0.249210500.0629-
0.261111000.0579-
0.273011500.0652-
0.284812000.0573-
0.296712500.0584-
0.308613000.0558-
0.320413500.0586-
0.332314000.0574-
0.344214500.0444-
0.356015000.0462-
0.367915500.0488-
0.379816000.0505-
0.391616500.0529-
0.403517000.0487-
0.415417500.0459-
0.427218000.0531-
0.439118500.0448-
0.451019000.0382-
0.462919500.0457-
0.474720000.0493-
0.486620500.0488-
0.498521000.049-
0.510321500.0495-
0.522222000.0402-
0.534122500.0493-
0.545923000.0496-
0.557823500.0438-
0.569724000.0361-
0.581524500.0428-
0.593425000.0419-
0.605325500.0416-
0.617126000.0338-
0.629026500.0397-
0.640927000.0385-
0.652727500.0285-
0.664628000.0461-
0.676528500.0341-
0.688329000.0379-
0.700229500.0435-
0.712130000.0341-
0.723930500.0395-
0.735831000.0424-
0.747731500.0415-
0.759632000.0422-
0.771432500.0402-
0.783333000.0309-
0.795233500.0379-
0.807034000.039-
0.818934500.0427-
0.830835000.0331-
0.842635500.0457-
0.854536000.0306-
0.866436500.034-
0.878237000.0354-
0.890137500.0393-
0.902038000.036-
0.913838500.0339-
0.925739000.0332-
0.937639500.0274-
0.949440000.0372-
0.961340500.0319-
0.973241000.0339-
0.985041500.0349-
0.996942000.0383-

Framework Versions

  • —Python: 3.11.13
  • —SetFit: 1.1.2
  • —Sentence Transformers: 4.1.0
  • —Transformers: 4.52.4
  • —PyTorch: 2.6.0+cu124
  • —Datasets: 3.6.0
  • —Tokenizers: 0.21.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. -->