CoolFace
Modelpublic

egis-group/router_mini_lm_l6

sourceHugging Faceupdated 2y agoView on Hugging Face
0likes11downloads
Model Card

SetFit with sentence-transformers/all-MiniLM-L12-v2

This is a SetFit model that can be used for Text Classification. This SetFit model uses sentence-transformers/all-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
sub_queries<ul><li>'Could you break down the main factors I should consider when researching market prices and how to effectively communicate our needs to the supplier during negotiations?'</li><li>'Comment faire pousser une plante et le mesurer ?'</li><li>"Quel est le meilleur matériau pour l'isolation phonique et thermique?"</li></ul>
simple_questions<ul><li>'What are the key strategies for maintaining efficient communication in a remote work environment?'</li><li>'Could you summarize the ways a person can help in adapting to climate change ?'</li><li>'What are the current trends in construction?'</li></ul>
exchange<ul><li>'Could you please restate your last explanation using simpler terms?'</li><li>'Could you restate the impact of augmented reality on design practices?'</li><li>'Pourriez-vous me donner un résumé des principaux points abordés dans notre conversation précédente ?'</li></ul>
compare<ul><li>'How do the conclusions differ?'</li><li>'Contrast the main arguments presented in each paper'</li><li>'Quelles sont les principales différences dans les programmes éducatifs décrits dans ces documents ?'</li></ul>
summary<ul><li>'Que dois-je retenir de ce doc ?'</li><li>'What are the key assertions made within the text'</li><li>'What are the most important argument stated in the document?'</li></ul>

Evaluation

Metrics

LabelAccuracy
all0.9333

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("egis-group/router_mini_lm_l6")
# Run inference
preds = model("Compare ces deux documents")

<!--

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 count413.438948
LabelTraining Sample Count
negative0
positive0

Training Hyperparameters

  • —batch_size: (16, 16)
  • —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
  • —seed: 42
  • —evalmaxsteps: -1
  • —loadbestmodelatend: True

Training Results

