Edit model card

SetFit with sentence-transformers/paraphrase-multilingual-mpnet-base-v2

This is a SetFit model that can be used for Text Classification. This SetFit model uses sentence-transformers/paraphrase-multilingual-mpnet-base-v2 as the Sentence Transformer embedding model. A OneVsRestClassifier 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

Evaluation

Metrics

Label F1 Accuracy
all 0.8988 0.8604

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("furrypython/setfit-multilabel-edt")
# Run inference
preds = model("再診料 肛門腺処置 プレドニン1mg")

Training Details

Training Set Metrics

Training set Min Median Max
Word count 1 10.1847 243

Training Hyperparameters

  • batch_size: (16, 16)
  • num_epochs: (1, 1)
  • max_steps: -1
  • sampling_strategy: oversampling
  • num_iterations: 20
  • body_learning_rate: (2e-05, 2e-05)
  • head_learning_rate: 2e-05
  • 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: False

Training Results

Epoch Step Training Loss Validation Loss
0.0000 1 0.2397 -
0.0020 50 0.2269 -
0.0041 100 0.2216 -
0.0061 150 0.1912 -
0.0081 200 0.156 -
0.0101 250 0.0944 -
0.0122 300 0.1347 -
0.0142 350 0.077 -
0.0162 400 0.155 -
0.0183 450 0.1546 -
0.0203 500 0.0952 -
0.0223 550 0.0687 -
0.0244 600 0.164 -
0.0264 650 0.1129 -
0.0284 700 0.0942 -
0.0304 750 0.0319 -
0.0325 800 0.0343 -
0.0345 850 0.0443 -
0.0365 900 0.1617 -
0.0386 950 0.0629 -
0.0406 1000 0.1326 -
0.0426 1050 0.0651 -
0.0447 1100 0.0568 -
0.0467 1150 0.077 -
0.0487 1200 0.1308 -
0.0507 1250 0.1027 -
0.0528 1300 0.1678 -
0.0548 1350 0.0687 -
0.0568 1400 0.092 -
0.0589 1450 0.0378 -
0.0609 1500 0.0563 -
0.0629 1550 0.0412 -
0.0650 1600 0.0321 -
0.0670 1650 0.0178 -
0.0690 1700 0.0269 -
0.0710 1750 0.0403 -
0.0731 1800 0.126 -
0.0751 1850 0.134 -
0.0771 1900 0.0141 -
0.0792 1950 0.0298 -
0.0812 2000 0.0144 -
0.0832 2050 0.0138 -
0.0853 2100 0.0556 -
0.0873 2150 0.06 -
0.0893 2200 0.0378 -
0.0913 2250 0.0061 -
0.0934 2300 0.0887 -
0.0954 2350 0.0536 -
0.0974 2400 0.0503 -
0.0995 2450 0.0884 -
0.1015 2500 0.0382 -
0.1035 2550 0.0487 -
0.1055 2600 0.0237 -
0.1076 2650 0.04 -
0.1096 2700 0.0319 -
0.1116 2750 0.0716 -
0.1137 2800 0.0567 -
0.1157 2850 0.0228 -
0.1177 2900 0.0386 -
0.1198 2950 0.0349 -
0.1218 3000 0.0756 -
0.1238 3050 0.1016 -
0.1258 3100 0.0479 -
0.1279 3150 0.1135 -
0.1299 3200 0.0981 -
0.1319 3250 0.0623 -
0.1340 3300 0.0507 -
0.1360 3350 0.0912 -
0.1380 3400 0.0347 -
0.1401 3450 0.0531 -
0.1421 3500 0.0183 -
0.1441 3550 0.0331 -
0.1461 3600 0.132 -
0.1482 3650 0.0695 -
0.1502 3700 0.1009 -
0.1522 3750 0.1298 -
0.1543 3800 0.0717 -
0.1563 3850 0.017 -
0.1583 3900 0.0885 -
0.1604 3950 0.0698 -
0.1624 4000 0.1238 -
0.1644 4050 0.022 -
0.1664 4100 0.1298 -
0.1685 4150 0.0287 -
0.1705 4200 0.0258 -
0.1725 4250 0.1484 -
0.1746 4300 0.0068 -
0.1766 4350 0.0154 -
0.1786 4400 0.1172 -
0.1807 4450 0.0987 -
0.1827 4500 0.0033 -
0.1847 4550 0.0984 -
0.1867 4600 0.034 -
0.1888 4650 0.0592 -
0.1908 4700 0.0614 -
0.1928 4750 0.0152 -
0.1949 4800 0.0353 -
0.1969 4850 0.0352 -
0.1989 4900 0.0213 -
0.2009 4950 0.028 -
0.2030 5000 0.0136 -
0.2050 5050 0.0159 -
0.2070 5100 0.0809 -
0.2091 5150 0.0248 -
0.2111 5200 0.0065 -
0.2131 5250 0.1326 -
0.2152 5300 0.0135 -
0.2172 5350 0.1515 -
0.2192 5400 0.0626 -
0.2212 5450 0.0268 -
0.2233 5500 0.0698 -
0.2253 5550 0.082 -
0.2273 5600 0.0796 -
0.2294 5650 0.0523 -
0.2314 5700 0.0638 -
0.2334 5750 0.027 -
0.2355 5800 0.083 -
0.2375 5850 0.137 -
0.2395 5900 0.0622 -
0.2415 5950 0.0388 -
0.2436 6000 0.0203 -
0.2456 6050 0.0254 -
0.2476 6100 0.0075 -
0.2497 6150 0.0264 -
0.2517 6200 0.0174 -
0.2537 6250 0.0599 -
0.2558 6300 0.0475 -
0.2578 6350 0.0279 -
0.2598 6400 0.05 -
0.2618 6450 0.0658 -
0.2639 6500 0.0364 -
0.2659 6550 0.0652 -
0.2679 6600 0.0642 -
0.2700 6650 0.134 -
0.2720 6700 0.0545 -
0.2740 6750 0.0027 -
0.2761 6800 0.0059 -
0.2781 6850 0.0091 -
0.2801 6900 0.0763 -
0.2821 6950 0.0937 -
0.2842 7000 0.0492 -
0.2862 7050 0.0087 -
0.2882 7100 0.012 -
0.2903 7150 0.0097 -
0.2923 7200 0.0475 -
0.2943 7250 0.0365 -
0.2964 7300 0.0102 -
0.2984 7350 0.0628 -
0.3004 7400 0.0268 -
0.3024 7450 0.0337 -
0.3045 7500 0.0215 -
0.3065 7550 0.0034 -
0.3085 7600 0.0253 -
0.3106 7650 0.0101 -
0.3126 7700 0.0069 -
0.3146 7750 0.0022 -
0.3166 7800 0.0427 -
0.3187 7850 0.0704 -
0.3207 7900 0.0015 -
0.3227 7950 0.0368 -
0.3248 8000 0.0165 -
0.3268 8050 0.008 -
0.3288 8100 0.1099 -
0.3309 8150 0.0371 -
0.3329 8200 0.034 -
0.3349 8250 0.0074 -
0.3369 8300 0.0074 -
0.3390 8350 0.0115 -
0.3410 8400 0.1039 -
0.3430 8450 0.0124 -
0.3451 8500 0.0098 -
0.3471 8550 0.0644 -
0.3491 8600 0.0799 -
0.3512 8650 0.0624 -
0.3532 8700 0.0062 -
0.3552 8750 0.0024 -
0.3572 8800 0.0436 -
0.3593 8850 0.0188 -
0.3613 8900 0.0158 -
0.3633 8950 0.0275 -
0.3654 9000 0.0668 -
0.3674 9050 0.0338 -
0.3694 9100 0.0203 -
0.3715 9150 0.0294 -
0.3735 9200 0.0268 -
0.3755 9250 0.0392 -
0.3775 9300 0.1269 -
0.3796 9350 0.0496 -
0.3816 9400 0.0034 -
0.3836 9450 0.0261 -
0.3857 9500 0.0271 -
0.3877 9550 0.0797 -
0.3897 9600 0.0055 -
0.3918 9650 0.0076 -
0.3938 9700 0.0058 -
0.3958 9750 0.0089 -
0.3978 9800 0.0063 -
0.3999 9850 0.0128 -
0.4019 9900 0.0049 -
0.4039 9950 0.0026 -
0.4060 10000 0.0367 -
0.4080 10050 0.0327 -
0.4100 10100 0.002 -
0.4120 10150 0.0039 -
0.4141 10200 0.0191 -
0.4161 10250 0.0346 -
0.4181 10300 0.0449 -
0.4202 10350 0.0065 -
0.4222 10400 0.0075 -
0.4242 10450 0.0121 -
0.4263 10500 0.0272 -
0.4283 10550 0.044 -
0.4303 10600 0.0143 -
0.4323 10650 0.0233 -
0.4344 10700 0.0479 -
0.4364 10750 0.008 -
0.4384 10800 0.0457 -
0.4405 10850 0.075 -
0.4425 10900 0.0028 -
0.4445 10950 0.0485 -
0.4466 11000 0.0343 -
0.4486 11050 0.0209 -
0.4506 11100 0.0216 -
0.4526 11150 0.0092 -
0.4547 11200 0.0059 -
0.4567 11250 0.0116 -
0.4587 11300 0.0057 -
0.4608 11350 0.0172 -
0.4628 11400 0.0282 -
0.4648 11450 0.0153 -
0.4669 11500 0.0018 -
0.4689 11550 0.033 -
0.4709 11600 0.0822 -
0.4729 11650 0.0391 -
0.4750 11700 0.0163 -
0.4770 11750 0.0118 -
0.4790 11800 0.0474 -
0.4811 11850 0.0248 -
0.4831 11900 0.0239 -
0.4851 11950 0.0179 -
0.4872 12000 0.0919 -
0.4892 12050 0.0188 -
0.4912 12100 0.0236 -
0.4932 12150 0.0145 -
0.4953 12200 0.0604 -
0.4973 12250 0.0069 -
0.4993 12300 0.0102 -
0.5014 12350 0.0041 -
0.5034 12400 0.0128 -
0.5054 12450 0.0279 -
0.5074 12500 0.0657 -
0.5095 12550 0.058 -
0.5115 12600 0.0219 -
0.5135 12650 0.0101 -
0.5156 12700 0.1377 -
0.5176 12750 0.0176 -
0.5196 12800 0.1056 -
0.5217 12850 0.0494 -
0.5237 12900 0.0172 -
0.5257 12950 0.0086 -
0.5277 13000 0.0541 -
0.5298 13050 0.0193 -
0.5318 13100 0.0778 -
0.5338 13150 0.0034 -
0.5359 13200 0.014 -
0.5379 13250 0.0233 -
0.5399 13300 0.0642 -
0.5420 13350 0.1205 -
0.5440 13400 0.0223 -
0.5460 13450 0.03 -
0.5480 13500 0.0029 -
0.5501 13550 0.0262 -
0.5521 13600 0.0506 -
0.5541 13650 0.1303 -
0.5562 13700 0.0637 -
0.5582 13750 0.0008 -
0.5602 13800 0.0062 -
0.5623 13850 0.0048 -
0.5643 13900 0.0708 -
0.5663 13950 0.0313 -
0.5683 14000 0.0611 -
0.5704 14050 0.0092 -
0.5724 14100 0.0112 -
0.5744 14150 0.0033 -
0.5765 14200 0.0452 -
0.5785 14250 0.0045 -
0.5805 14300 0.0545 -
0.5826 14350 0.0434 -
0.5846 14400 0.0514 -
0.5866 14450 0.0317 -
0.5886 14500 0.0033 -
0.5907 14550 0.0042 -
0.5927 14600 0.0038 -
0.5947 14650 0.0513 -
0.5968 14700 0.0221 -
0.5988 14750 0.0112 -
0.6008 14800 0.0071 -
0.6028 14850 0.0102 -
0.6049 14900 0.0021 -
0.6069 14950 0.0211 -
0.6089 15000 0.1043 -
0.6110 15050 0.0291 -
0.6130 15100 0.0074 -
0.6150 15150 0.0032 -
0.6171 15200 0.0242 -
0.6191 15250 0.0146 -
0.6211 15300 0.0342 -
0.6231 15350 0.0216 -
0.6252 15400 0.0021 -
0.6272 15450 0.0069 -
0.6292 15500 0.0075 -
0.6313 15550 0.0022 -
0.6333 15600 0.0127 -
0.6353 15650 0.0592 -
0.6374 15700 0.0014 -
0.6394 15750 0.0648 -
0.6414 15800 0.0248 -
0.6434 15850 0.0141 -
0.6455 15900 0.0057 -
0.6475 15950 0.0086 -
0.6495 16000 0.0021 -
0.6516 16050 0.0395 -
0.6536 16100 0.0029 -
0.6556 16150 0.0008 -
0.6577 16200 0.0051 -
0.6597 16250 0.0939 -
0.6617 16300 0.0129 -
0.6637 16350 0.0197 -
0.6658 16400 0.0869 -
0.6678 16450 0.0085 -
0.6698 16500 0.0144 -
0.6719 16550 0.0189 -
0.6739 16600 0.0376 -
0.6759 16650 0.0404 -
0.6780 16700 0.0113 -
0.6800 16750 0.0545 -
0.6820 16800 0.0081 -
0.6840 16850 0.0006 -
0.6861 16900 0.0156 -
0.6881 16950 0.0041 -
0.6901 17000 0.0539 -
0.6922 17050 0.0166 -
0.6942 17100 0.0553 -
0.6962 17150 0.0548 -
0.6983 17200 0.0055 -
0.7003 17250 0.0116 -
0.7023 17300 0.0088 -
0.7043 17350 0.0031 -
0.7064 17400 0.0034 -
0.7084 17450 0.0095 -
0.7104 17500 0.0174 -
0.7125 17550 0.0026 -
0.7145 17600 0.0298 -
0.7165 17650 0.0008 -
0.7185 17700 0.0051 -
0.7206 17750 0.0193 -
0.7226 17800 0.0186 -
0.7246 17850 0.0129 -
0.7267 17900 0.0138 -
0.7287 17950 0.0071 -
0.7307 18000 0.0268 -
0.7328 18050 0.0033 -
0.7348 18100 0.0181 -
0.7368 18150 0.0006 -
0.7388 18200 0.0123 -
0.7409 18250 0.0011 -
0.7429 18300 0.0126 -
0.7449 18350 0.0577 -
0.7470 18400 0.0102 -
0.7490 18450 0.0175 -
0.7510 18500 0.0087 -
0.7531 18550 0.0031 -
0.7551 18600 0.0044 -
0.7571 18650 0.009 -
0.7591 18700 0.0094 -
0.7612 18750 0.0039 -
0.7632 18800 0.0252 -
0.7652 18850 0.0402 -
0.7673 18900 0.0057 -
0.7693 18950 0.0177 -
0.7713 19000 0.0246 -
0.7734 19050 0.001 -
0.7754 19100 0.0166 -
0.7774 19150 0.0258 -
0.7794 19200 0.0016 -
0.7815 19250 0.0048 -
0.7835 19300 0.0188 -
0.7855 19350 0.025 -
0.7876 19400 0.0061 -
0.7896 19450 0.002 -
0.7916 19500 0.0044 -
0.7937 19550 0.0096 -
0.7957 19600 0.0137 -
0.7977 19650 0.0084 -
0.7997 19700 0.0079 -
0.8018 19750 0.0107 -
0.8038 19800 0.0151 -
0.8058 19850 0.0085 -
0.8079 19900 0.0095 -
0.8099 19950 0.0027 -
0.8119 20000 0.0552 -
0.8139 20050 0.0657 -
0.8160 20100 0.0017 -
0.8180 20150 0.0891 -
0.8200 20200 0.0082 -
0.8221 20250 0.0084 -
0.8241 20300 0.0113 -
0.8261 20350 0.0033 -
0.8282 20400 0.0413 -
0.8302 20450 0.0147 -
0.8322 20500 0.0064 -
0.8342 20550 0.0126 -
0.8363 20600 0.0088 -
0.8383 20650 0.0062 -
0.8403 20700 0.0374 -
0.8424 20750 0.0192 -
0.8444 20800 0.0672 -
0.8464 20850 0.0031 -
0.8485 20900 0.0017 -
0.8505 20950 0.0065 -
0.8525 21000 0.0021 -
0.8545 21050 0.0203 -
0.8566 21100 0.0063 -
0.8586 21150 0.0078 -
0.8606 21200 0.0069 -
0.8627 21250 0.0124 -
0.8647 21300 0.0064 -
0.8667 21350 0.025 -
0.8688 21400 0.0642 -
0.8708 21450 0.0217 -
0.8728 21500 0.0066 -
0.8748 21550 0.0038 -
0.8769 21600 0.0306 -
0.8789 21650 0.008 -
0.8809 21700 0.05 -
0.8830 21750 0.0068 -
0.8850 21800 0.0077 -
0.8870 21850 0.0016 -
0.8891 21900 0.017 -
0.8911 21950 0.0333 -
0.8931 22000 0.0185 -
0.8951 22050 0.0031 -
0.8972 22100 0.0105 -
0.8992 22150 0.008 -
0.9012 22200 0.0123 -
0.9033 22250 0.012 -
0.9053 22300 0.0013 -
0.9073 22350 0.0257 -
0.9093 22400 0.0161 -
0.9114 22450 0.0149 -
0.9134 22500 0.0114 -
0.9154 22550 0.0007 -
0.9175 22600 0.0107 -
0.9195 22650 0.0224 -
0.9215 22700 0.0014 -
0.9236 22750 0.007 -
0.9256 22800 0.0016 -
0.9276 22850 0.0084 -
0.9296 22900 0.0594 -
0.9317 22950 0.0042 -
0.9337 23000 0.0143 -
0.9357 23050 0.0127 -
0.9378 23100 0.0073 -
0.9398 23150 0.0157 -
0.9418 23200 0.0101 -
0.9439 23250 0.0064 -
0.9459 23300 0.002 -
0.9479 23350 0.0092 -
0.9499 23400 0.0199 -
0.9520 23450 0.0102 -
0.9540 23500 0.0493 -
0.9560 23550 0.0033 -
0.9581 23600 0.0107 -
0.9601 23650 0.0036 -
0.9621 23700 0.0308 -
0.9642 23750 0.0036 -
0.9662 23800 0.0784 -
0.9682 23850 0.0208 -
0.9702 23900 0.0075 -
0.9723 23950 0.0396 -
0.9743 24000 0.0074 -
0.9763 24050 0.0418 -
0.9784 24100 0.0073 -
0.9804 24150 0.0016 -
0.9824 24200 0.0083 -
0.9845 24250 0.0099 -
0.9865 24300 0.0008 -
0.9885 24350 0.0214 -
0.9905 24400 0.0077 -
0.9926 24450 0.0098 -
0.9946 24500 0.003 -
0.9966 24550 0.006 -
0.9987 24600 0.0079 -

Framework Versions

  • Python: 3.10.12
  • SetFit: 1.0.3
  • Sentence Transformers: 2.2.2
  • Transformers: 4.35.2
  • PyTorch: 2.1.0+cu121
  • Datasets: 2.16.1
  • 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
0
Safetensors
Model size
278M params
Tensor type
F32
·
Inference Examples
Inference API (serverless) has been turned off for this model.

Finetuned from

Evaluation results