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: 13 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 |
---|---|
4.0 |
|
3.0 |
|
6.0 |
|
0.0 |
|
2.0 |
|
10.0 |
|
12.0 |
|
1.0 |
|
9.0 |
|
11.0 |
|
5.0 |
|
7.0 |
|
8.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_sl13")
# Run inference
preds = model("태권도 헤드기어 호구 헬멧 보호장비 킥복싱 스포츠/레저>보호용품>머리보호대")
Training Details
Training Set Metrics
Training set | Min | Median | Max |
---|---|---|---|
Word count | 2 | 9.0551 | 21 |
Label | Training Sample Count |
---|---|
0.0 | 70 |
1.0 | 69 |
2.0 | 70 |
3.0 | 70 |
4.0 | 69 |
5.0 | 70 |
6.0 | 70 |
7.0 | 70 |
8.0 | 70 |
9.0 | 69 |
10.0 | 70 |
11.0 | 70 |
12.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.0056 | 1 | 0.5164 | - |
0.2809 | 50 | 0.4982 | - |
0.5618 | 100 | 0.3968 | - |
0.8427 | 150 | 0.2131 | - |
1.1236 | 200 | 0.0919 | - |
1.4045 | 250 | 0.031 | - |
1.6854 | 300 | 0.0171 | - |
1.9663 | 350 | 0.0078 | - |
2.2472 | 400 | 0.0066 | - |
2.5281 | 450 | 0.0002 | - |
2.8090 | 500 | 0.0 | - |
3.0899 | 550 | 0.0 | - |
3.3708 | 600 | 0.0001 | - |
3.6517 | 650 | 0.0 | - |
3.9326 | 700 | 0.0 | - |
4.2135 | 750 | 0.0 | - |
4.4944 | 800 | 0.0001 | - |
4.7753 | 850 | 0.0 | - |
5.0562 | 900 | 0.0 | - |
5.3371 | 950 | 0.0 | - |
5.6180 | 1000 | 0.0 | - |
5.8989 | 1050 | 0.0002 | - |
6.1798 | 1100 | 0.0 | - |
6.4607 | 1150 | 0.0 | - |
6.7416 | 1200 | 0.0 | - |
7.0225 | 1250 | 0.0 | - |
7.3034 | 1300 | 0.0 | - |
7.5843 | 1350 | 0.0 | - |
7.8652 | 1400 | 0.0 | - |
8.1461 | 1450 | 0.0 | - |
8.4270 | 1500 | 0.0 | - |
8.7079 | 1550 | 0.0 | - |
8.9888 | 1600 | 0.0 | - |
9.2697 | 1650 | 0.0 | - |
9.5506 | 1700 | 0.0 | - |
9.8315 | 1750 | 0.0 | - |
10.1124 | 1800 | 0.0 | - |
10.3933 | 1850 | 0.0 | - |
10.6742 | 1900 | 0.0 | - |
10.9551 | 1950 | 0.0 | - |
11.2360 | 2000 | 0.0 | - |
11.5169 | 2050 | 0.0 | - |
11.7978 | 2100 | 0.0 | - |
12.0787 | 2150 | 0.0 | - |
12.3596 | 2200 | 0.0 | - |
12.6404 | 2250 | 0.0 | - |
12.9213 | 2300 | 0.0 | - |
13.2022 | 2350 | 0.0 | - |
13.4831 | 2400 | 0.0 | - |
13.7640 | 2450 | 0.0 | - |
14.0449 | 2500 | 0.0 | - |
14.3258 | 2550 | 0.0 | - |
14.6067 | 2600 | 0.0 | - |
14.8876 | 2650 | 0.0 | - |
15.1685 | 2700 | 0.0 | - |
15.4494 | 2750 | 0.0 | - |
15.7303 | 2800 | 0.0 | - |
16.0112 | 2850 | 0.0 | - |
16.2921 | 2900 | 0.0 | - |
16.5730 | 2950 | 0.0 | - |
16.8539 | 3000 | 0.0 | - |
17.1348 | 3050 | 0.0 | - |
17.4157 | 3100 | 0.0 | - |
17.6966 | 3150 | 0.0 | - |
17.9775 | 3200 | 0.0 | - |
18.2584 | 3250 | 0.0 | - |
18.5393 | 3300 | 0.0 | - |
18.8202 | 3350 | 0.0 | - |
19.1011 | 3400 | 0.0 | - |
19.3820 | 3450 | 0.0 | - |
19.6629 | 3500 | 0.0 | - |
19.9438 | 3550 | 0.0 | - |
20.2247 | 3600 | 0.0 | - |
20.5056 | 3650 | 0.0 | - |
20.7865 | 3700 | 0.0 | - |
21.0674 | 3750 | 0.0 | - |
21.3483 | 3800 | 0.0 | - |
21.6292 | 3850 | 0.0 | - |
21.9101 | 3900 | 0.0 | - |
22.1910 | 3950 | 0.0 | - |
22.4719 | 4000 | 0.0 | - |
22.7528 | 4050 | 0.0 | - |
23.0337 | 4100 | 0.0 | - |
23.3146 | 4150 | 0.0 | - |
23.5955 | 4200 | 0.0 | - |
23.8764 | 4250 | 0.0 | - |
24.1573 | 4300 | 0.0 | - |
24.4382 | 4350 | 0.0 | - |
24.7191 | 4400 | 0.0 | - |
25.0 | 4450 | 0.0 | - |
25.2809 | 4500 | 0.0 | - |
25.5618 | 4550 | 0.0 | - |
25.8427 | 4600 | 0.0 | - |
26.1236 | 4650 | 0.0 | - |
26.4045 | 4700 | 0.0 | - |
26.6854 | 4750 | 0.0 | - |
26.9663 | 4800 | 0.0 | - |
27.2472 | 4850 | 0.0 | - |
27.5281 | 4900 | 0.0 | - |
27.8090 | 4950 | 0.0 | - |
28.0899 | 5000 | 0.0 | - |
28.3708 | 5050 | 0.0 | - |
28.6517 | 5100 | 0.0 | - |
28.9326 | 5150 | 0.0 | - |
29.2135 | 5200 | 0.0 | - |
29.4944 | 5250 | 0.0 | - |
29.7753 | 5300 | 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}
}
- Downloads last month
- 1,100
Inference Providers
NEW
This model is not currently available via any of the supported third-party Inference Providers, and
the model is not deployed on the HF Inference API.