EpochStepTraining LossValidation Loss
0.000310.4073-
0.0151500.3054-
0.03031000.2066-
0.04541500.2664-
0.06062000.2463-
0.07572500.214-
0.09093000.1892-
0.10603500.1402-
0.12124000.1804-
0.13634500.0571-
0.15155000.0979-
0.16665500.1775-
0.18186000.0377-
0.19696500.0398-
0.21217000.0423-
0.22727500.0036-
0.24248000.0079-
0.25758500.0049-
0.27269000.0018-
0.28789500.0018-
0.302910000.0032-
0.318110500.0019-
0.333211000.0008-
0.348411500.0006-
0.363512000.0006-
0.378712500.0011-
0.393813000.0005-
0.409013500.001-
0.424114000.0009-
0.439314500.0004-
0.454415000.0003-
0.469615500.0003-
0.484716000.0006-
0.499816500.0003-
0.515017000.0002-
0.530117500.0002-
0.545318000.0005-
0.560418500.0003-
0.575619000.0002-
0.590719500.0002-
0.605920000.0001-
0.621020500.0002-
0.636221000.0002-
0.651321500.0001-
0.666522000.0002-
0.681622500.0002-
0.696823000.0002-
0.711923500.0002-
0.727124000.0002-
0.742224500.0002-
0.757325000.0001-
0.772525500.0001-
0.787626000.0002-
0.802826500.0001-
0.817927000.0002-
0.833127500.0007-
0.848228000.0001-
0.863428500.0001-
0.878529000.0001-
0.893729500.0001-
0.908830000.0001-
0.924030500.0002-
0.939131000.0001-
0.954331500.0001-
0.969432000.0001-
0.984632500.0001-
0.999733000.0002-
1.03301-0.0001
1.014833500.0003-
1.030034000.0002-
1.045134500.0001-
1.060335000.0001-
1.075435500.0001-
1.090636000.0001-
1.105736500.0001-
1.120937000.0002-
1.136037500.0001-
1.151238000.0001-
1.166338500.0001-
1.181539000.0001-
1.196639500.001-
1.211840000.0001-
1.226940500.0001-
1.242041000.0001-
1.257241500.0001-
1.272342000.0001-
1.287542500.0001-
1.302643000.0001-
1.317843500.0-
1.332944000.0001-
1.348144500.0001-
1.363245000.0001-
1.378445500.0001-
1.393546000.0001-
1.408746500.0001-
1.423847000.0001-
1.439047500.0001-
1.454148000.0-
1.469348500.0-
1.484449000.0001-
1.499549500.0001-
1.514750000.0001-
1.529850500.0001-
1.545051000.0-
1.560151500.0001-
1.575352000.0-
1.590452500.0-
1.605653000.0001-
1.620753500.0-
1.635954000.0001-
1.651054500.0-
1.666255000.0001-
1.681355500.0001-
1.696556000.0-
1.711656500.0-
1.726757000.0-
1.741957500.0001-
1.757058000.0001-
1.772258500.0-
1.787359000.0-
1.802559500.0001-
1.817660000.0002-
1.832860500.0-
1.847961000.0001-
1.863161500.0001-
1.878262000.0001-
1.893462500.0-
1.908563000.0001-
1.923763500.0-
1.938864000.0001-
1.954064500.0001-
1.969165000.0-
1.984265500.0-
1.999466000.0-
2.06602-0.0
2.014566500.0-
2.029767000.0-
2.044867500.0-
2.060068000.0-
2.075168500.0-
2.090369000.0001-
2.105469500.0-
2.120670000.0-
2.135770500.0-
2.150971000.0001-
2.166071500.0-
2.181272000.0-
2.196372500.0-
2.211573000.0-
2.226673500.0001-
2.241774000.0-
2.256974500.0-
2.272075000.0001-
2.287275500.0001-
2.302376000.0-
2.317576500.0-
2.332677000.0-
2.347877500.0-
2.362978000.0-
2.378178500.0-
2.393279000.0-
2.408479500.0-
2.423580000.0-
2.438780500.0-
2.453881000.0001-
2.468981500.0-
2.484182000.0001-
2.499282500.0-
2.514483000.0-
2.529583500.0001-
2.544784000.0-
2.559884500.0-
2.575085000.0-
2.590185500.0001-
2.605386000.0001-
2.620486500.0-
2.635687000.0-
2.650787500.0-
2.665988000.0-
2.681088500.0-
2.696289000.0-
2.711389500.0-
2.726490000.0-
2.741690500.0001-
2.756791000.0001-
2.771991500.0-
2.787092000.0001-
2.802292500.0-
2.817393000.0-
2.832593500.0-
2.847694000.0-
2.862894500.0-
2.877995000.0-
2.893195500.0-
2.908296000.0-
2.923496500.0-
2.938597000.0-
2.953797500.0-
2.968898000.0-
2.983998500.0-
2.999199000.0-
3.09903-0.0
3.014299500.0-
3.0294100000.0-
3.0445100500.0-
3.0597101000.0-
3.0748101500.0-
3.0900102000.0-
3.1051102500.0001-
3.1203103000.0001-
3.1354103500.0-
3.1506104000.0-
3.1657104500.0-
3.1809105000.0-
3.1960105500.0-
3.2111106000.0-
3.2263106500.0-
3.2414107000.0-
3.2566107500.0-
3.2717108000.0-
3.2869108500.0-
3.3020109000.0-
3.3172109500.0-
3.3323110000.0-
3.3475110500.0-
3.3626111000.0-
3.3778111500.0-
3.3929112000.0-
3.4081112500.0001-
3.4232113000.0-
3.4384113500.0-
3.4535114000.0-
3.4686114500.0-
3.4838115000.0-
3.4989115500.0-
3.5141116000.0-
3.5292116500.0-
3.5444117000.0-
3.5595117500.0-
3.5747118000.0-
3.5898118500.0-
3.6050119000.0-
3.6201119500.0-
3.6353120000.0-
3.6504120500.0-
3.6656121000.0001-
3.6807121500.0-
3.6958122000.0-
3.7110122500.0-
3.7261123000.0-
3.7413123500.0-
3.7564124000.0-
3.7716124500.0-
3.7867125000.0-
3.8019125500.0-
3.8170126000.0-
3.8322126500.0-
3.8473127000.0-
3.8625127500.0-
3.8776128000.0-
3.8928128500.0-
3.9079129000.0-
3.9231129500.0-
3.9382130000.0-
3.9533130500.0-
3.9685131000.0-
3.9836131500.0-
3.9988132000.0-
4.013204-0.0
  • —The bold row denotes the saved checkpoint.

Framework Versions

  • —Python: 3.10.12
  • —SetFit: 1.0.3
  • —Sentence Transformers: 3.0.1
  • —Transformers: 4.39.0
  • —PyTorch: 2.3.0+cu121
  • —Datasets: 2.19.2
  • —Tokenizers: 0.15.2

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