CoolFace
Modelpublic

mann2107/BCMPIIRAB_MiniLM_ALLNew

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

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

This is a SetFit model that can be used for Text Classification. This SetFit model uses sentence-transformers/all-MiniLM-L6-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

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("mann2107/BCMPIIRAB_MiniLM_ALLNew")
# Run inference
preds = model("Thank you for your email. Please go ahead and issue. Please invoice in KES")

<!--

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 count125.6577136
LabelTraining Sample Count
024
124
224
324
424
524
624
724
824
924
1024
1124
1224
1324

Training Hyperparameters

  • —batch_size: (16, 16)
  • —num_epochs: (1, 1)
  • —max_steps: -1
  • —sampling_strategy: oversampling
  • —num_iterations: 99
  • —bodylearningrate: (0.0002733656643765287, 0.0002733656643765287)
  • —headlearningrate: 2.7029049129688732e-05
  • —loss: CosineSimilarityLoss
  • —distancemetric: cosinedistance
  • —margin: 0.25
  • —endtoend: False
  • —use_amp: False
  • —warmup_proportion: 0.1
  • —max_length: 512
  • —seed: 42
  • —evalmaxsteps: -1
  • —loadbestmodelatend: True

Training Results

EpochStepTraining LossValidation Loss
0.000210.2546-
0.0120500.1667-
0.02411000.1165-
0.03611500.0799-
0.04812000.0212-
0.06012500.0188-
0.07223000.0531-
0.08423500.0273-
0.09624000.0111-
0.10824500.0203-
0.12035000.0397-
0.13235500.0164-
0.14436000.0045-
0.15636500.0032-
0.16847000.001-
0.18047500.0011-
0.19248000.0004-
0.20448500.0009-
0.21659000.0006-
0.22859500.0008-
0.240510000.0004-
0.252510500.0008-
0.264611000.0005-
0.276611500.0006-
0.288612000.0007-
0.300612500.0043-
0.312713000.0004-
0.324713500.0005-
0.336714000.0005-
0.348714500.0004-
0.360815000.0004-
0.372815500.0005-
0.384816000.0007-
0.396816500.0006-
0.408917000.0002-
0.420917500.0006-
0.432918000.0008-
0.444918500.0003-
0.457019000.0005-
0.469019500.0003-
0.481020000.0003-
0.493020500.0003-
0.505121000.0006-
0.517121500.0003-
0.529122000.0002-
0.541122500.0002-
0.553223000.0002-
0.565223500.0004-
0.577224000.0003-
0.589224500.0003-
0.601325000.0002-
0.613325500.0002-
0.625326000.0013-
0.637326500.0002-
0.649427000.0007-
0.661427500.0004-
0.673428000.0007-
0.685428500.0018-
0.697529000.0002-
0.709529500.0003-
0.721530000.0006-
0.733530500.0003-
0.745631000.0002-
0.757631500.0002-
0.769632000.0002-
0.781632500.0002-
0.793733000.0002-
0.805733500.0001-
0.817734000.0003-
0.829734500.0002-
0.841835000.0002-
0.853835500.0002-
0.865836000.0002-
0.877836500.0002-
0.889937000.0002-
0.901937500.0005-
0.913938000.0002-
0.925938500.0001-
0.938039000.0004-
0.950039500.0001-
0.962040000.0005-
0.974040500.0002-
0.986141000.0002-
0.998141500.0001-
1.04158-0.0302
  • —The bold row denotes the saved checkpoint.

Framework Versions

  • —Python: 3.10.12
  • —SetFit: 1.1.0.dev0
  • —Sentence Transformers: 3.0.1
  • —Transformers: 4.42.4
  • —PyTorch: 2.3.1+cu121
  • —Datasets: 2.20.0
  • —Tokenizers: 0.19.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. -->