SetFit with sentence-transformers/paraphrase-multilingual-MiniLM-L12-v2

This is a SetFit model that can be used for Text Classification. This SetFit model uses sentence-transformers/paraphrase-multilingual-MiniLM-L12-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
neutral
  • 'Die Aktionen von Klima-Aktivisten, die in mehreren Städten zu Verkehrsbehinderungen geführt haben, haben in der Öffentlichkeit sowohl Unterstützung als auch Kritik ausgelöst.'
  • ' Die Diskussion über ein nationales Tempolimit auf Autobahnen spaltet weiterhin die Gemüter, während Experten die potenziellen Vorteile und Nachteile abwägen.'
  • ' Der Bundestag wird in den kommenden Wochen über das geplante Heizungsgesetz debattieren.'
supportive
  • ' "Die Aktionen von Gruppen wie Fridays for Future und der Letzten Generation zeigen, dass die junge Generation bereit ist, für eine lebenswerte Zukunft zu kämpfen."'
  • ' Die Einführung eines nationalen Tempolimits auf Autobahnen könnte die Verkehrssicherheit erheblich verbessern und die Zahl der Verkehrstoten reduzieren.'
  • '"Die jungen Aktivisten von Fridays for Future und die Letzte Generation haben mit ihren unkonventionellen Aktionen ein wichtiges Gespräch über die Dringlichkeit des Klimaschutzes angestoßen."'
opposed
  • '„Die Polizei musste am Freitag wiederholt mit harten Bandagen gegen die Klima-Rebellen vorgehen, die Straßen und Plätze in der Innenstadt blockierten, um für ihre Forderungen zu demonstrieren.“'
  • ' "Ein Tempolimit auf deutschen Autobahnen würde den freiheitsliebenden Autofahrern das Herz brechen."'
  • 'Die ständigen Straßenblockaden und Farbbeanspritzungen auf Kunstwerke haben viele Menschen in Deutschland mehr als nur gereizt - sie haben sie in ihrem täglichen Leben massiv behindert und zu einer wachsenden Ablehnung gegenüber den Klima-Aktivisten geführt.'

Evaluation

Metrics

Label Accuracy
all 0.9570

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("cbpuschmann/MiniLM-klimacoder_v0.6")
# Run inference
preds = model(" \"Ein nationales Tempolimit auf Autobahnen wäre ein weiterer Schritt in Richtung eines überregulierten Staates, der den Bürgern ihre Freiheit stückweise entreißt.\"")

Training Details

Training Set Metrics

Training set Min Median Max
Word count 10 25.7025 53
Label Training Sample Count
neutral 318
opposed 388
supportive 410

Training Hyperparameters

  • batch_size: (32, 32)
  • num_epochs: (1, 1)
  • max_steps: -1
  • sampling_strategy: oversampling
  • 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.0000 1 0.2339 -
