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 |
---|---|
0.0 |
|
3.0 |
|
7.0 |
|
5.0 |
|
10.0 |
|
1.0 |
|
11.0 |
|
6.0 |
|
8.0 |
|
12.0 |
|
2.0 |
|
13.0 |
|
9.0 |
|
4.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_sl20")
# Run inference
preds = model("브로브 수영랜턴 고급형 스노쿨링 잠수후레쉬 CREE 스포츠/레저>스킨스쿠버>수중전등")
Training Details
Training Set Metrics
Training set | Min | Median | Max |
---|---|---|---|
Word count | 2 | 9.2506 | 24 |
Label | Training Sample Count |
---|---|
0.0 | 69 |
1.0 | 70 |
2.0 | 70 |
3.0 | 70 |
4.0 | 9 |
5.0 | 70 |
6.0 | 70 |
7.0 | 70 |
8.0 | 70 |
9.0 | 70 |
10.0 | 70 |
11.0 | 70 |
12.0 | 70 |
13.0 | 10 |
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.0060 | 1 | 0.5025 | - |
0.2976 | 50 | 0.4963 | - |
0.5952 | 100 | 0.3183 | - |
0.8929 | 150 | 0.0275 | - |
1.1905 | 200 | 0.0142 | - |
1.4881 | 250 | 0.0142 | - |
1.7857 | 300 | 0.0132 | - |
2.0833 | 350 | 0.0144 | - |
2.3810 | 400 | 0.0097 | - |
2.6786 | 450 | 0.001 | - |
2.9762 | 500 | 0.0002 | - |
3.2738 | 550 | 0.0 | - |
3.5714 | 600 | 0.0 | - |
3.8690 | 650 | 0.0 | - |
4.1667 | 700 | 0.0 | - |
4.4643 | 750 | 0.0 | - |
4.7619 | 800 | 0.0001 | - |
5.0595 | 850 | 0.0 | - |
5.3571 | 900 | 0.0 | - |
5.6548 | 950 | 0.0 | - |
5.9524 | 1000 | 0.0 | - |
6.25 | 1050 | 0.0 | - |
6.5476 | 1100 | 0.0 | - |
6.8452 | 1150 | 0.0 | - |
7.1429 | 1200 | 0.0 | - |
7.4405 | 1250 | 0.0 | - |
7.7381 | 1300 | 0.0 | - |
8.0357 | 1350 | 0.0 | - |
8.3333 | 1400 | 0.0 | - |
8.6310 | 1450 | 0.0 | - |
8.9286 | 1500 | 0.0 | - |
9.2262 | 1550 | 0.0 | - |
9.5238 | 1600 | 0.0 | - |
9.8214 | 1650 | 0.0 | - |
10.1190 | 1700 | 0.0 | - |
10.4167 | 1750 | 0.0 | - |
10.7143 | 1800 | 0.0 | - |
11.0119 | 1850 | 0.0 | - |
11.3095 | 1900 | 0.0 | - |
11.6071 | 1950 | 0.0 | - |
11.9048 | 2000 | 0.0 | - |
12.2024 | 2050 | 0.0 | - |
12.5 | 2100 | 0.0 | - |
12.7976 | 2150 | 0.0006 | - |
13.0952 | 2200 | 0.0001 | - |
13.3929 | 2250 | 0.0 | - |
13.6905 | 2300 | 0.0 | - |
13.9881 | 2350 | 0.0 | - |
14.2857 | 2400 | 0.0 | - |
14.5833 | 2450 | 0.0 | - |
14.8810 | 2500 | 0.0 | - |
15.1786 | 2550 | 0.0 | - |
15.4762 | 2600 | 0.0 | - |
15.7738 | 2650 | 0.0 | - |
16.0714 | 2700 | 0.0 | - |
16.3690 | 2750 | 0.0 | - |
16.6667 | 2800 | 0.0 | - |
16.9643 | 2850 | 0.0 | - |
17.2619 | 2900 | 0.0 | - |
17.5595 | 2950 | 0.0 | - |
17.8571 | 3000 | 0.0 | - |
18.1548 | 3050 | 0.0 | - |
18.4524 | 3100 | 0.0 | - |
18.75 | 3150 | 0.0 | - |
19.0476 | 3200 | 0.0 | - |
19.3452 | 3250 | 0.0 | - |
19.6429 | 3300 | 0.0 | - |
19.9405 | 3350 | 0.0 | - |
20.2381 | 3400 | 0.0 | - |
20.5357 | 3450 | 0.0 | - |
20.8333 | 3500 | 0.0 | - |
21.1310 | 3550 | 0.0 | - |
21.4286 | 3600 | 0.0 | - |
21.7262 | 3650 | 0.0 | - |
22.0238 | 3700 | 0.0 | - |
22.3214 | 3750 | 0.0 | - |
22.6190 | 3800 | 0.0 | - |
22.9167 | 3850 | 0.0 | - |
23.2143 | 3900 | 0.0 | - |
23.5119 | 3950 | 0.0002 | - |
23.8095 | 4000 | 0.0 | - |
24.1071 | 4050 | 0.0 | - |
24.4048 | 4100 | 0.0 | - |
24.7024 | 4150 | 0.0 | - |
25.0 | 4200 | 0.0 | - |
25.2976 | 4250 | 0.0 | - |
25.5952 | 4300 | 0.0 | - |
25.8929 | 4350 | 0.0 | - |
26.1905 | 4400 | 0.0 | - |
26.4881 | 4450 | 0.0 | - |
26.7857 | 4500 | 0.0 | - |
27.0833 | 4550 | 0.0 | - |
27.3810 | 4600 | 0.0 | - |
27.6786 | 4650 | 0.0 | - |
27.9762 | 4700 | 0.0 | - |
28.2738 | 4750 | 0.0 | - |
28.5714 | 4800 | 0.0 | - |
28.8690 | 4850 | 0.0 | - |
29.1667 | 4900 | 0.0 | - |
29.4643 | 4950 | 0.0 | - |
29.7619 | 5000 | 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
- 47
Inference Providers
NEW
This model is not currently available via any of the supported Inference Providers.