--- tags: - setfit - sentence-transformers - text-classification - generated_from_setfit_trainer widget: - text: 캠핑 데크팩 타프팩 고정핀 단조 스토퍼 텐트비너 고강도 오토캠핑용품 백패킹 스포츠/레저>캠핑>텐트/타프용품>기타텐트/타프용품 - text: 빅토리캠프 BLAZE 블레이즈 펠렛연소기 캠핑용 화목난로 펠렛난로 차박 야외용 스포츠/레저>캠핑>기타캠핑용품 - text: 프리모리 세움 스탠다드 슬라이드 폴대 사이드 타프 가변 높이 조절 단품 캠핑 피크닉 스포츠/레저>캠핑>텐트/타프용품>폴대 - text: 익시드 디자인 TIRANT RAZOR V3 티타늄 만능칼 EDC 포켓 나이프 스포츠/레저>캠핑>취사용품>다용도칼 - text: 애몰라이트 후레쉬 AM1 표준슬립 손전등 스포츠/레저>캠핑>랜턴>손전등 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:** 14 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 | |:------|:--------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------| | 7.0 | | | 1.0 | | | 6.0 | | | 12.0 | | | 5.0 | | | 0.0 | | | 10.0 | | | 8.0 | | | 11.0 | | | 13.0 | | | 2.0 | | | 9.0 | | | 4.0 | | | 3.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_sl28") # Run inference preds = model("애몰라이트 후레쉬 AM1 표준슬립 손전등 스포츠/레저>캠핑>랜턴>손전등") ``` ## Training Details ### Training Set Metrics | Training set | Min | Median | Max | |:-------------|:----|:-------|:----| | Word count | 3 | 7.8108 | 22 | | Label | Training Sample Count | |:------|:----------------------| | 0.0 | 70 | | 1.0 | 70 | | 2.0 | 70 | | 3.0 | 25 | | 4.0 | 30 | | 5.0 | 70 | | 6.0 | 70 | | 7.0 | 70 | | 8.0 | 70 | | 9.0 | 70 | | 10.0 | 70 | | 11.0 | 70 | | 12.0 | 70 | | 13.0 | 26 | ### 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.0060 | 1 | 0.5164 | - | | 0.2994 | 50 | 0.4984 | - | | 0.5988 | 100 | 0.4882 | - | | 0.8982 | 150 | 0.1544 | - | | 1.1976 | 200 | 0.0264 | - | | 1.4970 | 250 | 0.0089 | - | | 1.7964 | 300 | 0.0027 | - | | 2.0958 | 350 | 0.0003 | - | | 2.3952 | 400 | 0.0002 | - | | 2.6946 | 450 | 0.0001 | - | | 2.9940 | 500 | 0.0001 | - | | 3.2934 | 550 | 0.0001 | - | | 3.5928 | 600 | 0.0001 | - | | 3.8922 | 650 | 0.0001 | - | | 4.1916 | 700 | 0.0001 | - | | 4.4910 | 750 | 0.0 | - | | 4.7904 | 800 | 0.0 | - | | 5.0898 | 850 | 0.0 | - | | 5.3892 | 900 | 0.0 | - | | 5.6886 | 950 | 0.0 | - | | 5.9880 | 1000 | 0.0 | - | | 6.2874 | 1050 | 0.0 | - | | 6.5868 | 1100 | 0.0 | - | | 6.8862 | 1150 | 0.0 | - | | 7.1856 | 1200 | 0.0 | - | | 7.4850 | 1250 | 0.0 | - | | 7.7844 | 1300 | 0.0 | - | | 8.0838 | 1350 | 0.0 | - | | 8.3832 | 1400 | 0.0 | - | | 8.6826 | 1450 | 0.0 | - | | 8.9820 | 1500 | 0.0 | - | | 9.2814 | 1550 | 0.0 | - | | 9.5808 | 1600 | 0.0 | - | | 9.8802 | 1650 | 0.0 | - | | 10.1796 | 1700 | 0.0 | - | | 10.4790 | 1750 | 0.0 | - | | 10.7784 | 1800 | 0.0 | - | | 11.0778 | 1850 | 0.0 | - | | 11.3772 | 1900 | 0.0 | - | | 11.6766 | 1950 | 0.0 | - | | 11.9760 | 2000 | 0.0 | - | | 12.2754 | 2050 | 0.0 | - | | 12.5749 | 2100 | 0.0 | - | | 12.8743 | 2150 | 0.0 | - | | 13.1737 | 2200 | 0.0 | - | | 13.4731 | 2250 | 0.0 | - | | 13.7725 | 2300 | 0.0 | - | | 14.0719 | 2350 | 0.0 | - | | 14.3713 | 2400 | 0.0 | - | | 14.6707 | 2450 | 0.0 | - | | 14.9701 | 2500 | 0.0 | - | | 15.2695 | 2550 | 0.0 | - | | 15.5689 | 2600 | 0.0 | - | | 15.8683 | 2650 | 0.0 | - | | 16.1677 | 2700 | 0.0 | - | | 16.4671 | 2750 | 0.0 | - | | 16.7665 | 2800 | 0.0 | - | | 17.0659 | 2850 | 0.0 | - | | 17.3653 | 2900 | 0.0 | - | | 17.6647 | 2950 | 0.0 | - | | 17.9641 | 3000 | 0.0 | - | | 18.2635 | 3050 | 0.0 | - | | 18.5629 | 3100 | 0.0 | - | | 18.8623 | 3150 | 0.0 | - | | 19.1617 | 3200 | 0.0 | - | | 19.4611 | 3250 | 0.0 | - | | 19.7605 | 3300 | 0.0 | - | | 20.0599 | 3350 | 0.0 | - | | 20.3593 | 3400 | 0.0 | - | | 20.6587 | 3450 | 0.0 | - | | 20.9581 | 3500 | 0.0 | - | | 21.2575 | 3550 | 0.0 | - | | 21.5569 | 3600 | 0.0 | - | | 21.8563 | 3650 | 0.0 | - | | 22.1557 | 3700 | 0.0 | - | | 22.4551 | 3750 | 0.0 | - | | 22.7545 | 3800 | 0.0 | - | | 23.0539 | 3850 | 0.0 | - | | 23.3533 | 3900 | 0.0 | - | | 23.6527 | 3950 | 0.0 | - | | 23.9521 | 4000 | 0.0 | - | | 24.2515 | 4050 | 0.0 | - | | 24.5509 | 4100 | 0.0 | - | | 24.8503 | 4150 | 0.0 | - | | 25.1497 | 4200 | 0.0 | - | | 25.4491 | 4250 | 0.0 | - | | 25.7485 | 4300 | 0.0 | - | | 26.0479 | 4350 | 0.0 | - | | 26.3473 | 4400 | 0.0 | - | | 26.6467 | 4450 | 0.0 | - | | 26.9461 | 4500 | 0.0 | - | | 27.2455 | 4550 | 0.0 | - | | 27.5449 | 4600 | 0.0 | - | | 27.8443 | 4650 | 0.0 | - | | 28.1437 | 4700 | 0.0 | - | | 28.4431 | 4750 | 0.0 | - | | 28.7425 | 4800 | 0.0 | - | | 29.0419 | 4850 | 0.0 | - | | 29.3413 | 4900 | 0.0 | - | | 29.6407 | 4950 | 0.0 | - | | 29.9401 | 5000 | 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} } ```