--- tags: - setfit - sentence-transformers - text-classification - generated_from_setfit_trainer widget: - text: u자 바디필로우 임산부 인형 극세사 쿠션 보호 01 01 출산/육아 > 임산부용품 > 임산부바디필로우 - text: V크로스 쿨 임산부 팬티 랜덤 3종1세트(M-XXL) 204830 L 출산/육아 > 임산부용품 > 기타임산부용품 - text: 1+1/2+2 코르셋 밴딩 올인원 속옷 3 IN 1 올인원 속옷 민소매 뱃살보정 일체형 속옷 L(65-70kg)_살구색 X 1+블랙 X 1 출산/육아 > 임산부용품 > 태교용품 > 태교용구 - text: u자베개 바디필로우 죽부인베개 임신베개 U자 배게 플래티넘 출산/육아 > 임산부용품 > 임산부바디필로우 - text: 임산부 손목 산모 산후 보호대 아대 패드 핑크 출산/육아 > 임산부용품 > 임산부보호대 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:** 8 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 | |:------|:-------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------| | 4.0 | | | 2.0 | | | 5.0 | | | 0.0 | | | 3.0 | | | 7.0 | | | 1.0 | | | 6.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_bc28") # Run inference preds = model("임산부 손목 산모 산후 보호대 아대 패드 핑크 출산/육아 > 임산부용품 > 임산부보호대") ``` ## Training Details ### Training Set Metrics | Training set | Min | Median | Max | |:-------------|:----|:--------|:----| | Word count | 7 | 15.0119 | 28 | | Label | Training Sample Count | |:------|:----------------------| | 0.0 | 70 | | 1.0 | 15 | | 2.0 | 70 | | 3.0 | 70 | | 4.0 | 70 | | 5.0 | 70 | | 6.0 | 70 | | 7.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.0101 | 1 | 0.4772 | - | | 0.5051 | 50 | 0.4978 | - | | 1.0101 | 100 | 0.2919 | - | | 1.5152 | 150 | 0.0498 | - | | 2.0202 | 200 | 0.019 | - | | 2.5253 | 250 | 0.0011 | - | | 3.0303 | 300 | 0.0001 | - | | 3.5354 | 350 | 0.0001 | - | | 4.0404 | 400 | 0.0001 | - | | 4.5455 | 450 | 0.0 | - | | 5.0505 | 500 | 0.0 | - | | 5.5556 | 550 | 0.0 | - | | 6.0606 | 600 | 0.0 | - | | 6.5657 | 650 | 0.0 | - | | 7.0707 | 700 | 0.0 | - | | 7.5758 | 750 | 0.0 | - | | 8.0808 | 800 | 0.0 | - | | 8.5859 | 850 | 0.0 | - | | 9.0909 | 900 | 0.0 | - | | 9.5960 | 950 | 0.0 | - | | 10.1010 | 1000 | 0.0 | - | | 10.6061 | 1050 | 0.0 | - | | 11.1111 | 1100 | 0.0 | - | | 11.6162 | 1150 | 0.0 | - | | 12.1212 | 1200 | 0.0 | - | | 12.6263 | 1250 | 0.0 | - | | 13.1313 | 1300 | 0.0 | - | | 13.6364 | 1350 | 0.0 | - | | 14.1414 | 1400 | 0.0 | - | | 14.6465 | 1450 | 0.0 | - | | 15.1515 | 1500 | 0.0 | - | | 15.6566 | 1550 | 0.0 | - | | 16.1616 | 1600 | 0.0 | - | | 16.6667 | 1650 | 0.0 | - | | 17.1717 | 1700 | 0.0 | - | | 17.6768 | 1750 | 0.0 | - | | 18.1818 | 1800 | 0.0 | - | | 18.6869 | 1850 | 0.0 | - | | 19.1919 | 1900 | 0.0 | - | | 19.6970 | 1950 | 0.0 | - | | 20.2020 | 2000 | 0.0 | - | | 20.7071 | 2050 | 0.0 | - | | 21.2121 | 2100 | 0.0 | - | | 21.7172 | 2150 | 0.0 | - | | 22.2222 | 2200 | 0.0 | - | | 22.7273 | 2250 | 0.0 | - | | 23.2323 | 2300 | 0.0 | - | | 23.7374 | 2350 | 0.0 | - | | 24.2424 | 2400 | 0.0 | - | | 24.7475 | 2450 | 0.0 | - | | 25.2525 | 2500 | 0.0 | - | | 25.7576 | 2550 | 0.0 | - | | 26.2626 | 2600 | 0.0 | - | | 26.7677 | 2650 | 0.0 | - | | 27.2727 | 2700 | 0.0 | - | | 27.7778 | 2750 | 0.0 | - | | 28.2828 | 2800 | 0.0 | - | | 28.7879 | 2850 | 0.0 | - | | 29.2929 | 2900 | 0.0 | - | | 29.7980 | 2950 | 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} } ```