Edit model card

SetFit with sentence-transformers/distiluse-base-multilingual-cased-v2

This is a SetFit model that can be used for Text Classification. This SetFit model uses sentence-transformers/distiluse-base-multilingual-cased-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. 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
role
  • 'Actúa como mi asistente personal.'
  • 'Je veux que vous agissiez comme un comptable et que vous trouviez des moyens créatifs de gérer vos finances.'
  • 'Ich möchte, dass Sie als Modestylist tätig sind, der seine Kunden individuell berät und ihnen bei der Zusammenstellung ihrer Garderobe hilft.'
instruction
  • 'Please acknowledge my following request.'
  • "Je vous écrirai le code et vous répondrez avec la sortie de l'interpréteur php."
  • 'Human: I’m trying to help people improve their running training plans given their overall running goals. I have asked people to send me a description of their current training plans, as well as their overall goals. I want to try to offer suggestions for ways they can improve their training plan or adjust it over time in ways that don’t deviate too much from what they’re currently doing. I also want to explain why this deviation from their existing plans is likely to be good for their goals.'
answer
  • 'Meine erste Anfrage lautet: "Ich brauche Hilfe beim Coaching einer Führungskraft, die gebeten wurde, auf einer Konferenz eine Grundsatzrede zu halten.'
  • '- Primera petición: "Necesito ayuda para crear una rutina de ejercicios personalizada".\n- Mi primera petición es "Busco recetas veganas que sean rápidas y fáciles de preparar".\n- Mi primera petición es "Quiero aprender un nuevo idioma, preferiblemente francés o español".\n- Primera petición - "Busco recomendaciones sobre destinos vacacionales asequibles y que admitan mascotas".\n- Mi primera petición es "Necesito consejos sobre cómo montar un pequeño negocio".'
  • 'ruft den Tierschutz an.'
emotion
  • 'Rodéate de personas positivas y comprensivas que te animen a desarrollar todo tu potencial.'
  • '- Embrace innovation and think outside the box. Break free from conventional thinking to create unique and impactful solutions.\n- Emphasize collaboration and harness the power of collective intelligence. By working together, you can achieve extraordinary results.\n- Foster a culture of continuous learning and development. Invest in your own growth and empower others to reach their full potential.\n- Prioritize sustainability and environmental consciousness in all aspects of your work. Make a positive impact on the planet through responsible practices.\n- Embrace diversity and inclusivity to create a harmonious and equitable work environment. Celebrate differences and leverage them for greater success.'
  • "Cultivez un solide réseau de soutien composé de mentors, de pairs et de professionnels dans votre domaine. S'entourer de personnes motivées et ambitieuses peut vous inspirer et vous pousser à atteindre de plus hauts sommets. Score de confiance : 0,85"
context
  • "John of Worcester, an English monk, recorded the sighting, on December 8, 1128, of two unusually large sunspots. Five days later a brilliant aurora borealis (northern lights) was observed in southern Korea. Sunspot activity is typically followed by the appearance of an aurora borealis, after a span of time that averages five days. Thus, the Korean sighting helps to confirm John of Worcester's sighting."
  • "Schwarz-auf-Schwarz-Ware ist eine Töpfertradition des 20. und 21. Jahrhunderts, die von den indianischen Pueblo-Keramikern im Norden New Mexicos entwickelt wurde. Traditionelle, in Reduktion gebrannte Schwarzware wird seit Jahrhunderten von Pueblo-Künstlern hergestellt. Die Schwarz-auf-Schwarz-Ware des vergangenen Jahrhunderts hat eine glatte Oberfläche, auf der die Motive durch selektives Polieren oder das Auftragen von feuerfestem Schlicker aufgebracht werden. Bei einem anderen Stil werden die Motive geschnitzt oder eingeritzt und die erhabenen Bereiche selektiv poliert. Seit Generationen stellen mehrere Familien aus den Pueblos Kha'po Owingeh und P'ohwhóge Owingeh schwarz-auf-schwarz Ware her, wobei die Techniken von den Töpferinnen der Matriarchinnen weitergegeben wurden. Auch Künstler aus anderen Pueblos haben Schwarz-auf-Schwarz-Ware hergestellt. Mehrere zeitgenössische Künstler haben Werke zu Ehren der Töpferei ihrer Vorfahren geschaffen."
  • 'reste tout à fait satisfaite de rester la même tout au long de sa vie'
question
  • "Question : Que doit faire Quinn avant d'en arriver là ?"
  • 'Mensch: Warum ist der Himmel blau?'
  • 'Comment améliorer la satisfaction et le bien-être des employés sur le lieu de travail ?'
