CoolFace
Modelpublic

Ah7med/setfit-football_bootpress_paraph-multi-v2

sourceHugging Faceupdated 1y agoView on Hugging Face
0likes13downloads
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 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
matches-match_time<ul><li>'Norwich City vs Newcastle United'</li><li>'will Manchester United play with chelsea'</li><li>'est-ce que Manchester United jouera avec chelsea'</li></ul>
matches-match_result<ul><li>'Liverpool and West Ham result'</li><li>'what is the score of Wolverhampton match'</li><li>'who won in Liverpool vs Newcastle United match'</li></ul>
greet-whoareyou<ul><li>'how can you help me'</li><li>"pourquoi j'ai besoin de toi"</li><li>'je ne te comprends pas'</li></ul>
matches-teamnextmatch<ul><li>'Real Madrid fixtures'</li><li>'quels sont les prochains matchs de Borussia Dortmund'</li><li>'próximos partidos de Atletico Madrid'</li></ul>
greet-good_bye<ul><li>'See you later'</li><li>'A plus tard'</li><li>'stop'</li></ul>
greet-hi<ul><li>'Hello buddy'</li><li>'Salut'</li><li>'Hey'</li></ul>

Evaluation

Metrics

LabelAccuracy
all1.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("Ah7med/setfit-football_bootpress_paraph-multi-v2")
# Run inference
preds = model("why do I need you")

<!--

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 count15.210
LabelTraining Sample Count
greet-hi5
greet-whoareyou7
greet-good_bye5
matches-teamnextmatch21
matches-match_time12
matches-match_result15

Training Hyperparameters

  • —batch_size: (4, 4)
  • —num_epochs: (4, 4)
  • —max_steps: -1
  • —sampling_strategy: oversampling
  • —bodylearningrate: (2e-05, 1e-05)
  • —headlearningrate: 0.01
  • —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: True

Training Results

EpochStepTraining LossValidation Loss
0.001210.1308-
0.0603500.1596-
0.12061000.1399-
0.18091500.089-
0.24132000.0461-
0.30162500.026-
0.36193000.0081-
0.42223500.0048-
0.48254000.0039-
0.54284500.0018-
0.60315000.002-
0.66345500.0015-
0.72386000.0011-
0.78416500.0009-
0.84447000.0008-
0.90477500.0005-
0.96508000.0007-
1.0829-0.0211
1.02538500.0006-
1.08569000.0005-
1.14609500.0005-
1.206310000.0003-
1.266610500.0003-
1.326911000.0004-
1.387211500.0003-
1.447512000.0004-
1.507812500.0002-
1.568213000.0003-
1.628513500.0003-
1.688814000.0003-
1.749114500.0003-
1.809415000.0003-
1.869715500.0003-
1.930016000.0002-
1.990316500.0002-
2.01658-0.0190
2.050717000.0003-
2.111017500.0002-
2.171318000.0002-
2.231618500.0002-
2.291919000.0002-
2.352219500.0002-
2.412520000.0002-
2.472920500.0002-
2.533221000.0002-
2.593521500.0002-
2.653822000.0001-
2.714122500.0002-
2.774423000.0001-
2.834723500.0002-
2.895124000.0001-
2.955424500.0002-
3.02487-0.0181
3.015725000.0002-
3.076025500.0001-
3.136326000.0001-
3.196626500.0001-
3.256927000.0001-
3.317227500.0001-
3.377628000.0001-
3.437928500.0001-
3.498229000.0001-
3.558529500.0001-
3.618830000.0001-
3.679130500.0001-
3.739431000.0001-
3.799831500.0001-
3.860132000.0001-
3.920432500.0001-
3.980733000.0001-
4.03316-0.0176

Framework Versions

  • —Python: 3.11.12
  • —SetFit: 1.1.2
  • —Sentence Transformers: 3.4.1
  • —Transformers: 4.51.3
  • —PyTorch: 2.6.0+cu124
  • —Datasets: 3.5.1
  • —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. -->