--- base_model: mini1013/master_domain library_name: setfit metrics: - metric pipeline_tag: text-classification tags: - setfit - sentence-transformers - text-classification - generated_from_setfit_trainer widget: - text: 스마일뱃지 제작 브로치 다양한 크기 문구 삽입가능 별빛(+300원)_뱃지 중(45mm)_200개~399개 맘스뱃지 - text: 고급 골지압박 타이즈 스타킹 유발 면 겨울 베이지 버징가마켓 - text: 겨울 목도리 여자 남자 캐시미어 니트 쁘띠 울 머플러 1_솜사탕-MS47 에스랑제이 - text: 손수건/무지손수건/등산손수건/스카프/등산손수건/두건/KC인증/인쇄가능/개별OPP 무지손수건 [무지손수건] 무지손수건(옐로우) 답돌이월드 - text: 동백꽃 부토니에 머리핀 코사지(K28) K28-06_머리핀 까만당나귀 inference: true 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: metric value: 0.8556701030927835 name: Metric --- # 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:** 20 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 | |:------|:-----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------| | 19.0 | | | 18.0 | | | 17.0 | | | 2.0 | | | 12.0 | | | 5.0 | | | 16.0 | | | 11.0 | | | 9.0 | | | 1.0 | | | 8.0 | | | 15.0 | | | 0.0 | | | 6.0 | | | 10.0 | | | 4.0 | | | 13.0 | | | 3.0 | | | 14.0 | | | 7.0 | | ## Evaluation ### Metrics | Label | Metric | |:--------|:-------| | **all** | 0.8557 | ## 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_ac15") # Run inference preds = model("고급 골지압박 타이즈 스타킹 유발 면 겨울 베이지 버징가마켓") ``` ## Training Details ### Training Set Metrics | Training set | Min | Median | Max | |:-------------|:----|:-------|:----| | Word count | 3 | 10.322 | 25 | | Label | Training Sample Count | |:------|:----------------------| | 0.0 | 50 | | 1.0 | 50 | | 2.0 | 50 | | 3.0 | 50 | | 4.0 | 50 | | 5.0 | 50 | | 6.0 | 50 | | 7.0 | 50 | | 8.0 | 50 | | 9.0 | 50 | | 10.0 | 50 | | 11.0 | 50 | | 12.0 | 50 | | 13.0 | 50 | | 14.0 | 50 | | 15.0 | 50 | | 16.0 | 50 | | 17.0 | 50 | | 18.0 | 50 | | 19.0 | 50 | ### Training Hyperparameters - batch_size: (512, 512) - num_epochs: (20, 20) - max_steps: -1 - sampling_strategy: oversampling - num_iterations: 40 - body_learning_rate: (2e-05, 2e-05) - head_learning_rate: 2e-05 - loss: CosineSimilarityLoss - distance_metric: cosine_distance - margin: 0.25 - end_to_end: False - use_amp: False - warmup_proportion: 0.1 - seed: 42 - eval_max_steps: -1 - load_best_model_at_end: False ### Training Results | Epoch | Step | Training Loss | Validation Loss | |:-------:|:----:|:-------------:|:---------------:| | 0.0064 | 1 | 0.3967 | - | | 0.3185 | 50 | 0.3383 | - | | 0.6369 | 100 | 0.2365 | - | | 0.9554 | 150 | 0.1145 | - | | 1.2739 | 200 | 0.0563 | - | | 1.5924 | 250 | 0.0414 | - | | 1.9108 | 300 | 0.0377 | - | | 2.2293 | 350 | 0.0159 | - | | 2.5478 | 400 | 0.0297 | - | | 2.8662 | 450 | 0.0258 | - | | 3.1847 | 500 | 0.0194 | - | | 3.5032 | 550 | 0.0113 | - | | 3.8217 | 600 | 0.0108 | - | | 4.1401 | 650 | 0.0059 | - | | 4.4586 | 700 | 0.0009 | - | | 4.7771 | 750 | 0.0059 | - | | 5.0955 | 800 | 0.0044 | - | | 5.4140 | 850 | 0.004 | - | | 5.7325 | 900 | 0.0023 | - | | 6.0510 | 950 | 0.0004 | - | | 6.3694 | 1000 | 0.0024 | - | | 6.6879 | 1050 | 0.0007 | - | | 7.0064 | 1100 | 0.0004 | - | | 7.3248 | 1150 | 0.0002 | - | | 7.6433 | 1200 | 0.0002 | - | | 7.9618 | 1250 | 0.0003 | - | | 8.2803 | 1300 | 0.0002 | - | | 8.5987 | 1350 | 0.0001 | - | | 8.9172 | 1400 | 0.0001 | - | | 9.2357 | 1450 | 0.0001 | - | | 9.5541 | 1500 | 0.0001 | - | | 9.8726 | 1550 | 0.0001 | - | | 10.1911 | 1600 | 0.0001 | - | | 10.5096 | 1650 | 0.0001 | - | | 10.8280 | 1700 | 0.0001 | - | | 11.1465 | 1750 | 0.0001 | - | | 11.4650 | 1800 | 0.0001 | - | | 11.7834 | 1850 | 0.0001 | - | | 12.1019 | 1900 | 0.0001 | - | | 12.4204 | 1950 | 0.0001 | - | | 12.7389 | 2000 | 0.0001 | - | | 13.0573 | 2050 | 0.0001 | - | | 13.3758 | 2100 | 0.0001 | - | | 13.6943 | 2150 | 0.0001 | - | | 14.0127 | 2200 | 0.0001 | - | | 14.3312 | 2250 | 0.0001 | - | | 14.6497 | 2300 | 0.0001 | - | | 14.9682 | 2350 | 0.0001 | - | | 15.2866 | 2400 | 0.0001 | - | | 15.6051 | 2450 | 0.0001 | - | | 15.9236 | 2500 | 0.0001 | - | | 16.2420 | 2550 | 0.0001 | - | | 16.5605 | 2600 | 0.0001 | - | | 16.8790 | 2650 | 0.0001 | - | | 17.1975 | 2700 | 0.0001 | - | | 17.5159 | 2750 | 0.0001 | - | | 17.8344 | 2800 | 0.0001 | - | | 18.1529 | 2850 | 0.0001 | - | | 18.4713 | 2900 | 0.0001 | - | | 18.7898 | 2950 | 0.0001 | - | | 19.1083 | 3000 | 0.0001 | - | | 19.4268 | 3050 | 0.0001 | - | | 19.7452 | 3100 | 0.0001 | - | ### Framework Versions - Python: 3.10.12 - SetFit: 1.1.0.dev0 - Sentence Transformers: 3.1.1 - Transformers: 4.46.1 - PyTorch: 2.4.0+cu121 - Datasets: 2.20.0 - Tokenizers: 0.20.0 ## 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} } ```