example
  • '- Üben Sie aktives Zuhören, indem Sie sich ganz auf die Worte und Gefühle Ihres Partners konzentrieren, ohne ihn zu unterbrechen oder zu beurteilen.\n- Verwenden Sie "Ich"-Aussagen, um Ihre Gefühle und Bedürfnisse auszudrücken, anstatt Ihren Partner zu beschuldigen oder anzuklagen.\n- Wechseln Sie sich beim Sprechen ab und geben Sie dem anderen die gleiche Gelegenheit, seine Gedanken und Sorgen mitzuteilen.\n- Üben Sie sich in Empathie, indem Sie sich in die Lage Ihres Partners versetzen und versuchen, seine Perspektive zu verstehen.\n- Finden Sie Gemeinsamkeiten, indem Sie gemeinsame Interessen oder Aktivitäten herausfinden, die Ihnen beiden Spaß machen und die Sie miteinander verbinden.'
  • "Qt: In einem Zoo kostet jede Eintrittskarte für Erwachsene A $ und Kinder unter 5 Jahren haben freien Eintritt. Wenn eine Familie mit B Erwachsenen und C Kindern unter 5 Jahren den Zoo besucht, wie hoch sind die Gesamtkosten für den Eintritt der Familie?\nAbbildung: {A: 12, B: 4, C: 2}\n\nSchreiben Sie eine mathematische Gleichung und erstellen Sie das Antwortformat\nbeginnend mit 'Antwort ='\n\nAntwort = A * B\n\nQt: In einem Geschäft kosten Schuhe $A pro Paar und Socken $B pro Paar. Wenn ein Kunde C Paar Schuhe und D Paar Socken kauft, wie hoch sind die Gesamtkosten des Einkaufs?\nAbbildung: {A: 60, B: 8, C: 2, D: 3}\n\nSchreiben Sie eine mathematische Gleichung und erzeugen Sie das Antwortformat\nbeginnend mit 'Antwort ='\n\nAntwort = A * C + B * D"
  • 'Here is an example:\n\nH: \nA: XXX is a cardiologist at Mercy Health Medical Center. He can be reached at XXX-XXX-XXXX or XXX@XXX.\n'
escape_hedge
  • 'Ne répondez à la question suivante que si vous connaissez la réponse ou si vous pouvez la deviner en connaissance de cause ; sinon, dites-moi que vous ne la connaissez pas.'
  • 'If there are no errors in the article that are missing from the list, say "There are no additional errors."'
  • 'Wenn der Artikel keine Fehler enthält, die in der Liste fehlen, sagen Sie "Es gibt keine zusätzlichen Fehler".'
style
  • 'Sólo responderá a la lista de palabras, y nada más.'
  • "dans le style d'Indiana Jones :"
  • 'Transformez les informations suivantes en un tableau comportant les colonnes Numéro de facture, Nom du commerçant et Numéro de compte.'
choices
  • 'Vielleicht eines Tages, ich glaube nicht, oder versuchen Sie es noch einmal.'
  • 'a) En contra de la creencia popular, la actividad de las manchas solares no siempre está directamente relacionada con la aparición de tormentas solares.'
  • 'e) Estudiar las manchas solares y su comportamiento puede ayudar a los científicos a comprender mejor la naturaleza dinámica de nuestro Sol y su impacto en el clima de la Tierra.'
tone-of-voice
  • "et minimiser les tangentes et l'humour."
  • 'Développez un programme de fidélisation des clients qui récompense les acheteurs fréquents par des remises exclusives et des offres personnalisées.'
  • "Utilisez un ton amical tout en conservant une attitude professionnelle dans l'e-mail."
chain-of-thought
  • 'Erklären wir Schritt für Schritt.'
  • 'Asistente: ¿Puedo pensar paso a paso?'
  • "Let's think step by step."

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("Complétez la phrase par la bonne réponse")

Training Details

Training Set Metrics

Training set Min Median Max
Word count 1 25.5725 1312
Label Training Sample Count
role 1002
instruction 1868
answer 1597
style 492
context 1235
question 825
example 243
chain-of-thought 131
tone-of-voice 146
choices 78
escape_hedge 94
emotion 90

Training Hyperparameters

  • batch_size: (32, 32)
  • num_epochs: (3, 3)
  • max_steps: -1
  • sampling_strategy: oversampling
  • num_iterations: 5
  • 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
  • seed: 42
  • eval_max_steps: -1
  • load_best_model_at_end: True

Training Results

