--- base_model: mini1013/master_domain library_name: setfit metrics: - accuracy pipeline_tag: text-classification tags: - setfit - sentence-transformers - text-classification - generated_from_setfit_trainer widget: - text: 질레트 퓨전 하이드라젤 센서티브스킨 195mgX3입 (질레트퓨전하이드라젤)-190mlx3통★특가★ 애니몰 - text: 꽃을든남자 플러스유 포맨 스킨 250ml 1개 플러스유 포맨 로션 아주상사 - text: 오니츠카타이거 MEXICO 66 SD 크림 남성 운동화 스니커즈 1183A838-100 27.5cm_- 77언니 - text: 키엘 훼이셜 퓨얼 에너자이징 모이스처 트리트먼트 포 맨 125ml 옵션없음 주식회사 샌팅 - text: 비오템옴므 포스 수프림 클렌저 125ml 비오템 포스 수프림 클렌저 125ml 메이비굿컴퍼니 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: accuracy value: 0.561352657004831 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:** 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 | |:------|:----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------| | 13.0 | | | 12.0 | | | 6.0 | | | 0.0 | | | 5.0 | | | 2.0 | | | 3.0 | | | 8.0 | | | 10.0 | | | 9.0 | | | 11.0 | | | 1.0 | | | 4.0 | | ## Evaluation ### Metrics | Label | Accuracy | |:--------|:---------| | **all** | 0.5614 | ## 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_bt0_test") # Run inference preds = model("꽃을든남자 플러스유 포맨 스킨 250ml 1개 플러스유 포맨 로션 아주상사") ``` ## Training Details ### Training Set Metrics | Training set | Min | Median | Max | |:-------------|:----|:-------|:----| | Word count | 4 | 8.8913 | 19 | | Label | Training Sample Count | |:------|:----------------------| | 0.0 | 12 | | 1.0 | 25 | | 2.0 | 20 | | 3.0 | 19 | | 4.0 | 17 | | 5.0 | 18 | | 6.0 | 22 | | 8.0 | 19 | | 9.0 | 10 | | 10.0 | 11 | | 11.0 | 22 | | 12.0 | 18 | | 13.0 | 17 | ### 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.0370 | 1 | 0.4919 | - | | 1.8519 | 50 | 0.3561 | - | | 3.7037 | 100 | 0.0781 | - | | 5.5556 | 150 | 0.0282 | - | | 7.4074 | 200 | 0.0154 | - | | 9.2593 | 250 | 0.0063 | - | | 11.1111 | 300 | 0.0005 | - | | 12.9630 | 350 | 0.0002 | - | | 14.8148 | 400 | 0.0002 | - | | 16.6667 | 450 | 0.0001 | - | | 18.5185 | 500 | 0.0001 | - | | 20.3704 | 550 | 0.0001 | - | | 22.2222 | 600 | 0.0001 | - | | 24.0741 | 650 | 0.0001 | - | | 25.9259 | 700 | 0.0001 | - | | 27.7778 | 750 | 0.0001 | - | | 29.6296 | 800 | 0.0001 | - | | 31.4815 | 850 | 0.0001 | - | | 33.3333 | 900 | 0.0001 | - | | 35.1852 | 950 | 0.0001 | - | | 37.0370 | 1000 | 0.0001 | - | | 38.8889 | 1050 | 0.0001 | - | | 40.7407 | 1100 | 0.0001 | - | | 42.5926 | 1150 | 0.0001 | - | | 44.4444 | 1200 | 0.0001 | - | | 46.2963 | 1250 | 0.0001 | - | | 48.1481 | 1300 | 0.0001 | - | | 50.0 | 1350 | 0.0001 | - | ### 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} } ```