--- tags: - setfit - sentence-transformers - text-classification - generated_from_setfit_trainer widget: - text: Zahnzusatzversicherung () [WebView|WebView] - text: 'Online-Marktplatz (Online-Marktplatz) [TextView|WebView] | (Warenkorb) [View|WebView] | Wonach suchst du? () [AutoCompleteTextView|WebView] | Kaufland.de — Angebote entdecken & günstig einkaufen () [WebView|WebView] | Kaufland.de — Angebote entdecken & günstig einkaufen () [TextView|WebView] | Lass dich inspirieren () [TextView|WebView] | Produktbild von Apple iPhone 15 128 GB schwarz () [Image|WebView] | Apple iPhone 15 128 GB schwarz () [TextView|WebView] | Durchschnittsbewertung: 4.5 von 5Anzahl Bewertungen: 799 () [TextView|WebView] | Energielabel anzeigen () [Button|WebView] | Die Energieeffizienzklasse des Produkts ist B. () [TextView|WebView] | Produktdatenblatt anzeigen Produktdatenblatt () [Button|WebView] | Verkäufer: Happy_Handy () [TextView|WebView] | (SCHNELL ZUGREIFEN! Jetzt sparen) [View|WebView] | SCHNELL ZUGREIFEN! () [TextView|WebView] | Jetzt sparen () [Button|WebView] | Produktbild von French Avenue Liquid Brun Eau de Parfum unisex 100 ml () [Image|WebView] | French Avenue Liquid Brun Eau de Parfum unisex 100 ml () [TextView|WebView] | Durchschnittsbewertung: 4.5 von 5Anzahl Bewertungen: 215 () [TextView|WebView] | -2% () [TextView|WebView] | Hammer-Preis () [Button|WebView] | Verkäufer: K8-Werkstatt () [TextView|WebView] | Produktbild von Roborock Saros 10R Staubsauger Roboter mit Wischfunktion, 22,000 Pa(Upgrade von S8 MaxV Ultra), 80 °C Heißwasser-Moppwäsche, 7,98cm Slim Design () [Image|WebView] | Roborock Saros 10R Staubsauger Roboter mit Wischfunktion, 22,000 Pa(Upgrade von S8 MaxV Ultra), 80 °C Heißwasser-Moppwäsche, 7,98cm Slim Design () [TextView|WebView] | Durchschnittsbewertung: 5 von 5Anzahl Bewertungen: 83 () [TextView|WebView] | Unverbindliche Preisempfehlung () [View|WebView] | Verkäufer: Roborock_Official_Store () [TextView|WebView] | Produktbild von Samsung GU55DU7170U 55" Ultra HD 4K Smart LED TV (2024) Black () [Image|WebView] | Samsung GU55DU7170U 55" Ultra HD 4K Smart LED TV (2024) Black () [TextView|WebView] | Durchschnittsbewertung: 4.5 von 5Anzahl Bewertungen: 288 () [TextView|WebView] | Hammer-Preis () [Button|WebView] | Energielabel anzeigen () [Button|WebView] | Die Energieeffizienzklasse des Produkts ist G. () [TextView|WebView] | Produktdatenblatt anzeigen Produktdatenblatt () [Button|WebView] | Verkäufer: Gamingoase_GmbH () [TextView|WebView] | GENTOR Wagenheber 3T hydraulisch – robuster Rangierwagenheber mit Zubehör () [Image|WebView] | Wagenheber 3T hydraulisch Rangierwagenheber flach 75-505mm Autoheber Rangier-wagenheber hydraulik () [TextView|WebView] | Durchschnittsbewertung: 4.5 von 5Anzahl Bewertungen: 95 () [TextView|WebView] | Verkäufer: BLACKCOCOs () [TextView|WebView] | Produktbild von Britax Römer Kidfix I-Size Autositz Storm Grey () [Image|WebView] | Britax Römer Kidfix I-Size Autositz Storm Grey () [TextView|WebView] | (Home) [FrameLayout|WebView] | Home () [TextView|WebView] | (Angebote) [FrameLayout|WebView] | Angebote () [TextView|WebView] | (Coupons) [FrameLayout|WebView] | Coupons () [TextView|WebView] | (Online-Marktplatz) [FrameLayout|WebView] | Online-Marktplatz () [TextView|WebView] | (Profil) [FrameLayout|WebView] | Profil () [TextView|WebView]' - text: Aktiviert (3) () [TextView|View] | Akti​viert () [TextView|View] - text: Alle (10) () [TextView|View] | Aktiviert (0) () [TextView|View] | -2€ () [TextView|View] | Jetzt 2€ Rabatt sichern! () [TextView|View] | Ab 20€ Einkaufswert () [TextView|View] | Akti​vieren () [TextView|View] | -20 (minus20) [TextView|View] | (loyalty points) [View|View] | Marktplatz () [TextView|View] | Nur noch 2 Tage () [TextView|View] | -5% () [TextView|View] | ProfiCare® elektrische Wärmflasche, kurze Aufheizzeit () [TextView|View] | Produkt ansehen () [TextView|View] | Marktplatz () [TextView|View] | Nur noch 2 Tage () [TextView|View] | -8€ () [TextView|View] | CreaTable, 16635, Cloudy Jeansblue, Kombiservice 10-tlg, Steinzeug () [TextView|View] | Produkt ansehen () [TextView|View] | Marktplatz () [TextView|View] | Nur noch 2 Tage () [TextView|View] | Kaufland Card () [Button|View] - text: ' (Close button) [View|DialogWrapper] | Mit Kaufland Pay sicher zahlen! () [TextView|DialogWrapper] | Ein Scan für alles: Kaufland Card Vorteile sichern und ganz einfach bezahlen. () [TextView|DialogWrapper] | So einfach geht''s: () [TextView|DialogWrapper] | 1 () [TextView|DialogWrapper] | Bei Kaufland Pay registrieren (1Bei Kaufland Pay registrieren) [TextView|DialogWrapper] | 2 () [TextView|DialogWrapper] | Kaufland Card öffnen & PIN eingeben (2Kaufland Card öffnen & PIN eingeben) [TextView|DialogWrapper] | 3 () [TextView|DialogWrapper] | Kaufland Card an der Kasse scannen zum Zahlen und Sparen (3Kaufland Card an der Kasse scannen zum Zahlen und Sparen) [TextView|DialogWrapper] | Bluecode® ermöglicht sichere und anonyme Zahlung mit Kaufland Pay () [TextView|DialogWrapper] | Jetzt registrieren* () [TextView|DialogWrapper] | *Mit der Registrierung akzeptierst du die Datenschutzbestimmungen und die Teilnahmebedingungen. () [TextView|DialogWrapper]' metrics: - accuracy pipeline_tag: text-classification library_name: setfit inference: true datasets: - tmp-org/kaufland-0-0 base_model: Alibaba-NLP/gte-multilingual-base --- # SetFit with Alibaba-NLP/gte-multilingual-base This is a [SetFit](https://github.com/huggingface/setfit) model trained on the [tmp-org/kaufland-0-0](https://huggingface.co/datasets/tmp-org/kaufland-0-0) dataset that can be used for Text Classification. This SetFit model uses [Alibaba-NLP/gte-multilingual-base](https://huggingface.co/Alibaba-NLP/gte-multilingual-base) as the Sentence Transformer embedding model. A [LogisticRegression](https://scikit-learn.org/stable/modules/generated/sklearn.linear_model.LogisticRegression.html) 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](https://www.sbert.net) with contrastive learning. 2. Training a classification head with features from the fine-tuned Sentence Transformer. ## Model Details ### Model Description - **Model Type:** SetFit - **Sentence Transformer body:** [Alibaba-NLP/gte-multilingual-base](https://huggingface.co/Alibaba-NLP/gte-multilingual-base) - **Classification head:** a [LogisticRegression](https://scikit-learn.org/stable/modules/generated/sklearn.linear_model.LogisticRegression.html) instance - **Maximum Sequence Length:** 8192 tokens - **Number of Classes:** 20 classes - **Training Dataset:** [tmp-org/kaufland-0-0](https://huggingface.co/datasets/tmp-org/kaufland-0-0) ### Model Sources - **Repository:** [SetFit on GitHub](https://github.com/huggingface/setfit) - **Paper:** [Efficient Few-Shot Learning Without Prompts](https://arxiv.org/abs/2209.11055) - **Blogpost:** [SetFit: Efficient Few-Shot Learning Without Prompts](https://huggingface.co/blog/setfit) ### Model Labels | Label | Examples | |:------------------------------------|:--------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------| | Home_Home | | | Coupons_Filiale | | | Angebote_Kaufland Card Angebote | | | Angebote_Angebote | | | Other_Prospekt | | | Other_Digitale Kassenbons | | | Other_Kaufland Card | | | Online-Marktplatz_Online-Marktplatz | | | Coupons_Partner | | | Coupons_Marktplatz | | | Profil_Profil | | | Other_Coupon details | | | Other_Other | | | Other_Einkaufsliste | | | Other_Rezepte | | | Other_Angebot details | | | Other_Loading | | | Other_Treuepunkte | | | Online-Marktplatz_Loading | | | Angebote_Loading | | ## 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("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 ```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} } ```