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: 11 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 |
---|---|
5.0 |
|
7.0 |
|
1.0 |
|
9.0 |
|
6.0 |
|
4.0 |
|
8.0 |
|
2.0 |
|
3.0 |
|
0.0 |
|
10.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_bc4")
# Run inference
preds = model("욕실 타일 바닥 미끄럼방지 스티커 12P 세트 출산/육아 > 목욕용품 > 기타목욕용품")
Training Details
Training Set Metrics
Training set | Min | Median | Max |
---|---|---|---|
Word count | 7 | 14.2403 | 27 |
Label | Training Sample Count |
---|---|
0.0 | 70 |
1.0 | 70 |
2.0 | 70 |
3.0 | 70 |
4.0 | 70 |
5.0 | 70 |
6.0 | 70 |
7.0 | 70 |
8.0 | 70 |
9.0 | 70 |
10.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.0066 | 1 | 0.4891 | - |
0.3311 | 50 | 0.5008 | - |
0.6623 | 100 | 0.4057 | - |
0.9934 | 150 | 0.3132 | - |
1.3245 | 200 | 0.176 | - |
1.6556 | 250 | 0.0868 | - |
1.9868 | 300 | 0.0349 | - |
2.3179 | 350 | 0.0133 | - |
2.6490 | 400 | 0.0018 | - |
2.9801 | 450 | 0.0006 | - |
3.3113 | 500 | 0.0004 | - |
3.6424 | 550 | 0.0005 | - |
3.9735 | 600 | 0.0003 | - |
4.3046 | 650 | 0.0002 | - |
4.6358 | 700 | 0.0002 | - |
4.9669 | 750 | 0.0002 | - |
5.2980 | 800 | 0.0001 | - |
5.6291 | 850 | 0.0001 | - |
5.9603 | 900 | 0.0001 | - |
6.2914 | 950 | 0.0001 | - |
6.6225 | 1000 | 0.0001 | - |
6.9536 | 1050 | 0.0001 | - |
7.2848 | 1100 | 0.0001 | - |
7.6159 | 1150 | 0.0001 | - |
7.9470 | 1200 | 0.0001 | - |
8.2781 | 1250 | 0.0001 | - |
8.6093 | 1300 | 0.0001 | - |
8.9404 | 1350 | 0.0001 | - |
9.2715 | 1400 | 0.0001 | - |
9.6026 | 1450 | 0.0 | - |
9.9338 | 1500 | 0.0001 | - |
10.2649 | 1550 | 0.0 | - |
10.5960 | 1600 | 0.0 | - |
10.9272 | 1650 | 0.0 | - |
11.2583 | 1700 | 0.0 | - |
11.5894 | 1750 | 0.0 | - |
11.9205 | 1800 | 0.0 | - |
12.2517 | 1850 | 0.0 | - |
12.5828 | 1900 | 0.0 | - |
12.9139 | 1950 | 0.0 | - |
13.2450 | 2000 | 0.0 | - |
13.5762 | 2050 | 0.0 | - |
13.9073 | 2100 | 0.0 | - |
14.2384 | 2150 | 0.0 | - |
14.5695 | 2200 | 0.0 | - |
14.9007 | 2250 | 0.0 | - |
15.2318 | 2300 | 0.0 | - |
15.5629 | 2350 | 0.0 | - |
15.8940 | 2400 | 0.0 | - |
16.2252 | 2450 | 0.0 | - |
16.5563 | 2500 | 0.0 | - |
16.8874 | 2550 | 0.0 | - |
17.2185 | 2600 | 0.0 | - |
17.5497 | 2650 | 0.0 | - |
17.8808 | 2700 | 0.0 | - |
18.2119 | 2750 | 0.0 | - |
18.5430 | 2800 | 0.0 | - |
18.8742 | 2850 | 0.0 | - |
19.2053 | 2900 | 0.0 | - |
19.5364 | 2950 | 0.0 | - |
19.8675 | 3000 | 0.0 | - |
20.1987 | 3050 | 0.0 | - |
20.5298 | 3100 | 0.0 | - |
20.8609 | 3150 | 0.0 | - |
21.1921 | 3200 | 0.0 | - |
21.5232 | 3250 | 0.0 | - |
21.8543 | 3300 | 0.0 | - |
22.1854 | 3350 | 0.0 | - |
22.5166 | 3400 | 0.0 | - |
22.8477 | 3450 | 0.0 | - |
23.1788 | 3500 | 0.0 | - |
23.5099 | 3550 | 0.0 | - |
23.8411 | 3600 | 0.0 | - |
24.1722 | 3650 | 0.0 | - |
24.5033 | 3700 | 0.0 | - |
24.8344 | 3750 | 0.0 | - |
25.1656 | 3800 | 0.0 | - |
25.4967 | 3850 | 0.0 | - |
25.8278 | 3900 | 0.0 | - |
26.1589 | 3950 | 0.0 | - |
26.4901 | 4000 | 0.0 | - |
26.8212 | 4050 | 0.0 | - |
27.1523 | 4100 | 0.0 | - |
27.4834 | 4150 | 0.0 | - |
27.8146 | 4200 | 0.0 | - |
28.1457 | 4250 | 0.0 | - |
28.4768 | 4300 | 0.0 | - |
28.8079 | 4350 | 0.0 | - |
29.1391 | 4400 | 0.0 | - |
29.4702 | 4450 | 0.0 | - |
29.8013 | 4500 | 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
- 633
Inference Providers
NEW
This model is not currently available via any of the supported Inference Providers.