SetFit with BAAI/bge-base-en-v1.5

This is a SetFit model that can be used for Text Classification. This SetFit model uses BAAI/bge-base-en-v1.5 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. Fine-tuning a Sentence Transformer with contrastive learning.
  2. Training a classification head with features from the fine-tuned Sentence Transformer.

Model Details

Model Description

Model Sources

Model Labels

Label Examples
ANTIOXIDANT
  • 'Quercetin'
  • 'Vitamin K1'
  • 'Caffeine'
BARRIER_SUPPORT
  • 'Cholesterol'
  • 'Ceramides'
  • 'Glycosphingolipids'
DIRECT_ACID
  • 'Capryloyl Salicylic Acid'
  • 'Willow Bark Extract'
  • 'Citric Acid'
EMOLLIENT
  • 'Mango Seed Butter'
  • 'Argan Oil'
  • 'Sweet Almond Oil'
HUMECTANT
  • 'Glycerol'
  • 'Serine'
  • 'Taurine'
NIACINAMIDE
  • 'Nicotinamide'
  • 'Niacinamide Serum'
  • 'Niacinamide'
NON_TARGET
  • 'Turmeric Root Extract'
  • 'Alpha-Glucan Oligosaccharide'
  • 'Neurophroline'
PEPTIDE
  • 'Acetyl Hexapeptide'
  • 'Myristol Pentapeptide'
  • 'Palmitoyl Tripeptide'
PIGMENT_REGULATOR
  • 'Zinc Gluconate'
  • 'Zinc Sulfate'
  • 'Arbutin'
RETINOID
  • 'Tretinoin Cream'
  • 'Adapalene Gel'
  • 'Bakuchiol'
SOOTHING
  • 'Chamomile Extract'
  • 'Magnesium Sulfate'
  • 'Centella Asiatica'
UV_FILTER
  • 'Octinoxate'
  • 'Zinc Oxide'
  • 'Butyl Methoxydibenzoylmethane'
VITAMIN_C
  • 'Vitamin C'
  • 'Ascorbyl Palmitate'
  • 'Magnesium Ascorbyl Phosphate'

Uses

Direct Use for Inference

First install the SetFit library:

pip install setfit

Then you can load this model and run inference.

from setfit import SetFitModel

# Download from the 🤗 Hub
model = SetFitModel.from_pretrained("setfit_model_id")
# Run inference
preds = model("Lysine")

Training Details

Training Set Metrics

Training set Min Median Max
Word count 1 1.9836 5
Label Training Sample Count
ANTIOXIDANT 15
BARRIER_SUPPORT 17
DIRECT_ACID 13
EMOLLIENT 11
HUMECTANT 30
NIACINAMIDE 8
NON_TARGET 40
PEPTIDE 33
PIGMENT_REGULATOR 15
RETINOID 12
SOOTHING 27
UV_FILTER 14
VITAMIN_C 9

Training Hyperparameters

  • batch_size: (16, 16)
  • num_epochs: (1, 1)
  • max_steps: -1
  • sampling_strategy: oversampling
  • num_iterations: 10
  • body_learning_rate: (2e-05, 1e-05)
  • head_learning_rate: 0.01
  • loss: CosineSimilarityLoss
  • distance_metric: cosine_distance
  • margin: 0.25
  • end_to_end: False
  • use_amp: False
  • warmup_proportion: 0.1
  • l2_weight: 0.01
  • seed: 42
  • eval_max_steps: -1
  • load_best_model_at_end: False

Training Results

Epoch Step Training Loss Validation Loss
0.0033 1 0.1906 -
0.1639 50 0.2095 -
0.3279 100 0.1719 -
0.4918 150 0.1369 -
0.6557 200 0.1034 -
0.8197 250 0.0909 -
0.9836 300 0.0921 -

Framework Versions

  • Python: 3.13.7
  • SetFit: 1.2.0
  • Sentence Transformers: 6.1.0
  • Transformers: 5.19.0
  • PyTorch: 2.14.1+cpu
  • Datasets: 5.1.0
  • Tokenizers: 0.23.3

Citation

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}
}
Downloads last month
15
Safetensors
Model size
0.1B params
Tensor type
F32
·
Inference Providers NEW
This model isn't deployed by any Inference Provider. 🙋 Ask for provider support

Model tree for nyylisaa/skinwise-setfit-model

Finetuned
(497)
this model

Space using nyylisaa/skinwise-setfit-model 1

Paper for nyylisaa/skinwise-setfit-model