--- 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: 모디스 일체형 미니 도킹형 보조배터리 5000mAh (8핀) 모디스 미니 5000 보조배터리 8핀(민트) 글로리아 - text: 삼성전자 갤럭시 S23 울트라 가죽 레더 커버 정품 케이스 EF-VS918 카멜 (VS918LAE) 주식회사 지엠트레이드 - text: 베루스 갤럭시 Z플립5 케이스 카드 케이스 2장 수납 자동 힌지보호 모던 고 비스포크 레모네이드_레모네이드_레모네이드 (주)베루스디자인 - text: 갤럭시워치5 44mm 9H 액정보호 강화유리필름 2매 MinSellAmount 하이애드 - text: '[원.쁠.원] 벨킨 C타입 충전 어댑터 + C to C 케이블 케이블블랙(WCA004+CAB0031MBK) (주) 디지월드' 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.9268917864705227 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:** 16 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 | |:------|:-------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------| | 15 | | | 9 | | | 8 | | | 11 | | | 14 | | | 3 | | | 7 | | | 4 | | | 13 | | | 2 | | | 0 | | | 1 | | | 6 | | | 10 | | | 5 | | | 12 | | ## Evaluation ### Metrics | Label | Metric | |:--------|:-------| | **all** | 0.9269 | ## 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_el25") # Run inference preds = model("갤럭시워치5 44mm 9H 액정보호 강화유리필름 2매 MinSellAmount 하이애드") ``` ## Training Details ### Training Set Metrics | Training set | Min | Median | Max | |:-------------|:----|:--------|:----| | Word count | 4 | 11.0114 | 27 | | Label | Training Sample Count | |:------|:----------------------| | 0 | 50 | | 1 | 50 | | 2 | 50 | | 3 | 50 | | 4 | 50 | | 5 | 7 | | 6 | 50 | | 7 | 29 | | 8 | 50 | | 9 | 50 | | 10 | 13 | | 11 | 50 | | 12 | 50 | | 13 | 50 | | 14 | 50 | | 15 | 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.0091 | 1 | 0.4972 | - | | 0.4545 | 50 | 0.2762 | - | | 0.9091 | 100 | 0.1381 | - | | 1.3636 | 150 | 0.0883 | - | | 1.8182 | 200 | 0.0328 | - | | 2.2727 | 250 | 0.0061 | - | | 2.7273 | 300 | 0.0009 | - | | 3.1818 | 350 | 0.0005 | - | | 3.6364 | 400 | 0.0004 | - | | 4.0909 | 450 | 0.0003 | - | | 4.5455 | 500 | 0.0022 | - | | 5.0 | 550 | 0.0002 | - | | 5.4545 | 600 | 0.0002 | - | | 5.9091 | 650 | 0.0002 | - | | 6.3636 | 700 | 0.0002 | - | | 6.8182 | 750 | 0.0002 | - | | 7.2727 | 800 | 0.0001 | - | | 7.7273 | 850 | 0.0021 | - | | 8.1818 | 900 | 0.0001 | - | | 8.6364 | 950 | 0.0001 | - | | 9.0909 | 1000 | 0.0001 | - | | 9.5455 | 1050 | 0.0001 | - | | 10.0 | 1100 | 0.0001 | - | | 10.4545 | 1150 | 0.0001 | - | | 10.9091 | 1200 | 0.0001 | - | | 11.3636 | 1250 | 0.0001 | - | | 11.8182 | 1300 | 0.0001 | - | | 12.2727 | 1350 | 0.002 | - | | 12.7273 | 1400 | 0.0001 | - | | 13.1818 | 1450 | 0.0001 | - | | 13.6364 | 1500 | 0.0001 | - | | 14.0909 | 1550 | 0.0001 | - | | 14.5455 | 1600 | 0.0001 | - | | 15.0 | 1650 | 0.0001 | - | | 15.4545 | 1700 | 0.0001 | - | | 15.9091 | 1750 | 0.0001 | - | | 16.3636 | 1800 | 0.002 | - | | 16.8182 | 1850 | 0.002 | - | | 17.2727 | 1900 | 0.0001 | - | | 17.7273 | 1950 | 0.0001 | - | | 18.1818 | 2000 | 0.0001 | - | | 18.6364 | 2050 | 0.0001 | - | | 19.0909 | 2100 | 0.0001 | - | | 19.5455 | 2150 | 0.0001 | - | | 20.0 | 2200 | 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} } ```