--- base_model: klue/roberta-base library_name: setfit metrics: - accuracy pipeline_tag: text-classification tags: - setfit - sentence-transformers - text-classification - generated_from_setfit_trainer widget: - text: 7 GRAB ME 레드 생로랑 Volupte 리퀴드 컬러 Balm 풀사이즈 B 20대여자 옵션없음 남인터내셔널 - text: 힐러랩 울트라본드 케라틴 단백질 트리트먼트 500ml 옵션없음 주식회사 와이제이비앤 - text: 바이오더마 센시비오 클렌징밀크 250ml 옵션없음 주식회사 하이유로 - text: 에스테티카 데미지 케어 컨센트레이트120ml /헤어오일 에센스 세럼 옵션없음 주식회사 베로유코스메틱 - text: 브이티코스메틱 VT 리들샷 700 시너지리페어 크림 옵션없음 북극곰마켓 inference: true model-index: - name: SetFit with klue/roberta-base results: - task: type: text-classification name: Text Classification dataset: name: Unknown type: unknown split: test metrics: - type: accuracy value: 0.7873765467135884 name: Accuracy --- # SetFit with klue/roberta-base This is a [SetFit](https://github.com/huggingface/setfit) model that can be used for Text Classification. This SetFit model uses [klue/roberta-base](https://huggingface.co/klue/roberta-base) 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:** [klue/roberta-base](https://huggingface.co/klue/roberta-base) - **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 | |:------|:-----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------| | 1.0 | | | 7.0 | | | 12.0 | | | 2.0 | | | 8.0 | | | 6.0 | | | 0.0 | | | 4.0 | | | 9.0 | | | 10.0 | | | 11.0 | | | 5.0 | | | 3.0 | | ## Evaluation ### Metrics | Label | Accuracy | |:--------|:---------| | **all** | 0.7874 | ## 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_item_bt_test") # Run inference preds = model("바이오더마 센시비오 클렌징밀크 250ml 옵션없음 주식회사 하이유로") ``` ## Training Details ### Training Set Metrics | Training set | Min | Median | Max | |:-------------|:----|:-------|:----| | Word count | 3 | 9.3971 | 26 | | Label | Training Sample Count | |:------|:----------------------| | 0.0 | 242 | | 1.0 | 134 | | 2.0 | 161 | | 3.0 | 324 | | 4.0 | 141 | | 5.0 | 130 | | 6.0 | 267 | | 7.0 | 133 | | 8.0 | 257 | | 9.0 | 251 | | 10.0 | 63 | | 11.0 | 117 | | 12.0 | 152 | ### Training Hyperparameters - batch_size: (512, 512) - num_epochs: (50, 50) - max_steps: -1 - sampling_strategy: oversampling - num_iterations: 60 - 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.0036 | 1 | 0.4112 | - | | 0.1799 | 50 | 0.3996 | - | | 0.3597 | 100 | 0.3542 | - | | 0.5396 | 150 | 0.3073 | - | | 0.7194 | 200 | 0.2654 | - | | 0.8993 | 250 | 0.2289 | - | | 1.0791 | 300 | 0.1949 | - | | 1.2590 | 350 | 0.1619 | - | | 1.4388 | 400 | 0.1254 | - | | 1.6187 | 450 | 0.0899 | - | | 1.7986 | 500 | 0.0645 | - | | 1.9784 | 550 | 0.0506 | - | | 2.1583 | 600 | 0.0403 | - | | 2.3381 | 650 | 0.0365 | - | | 2.5180 | 700 | 0.0342 | - | | 2.6978 | 750 | 0.0329 | - | | 2.8777 | 800 | 0.0302 | - | | 3.0576 | 850 | 0.0286 | - | | 3.2374 | 900 | 0.0272 | - | | 3.4173 | 950 | 0.0246 | - | | 3.5971 | 1000 | 0.0229 | - | | 3.7770 | 1050 | 0.0206 | - | | 3.9568 | 1100 | 0.0139 | - | | 4.1367 | 1150 | 0.0083 | - | | 4.3165 | 1200 | 0.0071 | - | | 4.4964 | 1250 | 0.0071 | - | | 4.6763 | 1300 | 0.0057 | - | | 4.8561 | 1350 | 0.0045 | - | | 5.0360 | 1400 | 0.0036 | - | | 5.2158 | 1450 | 0.0031 | - | | 5.3957 | 1500 | 0.0011 | - | | 5.5755 | 1550 | 0.0006 | - | | 5.7554 | 1600 | 0.0004 | - | | 5.9353 | 1650 | 0.0004 | - | | 6.1151 | 1700 | 0.0003 | - | | 6.2950 | 1750 | 0.0003 | - | | 6.4748 | 1800 | 0.0002 | - | | 6.6547 | 1850 | 0.0002 | - | | 6.8345 | 1900 | 0.0002 | - | | 7.0144 | 1950 | 0.0002 | - | | 7.1942 | 2000 | 0.0002 | - | | 7.3741 | 2050 | 0.0002 | - | | 7.5540 | 2100 | 0.0001 | - | | 7.7338 | 2150 | 0.0002 | - | | 7.9137 | 2200 | 0.0001 | - | | 8.0935 | 2250 | 0.0001 | - | | 8.2734 | 2300 | 0.0002 | - | | 8.4532 | 2350 | 0.0002 | - | | 8.6331 | 2400 | 0.0005 | - | | 8.8129 | 2450 | 0.0003 | - | | 8.9928 | 2500 | 0.0002 | - | | 9.1727 | 2550 | 0.0001 | - | | 9.3525 | 2600 | 0.0001 | - | | 9.5324 | 2650 | 0.0002 | - | | 9.7122 | 2700 | 0.0001 | - | | 9.8921 | 2750 | 0.0002 | - | | 10.0719 | 2800 | 0.0001 | - | | 10.2518 | 2850 | 0.0001 | - | | 10.4317 | 2900 | 0.0002 | - | | 10.6115 | 2950 | 0.0003 | - | | 10.7914 | 3000 | 0.0002 | - | | 10.9712 | 3050 | 0.0004 | - | | 11.1511 | 3100 | 0.0003 | - | | 11.3309 | 3150 | 0.0002 | - | | 11.5108 | 3200 | 0.0001 | - | | 11.6906 | 3250 | 0.0001 | - | | 11.8705 | 3300 | 0.0001 | - | | 12.0504 | 3350 | 0.0001 | - | | 12.2302 | 3400 | 0.0 | - | | 12.4101 | 3450 | 0.0 | - | | 12.5899 | 3500 | 0.0001 | - | | 12.7698 | 3550 | 0.0001 | - | | 12.9496 | 3600 | 0.0003 | - | | 13.1295 | 3650 | 0.0002 | - | | 13.3094 | 3700 | 0.0002 | - | | 13.4892 | 3750 | 0.0004 | - | | 13.6691 | 3800 | 0.0002 | - | | 13.8489 | 3850 | 0.0001 | - | | 14.0288 | 3900 | 0.0001 | - | | 14.2086 | 3950 | 0.0002 | - | | 14.3885 | 4000 | 0.0001 | - | | 14.5683 | 4050 | 0.0001 | - | | 14.7482 | 4100 | 0.0 | - | | 14.9281 | 4150 | 0.0001 | - | | 15.1079 | 4200 | 0.0003 | - | | 15.2878 | 4250 | 0.0002 | - | | 15.4676 | 4300 | 0.0001 | - | | 15.6475 | 4350 | 0.0001 | - | | 15.8273 | 4400 | 0.0 | - | | 16.0072 | 4450 | 0.0 | - | | 16.1871 | 4500 | 0.0 | - | | 16.3669 | 4550 | 0.0 | - | | 16.5468 | 4600 | 0.0 | - | | 16.7266 | 4650 | 0.0 | - | | 16.9065 | 4700 | 0.0 | - | | 17.0863 | 4750 | 0.0 | - | | 17.2662 | 4800 | 0.0001 | - | | 17.4460 | 4850 | 0.0 | - | | 17.6259 | 4900 | 0.0 | - | | 17.8058 | 4950 | 0.0 | - | | 17.9856 | 5000 | 0.0002 | - | | 18.1655 | 5050 | 0.0002 | - | | 18.3453 | 5100 | 0.0002 | - | | 18.5252 | 5150 | 0.0005 | - | | 18.7050 | 5200 | 0.0001 | - | | 18.8849 | 5250 | 0.0 | - | | 19.0647 | 5300 | 0.0 | - | | 19.2446 | 5350 | 0.0 | - | | 19.4245 | 5400 | 0.0 | - | | 19.6043 | 5450 | 0.0 | - | | 19.7842 | 5500 | 0.0 | - | | 19.9640 | 5550 | 0.0001 | - | | 20.1439 | 5600 | 0.0 | - | | 20.3237 | 5650 | 0.0001 | - | | 20.5036 | 5700 | 0.0002 | - | | 20.6835 | 5750 | 0.0001 | - | | 20.8633 | 5800 | 0.0001 | - | | 21.0432 | 5850 | 0.0003 | - | | 21.2230 | 5900 | 0.0002 | - | | 21.4029 | 5950 | 0.0001 | - | | 21.5827 | 6000 | 0.0 | - | | 21.7626 | 6050 | 0.0 | - | | 21.9424 | 6100 | 0.0 | - | | 22.1223 | 6150 | 0.0 | - | | 22.3022 | 6200 | 0.0 | - | | 22.4820 | 6250 | 0.0 | - | | 22.6619 | 6300 | 0.0 | - | | 22.8417 | 6350 | 0.0 | - | | 23.0216 | 6400 | 0.0 | - | | 23.2014 | 6450 | 0.0 | - | | 23.3813 | 6500 | 0.0 | - | | 23.5612 | 6550 | 0.0 | - | | 23.7410 | 6600 | 0.0 | - | | 23.9209 | 6650 | 0.0 | - | | 24.1007 | 6700 | 0.0 | - | | 24.2806 | 6750 | 0.0 | - | | 24.4604 | 6800 | 0.0 | - | | 24.6403 | 6850 | 0.0 | - | | 24.8201 | 6900 | 0.0 | - | | 25.0 | 6950 | 0.0 | - | | 25.1799 | 7000 | 0.0 | - | | 25.3597 | 7050 | 0.0 | - | | 25.5396 | 7100 | 0.0 | - | | 25.7194 | 7150 | 0.0 | - | | 25.8993 | 7200 | 0.0001 | - | | 26.0791 | 7250 | 0.0001 | - | | 26.2590 | 7300 | 0.0005 | - | | 26.4388 | 7350 | 0.0002 | - | | 26.6187 | 7400 | 0.0 | - | | 26.7986 | 7450 | 0.0 | - | | 26.9784 | 7500 | 0.0 | - | | 27.1583 | 7550 | 0.0 | - | | 27.3381 | 7600 | 0.0 | - | | 27.5180 | 7650 | 0.0 | - | | 27.6978 | 7700 | 0.0 | - | | 27.8777 | 7750 | 0.0002 | - | | 28.0576 | 7800 | 0.0001 | - | | 28.2374 | 7850 | 0.0001 | - | | 28.4173 | 7900 | 0.0 | - | | 28.5971 | 7950 | 0.0001 | - | | 28.7770 | 8000 | 0.0001 | - | | 28.9568 | 8050 | 0.0001 | - | | 29.1367 | 8100 | 0.0001 | - | | 29.3165 | 8150 | 0.0001 | - | | 29.4964 | 8200 | 0.0 | - | | 29.6763 | 8250 | 0.0 | - | | 29.8561 | 8300 | 0.0 | - | | 30.0360 | 8350 | 0.0 | - | | 30.2158 | 8400 | 0.0 | - | | 30.3957 | 8450 | 0.0 | - | | 30.5755 | 8500 | 0.0 | - | | 30.7554 | 8550 | 0.0 | - | | 30.9353 | 8600 | 0.0 | - | | 31.1151 | 8650 | 0.0 | - | | 31.2950 | 8700 | 0.0 | - | | 31.4748 | 8750 | 0.0 | - | | 31.6547 | 8800 | 0.0 | - | | 31.8345 | 8850 | 0.0 | - | | 32.0144 | 8900 | 0.0 | - | | 32.1942 | 8950 | 0.0 | - | | 32.3741 | 9000 | 0.0 | - | | 32.5540 | 9050 | 0.0 | - | | 32.7338 | 9100 | 0.0 | - | | 32.9137 | 9150 | 0.0 | - | | 33.0935 | 9200 | 0.0 | - | | 33.2734 | 9250 | 0.0 | - | | 33.4532 | 9300 | 0.0 | - | | 33.6331 | 9350 | 0.0 | - | | 33.8129 | 9400 | 0.0 | - | | 33.9928 | 9450 | 0.0 | - | | 34.1727 | 9500 | 0.0 | - | | 34.3525 | 9550 | 0.0001 | - | | 34.5324 | 9600 | 0.0 | - | | 34.7122 | 9650 | 0.0 | - | | 34.8921 | 9700 | 0.0 | - | | 35.0719 | 9750 | 0.0 | - | | 35.2518 | 9800 | 0.0 | - | | 35.4317 | 9850 | 0.0001 | - | | 35.6115 | 9900 | 0.0 | - | | 35.7914 | 9950 | 0.0 | - | | 35.9712 | 10000 | 0.0 | - | | 36.1511 | 10050 | 0.0 | - | | 36.3309 | 10100 | 0.0 | - | | 36.5108 | 10150 | 0.0 | - | | 36.6906 | 10200 | 0.0 | - | | 36.8705 | 10250 | 0.0 | - | | 37.0504 | 10300 | 0.0 | - | | 37.2302 | 10350 | 0.0 | - | | 37.4101 | 10400 | 0.0 | - | | 37.5899 | 10450 | 0.0 | - | | 37.7698 | 10500 | 0.0 | - | | 37.9496 | 10550 | 0.0 | - | | 38.1295 | 10600 | 0.0 | - | | 38.3094 | 10650 | 0.0 | - | | 38.4892 | 10700 | 0.0 | - | | 38.6691 | 10750 | 0.0 | - | | 38.8489 | 10800 | 0.0 | - | | 39.0288 | 10850 | 0.0 | - | | 39.2086 | 10900 | 0.0 | - | | 39.3885 | 10950 | 0.0 | - | | 39.5683 | 11000 | 0.0 | - | | 39.7482 | 11050 | 0.0 | - | | 39.9281 | 11100 | 0.0 | - | | 40.1079 | 11150 | 0.0 | - | | 40.2878 | 11200 | 0.0 | - | | 40.4676 | 11250 | 0.0 | - | | 40.6475 | 11300 | 0.0 | - | | 40.8273 | 11350 | 0.0 | - | | 41.0072 | 11400 | 0.0 | - | | 41.1871 | 11450 | 0.0 | - | | 41.3669 | 11500 | 0.0 | - | | 41.5468 | 11550 | 0.0 | - | | 41.7266 | 11600 | 0.0 | - | | 41.9065 | 11650 | 0.0 | - | | 42.0863 | 11700 | 0.0 | - | | 42.2662 | 11750 | 0.0 | - | | 42.4460 | 11800 | 0.0 | - | | 42.6259 | 11850 | 0.0 | - | | 42.8058 | 11900 | 0.0 | - | | 42.9856 | 11950 | 0.0 | - | | 43.1655 | 12000 | 0.0 | - | | 43.3453 | 12050 | 0.0 | - | | 43.5252 | 12100 | 0.0 | - | | 43.7050 | 12150 | 0.0 | - | | 43.8849 | 12200 | 0.0 | - | | 44.0647 | 12250 | 0.0 | - | | 44.2446 | 12300 | 0.0 | - | | 44.4245 | 12350 | 0.0 | - | | 44.6043 | 12400 | 0.0 | - | | 44.7842 | 12450 | 0.0 | - | | 44.9640 | 12500 | 0.0 | - | | 45.1439 | 12550 | 0.0 | - | | 45.3237 | 12600 | 0.0 | - | | 45.5036 | 12650 | 0.0 | - | | 45.6835 | 12700 | 0.0 | - | | 45.8633 | 12750 | 0.0 | - | | 46.0432 | 12800 | 0.0 | - | | 46.2230 | 12850 | 0.0 | - | | 46.4029 | 12900 | 0.0 | - | | 46.5827 | 12950 | 0.0 | - | | 46.7626 | 13000 | 0.0 | - | | 46.9424 | 13050 | 0.0 | - | | 47.1223 | 13100 | 0.0 | - | | 47.3022 | 13150 | 0.0 | - | | 47.4820 | 13200 | 0.0 | - | | 47.6619 | 13250 | 0.0 | - | | 47.8417 | 13300 | 0.0 | - | | 48.0216 | 13350 | 0.0 | - | | 48.2014 | 13400 | 0.0 | - | | 48.3813 | 13450 | 0.0 | - | | 48.5612 | 13500 | 0.0 | - | | 48.7410 | 13550 | 0.0 | - | | 48.9209 | 13600 | 0.0 | - | | 49.1007 | 13650 | 0.0 | - | | 49.2806 | 13700 | 0.0 | - | | 49.4604 | 13750 | 0.0 | - | | 49.6403 | 13800 | 0.0 | - | | 49.8201 | 13850 | 0.0 | - | | 50.0 | 13900 | 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} } ```