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: 16 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.0 |
|
15.0 |
|
11.0 |
|
14.0 |
|
13.0 |
|
8.0 |
|
12.0 |
|
4.0 |
|
10.0 |
|
2.0 |
|
1.0 |
|
9.0 |
|
3.0 |
|
0.0 |
|
5.0 |
|
6.0 |
|
Evaluation
Metrics
Label | Accuracy |
---|---|
all | 0.9987 |
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_fd0")
# Run inference
preds = model("(10+1) 다즐샵 식단 도시락 15종 골라담기 11_다섯가지나물밥+참스테이크 (#M)식품>냉동/간편조리식품>도시락 T200 > Naverstore > 식품 > 간편조리식품 > 도시락/밥류 > 도시락")
Training Details
Training Set Metrics
Training set | Min | Median | Max |
---|---|---|---|
Word count | 12 | 21.1790 | 41 |
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 | 32 |
10.0 | 50 |
11.0 | 50 |
12.0 | 50 |
13.0 | 50 |
14.0 | 50 |
15.0 | 50 |
Training Hyperparameters
- batch_size: (128, 128)
- num_epochs: (20, 20)
- max_steps: -1
- sampling_strategy: oversampling
- num_iterations: 50
- 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.0033 | 1 | 0.4947 | - |
0.1634 | 50 | 0.4776 | - |
0.3268 | 100 | 0.286 | - |
0.4902 | 150 | 0.1239 | - |
0.6536 | 200 | 0.0278 | - |
0.8170 | 250 | 0.0062 | - |
0.9804 | 300 | 0.0015 | - |
1.1438 | 350 | 0.0008 | - |
1.3072 | 400 | 0.0004 | - |
1.4706 | 450 | 0.0002 | - |
1.6340 | 500 | 0.0002 | - |
1.7974 | 550 | 0.0002 | - |
1.9608 | 600 | 0.0001 | - |
2.1242 | 650 | 0.0001 | - |
2.2876 | 700 | 0.0001 | - |
2.4510 | 750 | 0.0001 | - |
2.6144 | 800 | 0.0001 | - |
2.7778 | 850 | 0.0001 | - |
2.9412 | 900 | 0.0001 | - |
3.1046 | 950 | 0.0 | - |
3.2680 | 1000 | 0.0 | - |
3.4314 | 1050 | 0.0 | - |
3.5948 | 1100 | 0.0 | - |
3.7582 | 1150 | 0.0 | - |
3.9216 | 1200 | 0.0 | - |
4.0850 | 1250 | 0.0 | - |
4.2484 | 1300 | 0.0 | - |
4.4118 | 1350 | 0.0 | - |
4.5752 | 1400 | 0.0 | - |
4.7386 | 1450 | 0.0 | - |
4.9020 | 1500 | 0.0 | - |
5.0654 | 1550 | 0.0 | - |
5.2288 | 1600 | 0.0 | - |
5.3922 | 1650 | 0.0 | - |
5.5556 | 1700 | 0.0 | - |
5.7190 | 1750 | 0.0 | - |
5.8824 | 1800 | 0.0 | - |
6.0458 | 1850 | 0.0 | - |
6.2092 | 1900 | 0.0 | - |
6.3725 | 1950 | 0.0 | - |
6.5359 | 2000 | 0.0 | - |
6.6993 | 2050 | 0.0 | - |
6.8627 | 2100 | 0.0 | - |
7.0261 | 2150 | 0.0 | - |
7.1895 | 2200 | 0.0 | - |
7.3529 | 2250 | 0.0 | - |
7.5163 | 2300 | 0.0 | - |
7.6797 | 2350 | 0.0 | - |
7.8431 | 2400 | 0.0 | - |
8.0065 | 2450 | 0.0 | - |
8.1699 | 2500 | 0.0 | - |
8.3333 | 2550 | 0.0 | - |
8.4967 | 2600 | 0.0 | - |
8.6601 | 2650 | 0.0 | - |
8.8235 | 2700 | 0.0 | - |
8.9869 | 2750 | 0.0 | - |
9.1503 | 2800 | 0.0 | - |
9.3137 | 2850 | 0.0 | - |
9.4771 | 2900 | 0.0 | - |
9.6405 | 2950 | 0.0 | - |
9.8039 | 3000 | 0.0 | - |
9.9673 | 3050 | 0.0 | - |
10.1307 | 3100 | 0.0 | - |
10.2941 | 3150 | 0.0 | - |
10.4575 | 3200 | 0.0 | - |
10.6209 | 3250 | 0.0 | - |
10.7843 | 3300 | 0.0 | - |
10.9477 | 3350 | 0.0 | - |
11.1111 | 3400 | 0.0 | - |
11.2745 | 3450 | 0.0 | - |
11.4379 | 3500 | 0.0 | - |
11.6013 | 3550 | 0.0 | - |
11.7647 | 3600 | 0.0 | - |
11.9281 | 3650 | 0.0 | - |
12.0915 | 3700 | 0.0 | - |
12.2549 | 3750 | 0.0 | - |
12.4183 | 3800 | 0.0 | - |
12.5817 | 3850 | 0.0 | - |
12.7451 | 3900 | 0.0 | - |
12.9085 | 3950 | 0.0 | - |
13.0719 | 4000 | 0.0 | - |
13.2353 | 4050 | 0.0 | - |
13.3987 | 4100 | 0.0 | - |
13.5621 | 4150 | 0.0 | - |
13.7255 | 4200 | 0.0 | - |
13.8889 | 4250 | 0.0 | - |
14.0523 | 4300 | 0.0 | - |
14.2157 | 4350 | 0.0 | - |
14.3791 | 4400 | 0.0 | - |
14.5425 | 4450 | 0.0001 | - |
14.7059 | 4500 | 0.0001 | - |
14.8693 | 4550 | 0.0 | - |
15.0327 | 4600 | 0.0 | - |
15.1961 | 4650 | 0.0 | - |
15.3595 | 4700 | 0.0 | - |
15.5229 | 4750 | 0.0 | - |
15.6863 | 4800 | 0.0001 | - |
15.8497 | 4850 | 0.0 | - |
16.0131 | 4900 | 0.0 | - |
16.1765 | 4950 | 0.0 | - |
16.3399 | 5000 | 0.0 | - |
16.5033 | 5050 | 0.0 | - |
16.6667 | 5100 | 0.0 | - |
16.8301 | 5150 | 0.0 | - |
16.9935 | 5200 | 0.0 | - |
17.1569 | 5250 | 0.0 | - |
17.3203 | 5300 | 0.0 | - |
17.4837 | 5350 | 0.0 | - |
17.6471 | 5400 | 0.0 | - |
17.8105 | 5450 | 0.0 | - |
17.9739 | 5500 | 0.0 | - |
18.1373 | 5550 | 0.0 | - |
18.3007 | 5600 | 0.0 | - |
18.4641 | 5650 | 0.0 | - |
18.6275 | 5700 | 0.0 | - |
18.7908 | 5750 | 0.0 | - |
18.9542 | 5800 | 0.0 | - |
19.1176 | 5850 | 0.0 | - |
19.2810 | 5900 | 0.0 | - |
19.4444 | 5950 | 0.0 | - |
19.6078 | 6000 | 0.0 | - |
19.7712 | 6050 | 0.0 | - |
19.9346 | 6100 | 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}
}
- Downloads last month
- 2
Inference Providers
NEW
This model is not currently available via any of the supported third-party Inference Providers, and
the model is not deployed on the HF Inference API.
Model tree for mini1013/master_cate_top_fd0
Base model
klue/roberta-base