--- tags: - setfit - sentence-transformers - text-classification - generated_from_setfit_trainer widget: - text: 런지 머신 스쿼트 레그 레이즈 다리 하체 운동 허벅지 엉덩이 피트니스 스포츠/레저>헬스>웨이트기구>스쿼트머신 - text: 허리 단련 운동 허리강화 로마의자 로만체어 옆구리 스포츠/레저>헬스>복근운동기구 - text: 스트레칭봉 스트레칭 선물 막대 홈트운동기구 필라테스 요가봉 DD508 스포츠/레저>헬스>헬스소품>기타헬스소품 - text: 벽스쿼트 핵스쿼트머신 홈짐 홈트 허벅지 코어 운동 스포츠/레저>헬스>웨이트기구>스쿼트머신 - text: 프레임 웰이트볼 정리대 거치대 수납 메디신볼 월볼 스포츠/레저>헬스>헬스소품>기타헬스소품 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:** 18 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 | |:------|:----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------| | 11.0 | | | 13.0 | | | 10.0 | | | 1.0 | | | 15.0 | | | 17.0 | | | 3.0 | | | 14.0 | | | 4.0 | | | 6.0 | | | 8.0 | | | 9.0 | | | 2.0 | | | 7.0 | | | 12.0 | | | 5.0 | | | 16.0 | | | 0.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_sl31") # Run inference preds = model("허리 단련 운동 허리강화 로마의자 로만체어 옆구리 스포츠/레저>헬스>복근운동기구") ``` ## Training Details ### Training Set Metrics | Training set | Min | Median | Max | |:-------------|:----|:-------|:----| | Word count | 2 | 8.0378 | 18 | | Label | Training Sample Count | |:------|:----------------------| | 0.0 | 3 | | 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 | | 11.0 | 70 | | 12.0 | 69 | | 13.0 | 70 | | 14.0 | 68 | | 15.0 | 70 | | 16.0 | 70 | | 17.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.0043 | 1 | 0.499 | - | | 0.2146 | 50 | 0.4998 | - | | 0.4292 | 100 | 0.4521 | - | | 0.6438 | 150 | 0.2435 | - | | 0.8584 | 200 | 0.093 | - | | 1.0730 | 250 | 0.0291 | - | | 1.2876 | 300 | 0.012 | - | | 1.5021 | 350 | 0.0065 | - | | 1.7167 | 400 | 0.0045 | - | | 1.9313 | 450 | 0.0039 | - | | 2.1459 | 500 | 0.0041 | - | | 2.3605 | 550 | 0.0021 | - | | 2.5751 | 600 | 0.0002 | - | | 2.7897 | 650 | 0.0001 | - | | 3.0043 | 700 | 0.0001 | - | | 3.2189 | 750 | 0.0001 | - | | 3.4335 | 800 | 0.0001 | - | | 3.6481 | 850 | 0.0001 | - | | 3.8627 | 900 | 0.0001 | - | | 4.0773 | 950 | 0.0001 | - | | 4.2918 | 1000 | 0.0001 | - | | 4.5064 | 1050 | 0.0001 | - | | 4.7210 | 1100 | 0.0001 | - | | 4.9356 | 1150 | 0.0 | - | | 5.1502 | 1200 | 0.0 | - | | 5.3648 | 1250 | 0.0 | - | | 5.5794 | 1300 | 0.0 | - | | 5.7940 | 1350 | 0.0 | - | | 6.0086 | 1400 | 0.0 | - | | 6.2232 | 1450 | 0.0 | - | | 6.4378 | 1500 | 0.0 | - | | 6.6524 | 1550 | 0.0 | - | | 6.8670 | 1600 | 0.0 | - | | 7.0815 | 1650 | 0.0 | - | | 7.2961 | 1700 | 0.0 | - | | 7.5107 | 1750 | 0.0 | - | | 7.7253 | 1800 | 0.0 | - | | 7.9399 | 1850 | 0.0 | - | | 8.1545 | 1900 | 0.0 | - | | 8.3691 | 1950 | 0.0 | - | | 8.5837 | 2000 | 0.0 | - | | 8.7983 | 2050 | 0.0 | - | | 9.0129 | 2100 | 0.0 | - | | 9.2275 | 2150 | 0.0 | - | | 9.4421 | 2200 | 0.0 | - | | 9.6567 | 2250 | 0.0 | - | | 9.8712 | 2300 | 0.0 | - | | 10.0858 | 2350 | 0.0 | - | | 10.3004 | 2400 | 0.0 | - | | 10.5150 | 2450 | 0.0 | - | | 10.7296 | 2500 | 0.0 | - | | 10.9442 | 2550 | 0.0 | - | | 11.1588 | 2600 | 0.0 | - | | 11.3734 | 2650 | 0.0 | - | | 11.5880 | 2700 | 0.0 | - | | 11.8026 | 2750 | 0.0 | - | | 12.0172 | 2800 | 0.0 | - | | 12.2318 | 2850 | 0.0 | - | | 12.4464 | 2900 | 0.0 | - | | 12.6609 | 2950 | 0.0 | - | | 12.8755 | 3000 | 0.0 | - | | 13.0901 | 3050 | 0.0 | - | | 13.3047 | 3100 | 0.0 | - | | 13.5193 | 3150 | 0.0 | - | | 13.7339 | 3200 | 0.0 | - | | 13.9485 | 3250 | 0.0 | - | | 14.1631 | 3300 | 0.0 | - | | 14.3777 | 3350 | 0.0 | - | | 14.5923 | 3400 | 0.0 | - | | 14.8069 | 3450 | 0.0 | - | | 15.0215 | 3500 | 0.0 | - | | 15.2361 | 3550 | 0.0 | - | | 15.4506 | 3600 | 0.0 | - | | 15.6652 | 3650 | 0.0 | - | | 15.8798 | 3700 | 0.0 | - | | 16.0944 | 3750 | 0.0 | - | | 16.3090 | 3800 | 0.0 | - | | 16.5236 | 3850 | 0.0 | - | | 16.7382 | 3900 | 0.0 | - | | 16.9528 | 3950 | 0.0 | - | | 17.1674 | 4000 | 0.0 | - | | 17.3820 | 4050 | 0.0 | - | | 17.5966 | 4100 | 0.0 | - | | 17.8112 | 4150 | 0.0 | - | | 18.0258 | 4200 | 0.0 | - | | 18.2403 | 4250 | 0.0 | - | | 18.4549 | 4300 | 0.0 | - | | 18.6695 | 4350 | 0.0 | - | | 18.8841 | 4400 | 0.0 | - | | 19.0987 | 4450 | 0.0 | - | | 19.3133 | 4500 | 0.0 | - | | 19.5279 | 4550 | 0.0 | - | | 19.7425 | 4600 | 0.0 | - | | 19.9571 | 4650 | 0.0 | - | | 20.1717 | 4700 | 0.0 | - | | 20.3863 | 4750 | 0.0 | - | | 20.6009 | 4800 | 0.0 | - | | 20.8155 | 4850 | 0.0 | - | | 21.0300 | 4900 | 0.0 | - | | 21.2446 | 4950 | 0.0 | - | | 21.4592 | 5000 | 0.0 | - | | 21.6738 | 5050 | 0.0 | - | | 21.8884 | 5100 | 0.0 | - | | 22.1030 | 5150 | 0.0 | - | | 22.3176 | 5200 | 0.0 | - | | 22.5322 | 5250 | 0.0 | - | | 22.7468 | 5300 | 0.0 | - | | 22.9614 | 5350 | 0.0 | - | | 23.1760 | 5400 | 0.0 | - | | 23.3906 | 5450 | 0.0 | - | | 23.6052 | 5500 | 0.0 | - | | 23.8197 | 5550 | 0.0 | - | | 24.0343 | 5600 | 0.0 | - | | 24.2489 | 5650 | 0.0 | - | | 24.4635 | 5700 | 0.0 | - | | 24.6781 | 5750 | 0.0 | - | | 24.8927 | 5800 | 0.0 | - | | 25.1073 | 5850 | 0.0 | - | | 25.3219 | 5900 | 0.0 | - | | 25.5365 | 5950 | 0.0 | - | | 25.7511 | 6000 | 0.0 | - | | 25.9657 | 6050 | 0.0 | - | | 26.1803 | 6100 | 0.0 | - | | 26.3948 | 6150 | 0.0 | - | | 26.6094 | 6200 | 0.0 | - | | 26.8240 | 6250 | 0.0 | - | | 27.0386 | 6300 | 0.0 | - | | 27.2532 | 6350 | 0.0 | - | | 27.4678 | 6400 | 0.0 | - | | 27.6824 | 6450 | 0.0 | - | | 27.8970 | 6500 | 0.0 | - | | 28.1116 | 6550 | 0.0 | - | | 28.3262 | 6600 | 0.0 | - | | 28.5408 | 6650 | 0.0 | - | | 28.7554 | 6700 | 0.0 | - | | 28.9700 | 6750 | 0.0 | - | | 29.1845 | 6800 | 0.0 | - | | 29.3991 | 6850 | 0.0 | - | | 29.6137 | 6900 | 0.0 | - | | 29.8283 | 6950 | 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} } ```