metadata
tags:
- setfit
- sentence-transformers
- text-classification
- generated_from_setfit_trainer
widget:
- text: Lawrence Frames 로프 디자인 금속 액자 12 7x17 5x7인치 가구/인테리어>인테리어소품>액자>벽걸이액자
- text: 아트박스 미드나인 무선 터치 테이블 스탠드 LED 무드등 가구/인테리어>인테리어소품>스탠드>단스탠드
- text: 인공 분수 분수대 소형 사무실 인테리어 재물 인테리어 선물 카운터 식당 가구/인테리어>인테리어소품>인테리어분수
- text: 구리 향 버너 아로마 테라피 향홀더 다도 향받침 가구/인테리어>인테리어소품>아로마/캔들용품>아로마램프/오일
- text: 솜인형 만들기 DIY 키트 25색상 자수실 세트 인형 원단 멜로디클로젯 가구/인테리어>인테리어소품>장식인형
metrics:
- accuracy
pipeline_tag: text-classification
library_name: setfit
inference: true
base_model: mini1013/master_domain
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: accuracy
value: 1
name: Accuracy
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: 23 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 |
|---|---|
| 16.0 |
|
| 18.0 |
|
| 1.0 |
|
| 0.0 |
|
| 12.0 |
|
| 22.0 |
|
| 20.0 |
|
| 8.0 |
|
| 17.0 |
|
| 7.0 |
|
| 15.0 |
|
| 6.0 |
|
| 2.0 |
|
| 19.0 |
|
| 3.0 |
|
| 9.0 |
|
| 10.0 |
|
| 5.0 |
|
| 13.0 |
|
| 11.0 |
|
| 4.0 |
|
| 14.0 |
|
| 21.0 |
|
Evaluation
Metrics
| Label | Accuracy |
|---|---|
| all | 1.0 |
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_fi9")
# Run inference
preds = model("아트박스 미드나인 무선 터치 테이블 스탠드 LED 무드등 가구/인테리어>인테리어소품>스탠드>단스탠드")
Training Details
Training Set Metrics
| Training set | Min | Median | Max |
|---|---|---|---|
| Word count | 2 | 8.8911 | 24 |
| Label | Training Sample Count |
|---|---|
| 0.0 | 70 |
| 1.0 | 70 |
| 2.0 | 70 |
| 3.0 | 70 |
| 4.0 | 40 |
| 5.0 | 70 |
| 6.0 | 70 |
| 7.0 | 70 |
| 8.0 | 70 |
| 9.0 | 70 |
| 10.0 | 70 |
| 11.0 | 70 |
| 12.0 | 70 |
| 13.0 | 70 |
| 14.0 | 70 |
| 15.0 | 70 |
| 16.0 | 70 |
| 17.0 | 69 |
| 18.0 | 70 |
| 19.0 | 70 |
| 20.0 | 70 |
| 21.0 | 6 |
| 22.0 | 70 |
Training Hyperparameters
- batch_size: (256, 256)
- num_epochs: (30, 30)
- 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.0034 | 1 | 0.499 | - |
| 0.1689 | 50 | 0.5015 | - |
| 0.3378 | 100 | 0.4948 | - |
| 0.5068 | 150 | 0.3422 | - |
| 0.6757 | 200 | 0.1868 | - |
| 0.8446 | 250 | 0.0753 | - |
| 1.0135 | 300 | 0.0407 | - |
| 1.1824 | 350 | 0.0242 | - |
| 1.3514 | 400 | 0.0127 | - |
| 1.5203 | 450 | 0.0087 | - |
| 1.6892 | 500 | 0.0071 | - |
| 1.8581 | 550 | 0.0029 | - |
| 2.0270 | 600 | 0.0008 | - |
| 2.1959 | 650 | 0.0004 | - |
| 2.3649 | 700 | 0.0004 | - |
| 2.5338 | 750 | 0.0003 | - |
| 2.7027 | 800 | 0.0002 | - |
| 2.8716 | 850 | 0.0002 | - |
| 3.0405 | 900 | 0.0002 | - |
| 3.2095 | 950 | 0.0002 | - |
| 3.3784 | 1000 | 0.0001 | - |
| 3.5473 | 1050 | 0.0001 | - |
| 3.7162 | 1100 | 0.0001 | - |
| 3.8851 | 1150 | 0.0001 | - |
| 4.0541 | 1200 | 0.0001 | - |
| 4.2230 | 1250 | 0.0001 | - |
| 4.3919 | 1300 | 0.0001 | - |
| 4.5608 | 1350 | 0.0001 | - |
| 4.7297 | 1400 | 0.0001 | - |
| 4.8986 | 1450 | 0.0001 | - |
| 5.0676 | 1500 | 0.0001 | - |
| 5.2365 | 1550 | 0.0001 | - |
| 5.4054 | 1600 | 0.0001 | - |
| 5.5743 | 1650 | 0.0001 | - |
| 5.7432 | 1700 | 0.0 | - |
| 5.9122 | 1750 | 0.0 | - |
| 6.0811 | 1800 | 0.0 | - |
| 6.25 | 1850 | 0.0 | - |
| 6.4189 | 1900 | 0.0 | - |
| 6.5878 | 1950 | 0.0 | - |
| 6.7568 | 2000 | 0.0 | - |
| 6.9257 | 2050 | 0.0 | - |
| 7.0946 | 2100 | 0.0 | - |
| 7.2635 | 2150 | 0.0 | - |
| 7.4324 | 2200 | 0.0 | - |
| 7.6014 | 2250 | 0.0 | - |
| 7.7703 | 2300 | 0.0 | - |
| 7.9392 | 2350 | 0.0 | - |
| 8.1081 | 2400 | 0.0 | - |
| 8.2770 | 2450 | 0.0 | - |
| 8.4459 | 2500 | 0.0 | - |
| 8.6149 | 2550 | 0.0 | - |
| 8.7838 | 2600 | 0.0 | - |
| 8.9527 | 2650 | 0.0 | - |
| 9.1216 | 2700 | 0.0001 | - |
| 9.2905 | 2750 | 0.0 | - |
| 9.4595 | 2800 | 0.0 | - |
| 9.6284 | 2850 | 0.0 | - |
| 9.7973 | 2900 | 0.0 | - |
| 9.9662 | 2950 | 0.0 | - |
| 10.1351 | 3000 | 0.0 | - |
| 10.3041 | 3050 | 0.0 | - |
| 10.4730 | 3100 | 0.0 | - |
| 10.6419 | 3150 | 0.0 | - |
| 10.8108 | 3200 | 0.0 | - |
| 10.9797 | 3250 | 0.0 | - |
| 11.1486 | 3300 | 0.0 | - |
| 11.3176 | 3350 | 0.0 | - |
| 11.4865 | 3400 | 0.0 | - |
| 11.6554 | 3450 | 0.0 | - |
| 11.8243 | 3500 | 0.0 | - |
| 11.9932 | 3550 | 0.0 | - |
| 12.1622 | 3600 | 0.0 | - |
| 12.3311 | 3650 | 0.0 | - |
| 12.5 | 3700 | 0.0 | - |
| 12.6689 | 3750 | 0.0 | - |
| 12.8378 | 3800 | 0.0 | - |
| 13.0068 | 3850 | 0.0 | - |
| 13.1757 | 3900 | 0.0 | - |
| 13.3446 | 3950 | 0.0 | - |
| 13.5135 | 4000 | 0.0 | - |
| 13.6824 | 4050 | 0.0 | - |
| 13.8514 | 4100 | 0.0 | - |
| 14.0203 | 4150 | 0.0 | - |
| 14.1892 | 4200 | 0.0 | - |
| 14.3581 | 4250 | 0.0 | - |
| 14.5270 | 4300 | 0.0 | - |
| 14.6959 | 4350 | 0.0 | - |
| 14.8649 | 4400 | 0.0 | - |
| 15.0338 | 4450 | 0.0 | - |
| 15.2027 | 4500 | 0.0 | - |
| 15.3716 | 4550 | 0.0 | - |
| 15.5405 | 4600 | 0.0 | - |
| 15.7095 | 4650 | 0.0 | - |
| 15.8784 | 4700 | 0.0 | - |
| 16.0473 | 4750 | 0.0 | - |
| 16.2162 | 4800 | 0.0 | - |
| 16.3851 | 4850 | 0.0 | - |
| 16.5541 | 4900 | 0.0 | - |
| 16.7230 | 4950 | 0.0 | - |
| 16.8919 | 5000 | 0.0 | - |
| 17.0608 | 5050 | 0.0 | - |
| 17.2297 | 5100 | 0.0 | - |
| 17.3986 | 5150 | 0.0 | - |
| 17.5676 | 5200 | 0.0 | - |
| 17.7365 | 5250 | 0.0 | - |
| 17.9054 | 5300 | 0.0 | - |
| 18.0743 | 5350 | 0.0 | - |
| 18.2432 | 5400 | 0.0 | - |
| 18.4122 | 5450 | 0.0 | - |
| 18.5811 | 5500 | 0.0 | - |
| 18.75 | 5550 | 0.0 | - |
| 18.9189 | 5600 | 0.0 | - |
| 19.0878 | 5650 | 0.0 | - |
| 19.2568 | 5700 | 0.0 | - |
| 19.4257 | 5750 | 0.0 | - |
| 19.5946 | 5800 | 0.0 | - |
| 19.7635 | 5850 | 0.0 | - |
| 19.9324 | 5900 | 0.0 | - |
| 20.1014 | 5950 | 0.0 | - |
| 20.2703 | 6000 | 0.0 | - |
| 20.4392 | 6050 | 0.0 | - |
| 20.6081 | 6100 | 0.0 | - |
| 20.7770 | 6150 | 0.0 | - |
| 20.9459 | 6200 | 0.0 | - |
| 21.1149 | 6250 | 0.0 | - |
| 21.2838 | 6300 | 0.0 | - |
| 21.4527 | 6350 | 0.0 | - |
| 21.6216 | 6400 | 0.0 | - |
| 21.7905 | 6450 | 0.0 | - |
| 21.9595 | 6500 | 0.0 | - |
| 22.1284 | 6550 | 0.0 | - |
| 22.2973 | 6600 | 0.0 | - |
| 22.4662 | 6650 | 0.0 | - |
| 22.6351 | 6700 | 0.0 | - |
| 22.8041 | 6750 | 0.0 | - |
| 22.9730 | 6800 | 0.0 | - |
| 23.1419 | 6850 | 0.0 | - |
| 23.3108 | 6900 | 0.0 | - |
| 23.4797 | 6950 | 0.0 | - |
| 23.6486 | 7000 | 0.0 | - |
| 23.8176 | 7050 | 0.0 | - |
| 23.9865 | 7100 | 0.0 | - |
| 24.1554 | 7150 | 0.0 | - |
| 24.3243 | 7200 | 0.0 | - |
| 24.4932 | 7250 | 0.0 | - |
| 24.6622 | 7300 | 0.0 | - |
| 24.8311 | 7350 | 0.0 | - |
| 25.0 | 7400 | 0.0 | - |
| 25.1689 | 7450 | 0.0 | - |
| 25.3378 | 7500 | 0.0 | - |
| 25.5068 | 7550 | 0.0 | - |
| 25.6757 | 7600 | 0.0 | - |
| 25.8446 | 7650 | 0.0 | - |
| 26.0135 | 7700 | 0.0 | - |
| 26.1824 | 7750 | 0.0 | - |
| 26.3514 | 7800 | 0.0 | - |
| 26.5203 | 7850 | 0.0 | - |
| 26.6892 | 7900 | 0.0 | - |
| 26.8581 | 7950 | 0.0 | - |
| 27.0270 | 8000 | 0.0 | - |
| 27.1959 | 8050 | 0.0 | - |
| 27.3649 | 8100 | 0.0 | - |
| 27.5338 | 8150 | 0.0 | - |
| 27.7027 | 8200 | 0.0 | - |
| 27.8716 | 8250 | 0.0 | - |
| 28.0405 | 8300 | 0.0 | - |
| 28.2095 | 8350 | 0.0 | - |
| 28.3784 | 8400 | 0.0 | - |
| 28.5473 | 8450 | 0.0 | - |
| 28.7162 | 8500 | 0.0 | - |
| 28.8851 | 8550 | 0.0 | - |
| 29.0541 | 8600 | 0.0 | - |
| 29.2230 | 8650 | 0.0 | - |
| 29.3919 | 8700 | 0.0 | - |
| 29.5608 | 8750 | 0.0 | - |
| 29.7297 | 8800 | 0.0 | - |
| 29.8986 | 8850 | 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}
}