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: 국산 전라도 겉절이 1kg+1kg 열무김치 1kg+1kg 주식회사 하루식품
- text: 해남 황금절임배추 20kg / 노란 항암배추 국내산 김장 김치 해남 황금절임배추 20kg(7~10포기)_11/18(토) 바이곰
- text: '[김권태농부] 옥과 맛있는 김치 배추 포기김치 2kg 김권태 배추포기김치 2kg 목화골 우리농산'
- text: 황금배추로 만든 절임키트 19KG 황금절임키트 19kg_11월 16일 골드바이오스토어
- text: '[마음심은] 겉절이 3kg / 익을수록 시원한 (주)강가의나무'
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.9429298436932024
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: 14 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 |
|
6.0 |
|
11.0 |
|
7.0 | |
2.0 |
|
5.0 |
|
4.0 |
|
9.0 |
|
12.0 |
|
10.0 |
|
13.0 |
|
8.0 |
|
3.0 |
|
0.0 |
|
Evaluation
Metrics
Label | Metric |
---|---|
all | 0.9429 |
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_fd3")
# Run inference
preds = model("[마음심은] 겉절이 3kg / 익을수록 시원한 (주)강가의나무")
Training Details
Training Set Metrics
Training set | Min | Median | Max |
---|---|---|---|
Word count | 4 | 8.1522 | 18 |
Label | Training Sample Count |
---|---|
0.0 | 23 |
1.0 | 50 |
2.0 | 50 |
3.0 | 24 |
4.0 | 31 |
5.0 | 50 |
6.0 | 50 |
7.0 | 40 |
8.0 | 23 |
9.0 | 32 |
10.0 | 50 |
11.0 | 50 |
12.0 | 29 |
13.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.0115 | 1 | 0.4872 | - |
0.5747 | 50 | 0.3163 | - |
1.1494 | 100 | 0.2368 | - |
1.7241 | 150 | 0.1362 | - |
2.2989 | 200 | 0.0482 | - |
2.8736 | 250 | 0.0183 | - |
3.4483 | 300 | 0.0142 | - |
4.0230 | 350 | 0.004 | - |
4.5977 | 400 | 0.0022 | - |
5.1724 | 450 | 0.008 | - |
5.7471 | 500 | 0.0003 | - |
6.3218 | 550 | 0.0004 | - |
6.8966 | 600 | 0.002 | - |
7.4713 | 650 | 0.0004 | - |
8.0460 | 700 | 0.0003 | - |
8.6207 | 750 | 0.0002 | - |
9.1954 | 800 | 0.0002 | - |
9.7701 | 850 | 0.0002 | - |
10.3448 | 900 | 0.0001 | - |
10.9195 | 950 | 0.0001 | - |
11.4943 | 1000 | 0.0001 | - |
12.0690 | 1050 | 0.0001 | - |
12.6437 | 1100 | 0.0001 | - |
13.2184 | 1150 | 0.0001 | - |
13.7931 | 1200 | 0.0001 | - |
14.3678 | 1250 | 0.0001 | - |
14.9425 | 1300 | 0.0001 | - |
15.5172 | 1350 | 0.0001 | - |
16.0920 | 1400 | 0.0001 | - |
16.6667 | 1450 | 0.0001 | - |
17.2414 | 1500 | 0.0001 | - |
17.8161 | 1550 | 0.0001 | - |
18.3908 | 1600 | 0.0001 | - |
18.9655 | 1650 | 0.0001 | - |
19.5402 | 1700 | 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}
}