metadata
tags:
- setfit
- sentence-transformers
- text-classification
- generated_from_setfit_trainer
widget:
- text: 생활원사 수비용 야구장갑 스포츠/레저>야구>야구장갑
- text: 야구 타석 매트 피칭 발판 잔디 맞춤 마운드 스포츠/레저>야구>기타야구용품
- text: 수구 헬멧 수구모 귀 보호 모자 훈련 대회 수중 하키 특수 경기 스포츠/레저>야구>헬멧
- text: MLB 2023 샌디에이고 파드리스 홈 어웨이 김하성 마킹 외 선수 유니폼 져지 스포츠/레저>야구>야구의류
- text: 롤링스 마하 포수 헬멧 야구 시니어 7 1 8인치 3 4인치 다크 그린 스포츠/레저>야구>포수장비
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: 12 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 |
|
| 0.0 |
|
| 7.0 |
|
| 4.0 |
|
| 3.0 |
|
| 8.0 |
|
| 6.0 |
|
| 10.0 |
|
| 5.0 |
|
| 2.0 |
|
| 9.0 |
|
| 11.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_sl22")
# Run inference
preds = model("생활원사 수비용 야구장갑 스포츠/레저>야구>야구장갑")
Training Details
Training Set Metrics
| Training set | Min | Median | Max |
|---|---|---|---|
| Word count | 2 | 8.3993 | 20 |
| Label | Training Sample Count |
|---|---|
| 0.0 | 70 |
| 1.0 | 70 |
| 2.0 | 69 |
| 3.0 | 70 |
| 4.0 | 70 |
| 5.0 | 70 |
| 6.0 | 70 |
| 7.0 | 70 |
| 8.0 | 70 |
| 9.0 | 70 |
| 10.0 | 70 |
| 11.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.0061 | 1 | 0.4871 | - |
| 0.3049 | 50 | 0.4978 | - |
| 0.6098 | 100 | 0.4027 | - |
| 0.9146 | 150 | 0.1531 | - |
| 1.2195 | 200 | 0.0774 | - |
| 1.5244 | 250 | 0.0346 | - |
| 1.8293 | 300 | 0.0227 | - |
| 2.1341 | 350 | 0.0138 | - |
| 2.4390 | 400 | 0.0031 | - |
| 2.7439 | 450 | 0.0004 | - |
| 3.0488 | 500 | 0.0003 | - |
| 3.3537 | 550 | 0.0002 | - |
| 3.6585 | 600 | 0.0002 | - |
| 3.9634 | 650 | 0.0001 | - |
| 4.2683 | 700 | 0.0001 | - |
| 4.5732 | 750 | 0.0001 | - |
| 4.8780 | 800 | 0.0001 | - |
| 5.1829 | 850 | 0.0001 | - |
| 5.4878 | 900 | 0.0001 | - |
| 5.7927 | 950 | 0.0001 | - |
| 6.0976 | 1000 | 0.0001 | - |
| 6.4024 | 1050 | 0.0001 | - |
| 6.7073 | 1100 | 0.0001 | - |
| 7.0122 | 1150 | 0.0001 | - |
| 7.3171 | 1200 | 0.0001 | - |
| 7.6220 | 1250 | 0.0001 | - |
| 7.9268 | 1300 | 0.0 | - |
| 8.2317 | 1350 | 0.0 | - |
| 8.5366 | 1400 | 0.0 | - |
| 8.8415 | 1450 | 0.0 | - |
| 9.1463 | 1500 | 0.0 | - |
| 9.4512 | 1550 | 0.0 | - |
| 9.7561 | 1600 | 0.0 | - |
| 10.0610 | 1650 | 0.0 | - |
| 10.3659 | 1700 | 0.0 | - |
| 10.6707 | 1750 | 0.0 | - |
| 10.9756 | 1800 | 0.0 | - |
| 11.2805 | 1850 | 0.0 | - |
| 11.5854 | 1900 | 0.0 | - |
| 11.8902 | 1950 | 0.0 | - |
| 12.1951 | 2000 | 0.0 | - |
| 12.5 | 2050 | 0.0 | - |
| 12.8049 | 2100 | 0.0001 | - |
| 13.1098 | 2150 | 0.0001 | - |
| 13.4146 | 2200 | 0.0 | - |
| 13.7195 | 2250 | 0.0 | - |
| 14.0244 | 2300 | 0.0 | - |
| 14.3293 | 2350 | 0.0 | - |
| 14.6341 | 2400 | 0.0 | - |
| 14.9390 | 2450 | 0.0 | - |
| 15.2439 | 2500 | 0.0 | - |
| 15.5488 | 2550 | 0.0 | - |
| 15.8537 | 2600 | 0.0 | - |
| 16.1585 | 2650 | 0.0 | - |
| 16.4634 | 2700 | 0.0 | - |
| 16.7683 | 2750 | 0.0 | - |
| 17.0732 | 2800 | 0.0 | - |
| 17.3780 | 2850 | 0.0 | - |
| 17.6829 | 2900 | 0.0 | - |
| 17.9878 | 2950 | 0.0 | - |
| 18.2927 | 3000 | 0.0 | - |
| 18.5976 | 3050 | 0.0 | - |
| 18.9024 | 3100 | 0.0 | - |
| 19.2073 | 3150 | 0.0001 | - |
| 19.5122 | 3200 | 0.0 | - |
| 19.8171 | 3250 | 0.0 | - |
| 20.1220 | 3300 | 0.0 | - |
| 20.4268 | 3350 | 0.0 | - |
| 20.7317 | 3400 | 0.0 | - |
| 21.0366 | 3450 | 0.0 | - |
| 21.3415 | 3500 | 0.0 | - |
| 21.6463 | 3550 | 0.0 | - |
| 21.9512 | 3600 | 0.0 | - |
| 22.2561 | 3650 | 0.0 | - |
| 22.5610 | 3700 | 0.0 | - |
| 22.8659 | 3750 | 0.0 | - |
| 23.1707 | 3800 | 0.0 | - |
| 23.4756 | 3850 | 0.0 | - |
| 23.7805 | 3900 | 0.0 | - |
| 24.0854 | 3950 | 0.0 | - |
| 24.3902 | 4000 | 0.0 | - |
| 24.6951 | 4050 | 0.0 | - |
| 25.0 | 4100 | 0.0 | - |
| 25.3049 | 4150 | 0.0 | - |
| 25.6098 | 4200 | 0.0 | - |
| 25.9146 | 4250 | 0.0 | - |
| 26.2195 | 4300 | 0.0 | - |
| 26.5244 | 4350 | 0.0 | - |
| 26.8293 | 4400 | 0.0 | - |
| 27.1341 | 4450 | 0.0 | - |
| 27.4390 | 4500 | 0.0 | - |
| 27.7439 | 4550 | 0.0 | - |
| 28.0488 | 4600 | 0.0 | - |
| 28.3537 | 4650 | 0.0 | - |
| 28.6585 | 4700 | 0.0 | - |
| 28.9634 | 4750 | 0.0 | - |
| 29.2683 | 4800 | 0.0 | - |
| 29.5732 | 4850 | 0.0 | - |
| 29.8780 | 4900 | 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}
}