SetFit with Alibaba-NLP/gte-multilingual-base

This is a SetFit model trained on the tmp-org/kaufland-0-0 dataset that can be used for Text Classification. This SetFit model uses Alibaba-NLP/gte-multilingual-base 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
Home_Home
  • 'Hallo Kristin (Hallo Kristin) [TextView
Coupons_Filiale
  • 'Akti\u200bvieren () [TextView
Angebote_Kaufland Card Angebote
  • 'KNÜLLER () [TextView
Angebote_Angebote
  • 'Aktuelle Angebote (Aktuelle Angebote) [TextView
Other_Prospekt
  • ' (Seite 2 von 64) [View
Other_Digitale Kassenbons
  • ' (Zurück) [View
Other_Kaufland Card
  • ' (Close button) [View
Online-Marktplatz_Online-Marktplatz
  • 'Profil (Profil) [TextView
Coupons_Partner
  • 'Alle (18) () [TextView
Coupons_Marktplatz
  • 'Coupons (Coupons) [TextView
Profil_Profil
  • 'Profil (Profil) [TextView
Other_Coupon details
  • ' (Zurück) [View
Other_Other
  • " (Close button) [View
Other_Einkaufsliste
  • 'Hallo Kristin (Hallo Kristin) [TextView
Other_Rezepte
  • ' (Zurück) [ImageButton
Other_Angebot details
  • ' (Zurück) [View
Other_Loading
  • '\ue916 () [TextView
Other_Treuepunkte
  • 'Sammle Treuepunkte mit jedem Filialeinkauf und jeder Bestellung im Online-Marktplatz. Außerdem kannst durch die Teilnahme am „Glücksrad“ oder an unserem „Geschenk des Tages“ Treuepunkte erhalten. \n\nLös deine verfügbaren Treuepunkte ein, um Coupons zu aktivieren und spar bei deinem nächsten Einkauf online und in deiner Filiale. () [TextView
Online-Marktplatz_Loading
  • 'Online-Marktplatz (Online-Marktplatz) [TextView
Angebote_Loading
  • 'Aktuelle Angebote (Aktuelle Angebote) [TextView

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("tmp-org/kaufland_v1")
# Run inference
preds = model("Zahnzusatzversicherung () [WebView|WebView]")

Training Details

Training Set Metrics

Training set Min Median Max
Word count 3 134.6818 3133
Label Training Sample Count
Angebote_Angebote 16
Angebote_Kaufland Card Angebote 16
Angebote_Loading 2
Coupons_Filiale 16
Coupons_Marktplatz 16
Coupons_Partner 16
Home_Home 16
Online-Marktplatz_Loading 3
Online-Marktplatz_Online-Marktplatz 15
Other_Angebot details 11
Other_Coupon details 5
Other_Digitale Kassenbons 12
Other_Einkaufsliste 3
Other_Kaufland Card 11
Other_Loading 4
Other_Other 13
Other_Prospekt 16
Other_Rezepte 12
Other_Treuepunkte 4
Profil_Profil 13

Training Hyperparameters

  • batch_size: (4, 4)
  • num_epochs: (1, 1)
  • max_steps: -1
  • sampling_strategy: undersampling
  • 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: 4242
  • eval_max_steps: -1
  • load_best_model_at_end: False

Training Results

Epoch Step Training Loss Validation Loss
0.0013 1 0.2528 -
0.0628 50 0.1965 -
0.1256 100 0.143 -
0.1884 150 0.1238 -
0.2513 200 0.1006 -
0.3141 250 0.0849 -
0.3769 300 0.1106 -
0.4397 350 0.0844 -
0.5025 400 0.0738 -
0.5653 450 0.0642 -
0.6281 500 0.0654 -
0.6910 550 0.0566 -
0.7538 600 0.0702 -
0.8166 650 0.0524 -
0.8794 700 0.0557 -
0.9422 750 0.0519 -

Framework Versions

  • Python: 3.12.6
  • SetFit: 1.1.2
  • Sentence Transformers: 5.2.2
  • Transformers: 4.57.1
  • PyTorch: 2.10.0+cu128
  • Datasets: 3.6.0
  • Tokenizers: 0.22.2

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

Model tree for tmp-org/kaufland_v1

Finetuned
(99)
this model

Paper for tmp-org/kaufland_v1