--- tags: - setfit - sentence-transformers - text-classification - generated_from_setfit_trainer widget: - text: '[2+1]디엘프렌즈 순한네일 수성네일 유아 키즈 매니큐어 네일스티커 선물세트 캔디핑크_옐로우_핑크봉봉 출산/육아 > 스킨/바디용품 > 어린이네일케어' - text: '[3입] 킨더퍼페츠 아기입욕제 버블 거품 유아입욕제 카밍아로마 400g_바바옐로우 400g_아토그린 400g 출산/육아 > 스킨/바디용품 > 유아입욕제' - text: '[2+1]디엘프렌즈 순한네일 수성네일 유아 키즈 매니큐어 네일스티커 선물세트 핑크봉봉_다홍_다홍 출산/육아 > 스킨/바디용품 > 어린이네일케어' - text: 유아 네일 키즈 어린이 아동 손톱 매니큐어 네일 스티커 달콤한 캔디 출산/육아 > 스킨/바디용품 > 어린이네일케어 - text: 네일아트 언포일 레진 투명 얼음 믹스 스톤 100입 8종 언포일스톤 GSTON-111 출산/육아 > 스킨/바디용품 > 어린이네일케어 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: 1.0 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:** 14 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 | |:------|:--------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------| | 3.0 | | | 1.0 | | | 6.0 | | | 2.0 | | | 0.0 | | | 12.0 | | | 4.0 | | | 5.0 | | | 11.0 | | | 10.0 | | | 9.0 | | | 13.0 | | | 7.0 | | | 8.0 | | ## Evaluation ### Metrics | Label | Accuracy | |:--------|:---------| | **all** | 1.0 | ## 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_bc10") # Run inference preds = model("유아 네일 키즈 어린이 아동 손톱 매니큐어 네일 스티커 달콤한 캔디 출산/육아 > 스킨/바디용품 > 어린이네일케어") ``` ## Training Details ### Training Set Metrics | Training set | Min | Median | Max | |:-------------|:----|:--------|:----| | Word count | 7 | 13.9688 | 29 | | 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 | 20 | | 9.0 | 70 | | 10.0 | 70 | | 11.0 | 70 | | 12.0 | 70 | | 13.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.0055 | 1 | 0.493 | - | | 0.2747 | 50 | 0.4998 | - | | 0.5495 | 100 | 0.4964 | - | | 0.8242 | 150 | 0.3376 | - | | 1.0989 | 200 | 0.2021 | - | | 1.3736 | 250 | 0.0521 | - | | 1.6484 | 300 | 0.0033 | - | | 1.9231 | 350 | 0.0003 | - | | 2.1978 | 400 | 0.0002 | - | | 2.4725 | 450 | 0.0002 | - | | 2.7473 | 500 | 0.0001 | - | | 3.0220 | 550 | 0.0001 | - | | 3.2967 | 600 | 0.0 | - | | 3.5714 | 650 | 0.0 | - | | 3.8462 | 700 | 0.0 | - | | 4.1209 | 750 | 0.0 | - | | 4.3956 | 800 | 0.0 | - | | 4.6703 | 850 | 0.0 | - | | 4.9451 | 900 | 0.0 | - | | 5.2198 | 950 | 0.0 | - | | 5.4945 | 1000 | 0.0 | - | | 5.7692 | 1050 | 0.0001 | - | | 6.0440 | 1100 | 0.0002 | - | | 6.3187 | 1150 | 0.0 | - | | 6.5934 | 1200 | 0.0 | - | | 6.8681 | 1250 | 0.0 | - | | 7.1429 | 1300 | 0.0 | - | | 7.4176 | 1350 | 0.0 | - | | 7.6923 | 1400 | 0.0 | - | | 7.9670 | 1450 | 0.0 | - | | 8.2418 | 1500 | 0.0 | - | | 8.5165 | 1550 | 0.0 | - | | 8.7912 | 1600 | 0.0 | - | | 9.0659 | 1650 | 0.0 | - | | 9.3407 | 1700 | 0.0 | - | | 9.6154 | 1750 | 0.0 | - | | 9.8901 | 1800 | 0.0 | - | | 10.1648 | 1850 | 0.0 | - | | 10.4396 | 1900 | 0.0 | - | | 10.7143 | 1950 | 0.0 | - | | 10.9890 | 2000 | 0.0 | - | | 11.2637 | 2050 | 0.0 | - | | 11.5385 | 2100 | 0.0 | - | | 11.8132 | 2150 | 0.0 | - | | 12.0879 | 2200 | 0.0 | - | | 12.3626 | 2250 | 0.0 | - | | 12.6374 | 2300 | 0.0 | - | | 12.9121 | 2350 | 0.0 | - | | 13.1868 | 2400 | 0.0 | - | | 13.4615 | 2450 | 0.0 | - | | 13.7363 | 2500 | 0.0 | - | | 14.0110 | 2550 | 0.0 | - | | 14.2857 | 2600 | 0.0 | - | | 14.5604 | 2650 | 0.0 | - | | 14.8352 | 2700 | 0.0 | - | | 15.1099 | 2750 | 0.0 | - | | 15.3846 | 2800 | 0.0 | - | | 15.6593 | 2850 | 0.0 | - | | 15.9341 | 2900 | 0.0 | - | | 16.2088 | 2950 | 0.0 | - | | 16.4835 | 3000 | 0.0 | - | | 16.7582 | 3050 | 0.0 | - | | 17.0330 | 3100 | 0.0 | - | | 17.3077 | 3150 | 0.0 | - | | 17.5824 | 3200 | 0.0 | - | | 17.8571 | 3250 | 0.0 | - | | 18.1319 | 3300 | 0.0 | - | | 18.4066 | 3350 | 0.0 | - | | 18.6813 | 3400 | 0.0 | - | | 18.9560 | 3450 | 0.0 | - | | 19.2308 | 3500 | 0.0 | - | | 19.5055 | 3550 | 0.0 | - | | 19.7802 | 3600 | 0.0 | - | | 20.0549 | 3650 | 0.0 | - | | 20.3297 | 3700 | 0.0 | - | | 20.6044 | 3750 | 0.0 | - | | 20.8791 | 3800 | 0.0 | - | | 21.1538 | 3850 | 0.0 | - | | 21.4286 | 3900 | 0.0 | - | | 21.7033 | 3950 | 0.0 | - | | 21.9780 | 4000 | 0.0 | - | | 22.2527 | 4050 | 0.0 | - | | 22.5275 | 4100 | 0.0 | - | | 22.8022 | 4150 | 0.0 | - | | 23.0769 | 4200 | 0.0 | - | | 23.3516 | 4250 | 0.0 | - | | 23.6264 | 4300 | 0.0 | - | | 23.9011 | 4350 | 0.0 | - | | 24.1758 | 4400 | 0.0 | - | | 24.4505 | 4450 | 0.0 | - | | 24.7253 | 4500 | 0.0 | - | | 25.0 | 4550 | 0.0 | - | | 25.2747 | 4600 | 0.0 | - | | 25.5495 | 4650 | 0.0 | - | | 25.8242 | 4700 | 0.0 | - | | 26.0989 | 4750 | 0.0 | - | | 26.3736 | 4800 | 0.0 | - | | 26.6484 | 4850 | 0.0 | - | | 26.9231 | 4900 | 0.0 | - | | 27.1978 | 4950 | 0.0 | - | | 27.4725 | 5000 | 0.0 | - | | 27.7473 | 5050 | 0.0 | - | | 28.0220 | 5100 | 0.0 | - | | 28.2967 | 5150 | 0.0 | - | | 28.5714 | 5200 | 0.0 | - | | 28.8462 | 5250 | 0.0 | - | | 29.1209 | 5300 | 0.0 | - | | 29.3956 | 5350 | 0.0 | - | | 29.6703 | 5400 | 0.0 | - | | 29.9451 | 5450 | 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} } ```