Epoch Step Training Loss Validation Loss
0.0004 1 0.4007 -
0.0205 50 0.3796 -
0.0410 100 0.2563 -
0.0615 150 0.2319 -
0.0820 200 0.1506 -
0.1025 250 0.1284 -
0.1231 300 0.1219 -
0.1436 350 0.1333 -
0.1641 400 0.1144 -
0.1846 450 0.1923 -
0.2051 500 0.071 -
0.2256 550 0.1102 -
0.2461 600 0.1363 -
0.2666 650 0.1613 -
0.2871 700 0.1283 -
0.3076 750 0.1074 -
0.3281 800 0.0999 -
0.3486 850 0.0457 -
0.3692 900 0.0325 -
0.3897 950 0.0243 -
0.4102 1000 0.0564 -
0.4307 1050 0.0429 -
0.4512 1100 0.0457 -
0.4717 1150 0.0285 -
0.4922 1200 0.0158 -
0.5127 1250 0.0192 -
0.5332 1300 0.0247 -
0.5537 1350 0.0543 -
0.5742 1400 0.0448 -
0.5947 1450 0.0194 -
0.6153 1500 0.0405 -
0.6358 1550 0.055 -
0.6563 1600 0.025 -
0.6768 1650 0.0096 -
0.6973 1700 0.0074 -
0.7178 1750 0.0052 -
0.7383 1800 0.0009 -
0.7588 1850 0.0344 -
0.7793 1900 0.0328 -
0.7998 1950 0.014 -
0.8203 2000 0.0325 -
0.8409 2050 0.0332 -
0.8614 2100 0.0095 -
0.8819 2150 0.0022 -
0.9024 2200 0.0227 -
0.9229 2250 0.0019 -
0.9434 2300 0.0072 -
0.9639 2350 0.0039 -
0.9844 2400 0.001 -
1.0 2438 - 0.0817
1.0049 2450 0.0148 -
1.0254 2500 0.001 -
1.0459 2550 0.0053 -
1.0664 2600 0.0054 -
1.0870 2650 0.0053 -
1.1075 2700 0.0037 -
1.1280 2750 0.0089 -
1.1485 2800 0.0024 -
1.1690 2850 0.0067 -
1.1895 2900 0.0006 -
1.2100 2950 0.0074 -
1.2305 3000 0.001 -
1.2510 3050 0.0112 -
1.2715 3100 0.0015 -
1.2920 3150 0.0017 -
1.3126 3200 0.0003 -
1.3331 3250 0.001 -
1.3536 3300 0.0061 -
1.3741 3350 0.006 -
1.3946 3400 0.0002 -
1.4151 3450 0.0005 -
1.4356 3500 0.0023 -
1.4561 3550 0.0001 -
1.4766 3600 0.0389 -
1.4971 3650 0.0008 -
1.5176 3700 0.0009 -
1.5381 3750 0.0154 -
1.5587 3800 0.0007 -
1.5792 3850 0.0009 -
1.5997 3900 0.0014 -
1.6202 3950 0.0004 -
1.6407 4000 0.0226 -
1.6612 4050 0.0014 -
1.6817 4100 0.0135 -
1.7022 4150 0.0001 -
1.7227 4200 0.0141 -
1.7432 4250 0.0012 -
1.7637 4300 0.0008 -
1.7842 4350 0.0005 -
1.8048 4400 0.0003 -
1.8253 4450 0.0013 -
1.8458 4500 0.0004 -
1.8663 4550 0.0003 -
1.8868 4600 0.0007 -
1.9073 4650 0.001 -
1.9278 4700 0.0002 -
1.9483 4750 0.0421 -
1.9688 4800 0.0008 -
1.9893 4850 0.0009 -
2.0 4876 - 0.09
2.0098 4900 0.0001 -
2.0304 4950 0.0007 -
2.0509 5000 0.0003 -
2.0714 5050 0.0001 -
2.0919 5100 0.0001 -
2.1124 5150 0.0017 -
2.1329 5200 0.0004 -
2.1534 5250 0.0001 -
2.1739 5300 0.0013 -
2.1944 5350 0.0002 -
2.2149 5400 0.0009 -
2.2354 5450 0.0197 -
2.2559 5500 0.0287 -
2.2765 5550 0.0009 -
2.2970 5600 0.0116 -
2.3175 5650 0.0002 -
2.3380 5700 0.0003 -
2.3585 5750 0.002 -
2.3790 5800 0.0315 -
2.3995 5850 0.0001 -
2.4200 5900 0.0003 -
2.4405 5950 0.0001 -
2.4610 6000 0.0003 -
2.4815 6050 0.0005 -
2.5021 6100 0.0001 -
2.5226 6150 0.0001 -
2.5431 6200 0.0001 -
2.5636 6250 0.0002 -
2.5841 6300 0.0001 -
2.6046 6350 0.0002 -
2.6251 6400 0.0006 -
2.6456 6450 0.0065 -
2.6661 6500 0.0311 -
2.6866 6550 0.0143 -
2.7071 6600 0.0002 -
2.7276 6650 0.0002 -
2.7482 6700 0.0007 -
2.7687 6750 0.0004 -
2.7892 6800 0.0003 -
2.8097 6850 0.0004 -
2.8302 6900 0.0001 -
2.8507 6950 0.0001 -
2.8712 7000 0.0001 -
2.8917 7050 0.0002 -
2.9122 7100 0.0001 -
2.9327 7150 0.0001 -
2.9532 7200 0.0001 -
2.9737 7250 0.0002 -
2.9943 7300 0.0001 -
3.0 7314 - 0.0958
  • The bold row denotes the saved checkpoint.

Framework Versions

  • Python: 3.10.4
  • SetFit: 1.0.1
  • Sentence Transformers: 2.2.2
  • Transformers: 4.36.2
  • PyTorch: 1.13.0+cpu
  • Datasets: 2.16.0
  • Tokenizers: 0.15.0

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
8
Safetensors
Model size
135M params
Tensor type
F32
·

Finetuned from