--- base_model: mini1013/master_domain library_name: setfit metrics: - accuracy pipeline_tag: text-classification tags: - setfit - sentence-transformers - text-classification - generated_from_setfit_trainer widget: - text: '[라 메르]루미너스 리프팅 쿠션 파운데이션 SPF 20 [00003] 로즈 아이보리 (#M)11st>메이크업>페이스메이크업>파운데이션 11st > 뷰티 > 메이크업 > 페이스메이크업 > 파운데이션' - text: 바비브라운 인텐시브 스킨 세럼 파운데이션 30ml (SPF40) 샌드 (#M)화장품/미용>베이스메이크업>파운데이션>리퀴드형 Naverstore > 화장품/미용 > 베이스메이크업 > 파운데이션 > 리퀴드형 - text: 입생로랑 뚜쉬 에끌라 글로우-팩트 쿠션 B20 LotteOn > 뷰티 > 메이크업 > 베이스메이크업 > 쿠션/팩트 LotteOn > 뷰티 > 메이크업 > 베이스메이크업 > 쿠션/팩트 - text: IOPE 퍼펙트 커버 베이스 35ml 메이크업 컨실러 비비 1호 라이트그린 (#M)SSG.COM/메이크업/베이스메이크업/메이크업베이스 ssg > 뷰티 > 메이크업 > 베이스메이크업 > 메이크업베이스 - text: 에스쁘아 프로 테일러 파운데이션 비글로우 SPF25 PA++ 1호 포슬린 × 1개 (#M)SSG.COM/메이크업/베이스메이크업/쿠션파운데이션 ssg > 뷰티 > 메이크업 > 베이스메이크업 > 쿠션파운데이션 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: accuracy value: 0.9587109768378651 name: Accuracy --- # SetFit with mini1013/master_domain This is a [SetFit](https://github.com/huggingface/setfit) model that can be used for Text Classification. This SetFit model uses [mini1013/master_domain](https://huggingface.co/mini1013/master_domain) as the Sentence Transformer embedding model. A [LogisticRegression](https://scikit-learn.org/stable/modules/generated/sklearn.linear_model.LogisticRegression.html) instance is used for classification. The model has been trained using an efficient few-shot learning technique that involves: 1. Fine-tuning a [Sentence Transformer](https://www.sbert.net) with contrastive learning. 2. 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](https://huggingface.co/mini1013/master_domain) - **Classification head:** a [LogisticRegression](https://scikit-learn.org/stable/modules/generated/sklearn.linear_model.LogisticRegression.html) instance - **Maximum Sequence Length:** 512 tokens - **Number of Classes:** 5 classes ### Model Sources - **Repository:** [SetFit on GitHub](https://github.com/huggingface/setfit) - **Paper:** [Efficient Few-Shot Learning Without Prompts](https://arxiv.org/abs/2209.11055) - **Blogpost:** [SetFit: Efficient Few-Shot Learning Without Prompts](https://huggingface.co/blog/setfit) ### Model Labels | Label | Examples | |:------|:--------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------| | 2 | | | 1 | | | 0 | | | 4 | | | 3 | | ## Evaluation ### Metrics | Label | Accuracy | |:--------|:---------| | **all** | 0.9587 | ## Uses ### Direct Use for Inference First install the SetFit library: ```bash pip install setfit ``` Then you can load this model and run inference. ```python from setfit import SetFitModel # Download from the 🤗 Hub model = SetFitModel.from_pretrained("mini1013/master_cate_top_bt5_4_test_flat") # Run inference preds = model("입생로랑 뚜쉬 에끌라 글로우-팩트 쿠션 B20 LotteOn > 뷰티 > 메이크업 > 베이스메이크업 > 쿠션/팩트 LotteOn > 뷰티 > 메이크업 > 베이스메이크업 > 쿠션/팩트") ``` ## Training Details ### Training Set Metrics | Training set | Min | Median | Max | |:-------------|:----|:-------|:----| | Word count | 10 | 23.036 | 53 | | Label | Training Sample Count | |:------|:----------------------| | 0 | 50 | | 1 | 50 | | 2 | 50 | | 3 | 50 | | 4 | 50 | ### Training Hyperparameters - batch_size: (64, 64) - num_epochs: (30, 30) - max_steps: -1 - sampling_strategy: oversampling - num_iterations: 100 - 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.0026 | 1 | 0.3977 | - | | 0.1279 | 50 | 0.4192 | - | | 0.2558 | 100 | 0.3842 | - | | 0.3836 | 150 | 0.3421 | - | | 0.5115 | 200 | 0.3111 | - | | 0.6394 | 250 | 0.2705 | - | | 0.7673 | 300 | 0.2216 | - | | 0.8951 | 350 | 0.1494 | - | | 1.0230 | 400 | 0.0875 | - | | 1.1509 | 450 | 0.0521 | - | | 1.2788 | 500 | 0.0321 | - | | 1.4066 | 550 | 0.004 | - | | 1.5345 | 600 | 0.0019 | - | | 1.6624 | 650 | 0.0011 | - | | 1.7903 | 700 | 0.0005 | - | | 1.9182 | 750 | 0.0004 | - | | 2.0460 | 800 | 0.0004 | - | | 2.1739 | 850 | 0.0003 | - | | 2.3018 | 900 | 0.0003 | - | | 2.4297 | 950 | 0.0003 | - | | 2.5575 | 1000 | 0.0001 | - | | 2.6854 | 1050 | 0.0003 | - | | 2.8133 | 1100 | 0.0005 | - | | 2.9412 | 1150 | 0.0003 | - | | 3.0691 | 1200 | 0.0001 | - | | 3.1969 | 1250 | 0.0001 | - | | 3.3248 | 1300 | 0.0 | - | | 3.4527 | 1350 | 0.0001 | - | | 3.5806 | 1400 | 0.0 | - | | 3.7084 | 1450 | 0.0 | - | | 3.8363 | 1500 | 0.0 | - | | 3.9642 | 1550 | 0.0 | - | | 4.0921 | 1600 | 0.0 | - | | 4.2199 | 1650 | 0.0 | - | | 4.3478 | 1700 | 0.0 | - | | 4.4757 | 1750 | 0.0 | - | | 4.6036 | 1800 | 0.0 | - | | 4.7315 | 1850 | 0.0 | - | | 4.8593 | 1900 | 0.0 | - | | 4.9872 | 1950 | 0.0002 | - | | 5.1151 | 2000 | 0.0018 | - | | 5.2430 | 2050 | 0.0009 | - | | 5.3708 | 2100 | 0.0003 | - | | 5.4987 | 2150 | 0.0 | - | | 5.6266 | 2200 | 0.0002 | - | | 5.7545 | 2250 | 0.0 | - | | 5.8824 | 2300 | 0.0002 | - | | 6.0102 | 2350 | 0.0 | - | | 6.1381 | 2400 | 0.0007 | - | | 6.2660 | 2450 | 0.0 | - | | 6.3939 | 2500 | 0.0 | - | | 6.5217 | 2550 | 0.0 | - | | 6.6496 | 2600 | 0.0 | - | | 6.7775 | 2650 | 0.0 | - | | 6.9054 | 2700 | 0.0 | - | | 7.0332 | 2750 | 0.0 | - | | 7.1611 | 2800 | 0.0 | - | | 7.2890 | 2850 | 0.0 | - | | 7.4169 | 2900 | 0.0 | - | | 7.5448 | 2950 | 0.0 | - | | 7.6726 | 3000 | 0.0 | - | | 7.8005 | 3050 | 0.0 | - | | 7.9284 | 3100 | 0.0 | - | | 8.0563 | 3150 | 0.0 | - | | 8.1841 | 3200 | 0.0 | - | | 8.3120 | 3250 | 0.0 | - | | 8.4399 | 3300 | 0.0 | - | | 8.5678 | 3350 | 0.0 | - | | 8.6957 | 3400 | 0.0 | - | | 8.8235 | 3450 | 0.0 | - | | 8.9514 | 3500 | 0.0 | - | | 9.0793 | 3550 | 0.0 | - | | 9.2072 | 3600 | 0.0 | - | | 9.3350 | 3650 | 0.0 | - | | 9.4629 | 3700 | 0.0 | - | | 9.5908 | 3750 | 0.0 | - | | 9.7187 | 3800 | 0.0 | - | | 9.8465 | 3850 | 0.0 | - | | 9.9744 | 3900 | 0.0029 | - | | 10.1023 | 3950 | 0.0026 | - | | 10.2302 | 4000 | 0.0037 | - | | 10.3581 | 4050 | 0.0001 | - | | 10.4859 | 4100 | 0.0 | - | | 10.6138 | 4150 | 0.0003 | - | | 10.7417 | 4200 | 0.0 | - | | 10.8696 | 4250 | 0.0 | - | | 10.9974 | 4300 | 0.0 | - | | 11.1253 | 4350 | 0.0 | - | | 11.2532 | 4400 | 0.0 | - | | 11.3811 | 4450 | 0.0 | - | | 11.5090 | 4500 | 0.0 | - | | 11.6368 | 4550 | 0.0 | - | | 11.7647 | 4600 | 0.0 | - | | 11.8926 | 4650 | 0.0 | - | | 12.0205 | 4700 | 0.0 | - | | 12.1483 | 4750 | 0.0 | - | | 12.2762 | 4800 | 0.0 | - | | 12.4041 | 4850 | 0.0 | - | | 12.5320 | 4900 | 0.0 | - | | 12.6598 | 4950 | 0.0 | - | | 12.7877 | 5000 | 0.0 | - | | 12.9156 | 5050 | 0.0 | - | | 13.0435 | 5100 | 0.0 | - | | 13.1714 | 5150 | 0.0 | - | | 13.2992 | 5200 | 0.0 | - | | 13.4271 | 5250 | 0.0 | - | | 13.5550 | 5300 | 0.0 | - | | 13.6829 | 5350 | 0.0 | - | | 13.8107 | 5400 | 0.0 | - | | 13.9386 | 5450 | 0.0 | - | | 14.0665 | 5500 | 0.0 | - | | 14.1944 | 5550 | 0.0 | - | | 14.3223 | 5600 | 0.0 | - | | 14.4501 | 5650 | 0.0 | - | | 14.5780 | 5700 | 0.0 | - | | 14.7059 | 5750 | 0.0 | - | | 14.8338 | 5800 | 0.0 | - | | 14.9616 | 5850 | 0.0 | - | | 15.0895 | 5900 | 0.0 | - | | 15.2174 | 5950 | 0.0 | - | | 15.3453 | 6000 | 0.0 | - | | 15.4731 | 6050 | 0.0 | - | | 15.6010 | 6100 | 0.0 | - | | 15.7289 | 6150 | 0.0 | - | | 15.8568 | 6200 | 0.0 | - | | 15.9847 | 6250 | 0.0 | - | | 16.1125 | 6300 | 0.0 | - | | 16.2404 | 6350 | 0.0 | - | | 16.3683 | 6400 | 0.0 | - | | 16.4962 | 6450 | 0.0 | - | | 16.6240 | 6500 | 0.0 | - | | 16.7519 | 6550 | 0.0 | - | | 16.8798 | 6600 | 0.0 | - | | 17.0077 | 6650 | 0.0 | - | | 17.1355 | 6700 | 0.0 | - | | 17.2634 | 6750 | 0.0 | - | | 17.3913 | 6800 | 0.0 | - | | 17.5192 | 6850 | 0.0 | - | | 17.6471 | 6900 | 0.0 | - | | 17.7749 | 6950 | 0.0 | - | | 17.9028 | 7000 | 0.0 | - | | 18.0307 | 7050 | 0.0 | - | | 18.1586 | 7100 | 0.0 | - | | 18.2864 | 7150 | 0.0 | - | | 18.4143 | 7200 | 0.0 | - | | 18.5422 | 7250 | 0.0 | - | | 18.6701 | 7300 | 0.0 | - | | 18.7980 | 7350 | 0.0 | - | | 18.9258 | 7400 | 0.0 | - | | 19.0537 | 7450 | 0.0 | - | | 19.1816 | 7500 | 0.0 | - | | 19.3095 | 7550 | 0.0 | - | | 19.4373 | 7600 | 0.0 | - | | 19.5652 | 7650 | 0.0 | - | | 19.6931 | 7700 | 0.0 | - | | 19.8210 | 7750 | 0.0 | - | | 19.9488 | 7800 | 0.0 | - | | 20.0767 | 7850 | 0.0 | - | | 20.2046 | 7900 | 0.0 | - | | 20.3325 | 7950 | 0.0 | - | | 20.4604 | 8000 | 0.0 | - | | 20.5882 | 8050 | 0.0 | - | | 20.7161 | 8100 | 0.0 | - | | 20.8440 | 8150 | 0.0 | - | | 20.9719 | 8200 | 0.0 | - | | 21.0997 | 8250 | 0.0 | - | | 21.2276 | 8300 | 0.0 | - | | 21.3555 | 8350 | 0.0 | - | | 21.4834 | 8400 | 0.0 | - | | 21.6113 | 8450 | 0.0 | - | | 21.7391 | 8500 | 0.0 | - | | 21.8670 | 8550 | 0.0 | - | | 21.9949 | 8600 | 0.0 | - | | 22.1228 | 8650 | 0.0 | - | | 22.2506 | 8700 | 0.0 | - | | 22.3785 | 8750 | 0.0 | - | | 22.5064 | 8800 | 0.0 | - | | 22.6343 | 8850 | 0.0 | - | | 22.7621 | 8900 | 0.0 | - | | 22.8900 | 8950 | 0.0 | - | | 23.0179 | 9000 | 0.0 | - | | 23.1458 | 9050 | 0.0 | - | | 23.2737 | 9100 | 0.0 | - | | 23.4015 | 9150 | 0.0 | - | | 23.5294 | 9200 | 0.0 | - | | 23.6573 | 9250 | 0.0 | - | | 23.7852 | 9300 | 0.0 | - | | 23.9130 | 9350 | 0.0 | - | | 24.0409 | 9400 | 0.0 | - | | 24.1688 | 9450 | 0.0 | - | | 24.2967 | 9500 | 0.0 | - | | 24.4246 | 9550 | 0.0 | - | | 24.5524 | 9600 | 0.0 | - | | 24.6803 | 9650 | 0.0 | - | | 24.8082 | 9700 | 0.0 | - | | 24.9361 | 9750 | 0.0 | - | | 25.0639 | 9800 | 0.0 | - | | 25.1918 | 9850 | 0.0 | - | | 25.3197 | 9900 | 0.0 | - | | 25.4476 | 9950 | 0.0 | - | | 25.5754 | 10000 | 0.0 | - | | 25.7033 | 10050 | 0.0 | - | | 25.8312 | 10100 | 0.0 | - | | 25.9591 | 10150 | 0.0 | - | | 26.0870 | 10200 | 0.0 | - | | 26.2148 | 10250 | 0.0 | - | | 26.3427 | 10300 | 0.0 | - | | 26.4706 | 10350 | 0.0 | - | | 26.5985 | 10400 | 0.0 | - | | 26.7263 | 10450 | 0.0 | - | | 26.8542 | 10500 | 0.0 | - | | 26.9821 | 10550 | 0.0 | - | | 27.1100 | 10600 | 0.0 | - | | 27.2379 | 10650 | 0.0 | - | | 27.3657 | 10700 | 0.0 | - | | 27.4936 | 10750 | 0.0 | - | | 27.6215 | 10800 | 0.0 | - | | 27.7494 | 10850 | 0.0 | - | | 27.8772 | 10900 | 0.0 | - | | 28.0051 | 10950 | 0.0 | - | | 28.1330 | 11000 | 0.0 | - | | 28.2609 | 11050 | 0.0 | - | | 28.3887 | 11100 | 0.0 | - | | 28.5166 | 11150 | 0.0 | - | | 28.6445 | 11200 | 0.0 | - | | 28.7724 | 11250 | 0.0 | - | | 28.9003 | 11300 | 0.0 | - | | 29.0281 | 11350 | 0.0 | - | | 29.1560 | 11400 | 0.0 | - | | 29.2839 | 11450 | 0.0 | - | | 29.4118 | 11500 | 0.0 | - | | 29.5396 | 11550 | 0.0 | - | | 29.6675 | 11600 | 0.0 | - | | 29.7954 | 11650 | 0.0 | - | | 29.9233 | 11700 | 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 ```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} } ```