--- tags: - setfit - sentence-transformers - text-classification - generated_from_setfit_trainer widget: - text: 화장대의자 1인 스툴 모던 심플 인테리어 체어 스툴 간이 의자 가구/인테리어>침실가구>화장대>화장대의자 - text: 가벼운 럭셔리 슬레이트 식탁 소형 거실 식탁 직사각형 커피 테이블 모던 심플 홈 가구 가구/인테리어>침실가구>침실세트 - text: 대나무 플립 신발 캐비닛 절약 숨겨진 신발거치대 장식 입구 홀 가구 가구/인테리어>침실가구>침실세트 - text: 동서가구 히루 LPM 편백 800 수납선반옷장 드레스룸 D1021 가구/인테리어>침실가구>장롱/붙박이장>드레스룸 - text: 시몬스 뷰티레스트 허브 매트리스 Q 가구/인테리어>침실가구>매트리스>퀸매트리스 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:** 9 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 | |:------|:-------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------| | 1.0 | | | 8.0 | | | 6.0 | | | 7.0 | | | 3.0 | | | 4.0 | | | 0.0 | | | 5.0 | | | 2.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_fi13") # Run inference preds = model("시몬스 뷰티레스트 허브 매트리스 Q 가구/인테리어>침실가구>매트리스>퀸매트리스") ``` ## Training Details ### Training Set Metrics | Training set | Min | Median | Max | |:-------------|:----|:-------|:----| | Word count | 3 | 8.2846 | 19 | | Label | Training Sample Count | |:------|:----------------------| | 0.0 | 70 | | 1.0 | 70 | | 2.0 | 69 | | 3.0 | 70 | | 4.0 | 70 | | 5.0 | 70 | | 6.0 | 70 | | 7.0 | 70 | | 8.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.0081 | 1 | 0.4686 | - | | 0.4065 | 50 | 0.4974 | - | | 0.8130 | 100 | 0.5009 | - | | 1.2195 | 150 | 0.4141 | - | | 1.6260 | 200 | 0.1421 | - | | 2.0325 | 250 | 0.0417 | - | | 2.4390 | 300 | 0.0104 | - | | 2.8455 | 350 | 0.0007 | - | | 3.2520 | 400 | 0.0004 | - | | 3.6585 | 450 | 0.0002 | - | | 4.0650 | 500 | 0.0002 | - | | 4.4715 | 550 | 0.0002 | - | | 4.8780 | 600 | 0.0001 | - | | 5.2846 | 650 | 0.0002 | - | | 5.6911 | 700 | 0.0001 | - | | 6.0976 | 750 | 0.0001 | - | | 6.5041 | 800 | 0.0001 | - | | 6.9106 | 850 | 0.0001 | - | | 7.3171 | 900 | 0.0001 | - | | 7.7236 | 950 | 0.0001 | - | | 8.1301 | 1000 | 0.0001 | - | | 8.5366 | 1050 | 0.0001 | - | | 8.9431 | 1100 | 0.0 | - | | 9.3496 | 1150 | 0.0 | - | | 9.7561 | 1200 | 0.0 | - | | 10.1626 | 1250 | 0.0 | - | | 10.5691 | 1300 | 0.0 | - | | 10.9756 | 1350 | 0.0 | - | | 11.3821 | 1400 | 0.0 | - | | 11.7886 | 1450 | 0.0 | - | | 12.1951 | 1500 | 0.0 | - | | 12.6016 | 1550 | 0.0 | - | | 13.0081 | 1600 | 0.0 | - | | 13.4146 | 1650 | 0.0 | - | | 13.8211 | 1700 | 0.0 | - | | 14.2276 | 1750 | 0.0 | - | | 14.6341 | 1800 | 0.0 | - | | 15.0407 | 1850 | 0.0 | - | | 15.4472 | 1900 | 0.0 | - | | 15.8537 | 1950 | 0.0 | - | | 16.2602 | 2000 | 0.0 | - | | 16.6667 | 2050 | 0.0 | - | | 17.0732 | 2100 | 0.0 | - | | 17.4797 | 2150 | 0.0 | - | | 17.8862 | 2200 | 0.0 | - | | 18.2927 | 2250 | 0.0 | - | | 18.6992 | 2300 | 0.0 | - | | 19.1057 | 2350 | 0.0 | - | | 19.5122 | 2400 | 0.0 | - | | 19.9187 | 2450 | 0.0 | - | | 20.3252 | 2500 | 0.0 | - | | 20.7317 | 2550 | 0.0 | - | | 21.1382 | 2600 | 0.0 | - | | 21.5447 | 2650 | 0.0 | - | | 21.9512 | 2700 | 0.0 | - | | 22.3577 | 2750 | 0.0 | - | | 22.7642 | 2800 | 0.0 | - | | 23.1707 | 2850 | 0.0 | - | | 23.5772 | 2900 | 0.0 | - | | 23.9837 | 2950 | 0.0 | - | | 24.3902 | 3000 | 0.0 | - | | 24.7967 | 3050 | 0.0 | - | | 25.2033 | 3100 | 0.0 | - | | 25.6098 | 3150 | 0.0 | - | | 26.0163 | 3200 | 0.0 | - | | 26.4228 | 3250 | 0.0 | - | | 26.8293 | 3300 | 0.0 | - | | 27.2358 | 3350 | 0.0 | - | | 27.6423 | 3400 | 0.0 | - | | 28.0488 | 3450 | 0.0 | - | | 28.4553 | 3500 | 0.0 | - | | 28.8618 | 3550 | 0.0 | - | | 29.2683 | 3600 | 0.0 | - | | 29.6748 | 3650 | 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} } ```