metadata
tags:
- setfit
- sentence-transformers
- text-classification
- generated_from_setfit_trainer
widget:
- text: >-
고흥 유자 10kg 신선농장 상품 10kg (#M)식품>농산물>과일>오렌지 T200 > Naverstore > 식품 > 과일 >
오렌지/자몽/레몬 > 오렌지
- text: >-
국내산 참다래 5kg/10kg 골드/레드키위 국내산 그린키위10kg 91-100과 (#M)식품>농산물>과일>키위/참다래 T200 >
Naverstore > 식품 > 과일 > 키위/참다래
- text: >-
제스프리 썬골드키위 대왕점보사이즈 8개입 (155g내외) 뉴질랜드 (#M)식품>농산물>과일>바나나 T200 > Naverstore
> 식품 > 과일 > 바나나/망고/파인애플 > 바나나
- text: >-
새콤달콤 스타루비 레드 자몽 특대과 특품 5kg 5-7과 (#M)식품>농산물>과일>자몽 T200 > Naverstore > 식품 >
과일 > 오렌지/자몽/레몬 > 자몽
- text: >-
프리미엄 냉동과일 아보카도 다이스, 냉동아보카도 500g 02. 냉동 람부탄 1팩 (#M)식품>농산물>과일>아보카도 T200 >
Naverstore > 식품 > 과일 > 아보카도
metrics:
- accuracy
pipeline_tag: text-classification
library_name: setfit
inference: true
base_model: klue/roberta-base
model-index:
- name: SetFit with klue/roberta-base
results:
- task:
type: text-classification
name: Text Classification
dataset:
name: Unknown
type: unknown
split: test
metrics:
- type: accuracy
value: 0.998283105022831
name: Accuracy
SetFit with klue/roberta-base
This is a SetFit model that can be used for Text Classification. This SetFit model uses klue/roberta-base 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: klue/roberta-base
- Classification head: a LogisticRegression instance
- Maximum Sequence Length: 512 tokens
- Number of Classes: 31 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 |
---|---|
20.0 |
|
19.0 |
|
27.0 |
|
8.0 |
|
17.0 |
|
0.0 |
|
21.0 |
|
4.0 |
|
18.0 |
|
13.0 |
|
22.0 |
|
3.0 |
|
14.0 |
|
24.0 |
|
23.0 |
|
2.0 |
|
9.0 |
|
11.0 |
|
30.0 |
|
15.0 |
|
7.0 |
|
1.0 |
|
10.0 |
|
28.0 |
|
6.0 |
|
25.0 |
|
26.0 |
|
5.0 |
|
29.0 |
|
12.0 |
|
16.0 |
|
Evaluation
Metrics
Label | Accuracy |
---|---|
all | 0.9983 |
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_top_fd4")
# Run inference
preds = model("고흥 유자 10kg 신선농장 상품 10kg (#M)식품>농산물>과일>오렌지 T200 > Naverstore > 식품 > 과일 > 오렌지/자몽/레몬 > 오렌지")
Training Details
Training Set Metrics
Training set | Min | Median | Max |
---|---|---|---|
Word count | 14 | 21.8097 | 48 |
Label | Training Sample Count |
---|---|
0.0 | 50 |
1.0 | 50 |
2.0 | 50 |
3.0 | 50 |
4.0 | 50 |
5.0 | 50 |
6.0 | 50 |
7.0 | 50 |
8.0 | 50 |
9.0 | 50 |
10.0 | 50 |
11.0 | 50 |
12.0 | 50 |
13.0 | 50 |
14.0 | 50 |
15.0 | 50 |
16.0 | 50 |
17.0 | 50 |
18.0 | 50 |
19.0 | 50 |
20.0 | 50 |
21.0 | 50 |
22.0 | 50 |
23.0 | 50 |
24.0 | 50 |
25.0 | 50 |
26.0 | 50 |
27.0 | 50 |
28.0 | 50 |
29.0 | 50 |
30.0 | 50 |
Training Hyperparameters
- batch_size: (64, 64)
- num_epochs: (20, 20)
- max_steps: -1
- sampling_strategy: oversampling
- num_iterations: 30
- 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.0014 | 1 | 0.5541 | - |
0.0688 | 50 | 0.4773 | - |
0.1376 | 100 | 0.4113 | - |
0.2063 | 150 | 0.3227 | - |
0.2751 | 200 | 0.2635 | - |
0.3439 | 250 | 0.1443 | - |
0.4127 | 300 | 0.054 | - |
0.4814 | 350 | 0.031 | - |
0.5502 | 400 | 0.0242 | - |
0.6190 | 450 | 0.0186 | - |
0.6878 | 500 | 0.013 | - |
0.7565 | 550 | 0.0088 | - |
0.8253 | 600 | 0.0088 | - |
0.8941 | 650 | 0.0088 | - |
0.9629 | 700 | 0.0074 | - |
1.0316 | 750 | 0.0064 | - |
1.1004 | 800 | 0.0037 | - |
1.1692 | 850 | 0.0032 | - |
1.2380 | 900 | 0.002 | - |
1.3067 | 950 | 0.0018 | - |
1.3755 | 1000 | 0.0012 | - |
1.4443 | 1050 | 0.0006 | - |
1.5131 | 1100 | 0.0005 | - |
1.5818 | 1150 | 0.0004 | - |
1.6506 | 1200 | 0.0003 | - |
1.7194 | 1250 | 0.0003 | - |
1.7882 | 1300 | 0.0003 | - |
1.8569 | 1350 | 0.0003 | - |
1.9257 | 1400 | 0.0002 | - |
1.9945 | 1450 | 0.0002 | - |
2.0633 | 1500 | 0.0002 | - |
2.1320 | 1550 | 0.0002 | - |
2.2008 | 1600 | 0.0002 | - |
2.2696 | 1650 | 0.0001 | - |
2.3384 | 1700 | 0.0002 | - |
2.4072 | 1750 | 0.0001 | - |
2.4759 | 1800 | 0.0001 | - |
2.5447 | 1850 | 0.0001 | - |
2.6135 | 1900 | 0.0001 | - |
2.6823 | 1950 | 0.0001 | - |
2.7510 | 2000 | 0.0001 | - |
2.8198 | 2050 | 0.0001 | - |
2.8886 | 2100 | 0.0001 | - |
2.9574 | 2150 | 0.0001 | - |
3.0261 | 2200 | 0.0001 | - |
3.0949 | 2250 | 0.0001 | - |
3.1637 | 2300 | 0.0001 | - |
3.2325 | 2350 | 0.0001 | - |
3.3012 | 2400 | 0.0001 | - |
3.3700 | 2450 | 0.0001 | - |
3.4388 | 2500 | 0.0001 | - |
3.5076 | 2550 | 0.0001 | - |
3.5763 | 2600 | 0.0001 | - |
3.6451 | 2650 | 0.0001 | - |
3.7139 | 2700 | 0.0001 | - |
3.7827 | 2750 | 0.0001 | - |
3.8514 | 2800 | 0.0001 | - |
3.9202 | 2850 | 0.0001 | - |
3.9890 | 2900 | 0.0001 | - |
4.0578 | 2950 | 0.0001 | - |
4.1265 | 3000 | 0.0001 | - |
4.1953 | 3050 | 0.0001 | - |
4.2641 | 3100 | 0.0001 | - |
4.3329 | 3150 | 0.0001 | - |
4.4017 | 3200 | 0.0001 | - |
4.4704 | 3250 | 0.0001 | - |
4.5392 | 3300 | 0.0 | - |
4.6080 | 3350 | 0.0 | - |
4.6768 | 3400 | 0.0 | - |
4.7455 | 3450 | 0.0 | - |
4.8143 | 3500 | 0.0 | - |
4.8831 | 3550 | 0.0 | - |
4.9519 | 3600 | 0.0 | - |
5.0206 | 3650 | 0.0 | - |
5.0894 | 3700 | 0.0 | - |
5.1582 | 3750 | 0.0 | - |
5.2270 | 3800 | 0.0 | - |
5.2957 | 3850 | 0.0 | - |
5.3645 | 3900 | 0.0 | - |
5.4333 | 3950 | 0.0 | - |
5.5021 | 4000 | 0.0 | - |
5.5708 | 4050 | 0.0 | - |
5.6396 | 4100 | 0.0 | - |
5.7084 | 4150 | 0.0 | - |
5.7772 | 4200 | 0.0 | - |
5.8459 | 4250 | 0.0 | - |
5.9147 | 4300 | 0.0 | - |
5.9835 | 4350 | 0.0 | - |
6.0523 | 4400 | 0.0 | - |
6.1210 | 4450 | 0.0 | - |
6.1898 | 4500 | 0.0 | - |
6.2586 | 4550 | 0.0 | - |
6.3274 | 4600 | 0.0 | - |
6.3961 | 4650 | 0.0 | - |
6.4649 | 4700 | 0.0 | - |
6.5337 | 4750 | 0.0 | - |
6.6025 | 4800 | 0.0 | - |
6.6713 | 4850 | 0.0 | - |
6.7400 | 4900 | 0.0 | - |
6.8088 | 4950 | 0.0 | - |
6.8776 | 5000 | 0.0 | - |
6.9464 | 5050 | 0.0 | - |
7.0151 | 5100 | 0.0 | - |
7.0839 | 5150 | 0.0 | - |
7.1527 | 5200 | 0.0 | - |
7.2215 | 5250 | 0.0 | - |
7.2902 | 5300 | 0.0 | - |
7.3590 | 5350 | 0.0 | - |
7.4278 | 5400 | 0.0 | - |
7.4966 | 5450 | 0.0 | - |
7.5653 | 5500 | 0.0 | - |
7.6341 | 5550 | 0.0 | - |
7.7029 | 5600 | 0.0 | - |
7.7717 | 5650 | 0.0 | - |
7.8404 | 5700 | 0.0 | - |
7.9092 | 5750 | 0.0 | - |
7.9780 | 5800 | 0.0 | - |
8.0468 | 5850 | 0.0 | - |
8.1155 | 5900 | 0.0 | - |
8.1843 | 5950 | 0.0 | - |
8.2531 | 6000 | 0.0 | - |
8.3219 | 6050 | 0.0 | - |
8.3906 | 6100 | 0.0 | - |
8.4594 | 6150 | 0.0 | - |
8.5282 | 6200 | 0.0 | - |
8.5970 | 6250 | 0.0 | - |
8.6657 | 6300 | 0.0 | - |
8.7345 | 6350 | 0.0 | - |
8.8033 | 6400 | 0.0 | - |
8.8721 | 6450 | 0.0 | - |
8.9409 | 6500 | 0.0 | - |
9.0096 | 6550 | 0.0 | - |
9.0784 | 6600 | 0.0 | - |
9.1472 | 6650 | 0.0 | - |
9.2160 | 6700 | 0.0 | - |
9.2847 | 6750 | 0.0 | - |
9.3535 | 6800 | 0.0 | - |
9.4223 | 6850 | 0.0 | - |
9.4911 | 6900 | 0.0 | - |
9.5598 | 6950 | 0.0 | - |
9.6286 | 7000 | 0.0 | - |
9.6974 | 7050 | 0.0 | - |
9.7662 | 7100 | 0.0 | - |
9.8349 | 7150 | 0.0 | - |
9.9037 | 7200 | 0.0 | - |
9.9725 | 7250 | 0.0 | - |
10.0413 | 7300 | 0.0 | - |
10.1100 | 7350 | 0.0 | - |
10.1788 | 7400 | 0.0 | - |
10.2476 | 7450 | 0.0 | - |
10.3164 | 7500 | 0.0 | - |
10.3851 | 7550 | 0.0 | - |
10.4539 | 7600 | 0.0 | - |
10.5227 | 7650 | 0.0 | - |
10.5915 | 7700 | 0.0 | - |
10.6602 | 7750 | 0.0 | - |
10.7290 | 7800 | 0.0 | - |
10.7978 | 7850 | 0.0 | - |
10.8666 | 7900 | 0.0 | - |
10.9354 | 7950 | 0.0 | - |
11.0041 | 8000 | 0.0 | - |
11.0729 | 8050 | 0.0 | - |
11.1417 | 8100 | 0.0 | - |
11.2105 | 8150 | 0.0 | - |
11.2792 | 8200 | 0.0 | - |
11.3480 | 8250 | 0.0 | - |
11.4168 | 8300 | 0.0 | - |
11.4856 | 8350 | 0.0 | - |
11.5543 | 8400 | 0.0 | - |
11.6231 | 8450 | 0.0 | - |
11.6919 | 8500 | 0.0 | - |
11.7607 | 8550 | 0.0 | - |
11.8294 | 8600 | 0.0 | - |
11.8982 | 8650 | 0.0 | - |
11.9670 | 8700 | 0.0 | - |
12.0358 | 8750 | 0.0 | - |
12.1045 | 8800 | 0.0 | - |
12.1733 | 8850 | 0.0 | - |
12.2421 | 8900 | 0.0 | - |
12.3109 | 8950 | 0.0 | - |
12.3796 | 9000 | 0.0 | - |
12.4484 | 9050 | 0.0 | - |
12.5172 | 9100 | 0.0 | - |
12.5860 | 9150 | 0.0 | - |
12.6547 | 9200 | 0.0 | - |
12.7235 | 9250 | 0.0 | - |
12.7923 | 9300 | 0.0 | - |
12.8611 | 9350 | 0.0 | - |
12.9298 | 9400 | 0.0 | - |
12.9986 | 9450 | 0.0 | - |
13.0674 | 9500 | 0.0 | - |
13.1362 | 9550 | 0.0 | - |
13.2050 | 9600 | 0.0 | - |
13.2737 | 9650 | 0.0 | - |
13.3425 | 9700 | 0.0 | - |
13.4113 | 9750 | 0.0 | - |
13.4801 | 9800 | 0.0 | - |
13.5488 | 9850 | 0.0 | - |
13.6176 | 9900 | 0.0 | - |
13.6864 | 9950 | 0.0 | - |
13.7552 | 10000 | 0.0 | - |
13.8239 | 10050 | 0.0 | - |
13.8927 | 10100 | 0.0 | - |
13.9615 | 10150 | 0.0 | - |
14.0303 | 10200 | 0.0 | - |
14.0990 | 10250 | 0.0 | - |
14.1678 | 10300 | 0.0 | - |
14.2366 | 10350 | 0.0 | - |
14.3054 | 10400 | 0.0 | - |
14.3741 | 10450 | 0.0 | - |
14.4429 | 10500 | 0.0 | - |
14.5117 | 10550 | 0.0 | - |
14.5805 | 10600 | 0.0 | - |
14.6492 | 10650 | 0.0 | - |
14.7180 | 10700 | 0.0 | - |
14.7868 | 10750 | 0.0 | - |
14.8556 | 10800 | 0.0 | - |
14.9243 | 10850 | 0.0 | - |
14.9931 | 10900 | 0.0 | - |
15.0619 | 10950 | 0.0 | - |
15.1307 | 11000 | 0.0 | - |
15.1994 | 11050 | 0.0 | - |
15.2682 | 11100 | 0.0 | - |
15.3370 | 11150 | 0.0 | - |
15.4058 | 11200 | 0.0 | - |
15.4746 | 11250 | 0.0 | - |
15.5433 | 11300 | 0.0 | - |
15.6121 | 11350 | 0.0 | - |
15.6809 | 11400 | 0.0 | - |
15.7497 | 11450 | 0.0 | - |
15.8184 | 11500 | 0.0 | - |
15.8872 | 11550 | 0.0 | - |
15.9560 | 11600 | 0.0 | - |
16.0248 | 11650 | 0.0 | - |
16.0935 | 11700 | 0.0 | - |
16.1623 | 11750 | 0.0 | - |
16.2311 | 11800 | 0.0 | - |
16.2999 | 11850 | 0.0 | - |
16.3686 | 11900 | 0.0 | - |
16.4374 | 11950 | 0.0 | - |
16.5062 | 12000 | 0.0 | - |
16.5750 | 12050 | 0.0 | - |
16.6437 | 12100 | 0.0 | - |
16.7125 | 12150 | 0.0 | - |
16.7813 | 12200 | 0.0 | - |
16.8501 | 12250 | 0.0 | - |
16.9188 | 12300 | 0.0 | - |
16.9876 | 12350 | 0.0 | - |
17.0564 | 12400 | 0.0 | - |
17.1252 | 12450 | 0.0 | - |
17.1939 | 12500 | 0.0 | - |
17.2627 | 12550 | 0.0 | - |
17.3315 | 12600 | 0.0 | - |
17.4003 | 12650 | 0.0 | - |
17.4691 | 12700 | 0.0 | - |
17.5378 | 12750 | 0.0 | - |
17.6066 | 12800 | 0.0 | - |
17.6754 | 12850 | 0.0005 | - |
17.7442 | 12900 | 0.0021 | - |
17.8129 | 12950 | 0.0002 | - |
17.8817 | 13000 | 0.0001 | - |
17.9505 | 13050 | 0.0 | - |
18.0193 | 13100 | 0.0 | - |
18.0880 | 13150 | 0.0 | - |
18.1568 | 13200 | 0.0 | - |
18.2256 | 13250 | 0.0 | - |
18.2944 | 13300 | 0.0 | - |
18.3631 | 13350 | 0.0 | - |
18.4319 | 13400 | 0.0 | - |
18.5007 | 13450 | 0.0 | - |
18.5695 | 13500 | 0.0 | - |
18.6382 | 13550 | 0.0 | - |
18.7070 | 13600 | 0.0 | - |
18.7758 | 13650 | 0.0 | - |
18.8446 | 13700 | 0.0 | - |
18.9133 | 13750 | 0.0 | - |
18.9821 | 13800 | 0.0 | - |
19.0509 | 13850 | 0.0 | - |
19.1197 | 13900 | 0.0 | - |
19.1884 | 13950 | 0.0 | - |
19.2572 | 14000 | 0.0 | - |
19.3260 | 14050 | 0.0 | - |
19.3948 | 14100 | 0.0 | - |
19.4635 | 14150 | 0.0 | - |
19.5323 | 14200 | 0.0 | - |
19.6011 | 14250 | 0.0 | - |
19.6699 | 14300 | 0.0 | - |
19.7387 | 14350 | 0.0 | - |
19.8074 | 14400 | 0.0 | - |
19.8762 | 14450 | 0.0 | - |
19.9450 | 14500 | 0.0 | - |
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}
}