SetFit with mini1013/master_domain
This is a SetFit model that can be used for Text Classification. This SetFit model uses mini1013/master_domain 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:
- Fine-tuning a Sentence Transformer with contrastive learning.
- Training a classification head with features from the fine-tuned Sentence Transformer.
Model Details
Model Description
- Model Type: SetFit
- Sentence Transformer body: mini1013/master_domain
- Classification head: a LogisticRegression instance
- Maximum Sequence Length: 512 tokens
- Number of Classes: 8 classes
Model Sources
- Repository: SetFit on GitHub
- Paper: Efficient Few-Shot Learning Without Prompts
- Blogpost: SetFit: Efficient Few-Shot Learning Without Prompts
Model Labels
Label | Examples |
---|---|
7 |
|
3 |
|
6 |
|
0 |
|
5 |
|
1 |
|
2 |
|
4 |
|
Evaluation
Metrics
Label | Accuracy |
---|---|
all | 0.7369 |
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("mini1013/master_cate_bt5_test_flat_top_cate")
# Run inference
preds = model("비레디 페이스 피팅 브러쉬 포 히어로즈 MinSellAmount (#M)화장품/향수>남성화장품>남성메이크업/BB Gmarket > 뷰티 > 화장품/향수 > 남성화장품 > 남성메이크업/BB")
Training Details
Training Set Metrics
Training set | Min | Median | Max |
---|---|---|---|
Word count | 12 | 20.6963 | 66 |
Label | Training Sample Count |
---|---|
0 | 1 |
1 | 50 |
2 | 48 |
3 | 50 |
4 | 50 |
5 | 50 |
6 | 50 |
7 | 50 |
Training Hyperparameters
- batch_size: (64, 64)
- num_epochs: (30, 30)
- max_steps: -1
- sampling_strategy: oversampling
- num_iterations: 100
- 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.0018 | 1 | 0.4261 | - |
0.0916 | 50 | 0.4493 | - |
0.1832 | 100 | 0.4428 | - |
0.2747 | 150 | 0.4252 | - |
0.3663 | 200 | 0.3948 | - |
0.4579 | 250 | 0.361 | - |
0.5495 | 300 | 0.3209 | - |
0.6410 | 350 | 0.2692 | - |
0.7326 | 400 | 0.2629 | - |
0.8242 | 450 | 0.2437 | - |
0.9158 | 500 | 0.2383 | - |
1.0073 | 550 | 0.2352 | - |
1.0989 | 600 | 0.2306 | - |
1.1905 | 650 | 0.2165 | - |
1.2821 | 700 | 0.2081 | - |
1.3736 | 750 | 0.1861 | - |
1.4652 | 800 | 0.1676 | - |
1.5568 | 850 | 0.1363 | - |
1.6484 | 900 | 0.112 | - |
1.7399 | 950 | 0.1005 | - |
1.8315 | 1000 | 0.0779 | - |
1.9231 | 1050 | 0.0613 | - |
2.0147 | 1100 | 0.0392 | - |
2.1062 | 1150 | 0.0267 | - |
2.1978 | 1200 | 0.0213 | - |
2.2894 | 1250 | 0.0189 | - |
2.3810 | 1300 | 0.0174 | - |
2.4725 | 1350 | 0.0135 | - |
2.5641 | 1400 | 0.015 | - |
2.6557 | 1450 | 0.0108 | - |
2.7473 | 1500 | 0.0074 | - |
2.8388 | 1550 | 0.0072 | - |
2.9304 | 1600 | 0.0073 | - |
3.0220 | 1650 | 0.0058 | - |
3.1136 | 1700 | 0.0045 | - |
3.2051 | 1750 | 0.006 | - |
3.2967 | 1800 | 0.0056 | - |
3.3883 | 1850 | 0.0039 | - |
3.4799 | 1900 | 0.0041 | - |
3.5714 | 1950 | 0.0033 | - |
3.6630 | 2000 | 0.0045 | - |
3.7546 | 2050 | 0.0053 | - |
3.8462 | 2100 | 0.0075 | - |
3.9377 | 2150 | 0.0017 | - |
4.0293 | 2200 | 0.0008 | - |
4.1209 | 2250 | 0.0005 | - |
4.2125 | 2300 | 0.0007 | - |
4.3040 | 2350 | 0.0007 | - |
4.3956 | 2400 | 0.0003 | - |
4.4872 | 2450 | 0.0013 | - |
4.5788 | 2500 | 0.0008 | - |
4.6703 | 2550 | 0.0002 | - |
4.7619 | 2600 | 0.0 | - |
4.8535 | 2650 | 0.0004 | - |
4.9451 | 2700 | 0.0001 | - |
5.0366 | 2750 | 0.0007 | - |
5.1282 | 2800 | 0.0003 | - |
5.2198 | 2850 | 0.0003 | - |
5.3114 | 2900 | 0.0007 | - |
5.4029 | 2950 | 0.0002 | - |
5.4945 | 3000 | 0.0012 | - |
5.5861 | 3050 | 0.0007 | - |
5.6777 | 3100 | 0.0002 | - |
5.7692 | 3150 | 0.0007 | - |
5.8608 | 3200 | 0.0003 | - |
5.9524 | 3250 | 0.0003 | - |
6.0440 | 3300 | 0.0003 | - |
6.1355 | 3350 | 0.0003 | - |
6.2271 | 3400 | 0.0002 | - |
6.3187 | 3450 | 0.0005 | - |
6.4103 | 3500 | 0.0002 | - |
6.5018 | 3550 | 0.0006 | - |
6.5934 | 3600 | 0.0005 | - |
6.6850 | 3650 | 0.0003 | - |
6.7766 | 3700 | 0.0003 | - |
6.8681 | 3750 | 0.0009 | - |
6.9597 | 3800 | 0.0006 | - |
7.0513 | 3850 | 0.0002 | - |
7.1429 | 3900 | 0.0005 | - |
7.2344 | 3950 | 0.0005 | - |
7.3260 | 4000 | 0.0005 | - |
7.4176 | 4050 | 0.0005 | - |
7.5092 | 4100 | 0.0005 | - |
7.6007 | 4150 | 0.0008 | - |
7.6923 | 4200 | 0.0009 | - |
7.7839 | 4250 | 0.0003 | - |
7.8755 | 4300 | 0.0 | - |
7.9670 | 4350 | 0.0 | - |
8.0586 | 4400 | 0.0002 | - |
8.1502 | 4450 | 0.0003 | - |
8.2418 | 4500 | 0.0008 | - |
8.3333 | 4550 | 0.0005 | - |
8.4249 | 4600 | 0.0003 | - |
8.5165 | 4650 | 0.0003 | - |
8.6081 | 4700 | 0.0006 | - |
8.6996 | 4750 | 0.0005 | - |
8.7912 | 4800 | 0.0 | - |
8.8828 | 4850 | 0.0002 | - |
8.9744 | 4900 | 0.0008 | - |
9.0659 | 4950 | 0.0005 | - |
9.1575 | 5000 | 0.0002 | - |
9.2491 | 5050 | 0.0008 | - |
9.3407 | 5100 | 0.0005 | - |
9.4322 | 5150 | 0.0002 | - |
9.5238 | 5200 | 0.0003 | - |
9.6154 | 5250 | 0.0008 | - |
9.7070 | 5300 | 0.0005 | - |
9.7985 | 5350 | 0.0003 | - |
9.8901 | 5400 | 0.0006 | - |
9.9817 | 5450 | 0.0003 | - |
10.0733 | 5500 | 0.0003 | - |
10.1648 | 5550 | 0.0006 | - |
10.2564 | 5600 | 0.0005 | - |
10.3480 | 5650 | 0.0002 | - |
10.4396 | 5700 | 0.0005 | - |
10.5311 | 5750 | 0.0002 | - |
10.6227 | 5800 | 0.0012 | - |
10.7143 | 5850 | 0.0 | - |
10.8059 | 5900 | 0.0002 | - |
10.8974 | 5950 | 0.0002 | - |
10.9890 | 6000 | 0.0011 | - |
11.0806 | 6050 | 0.008 | - |
11.1722 | 6100 | 0.0057 | - |
11.2637 | 6150 | 0.004 | - |
11.3553 | 6200 | 0.0037 | - |
11.4469 | 6250 | 0.0038 | - |
11.5385 | 6300 | 0.0025 | - |
11.6300 | 6350 | 0.0023 | - |
11.7216 | 6400 | 0.0007 | - |
11.8132 | 6450 | 0.0006 | - |
11.9048 | 6500 | 0.0008 | - |
11.9963 | 6550 | 0.0002 | - |
12.0879 | 6600 | 0.0013 | - |
12.1795 | 6650 | 0.0004 | - |
12.2711 | 6700 | 0.0008 | - |
12.3626 | 6750 | 0.0006 | - |
12.4542 | 6800 | 0.0006 | - |
12.5458 | 6850 | 0.0 | - |
12.6374 | 6900 | 0.0005 | - |
12.7289 | 6950 | 0.0004 | - |
12.8205 | 7000 | 0.0003 | - |
12.9121 | 7050 | 0.0003 | - |
13.0037 | 7100 | 0.0008 | - |
13.0952 | 7150 | 0.0006 | - |
13.1868 | 7200 | 0.0005 | - |
13.2784 | 7250 | 0.0005 | - |
13.3700 | 7300 | 0.0003 | - |
13.4615 | 7350 | 0.0006 | - |
13.5531 | 7400 | 0.0003 | - |
13.6447 | 7450 | 0.0 | - |
13.7363 | 7500 | 0.0003 | - |
13.8278 | 7550 | 0.0005 | - |
13.9194 | 7600 | 0.0002 | - |
14.0110 | 7650 | 0.0006 | - |
14.1026 | 7700 | 0.0003 | - |
14.1941 | 7750 | 0.0006 | - |
14.2857 | 7800 | 0.0008 | - |
14.3773 | 7850 | 0.0 | - |
14.4689 | 7900 | 0.0006 | - |
14.5604 | 7950 | 0.0005 | - |
14.6520 | 8000 | 0.0005 | - |
14.7436 | 8050 | 0.0003 | - |
14.8352 | 8100 | 0.0002 | - |
14.9267 | 8150 | 0.0003 | - |
15.0183 | 8200 | 0.0003 | - |
15.1099 | 8250 | 0.0003 | - |
15.2015 | 8300 | 0.0006 | - |
15.2930 | 8350 | 0.0002 | - |
15.3846 | 8400 | 0.0009 | - |
15.4762 | 8450 | 0.0006 | - |
15.5678 | 8500 | 0.0002 | - |
15.6593 | 8550 | 0.0003 | - |
15.7509 | 8600 | 0.0005 | - |
15.8425 | 8650 | 0.0005 | - |
15.9341 | 8700 | 0.0003 | - |
16.0256 | 8750 | 0.0003 | - |
16.1172 | 8800 | 0.0 | - |
16.2088 | 8850 | 0.0008 | - |
16.3004 | 8900 | 0.0002 | - |
16.3919 | 8950 | 0.0003 | - |
16.4835 | 9000 | 0.0003 | - |
16.5751 | 9050 | 0.0005 | - |
16.6667 | 9100 | 0.0006 | - |
16.7582 | 9150 | 0.0006 | - |
16.8498 | 9200 | 0.0002 | - |
16.9414 | 9250 | 0.0005 | - |
17.0330 | 9300 | 0.0006 | - |
17.1245 | 9350 | 0.0002 | - |
17.2161 | 9400 | 0.0009 | - |
17.3077 | 9450 | 0.0005 | - |
17.3993 | 9500 | 0.0008 | - |
17.4908 | 9550 | 0.0006 | - |
17.5824 | 9600 | 0.0003 | - |
17.6740 | 9650 | 0.0003 | - |
17.7656 | 9700 | 0.0 | - |
17.8571 | 9750 | 0.0003 | - |
17.9487 | 9800 | 0.0002 | - |
18.0403 | 9850 | 0.0003 | - |
18.1319 | 9900 | 0.0006 | - |
18.2234 | 9950 | 0.0008 | - |
18.3150 | 10000 | 0.0005 | - |
18.4066 | 10050 | 0.0003 | - |
18.4982 | 10100 | 0.0005 | - |
18.5897 | 10150 | 0.0002 | - |
18.6813 | 10200 | 0.0 | - |
18.7729 | 10250 | 0.0003 | - |
18.8645 | 10300 | 0.0003 | - |
18.9560 | 10350 | 0.0003 | - |
19.0476 | 10400 | 0.0008 | - |
19.1392 | 10450 | 0.0006 | - |
19.2308 | 10500 | 0.0002 | - |
19.3223 | 10550 | 0.0003 | - |
19.4139 | 10600 | 0.0003 | - |
19.5055 | 10650 | 0.0003 | - |
19.5971 | 10700 | 0.0005 | - |
19.6886 | 10750 | 0.0009 | - |
19.7802 | 10800 | 0.0002 | - |
19.8718 | 10850 | 0.0003 | - |
19.9634 | 10900 | 0.0005 | - |
20.0549 | 10950 | 0.0003 | - |
20.1465 | 11000 | 0.0005 | - |
20.2381 | 11050 | 0.0009 | - |
20.3297 | 11100 | 0.0003 | - |
20.4212 | 11150 | 0.0 | - |
20.5128 | 11200 | 0.0006 | - |
20.6044 | 11250 | 0.0005 | - |
20.6960 | 11300 | 0.0002 | - |
20.7875 | 11350 | 0.0003 | - |
20.8791 | 11400 | 0.0005 | - |
20.9707 | 11450 | 0.0003 | - |
21.0623 | 11500 | 0.0002 | - |
21.1538 | 11550 | 0.0006 | - |
21.2454 | 11600 | 0.0004 | - |
21.3370 | 11650 | 0.0005 | - |
21.4286 | 11700 | 0.0009 | - |
21.5201 | 11750 | 0.0005 | - |
21.6117 | 11800 | 0.0005 | - |
21.7033 | 11850 | 0.0003 | - |
21.7949 | 11900 | 0.0005 | - |
21.8864 | 11950 | 0.0003 | - |
21.9780 | 12000 | 0.0 | - |
22.0696 | 12050 | 0.0005 | - |
22.1612 | 12100 | 0.0009 | - |
22.2527 | 12150 | 0.002 | - |
22.3443 | 12200 | 0.0022 | - |
22.4359 | 12250 | 0.002 | - |
22.5275 | 12300 | 0.0002 | - |
22.6190 | 12350 | 0.0003 | - |
22.7106 | 12400 | 0.0003 | - |
22.8022 | 12450 | 0.0005 | - |
22.8938 | 12500 | 0.0003 | - |
22.9853 | 12550 | 0.0005 | - |
23.0769 | 12600 | 0.0002 | - |
23.1685 | 12650 | 0.0003 | - |
23.2601 | 12700 | 0.0003 | - |
23.3516 | 12750 | 0.0006 | - |
23.4432 | 12800 | 0.0006 | - |
23.5348 | 12850 | 0.0005 | - |
23.6264 | 12900 | 0.0006 | - |
23.7179 | 12950 | 0.0008 | - |
23.8095 | 13000 | 0.0002 | - |
23.9011 | 13050 | 0.0003 | - |
23.9927 | 13100 | 0.0008 | - |
24.0842 | 13150 | 0.0003 | - |
24.1758 | 13200 | 0.0005 | - |
24.2674 | 13250 | 0.0003 | - |
24.3590 | 13300 | 0.0003 | - |
24.4505 | 13350 | 0.0003 | - |
24.5421 | 13400 | 0.0008 | - |
24.6337 | 13450 | 0.0002 | - |
24.7253 | 13500 | 0.0005 | - |
24.8168 | 13550 | 0.0003 | - |
24.9084 | 13600 | 0.0005 | - |
25.0 | 13650 | 0.0005 | - |
25.0916 | 13700 | 0.0006 | - |
25.1832 | 13750 | 0.0006 | - |
25.2747 | 13800 | 0.0003 | - |
25.3663 | 13850 | 0.0009 | - |
25.4579 | 13900 | 0.0 | - |
25.5495 | 13950 | 0.0006 | - |
25.6410 | 14000 | 0.0006 | - |
25.7326 | 14050 | 0.0002 | - |
25.8242 | 14100 | 0.0 | - |
25.9158 | 14150 | 0.0003 | - |
26.0073 | 14200 | 0.0002 | - |
26.0989 | 14250 | 0.0006 | - |
26.1905 | 14300 | 0.0002 | - |
26.2821 | 14350 | 0.0003 | - |
26.3736 | 14400 | 0.0008 | - |
26.4652 | 14450 | 0.0007 | - |
26.5568 | 14500 | 0.0008 | - |
26.6484 | 14550 | 0.0005 | - |
26.7399 | 14600 | 0.0002 | - |
26.8315 | 14650 | 0.0003 | - |
26.9231 | 14700 | 0.0 | - |
27.0147 | 14750 | 0.0002 | - |
27.1062 | 14800 | 0.0005 | - |
27.1978 | 14850 | 0.0006 | - |
27.2894 | 14900 | 0.0005 | - |
27.3810 | 14950 | 0.0 | - |
27.4725 | 15000 | 0.0005 | - |
27.5641 | 15050 | 0.0005 | - |
27.6557 | 15100 | 0.0006 | - |
27.7473 | 15150 | 0.0006 | - |
27.8388 | 15200 | 0.0005 | - |
27.9304 | 15250 | 0.0 | - |
28.0220 | 15300 | 0.0002 | - |
28.1136 | 15350 | 0.0006 | - |
28.2051 | 15400 | 0.0003 | - |
28.2967 | 15450 | 0.0005 | - |
28.3883 | 15500 | 0.0005 | - |
28.4799 | 15550 | 0.0002 | - |
28.5714 | 15600 | 0.0005 | - |
28.6630 | 15650 | 0.0003 | - |
28.7546 | 15700 | 0.0006 | - |
28.8462 | 15750 | 0.0005 | - |
28.9377 | 15800 | 0.0005 | - |
29.0293 | 15850 | 0.0 | - |
29.1209 | 15900 | 0.0 | - |
29.2125 | 15950 | 0.0003 | - |
29.3040 | 16000 | 0.0006 | - |
29.3956 | 16050 | 0.0002 | - |
29.4872 | 16100 | 0.0011 | - |
29.5788 | 16150 | 0.0005 | - |
29.6703 | 16200 | 0.0003 | - |
29.7619 | 16250 | 0.0005 | - |
29.8535 | 16300 | 0.0002 | - |
29.9451 | 16350 | 0.0005 | - |
Framework Versions
- Python: 3.10.12
- SetFit: 1.1.0
- Sentence Transformers: 3.3.1
- Transformers: 4.44.2
- PyTorch: 2.2.0a0+81ea7a4
- 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
- 0
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.