metadata
tags:
- setfit
- sentence-transformers
- text-classification
- generated_from_setfit_trainer
widget:
- text: >-
[매일유업]요미요미 유기농 쌀떡뻥 시금치와브로콜리30g 한팩골라담기 쌀과자 초록1단계(6개월 이후) 25g 출산/육아 > 아기간식 >
유아과자
- text: 팔도 뽀로로 밀크맛 235ml 1개입 대페트_칠성 제로 사이다 1.5L 12개입 출산/육아 > 아기간식 > 유아음료
- text: '[맛있는풍경] 유기농 쌀스틱 떡뻥 요거트볼 유아과자 어린이간식 11. 유기농 요거트 블루베리 출산/육아 > 아기간식 > 유아과자'
- text: 팔도 뽀로로 딸기맛 235ml 12개 팩음료_JARDIN 로얄 헤이즐넛 230ml 20개 출산/육아 > 아기간식 > 유아음료
- text: >-
[베베당] 유기농 아기과자 아이 간식 떡뻥 쌀과자 롱 스틱 팝 요거트 치즈 과일칩 10+3 10. 유기농 현미스틱 브로콜리30g
출산/육아 > 아기간식 > 유아과자
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: 0.9978471474703983
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: 3 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 |
---|---|
2.0 |
|
0.0 |
|
1.0 |
|
Evaluation
Metrics
Label | Accuracy |
---|---|
all | 0.9978 |
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_bc12")
# Run inference
preds = model("팔도 뽀로로 밀크맛 235ml 1개입 대페트_칠성 제로 사이다 1.5L 12개입 출산/육아 > 아기간식 > 유아음료")
Training Details
Training Set Metrics
Training set | Min | Median | Max |
---|---|---|---|
Word count | 7 | 15.3381 | 37 |
Label | Training Sample Count |
---|---|
0.0 | 70 |
1.0 | 70 |
2.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.0238 | 1 | 0.4944 | - |
1.1905 | 50 | 0.4153 | - |
2.3810 | 100 | 0.1469 | - |
3.5714 | 150 | 0.0014 | - |
4.7619 | 200 | 0.0001 | - |
5.9524 | 250 | 0.0001 | - |
7.1429 | 300 | 0.0001 | - |
8.3333 | 350 | 0.0 | - |
9.5238 | 400 | 0.0 | - |
10.7143 | 450 | 0.0 | - |
11.9048 | 500 | 0.0 | - |
13.0952 | 550 | 0.0 | - |
14.2857 | 600 | 0.0 | - |
15.4762 | 650 | 0.0 | - |
16.6667 | 700 | 0.0 | - |
17.8571 | 750 | 0.0 | - |
19.0476 | 800 | 0.0 | - |
20.2381 | 850 | 0.0 | - |
21.4286 | 900 | 0.0 | - |
22.6190 | 950 | 0.0 | - |
23.8095 | 1000 | 0.0 | - |
25.0 | 1050 | 0.0 | - |
26.1905 | 1100 | 0.0 | - |
27.3810 | 1150 | 0.0 | - |
28.5714 | 1200 | 0.0 | - |
29.7619 | 1250 | 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}
}