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: '[리바이스](강남점) 남성 511 슬림 스트레치 데님 팬츠(04511-4655) 29(74) 신세계백화점'
- text: '[헤지스 남성] HZPA2D344N2 네이비 단색 면혼방 일자핏팬츠 82 (32) '
- text: 남성 나일론 고프코어 쇼츠 그레이 (263525EY23) 회색(앤틱실버)_L (주)아이엔에프아이엑스
- text: 멜빵바지 데님 점프수트 코디 남성 스트릿패션 M_블랙 설현닷컴
- text: 뱅뱅 남성 23FW 라이크라 본딩 데님팬츠 3종 남성/캐주얼(하의)_38 NS홈쇼핑
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.7622648207312744
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: 17 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 |
|
4.0 |
|
15.0 |
|
9.0 |
|
11.0 |
|
3.0 |
|
8.0 |
|
7.0 |
|
6.0 |
|
14.0 |
|
2.0 |
|
13.0 |
|
16.0 |
|
10.0 |
|
0.0 |
|
5.0 |
|
12.0 |
|
Evaluation
Metrics
Label | Metric |
---|---|
all | 0.7623 |
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_ap1")
# Run inference
preds = model("멜빵바지 데님 점프수트 코디 남성 스트릿패션 M_블랙 설현닷컴")
Training Details
Training Set Metrics
Training set | Min | Median | Max |
---|---|---|---|
Word count | 3 | 9.8578 | 23 |
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 | 9 |
13.0 | 50 |
14.0 | 50 |
15.0 | 50 |
16.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.0079 | 1 | 0.448 | - |
0.3937 | 50 | 0.3099 | - |
0.7874 | 100 | 0.1872 | - |
1.1811 | 150 | 0.1141 | - |
1.5748 | 200 | 0.0429 | - |
1.9685 | 250 | 0.0283 | - |
2.3622 | 300 | 0.0134 | - |
2.7559 | 350 | 0.0137 | - |
3.1496 | 400 | 0.0079 | - |
3.5433 | 450 | 0.0087 | - |
3.9370 | 500 | 0.0037 | - |
4.3307 | 550 | 0.0006 | - |
4.7244 | 600 | 0.0006 | - |
5.1181 | 650 | 0.0003 | - |
5.5118 | 700 | 0.0004 | - |
5.9055 | 750 | 0.0003 | - |
6.2992 | 800 | 0.0003 | - |
6.6929 | 850 | 0.0002 | - |
7.0866 | 900 | 0.0002 | - |
7.4803 | 950 | 0.0002 | - |
7.8740 | 1000 | 0.0002 | - |
8.2677 | 1050 | 0.0002 | - |
8.6614 | 1100 | 0.0002 | - |
9.0551 | 1150 | 0.0003 | - |
9.4488 | 1200 | 0.0002 | - |
9.8425 | 1250 | 0.0002 | - |
10.2362 | 1300 | 0.0002 | - |
10.6299 | 1350 | 0.0001 | - |
11.0236 | 1400 | 0.0001 | - |
11.4173 | 1450 | 0.0001 | - |
11.8110 | 1500 | 0.0001 | - |
12.2047 | 1550 | 0.0002 | - |
12.5984 | 1600 | 0.0001 | - |
12.9921 | 1650 | 0.0001 | - |
13.3858 | 1700 | 0.0001 | - |
13.7795 | 1750 | 0.0001 | - |
14.1732 | 1800 | 0.0001 | - |
14.5669 | 1850 | 0.0001 | - |
14.9606 | 1900 | 0.0001 | - |
15.3543 | 1950 | 0.0001 | - |
15.7480 | 2000 | 0.0001 | - |
16.1417 | 2050 | 0.0001 | - |
16.5354 | 2100 | 0.0001 | - |
16.9291 | 2150 | 0.0001 | - |
17.3228 | 2200 | 0.0001 | - |
17.7165 | 2250 | 0.0001 | - |
18.1102 | 2300 | 0.0001 | - |
18.5039 | 2350 | 0.0001 | - |
18.8976 | 2400 | 0.0001 | - |
19.2913 | 2450 | 0.0001 | - |
19.6850 | 2500 | 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}
}