--- tags: - setfit - sentence-transformers - text-classification - generated_from_setfit_trainer widget: - text: 아레나 모던 대리석 다용도 도어 수납장 가구/인테리어>수납가구>수납장 - text: 원목 문갑 약장 자개농 엔틱 고가구 거실 인테리어 선반 가구/인테리어>수납가구>고가구 - text: 아카시아 대용량 2단 선반 행거 400호 가구/인테리어>수납가구>행거 - 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:** 12 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 | |:------|:------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------| | 10.0 | | | 0.0 | | | 3.0 | | | 11.0 | | | 4.0 | | | 2.0 | | | 7.0 | | | 8.0 | | | 6.0 | | | 5.0 | | | 1.0 | | | 9.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_fi5") # Run inference preds = model("아카시아 대용량 2단 선반 행거 400호 가구/인테리어>수납가구>행거") ``` ## Training Details ### Training Set Metrics | Training set | Min | Median | Max | |:-------------|:----|:-------|:----| | Word count | 3 | 9.0095 | 20 | | Label | Training Sample Count | |:------|:----------------------| | 0.0 | 69 | | 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 | 69 | | 10.0 | 70 | | 11.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.0061 | 1 | 0.4852 | - | | 0.3049 | 50 | 0.4994 | - | | 0.6098 | 100 | 0.4134 | - | | 0.9146 | 150 | 0.1731 | - | | 1.2195 | 200 | 0.0287 | - | | 1.5244 | 250 | 0.0058 | - | | 1.8293 | 300 | 0.0003 | - | | 2.1341 | 350 | 0.0001 | - | | 2.4390 | 400 | 0.0001 | - | | 2.7439 | 450 | 0.0001 | - | | 3.0488 | 500 | 0.0 | - | | 3.3537 | 550 | 0.0 | - | | 3.6585 | 600 | 0.0 | - | | 3.9634 | 650 | 0.0 | - | | 4.2683 | 700 | 0.0 | - | | 4.5732 | 750 | 0.0 | - | | 4.8780 | 800 | 0.0 | - | | 5.1829 | 850 | 0.0 | - | | 5.4878 | 900 | 0.0 | - | | 5.7927 | 950 | 0.0 | - | | 6.0976 | 1000 | 0.0 | - | | 6.4024 | 1050 | 0.0 | - | | 6.7073 | 1100 | 0.0 | - | | 7.0122 | 1150 | 0.0002 | - | | 7.3171 | 1200 | 0.0001 | - | | 7.6220 | 1250 | 0.0 | - | | 7.9268 | 1300 | 0.0 | - | | 8.2317 | 1350 | 0.0 | - | | 8.5366 | 1400 | 0.0 | - | | 8.8415 | 1450 | 0.0 | - | | 9.1463 | 1500 | 0.0 | - | | 9.4512 | 1550 | 0.0 | - | | 9.7561 | 1600 | 0.0 | - | | 10.0610 | 1650 | 0.0 | - | | 10.3659 | 1700 | 0.0 | - | | 10.6707 | 1750 | 0.0 | - | | 10.9756 | 1800 | 0.0 | - | | 11.2805 | 1850 | 0.0 | - | | 11.5854 | 1900 | 0.0 | - | | 11.8902 | 1950 | 0.0 | - | | 12.1951 | 2000 | 0.0 | - | | 12.5 | 2050 | 0.0 | - | | 12.8049 | 2100 | 0.0 | - | | 13.1098 | 2150 | 0.0 | - | | 13.4146 | 2200 | 0.0 | - | | 13.7195 | 2250 | 0.0 | - | | 14.0244 | 2300 | 0.0 | - | | 14.3293 | 2350 | 0.0 | - | | 14.6341 | 2400 | 0.0 | - | | 14.9390 | 2450 | 0.0 | - | | 15.2439 | 2500 | 0.0 | - | | 15.5488 | 2550 | 0.0 | - | | 15.8537 | 2600 | 0.0 | - | | 16.1585 | 2650 | 0.0 | - | | 16.4634 | 2700 | 0.0 | - | | 16.7683 | 2750 | 0.0 | - | | 17.0732 | 2800 | 0.0 | - | | 17.3780 | 2850 | 0.0 | - | | 17.6829 | 2900 | 0.0 | - | | 17.9878 | 2950 | 0.0 | - | | 18.2927 | 3000 | 0.0 | - | | 18.5976 | 3050 | 0.0 | - | | 18.9024 | 3100 | 0.0 | - | | 19.2073 | 3150 | 0.0 | - | | 19.5122 | 3200 | 0.0 | - | | 19.8171 | 3250 | 0.0 | - | | 20.1220 | 3300 | 0.0 | - | | 20.4268 | 3350 | 0.0 | - | | 20.7317 | 3400 | 0.0 | - | | 21.0366 | 3450 | 0.0 | - | | 21.3415 | 3500 | 0.0 | - | | 21.6463 | 3550 | 0.0 | - | | 21.9512 | 3600 | 0.0 | - | | 22.2561 | 3650 | 0.0 | - | | 22.5610 | 3700 | 0.0 | - | | 22.8659 | 3750 | 0.0 | - | | 23.1707 | 3800 | 0.0 | - | | 23.4756 | 3850 | 0.0 | - | | 23.7805 | 3900 | 0.0 | - | | 24.0854 | 3950 | 0.0 | - | | 24.3902 | 4000 | 0.0 | - | | 24.6951 | 4050 | 0.0 | - | | 25.0 | 4100 | 0.0 | - | | 25.3049 | 4150 | 0.0 | - | | 25.6098 | 4200 | 0.0 | - | | 25.9146 | 4250 | 0.0 | - | | 26.2195 | 4300 | 0.0 | - | | 26.5244 | 4350 | 0.0 | - | | 26.8293 | 4400 | 0.0 | - | | 27.1341 | 4450 | 0.0 | - | | 27.4390 | 4500 | 0.0 | - | | 27.7439 | 4550 | 0.0 | - | | 28.0488 | 4600 | 0.0 | - | | 28.3537 | 4650 | 0.0 | - | | 28.6585 | 4700 | 0.0 | - | | 28.9634 | 4750 | 0.0 | - | | 29.2683 | 4800 | 0.0 | - | | 29.5732 | 4850 | 0.0 | - | | 29.8780 | 4900 | 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} } ```