0.0019 50 0.2439 -
0.0039 100 0.2407 -
0.0058 150 0.2295 -
0.0078 200 0.2123 -
0.0097 250 0.1903 -
0.0116 300 0.153 -
0.0136 350 0.1322 -
0.0155 400 0.116 -
0.0174 450 0.0937 -
0.0194 500 0.0721 -
0.0213 550 0.0525 -
0.0233 600 0.0388 -
0.0252 650 0.0338 -
0.0271 700 0.026 -
0.0291 750 0.0224 -
0.0310 800 0.0122 -
0.0329 850 0.0088 -
0.0349 900 0.0079 -
0.0368 950 0.0055 -
0.0388 1000 0.004 -
0.0407 1050 0.0027 -
0.0426 1100 0.0025 -
0.0446 1150 0.0019 -
0.0465 1200 0.0014 -
0.0484 1250 0.0013 -
0.0504 1300 0.0006 -
0.0523 1350 0.0012 -
0.0543 1400 0.0006 -
0.0562 1450 0.0004 -
0.0581 1500 0.0003 -
0.0601 1550 0.0003 -
0.0620 1600 0.0003 -
0.0639 1650 0.0002 -
0.0659 1700 0.0007 -
0.0678 1750 0.0002 -
0.0698 1800 0.0002 -
0.0717 1850 0.0002 -
0.0736 1900 0.0003 -
0.0756 1950 0.0002 -
0.0775 2000 0.0001 -
0.0794 2050 0.0001 -
0.0814 2100 0.0001 -
0.0833 2150 0.0001 -
0.0853 2200 0.0008 -
0.0872 2250 0.0007 -
0.0891 2300 0.0007 -
0.0911 2350 0.0002 -
0.0930 2400 0.0001 -
0.0950 2450 0.0001 -
0.0969 2500 0.0014 -
0.0988 2550 0.0008 -
0.1008 2600 0.0009 -
0.1027 2650 0.0006 -
0.1046 2700 0.0008 -
0.1066 2750 0.0001 -
0.1085 2800 0.0 -
0.1105 2850 0.0 -
0.1124 2900 0.0 -
0.1143 2950 0.0 -
0.1163 3000 0.0 -
0.1182 3050 0.0 -
0.1201 3100 0.0 -
0.1221 3150 0.0 -
0.1240 3200 0.0 -
0.1260 3250 0.0 -
0.1279 3300 0.0 -
0.1298 3350 0.0 -
0.1318 3400 0.0 -
0.1337 3450 0.0 -
0.1356 3500 0.0 -
0.1376 3550 0.0 -
0.1395 3600 0.0 -
0.1415 3650 0.0 -
0.1434 3700 0.0 -
0.1453 3750 0.0 -
0.1473 3800 0.0 -
0.1492 3850 0.0 -
0.1511 3900 0.0 -
0.1531 3950 0.0 -
0.1550 4000 0.001 -
0.1570 4050 0.0012 -
0.1589 4100 0.0042 -
0.1608 4150 0.0023 -
0.1628 4200 0.001 -
0.1647 4250 0.001 -
0.1666 4300 0.0001 -
0.1686 4350 0.0 -
0.1705 4400 0.0 -
0.1725 4450 0.0 -
0.1744 4500 0.0 -
0.1763 4550 0.0003 -
0.1783 4600 0.0 -
0.1802 4650 0.0 -
0.1821 4700 0.0005 -
0.1841 4750 0.0009 -
0.1860 4800 0.0001 -
0.1880 4850 0.0 -
0.1899 4900 0.0 -
0.1918 4950 0.0 -
0.1938 5000 0.0 -
0.1957 5050 0.0 -
0.1977 5100 0.0 -
0.1996 5150 0.0 -
0.2015 5200 0.0 -
0.2035 5250 0.0 -
0.2054 5300 0.0 -
0.2073 5350 0.0 -
0.2093 5400 0.0 -
0.2112 5450 0.0 -
0.2132 5500 0.0 -
0.2151 5550 0.0 -
0.2170 5600 0.0 -
0.2190 5650 0.0 -
0.2209 5700 0.0 -
0.2228 5750 0.0 -
0.2248 5800 0.0 -
0.2267 5850 0.0 -
0.2287 5900 0.0 -
0.2306 5950 0.0 -
0.2325 6000 0.0 -
0.2345 6050 0.0 -
0.2364 6100 0.0 -
0.2383 6150 0.0 -
0.2403 6200 0.0 -
0.2422 6250 0.0 -
0.2442 6300 0.0 -
0.2461 6350 0.0 -
0.2480 6400 0.0 -
0.2500 6450 0.0 -
0.2519 6500 0.0 -
0.2538 6550 0.0 -
0.2558 6600 0.0 -
0.2577 6650 0.0 -
0.2597 6700 0.0 -
0.2616 6750 0.0 -
0.2635 6800 0.0 -
0.2655 6850 0.0 -
0.2674 6900 0.0 -
0.2693 6950 0.0 -
0.2713 7000 0.0 -
0.2732 7050 0.0 -
0.2752 7100 0.0 -
0.2771 7150 0.0 -
0.2790 7200 0.0 -
0.2810 7250 0.0 -
0.2829 7300 0.0 -
0.2849 7350 0.0 -
0.2868 7400 0.0 -
0.2887 7450 0.0 -
0.2907 7500 0.0 -
0.2926 7550 0.0 -
0.2945 7600 0.0 -
0.2965 7650 0.0 -
0.2984 7700 0.0 -
0.3004 7750 0.0 -
0.3023 7800 0.0 -
0.3042 7850 0.0 -
0.3062 7900 0.0 -
0.3081 7950 0.0 -
0.3100 8000 0.0 -
0.3120 8050 0.0 -
0.3139 8100 0.0 -
0.3159 8150 0.0 -
0.3178 8200 0.0 -
0.3197 8250 0.0 -
0.3217 8300 0.0 -
0.3236 8350 0.0 -
0.3255 8400 0.0 -
0.3275 8450 0.0 -
0.3294 8500 0.0 -
0.3314 8550 0.0 -
0.3333 8600 0.0 -
0.3352 8650 0.0 -
0.3372 8700 0.0 -
0.3391 8750 0.0 -
0.3410 8800 0.0 -
0.3430 8850 0.0 -
0.3449 8900 0.0 -
0.3469 8950 0.0 -
0.3488 9000 0.0 -
0.3507 9050 0.0 -
0.3527 9100 0.0 -
0.3546 9150 0.0 -
0.3565 9200 0.0042 -
0.3585 9250 0.0083 -
0.3604 9300 0.0071 -
0.3624 9350 0.0011 -
0.3643 9400 0.0008 -
0.3662 9450 0.001 -
0.3682 9500 0.0006 -
0.3701 9550 0.0 -
0.3720 9600 0.0 -
0.3740 9650 0.0004 -
0.3759 9700 0.0 -
0.3779 9750 0.0 -
0.3798 9800 0.0 -
0.3817 9850 0.0 -
0.3837 9900 0.0 -
0.3856 9950 0.0 -
0.3876 10000 0.0 -
0.3895 10050 0.0 -
0.3914 10100 0.0 -
0.3934 10150 0.0 -
0.3953 10200 0.0 -
0.3972 10250 0.0 -
0.3992 10300 0.0 -
0.4011 10350 0.0 -
0.4031 10400 0.0 -
0.4050 10450 0.0 -
0.4069 10500 0.0 -
0.4089 10550 0.0 -
0.4108 10600 0.0 -
0.4127 10650 0.0 -
0.4147 10700 0.0 -
0.4166 10750 0.0 -
0.4186 10800 0.0 -
0.4205 10850 0.0 -
0.4224 10900 0.0 -
0.4244 10950 0.0 -
0.4263 11000 0.0 -
0.4282 11050 0.0 -
0.4302 11100 0.0 -
0.4321 11150 0.0 -
0.4341 11200 0.0 -
0.4360 11250 0.0 -
0.4379 11300 0.0 -
0.4399 11350 0.0 -
0.4418 11400 0.0 -
0.4437 11450 0.0 -
0.4457 11500 0.0 -
0.4476 11550 0.0 -
0.4496 11600 0.0 -
0.4515 11650 0.0 -
0.4534 11700 0.0 -
0.4554 11750 0.0 -
0.4573 11800 0.0 -
0.4592 11850 0.0 -
0.4612 11900 0.0 -
0.4631 11950 0.0 -
0.4651 12000 0.0 -
0.4670 12050 0.0 -
0.4689 12100 0.0 -
0.4709 12150 0.0 -
0.4728 12200 0.0 -
0.4748 12250 0.0 -
0.4767 12300 0.0 -
0.4786 12350 0.0 -
0.4806 12400 0.0 -
0.4825 12450 0.0 -
0.4844 12500 0.0 -
0.4864 12550 0.0 -
0.4883 12600 0.0 -
0.4903 12650 0.0 -
0.4922 12700 0.0 -
0.4941 12750 0.0 -
0.4961 12800 0.0 -
0.4980 12850 0.0 -
0.4999 12900 0.0 -
0.5019 12950 0.0 -
0.5038 13000 0.0 -
0.5058 13050 0.0 -
0.5077 13100 0.0 -
0.5096 13150 0.0 -
0.5116 13200 0.0 -
0.5135 13250 0.0 -
0.5154 13300 0.0 -
0.5174 13350 0.0 -
0.5193 13400 0.0 -
0.5213 13450 0.0 -
0.5232 13500 0.0 -
0.5251 13550 0.0 -
0.5271 13600 0.0 -
0.5290 13650 0.0 -
0.5309 13700 0.0 -
0.5329 13750 0.0 -
0.5348 13800 0.0 -
0.5368 13850 0.0 -
0.5387 13900 0.0 -
0.5406 13950 0.0 -
0.5426 14000 0.0 -
0.5445 14050 0.0 -
0.5464 14100 0.0 -
0.5484 14150 0.0 -
0.5503 14200 0.0 -
0.5523 14250 0.0 -
0.5542 14300 0.0 -
0.5561 14350 0.0 -
0.5581 14400 0.0 -
0.5600 14450 0.0 -
0.5620 14500 0.0 -
0.5639 14550 0.0 -
0.5658 14600 0.0 -
0.5678 14650 0.0 -
0.5697 14700 0.0 -
0.5716 14750 0.0 -
0.5736 14800 0.0 -
0.5755 14850 0.0 -
0.5775 14900 0.0 -
0.5794 14950 0.0 -
0.5813 15000 0.0 -
0.5833 15050 0.0 -
0.5852 15100 0.0 -
0.5871 15150 0.0 -
0.5891 15200 0.0 -
0.5910 15250 0.0 -
0.5930 15300 0.0 -
0.5949 15350 0.0 -
0.5968 15400 0.0 -
0.5988 15450 0.0 -
0.6007 15500 0.0 -
0.6026 15550 0.0 -
0.6046 15600 0.0 -
0.6065 15650 0.0 -
0.6085 15700 0.0 -
0.6104 15750 0.0 -
0.6123 15800 0.0 -
0.6143 15850 0.0 -
0.6162 15900 0.0 -
0.6181 15950 0.0 -
0.6201 16000 0.0 -
0.6220 16050 0.0 -
0.6240 16100 0.0 -
0.6259 16150 0.0 -
0.6278 16200 0.0 -
0.6298 16250 0.0 -
0.6317 16300 0.0 -
0.6336 16350 0.0 -
0.6356 16400 0.0 -
0.6375 16450 0.0 -
0.6395 16500 0.0 -
0.6414 16550 0.0 -
0.6433 16600 0.0 -
0.6453 16650 0.0 -
0.6472 16700 0.0 -
0.6491 16750 0.0 -
0.6511 16800 0.0 -
0.6530 16850 0.0 -
0.6550 16900 0.0 -
0.6569 16950 0.0 -
0.6588 17000 0.0 -
0.6608 17050 0.0 -
0.6627 17100 0.0 -
0.6647 17150 0.0 -
0.6666 17200 0.0 -
0.6685 17250 0.0 -
0.6705 17300 0.0 -
0.6724 17350 0.0 -
0.6743 17400 0.0 -
0.6763 17450 0.0 -
0.6782 17500 0.0 -
0.6802 17550 0.0 -
0.6821 17600 0.0 -
0.6840 17650 0.0 -
0.6860 17700 0.0 -
0.6879 17750 0.0 -
0.6898 17800 0.0 -
0.6918 17850 0.0 -
0.6937 17900 0.0 -
0.6957 17950 0.0 -
0.6976 18000 0.0 -
0.6995 18050 0.0 -
0.7015 18100 0.0 -
0.7034 18150 0.0 -
0.7053 18200 0.0 -
0.7073 18250 0.0 -
0.7092 18300 0.0 -
0.7112 18350 0.0 -
0.7131 18400 0.0 -
0.7150 18450 0.0 -
0.7170 18500 0.0 -
0.7189 18550 0.0 -
0.7208 18600 0.0 -
0.7228 18650 0.0 -
0.7247 18700 0.0 -
0.7267 18750 0.0 -
0.7286 18800 0.0 -
0.7305 18850 0.0 -
0.7325 18900 0.0 -
0.7344 18950 0.0 -
0.7363 19000 0.0 -
0.7383 19050 0.0 -
0.7402 19100 0.0 -
0.7422 19150 0.0 -
0.7441 19200 0.0 -
0.7460 19250 0.0 -
0.7480 19300 0.0 -
0.7499 19350 0.0 -
0.7519 19400 0.0 -
0.7538 19450 0.0 -
0.7557 19500 0.0 -
0.7577 19550 0.0 -
0.7596 19600 0.0 -
0.7615 19650 0.0 -
0.7635 19700 0.0 -
0.7654 19750 0.0 -
0.7674 19800 0.0 -
0.7693 19850 0.0 -
0.7712 19900 0.0 -
0.7732 19950 0.0 -
0.7751 20000 0.0 -
0.7770 20050 0.0 -
0.7790 20100 0.0 -
0.7809 20150 0.0 -
0.7829 20200 0.0 -
0.7848 20250 0.0 -
0.7867 20300 0.0 -
0.7887 20350 0.0 -
0.7906 20400 0.0 -
0.7925 20450 0.0 -
0.7945 20500 0.0 -
0.7964 20550 0.0 -
0.7984 20600 0.0 -
0.8003 20650 0.0 -
0.8022 20700 0.0 -
0.8042 20750 0.0 -
0.8061 20800 0.0 -
0.8080 20850 0.0 -
0.8100 20900 0.0 -
0.8119 20950 0.0 -
0.8139 21000 0.0 -
0.8158 21050 0.0 -
0.8177 21100 0.0 -
0.8197 21150 0.0 -
0.8216 21200 0.0 -
0.8235 21250 0.0 -
0.8255 21300 0.0 -
0.8274 21350 0.0 -
0.8294 21400 0.0 -
0.8313 21450 0.0 -
0.8332 21500 0.0 -
0.8352 21550 0.0 -
0.8371 21600 0.0 -
0.8390 21650 0.0 -
0.8410 21700 0.0 -
0.8429 21750 0.0 -
0.8449 21800 0.0 -
0.8468 21850 0.0 -
0.8487 21900 0.0 -
0.8507 21950 0.0 -
0.8526 22000 0.0 -
0.8546 22050 0.0 -
0.8565 22100 0.0 -
0.8584 22150 0.0 -
0.8604 22200 0.0 -
0.8623 22250 0.0 -
0.8642 22300 0.0 -
0.8662 22350 0.0 -
0.8681 22400 0.0 -
0.8701 22450 0.0 -
0.8720 22500 0.0 -
0.8739 22550 0.0 -
0.8759 22600 0.0 -
0.8778 22650 0.0 -
0.8797 22700 0.0 -
0.8817 22750 0.0 -
0.8836 22800 0.0 -
0.8856 22850 0.0 -
0.8875 22900 0.0 -
0.8894 22950 0.0 -
0.8914 23000 0.0 -
0.8933 23050 0.0 -
0.8952 23100 0.0 -
0.8972 23150 0.0 -
0.8991 23200 0.0 -
0.9011 23250 0.0 -
0.9030 23300 0.0 -
0.9049 23350 0.0 -
0.9069 23400 0.0 -
0.9088 23450 0.0 -
0.9107 23500 0.0 -
0.9127 23550 0.0 -
0.9146 23600 0.0 -
0.9166 23650 0.0 -
0.9185 23700 0.0 -
0.9204 23750 0.0 -
0.9224 23800 0.0 -
0.9243 23850 0.0 -
0.9262 23900 0.0 -
0.9282 23950 0.0 -
0.9301 24000 0.0 -
0.9321 24050 0.0 -
0.9340 24100 0.0 -
0.9359 24150 0.0 -
0.9379 24200 0.0 -
0.9398 24250 0.0 -
0.9418 24300 0.0 -
0.9437 24350 0.0 -
0.9456 24400 0.0 -
0.9476 24450 0.0 -
0.9495 24500 0.0 -
0.9514 24550 0.0 -
0.9534 24600 0.0 -
0.9553 24650 0.0 -
0.9573 24700 0.0 -
0.9592 24750 0.0 -
0.9611 24800 0.0 -
0.9631 24850 0.0 -
0.9650 24900 0.0 -
0.9669 24950 0.0 -
0.9689 25000 0.0 -
0.9708 25050 0.0 -
0.9728 25100 0.0 -
0.9747 25150 0.0 -
0.9766 25200 0.0 -
0.9786 25250 0.0 -
0.9805 25300 0.0 -
0.9824 25350 0.0 -
0.9844 25400 0.0 -
0.9863 25450 0.0 -
0.9883 25500 0.0 -
0.9902 25550 0.0 -
0.9921 25600 0.0 -
0.9941 25650 0.0 -
0.9960 25700 0.0 -
0.9979 25750 0.0 -
0.9999 25800 0.0 -

Framework Versions

  • Python: 3.10.12
  • SetFit: 1.1.0
  • Sentence Transformers: 3.3.1
  • Transformers: 4.42.2
  • PyTorch: 2.5.1+cu121
  • Datasets: 3.2.0
  • Tokenizers: 0.19.1

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
118M params
Tensor type
F32
·
Inference Examples
This model does not have enough activity to be deployed to Inference API (serverless) yet. Increase its social visibility and check back later, or deploy to Inference Endpoints (dedicated) instead.

Model tree for cbpuschmann/MiniLM-klimacoder_v0.6

Evaluation results