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: >-
전기 스팀해빙기 수도 배관 동파방지 고온 공구 스팀 고성능 고압 2500W 디지털 7점 세트 2500W 산업용 온도조절 7종
세트+수납함 하니빌리지
- text: 스텐 나사못 목재 피스 목공 철판 나사 직결 와샤머리 4-13(25개) 11. 스텐 트라스머리 볼트_M5-40 (5개) 리더화스너
- text: >-
안전봉투 택배 포장 뽁뽁이 0호 100X100+40 10매 소량 주황 [비접착] 투명 에어캡 봉투 - 0.2T_18호 250x350
10매 주식회사 이고다(IGODA CO. ,Ltd.)
- text: 토네이도 다이아몬드 융착코어비트 폴리싱 대리석 천공 TQ5 57_TTC 17 주식회사 투엑스
- text: 킹토니 핸드소켓 복스알 233504M 2. 롱핸드소켓(육각)_2-21 323513M 3/8x13mm 제로나인
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.6113686482182797
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: 19 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 |
---|---|
1.0 |
|
18.0 |
|
5.0 |
|
4.0 |
|
14.0 |
|
8.0 |
|
0.0 |
|
6.0 |
|
12.0 |
|
11.0 |
|
2.0 |
|
15.0 |
|
16.0 |
|
3.0 |
|
7.0 |
|
17.0 |
|
9.0 |
|
10.0 |
|
13.0 |
|
Evaluation
Metrics
Label | Metric |
---|---|
all | 0.6114 |
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_lh2")
# Run inference
preds = model("토네이도 다이아몬드 융착코어비트 폴리싱 대리석 천공 TQ5 57_TTC 17 주식회사 투엑스")
Training Details
Training Set Metrics
Training set | Min | Median | Max |
---|---|---|---|
Word count | 3 | 10.7474 | 27 |
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 |
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.0067 | 1 | 0.3954 | - |
0.3356 | 50 | 0.3839 | - |
0.6711 | 100 | 0.2913 | - |
1.0067 | 150 | 0.2101 | - |
1.3423 | 200 | 0.1066 | - |
1.6779 | 250 | 0.0475 | - |
2.0134 | 300 | 0.0342 | - |
2.3490 | 350 | 0.0274 | - |
2.6846 | 400 | 0.028 | - |
3.0201 | 450 | 0.029 | - |
3.3557 | 500 | 0.0291 | - |
3.6913 | 550 | 0.0258 | - |
4.0268 | 600 | 0.0202 | - |
4.3624 | 650 | 0.0085 | - |
4.6980 | 700 | 0.0124 | - |
5.0336 | 750 | 0.0039 | - |
5.3691 | 800 | 0.0089 | - |
5.7047 | 850 | 0.0063 | - |
6.0403 | 900 | 0.0034 | - |
6.3758 | 950 | 0.0046 | - |
6.7114 | 1000 | 0.008 | - |
7.0470 | 1050 | 0.0048 | - |
7.3826 | 1100 | 0.0028 | - |
7.7181 | 1150 | 0.0042 | - |
8.0537 | 1200 | 0.0019 | - |
8.3893 | 1250 | 0.0008 | - |
8.7248 | 1300 | 0.0004 | - |
9.0604 | 1350 | 0.0003 | - |
9.3960 | 1400 | 0.0003 | - |
9.7315 | 1450 | 0.0002 | - |
10.0671 | 1500 | 0.0003 | - |
10.4027 | 1550 | 0.0002 | - |
10.7383 | 1600 | 0.0001 | - |
11.0738 | 1650 | 0.0002 | - |
11.4094 | 1700 | 0.0001 | - |
11.7450 | 1750 | 0.0001 | - |
12.0805 | 1800 | 0.0001 | - |
12.4161 | 1850 | 0.0001 | - |
12.7517 | 1900 | 0.0001 | - |
13.0872 | 1950 | 0.0001 | - |
13.4228 | 2000 | 0.0001 | - |
13.7584 | 2050 | 0.0001 | - |
14.0940 | 2100 | 0.0001 | - |
14.4295 | 2150 | 0.0001 | - |
14.7651 | 2200 | 0.0001 | - |
15.1007 | 2250 | 0.0001 | - |
15.4362 | 2300 | 0.0001 | - |
15.7718 | 2350 | 0.0001 | - |
16.1074 | 2400 | 0.0001 | - |
16.4430 | 2450 | 0.0001 | - |
16.7785 | 2500 | 0.0001 | - |
17.1141 | 2550 | 0.0001 | - |
17.4497 | 2600 | 0.0001 | - |
17.7852 | 2650 | 0.0001 | - |
18.1208 | 2700 | 0.0001 | - |
18.4564 | 2750 | 0.0001 | - |
18.7919 | 2800 | 0.0001 | - |
19.1275 | 2850 | 0.0001 | - |
19.4631 | 2900 | 0.0001 | - |
19.7987 | 2950 | 0.0001 | - |
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}
}