metadata
base_model: mini1013/master_domain
library_name: setfit
metrics:
- metric
pipeline_tag: text-classification
tags:
- setfit
- sentence-transformers
- text-classification
- generated_from_setfit_trainer
widget:
- text: 오뚜기 옛날 쇠고기죽 85g (주) 식자재민족
- text: 오뚜기 맛있는 오뚜기밥 210g x 3개입 (주)푸드엔
- text: 햇반소프트밀 비비고 소고기죽 420g 외 35종 소프트밀 누룽지닭백숙 420g 다여기
- text: 오뚜기 전복죽 용기 285g/즉석죽/간편식 스프-보노_VONO 콘스프 55.8g 모두유통주식회사
- text: 꼴떡꼴떡 자체생산 학교앞 밀떡볶이 어묵포함 밀키트 2인분 일반떡2봉+어묵2봉+소스2봉_까르보나라 맛있는꼴떡꼴떡
inference: true
model-index:
- name: SetFit with mini1013/master_domain
results:
- task:
type: text-classification
name: Text Classification
dataset:
name: Unknown
type: unknown
split: test
metrics:
- type: metric
value: 0.867680979418027
name: Metric
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: 21 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 |
---|---|
15.0 |
|
5.0 |
|
7.0 |
|
10.0 |
|
3.0 |
|
0.0 |
|
16.0 |
|
4.0 |
|
20.0 |
|
11.0 |
|
17.0 |
|
18.0 |
|
2.0 |
|
19.0 |
|
14.0 |
|
12.0 |
|
13.0 |
|
6.0 |
|
9.0 |
|
1.0 |
|
8.0 |
|
Evaluation
Metrics
Label | Metric |
---|---|
all | 0.8677 |
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_fd4")
# Run inference
preds = model("오뚜기 옛날 쇠고기죽 85g (주) 식자재민족")
Training Details
Training Set Metrics
Training set | Min | Median | Max |
---|---|---|---|
Word count | 3 | 9.5276 | 26 |
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 |
Training Hyperparameters
- batch_size: (512, 512)
- num_epochs: (20, 20)
- max_steps: -1
- sampling_strategy: oversampling
- num_iterations: 40
- 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.0061 | 1 | 0.4265 | - |
0.3030 | 50 | 0.3323 | - |
0.6061 | 100 | 0.234 | - |
0.9091 | 150 | 0.1134 | - |
1.2121 | 200 | 0.0641 | - |
1.5152 | 250 | 0.0509 | - |
1.8182 | 300 | 0.0435 | - |
2.1212 | 350 | 0.0309 | - |
2.4242 | 400 | 0.0191 | - |
2.7273 | 450 | 0.0163 | - |
3.0303 | 500 | 0.0215 | - |
3.3333 | 550 | 0.0161 | - |
3.6364 | 600 | 0.024 | - |
3.9394 | 650 | 0.006 | - |
4.2424 | 700 | 0.0116 | - |
4.5455 | 750 | 0.0061 | - |
4.8485 | 800 | 0.0025 | - |
5.1515 | 850 | 0.001 | - |
5.4545 | 900 | 0.0003 | - |
5.7576 | 950 | 0.0002 | - |
6.0606 | 1000 | 0.0002 | - |
6.3636 | 1050 | 0.0001 | - |
6.6667 | 1100 | 0.0002 | - |
6.9697 | 1150 | 0.0002 | - |
7.2727 | 1200 | 0.0001 | - |
7.5758 | 1250 | 0.0001 | - |
7.8788 | 1300 | 0.0001 | - |
8.1818 | 1350 | 0.0001 | - |
8.4848 | 1400 | 0.0001 | - |
8.7879 | 1450 | 0.0001 | - |
9.0909 | 1500 | 0.0001 | - |
9.3939 | 1550 | 0.0001 | - |
9.6970 | 1600 | 0.0001 | - |
10.0 | 1650 | 0.0001 | - |
10.3030 | 1700 | 0.0001 | - |
10.6061 | 1750 | 0.0001 | - |
10.9091 | 1800 | 0.0001 | - |
11.2121 | 1850 | 0.0001 | - |
11.5152 | 1900 | 0.0001 | - |
11.8182 | 1950 | 0.0001 | - |
12.1212 | 2000 | 0.0001 | - |
12.4242 | 2050 | 0.0001 | - |
12.7273 | 2100 | 0.0001 | - |
13.0303 | 2150 | 0.0001 | - |
13.3333 | 2200 | 0.0001 | - |
13.6364 | 2250 | 0.0001 | - |
13.9394 | 2300 | 0.0001 | - |
14.2424 | 2350 | 0.0 | - |
14.5455 | 2400 | 0.0 | - |
14.8485 | 2450 | 0.0001 | - |
15.1515 | 2500 | 0.0 | - |
15.4545 | 2550 | 0.0001 | - |
15.7576 | 2600 | 0.0 | - |
16.0606 | 2650 | 0.0 | - |
16.3636 | 2700 | 0.0001 | - |
16.6667 | 2750 | 0.0001 | - |
16.9697 | 2800 | 0.0001 | - |
17.2727 | 2850 | 0.0001 | - |
17.5758 | 2900 | 0.0001 | - |
17.8788 | 2950 | 0.0001 | - |
18.1818 | 3000 | 0.0 | - |
18.4848 | 3050 | 0.0 | - |
18.7879 | 3100 | 0.0001 | - |
19.0909 | 3150 | 0.0 | - |
19.3939 | 3200 | 0.0001 | - |
19.6970 | 3250 | 0.0 | - |
20.0 | 3300 | 0.0 | - |
Framework Versions
- Python: 3.10.12
- SetFit: 1.1.0.dev0
- Sentence Transformers: 3.1.1
- Transformers: 4.46.1
- PyTorch: 2.4.0+cu121
- Datasets: 2.20.0
- Tokenizers: 0.20.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}
}