--- tags: - setfit - sentence-transformers - text-classification - generated_from_setfit_trainer widget: - text: 바운티풀 프리미엄 코마사 사틴면 호텔 이불커버 Q 가구/인테리어>침구단품>이불커버 - text: 쇼파커버 사계절 담요 블랭킷 캠핑 이불 차박 대형 러그 가구/인테리어>침구단품>담요 - text: 플로라 시어서커 리플 여름 홑이불 SS 가구/인테리어>침구단품>홑이불 - text: 아이리스 포르토MT 모달 워싱 스프레드 Q 가구/인테리어>침구단품>스프레드 - text: 모던하우스 마이호텔 여름 모달혼방 고밀도워싱 차렵이불 S 가구/인테리어>침구단품>차렵이불 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:** 13 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 | |:------|:---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------| | 0.0 | | | 9.0 | | | 10.0 | | | 11.0 | | | 1.0 | | | 2.0 | | | 8.0 | | | 3.0 | | | 4.0 | | | 7.0 | | | 5.0 | | | 12.0 | | | 6.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_fi11") # Run inference preds = model("플로라 시어서커 리플 여름 홑이불 SS 가구/인테리어>침구단품>홑이불") ``` ## Training Details ### Training Set Metrics | Training set | Min | Median | Max | |:-------------|:----|:-------|:----| | Word count | 3 | 8.8067 | 23 | | Label | Training Sample Count | |:------|:----------------------| | 0.0 | 70 | | 1.0 | 70 | | 2.0 | 70 | | 3.0 | 70 | | 4.0 | 70 | | 5.0 | 50 | | 6.0 | 70 | | 7.0 | 70 | | 8.0 | 70 | | 9.0 | 70 | | 10.0 | 70 | | 11.0 | 70 | | 12.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.0057 | 1 | 0.5104 | - | | 0.2874 | 50 | 0.4986 | - | | 0.5747 | 100 | 0.3956 | - | | 0.8621 | 150 | 0.1871 | - | | 1.1494 | 200 | 0.0555 | - | | 1.4368 | 250 | 0.017 | - | | 1.7241 | 300 | 0.0073 | - | | 2.0115 | 350 | 0.0015 | - | | 2.2989 | 400 | 0.0003 | - | | 2.5862 | 450 | 0.0002 | - | | 2.8736 | 500 | 0.0001 | - | | 3.1609 | 550 | 0.0001 | - | | 3.4483 | 600 | 0.0001 | - | | 3.7356 | 650 | 0.0001 | - | | 4.0230 | 700 | 0.0001 | - | | 4.3103 | 750 | 0.0001 | - | | 4.5977 | 800 | 0.0001 | - | | 4.8851 | 850 | 0.0001 | - | | 5.1724 | 900 | 0.0 | - | | 5.4598 | 950 | 0.0 | - | | 5.7471 | 1000 | 0.0 | - | | 6.0345 | 1050 | 0.0 | - | | 6.3218 | 1100 | 0.0 | - | | 6.6092 | 1150 | 0.0 | - | | 6.8966 | 1200 | 0.0 | - | | 7.1839 | 1250 | 0.0 | - | | 7.4713 | 1300 | 0.0001 | - | | 7.7586 | 1350 | 0.0 | - | | 8.0460 | 1400 | 0.0 | - | | 8.3333 | 1450 | 0.0 | - | | 8.6207 | 1500 | 0.0 | - | | 8.9080 | 1550 | 0.0 | - | | 9.1954 | 1600 | 0.0 | - | | 9.4828 | 1650 | 0.0 | - | | 9.7701 | 1700 | 0.0 | - | | 10.0575 | 1750 | 0.0 | - | | 10.3448 | 1800 | 0.0 | - | | 10.6322 | 1850 | 0.0 | - | | 10.9195 | 1900 | 0.0 | - | | 11.2069 | 1950 | 0.0 | - | | 11.4943 | 2000 | 0.0 | - | | 11.7816 | 2050 | 0.0 | - | | 12.0690 | 2100 | 0.0 | - | | 12.3563 | 2150 | 0.0 | - | | 12.6437 | 2200 | 0.0 | - | | 12.9310 | 2250 | 0.0 | - | | 13.2184 | 2300 | 0.0 | - | | 13.5057 | 2350 | 0.0 | - | | 13.7931 | 2400 | 0.0 | - | | 14.0805 | 2450 | 0.0 | - | | 14.3678 | 2500 | 0.0 | - | | 14.6552 | 2550 | 0.0 | - | | 14.9425 | 2600 | 0.0 | - | | 15.2299 | 2650 | 0.0 | - | | 15.5172 | 2700 | 0.0 | - | | 15.8046 | 2750 | 0.0 | - | | 16.0920 | 2800 | 0.0 | - | | 16.3793 | 2850 | 0.0 | - | | 16.6667 | 2900 | 0.0 | - | | 16.9540 | 2950 | 0.0 | - | | 17.2414 | 3000 | 0.0 | - | | 17.5287 | 3050 | 0.0 | - | | 17.8161 | 3100 | 0.0 | - | | 18.1034 | 3150 | 0.0 | - | | 18.3908 | 3200 | 0.0 | - | | 18.6782 | 3250 | 0.0 | - | | 18.9655 | 3300 | 0.0 | - | | 19.2529 | 3350 | 0.0 | - | | 19.5402 | 3400 | 0.0 | - | | 19.8276 | 3450 | 0.0 | - | | 20.1149 | 3500 | 0.0 | - | | 20.4023 | 3550 | 0.0 | - | | 20.6897 | 3600 | 0.0 | - | | 20.9770 | 3650 | 0.0 | - | | 21.2644 | 3700 | 0.0 | - | | 21.5517 | 3750 | 0.0 | - | | 21.8391 | 3800 | 0.0 | - | | 22.1264 | 3850 | 0.0 | - | | 22.4138 | 3900 | 0.0 | - | | 22.7011 | 3950 | 0.0 | - | | 22.9885 | 4000 | 0.0 | - | | 23.2759 | 4050 | 0.0 | - | | 23.5632 | 4100 | 0.0 | - | | 23.8506 | 4150 | 0.0 | - | | 24.1379 | 4200 | 0.0 | - | | 24.4253 | 4250 | 0.0 | - | | 24.7126 | 4300 | 0.0 | - | | 25.0 | 4350 | 0.0 | - | | 25.2874 | 4400 | 0.0 | - | | 25.5747 | 4450 | 0.0 | - | | 25.8621 | 4500 | 0.0 | - | | 26.1494 | 4550 | 0.0 | - | | 26.4368 | 4600 | 0.0 | - | | 26.7241 | 4650 | 0.0 | - | | 27.0115 | 4700 | 0.0 | - | | 27.2989 | 4750 | 0.0 | - | | 27.5862 | 4800 | 0.0 | - | | 27.8736 | 4850 | 0.0 | - | | 28.1609 | 4900 | 0.0 | - | | 28.4483 | 4950 | 0.0 | - | | 28.7356 | 5000 | 0.0 | - | | 29.0230 | 5050 | 0.0 | - | | 29.3103 | 5100 | 0.0 | - | | 29.5977 | 5150 | 0.0 | - | | 29.8851 | 5200 | 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} } ```