--- 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: 아에르 마스크 피크V라이트핏 10매 KF94마스크새부리형 여름용 조인성 대형 블랙 50매 복덩이가게 - text: 전자담배 무화기 폐호흡 3 개/갑 cudo ONID 미니 포드 카트리지 1.0ohm 저항 recoment Vape 펜 01 3pcs one pack 썬데이무드 - text: 렉스팟 REX POD 릴렉스 전자담배 팟 RELX 호환 포도 베이프코드 - text: 슈얼리 배란테스트기 30개입+임테기 3개입 배테기 배란일 배란기 [임신테스트기]_클리어 얼리 패스트 X 3개 뉴트리헬스케어 주식회사 - text: 부푸 브이메이트맥스 액상입호흡입문전자담배 오닉스블랙 토이베이프 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.9110184776944967 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:** 17 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 | | | 9.0 | | | 14.0 | | | 12.0 | | | 5.0 | | | 8.0 | | | 16.0 | | | 6.0 | | | 13.0 | | | 3.0 | | | 1.0 | | | 10.0 | | | 2.0 | | | 0.0 | | | 15.0 | | | 11.0 | | | 7.0 | | ## Evaluation ### Metrics | Label | Metric | |:--------|:-------| | **all** | 0.9110 | ## 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_lh0") # Run inference preds = model("부푸 브이메이트맥스 액상입호흡입문전자담배 오닉스블랙 토이베이프") ``` ## Training Details ### Training Set Metrics | Training set | Min | Median | Max | |:-------------|:----|:--------|:----| | Word count | 3 | 10.4659 | 31 | | Label | Training Sample Count | |:------|:----------------------| | 0.0 | 50 | | 1.0 | 50 | | 2.0 | 25 | | 3.0 | 50 | | 4.0 | 50 | | 5.0 | 50 | | 6.0 | 50 | | 7.0 | 50 | | 8.0 | 50 | | 9.0 | 50 | | 10.0 | 28 | | 11.0 | 50 | | 12.0 | 24 | | 13.0 | 50 | | 14.0 | 50 | | 15.0 | 50 | | 16.0 | 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.0082 | 1 | 0.4305 | - | | 0.4098 | 50 | 0.347 | - | | 0.8197 | 100 | 0.1694 | - | | 1.2295 | 150 | 0.0708 | - | | 1.6393 | 200 | 0.0363 | - | | 2.0492 | 250 | 0.0314 | - | | 2.4590 | 300 | 0.0411 | - | | 2.8689 | 350 | 0.0414 | - | | 3.2787 | 400 | 0.0175 | - | | 3.6885 | 450 | 0.0267 | - | | 4.0984 | 500 | 0.0184 | - | | 4.5082 | 550 | 0.0085 | - | | 4.9180 | 600 | 0.0185 | - | | 5.3279 | 650 | 0.0094 | - | | 5.7377 | 700 | 0.0022 | - | | 6.1475 | 750 | 0.0078 | - | | 6.5574 | 800 | 0.0104 | - | | 6.9672 | 850 | 0.004 | - | | 7.3770 | 900 | 0.0081 | - | | 7.7869 | 950 | 0.0058 | - | | 8.1967 | 1000 | 0.0045 | - | | 8.6066 | 1050 | 0.0021 | - | | 9.0164 | 1100 | 0.0079 | - | | 9.4262 | 1150 | 0.0021 | - | | 9.8361 | 1200 | 0.0002 | - | | 10.2459 | 1250 | 0.0001 | - | | 10.6557 | 1300 | 0.0001 | - | | 11.0656 | 1350 | 0.0001 | - | | 11.4754 | 1400 | 0.002 | - | | 11.8852 | 1450 | 0.0002 | - | | 12.2951 | 1500 | 0.0039 | - | | 12.7049 | 1550 | 0.0001 | - | | 13.1148 | 1600 | 0.0001 | - | | 13.5246 | 1650 | 0.002 | - | | 13.9344 | 1700 | 0.0005 | - | | 14.3443 | 1750 | 0.0002 | - | | 14.7541 | 1800 | 0.0001 | - | | 15.1639 | 1850 | 0.0001 | - | | 15.5738 | 1900 | 0.0001 | - | | 15.9836 | 1950 | 0.0001 | - | | 16.3934 | 2000 | 0.0001 | - | | 16.8033 | 2050 | 0.0001 | - | | 17.2131 | 2100 | 0.0001 | - | | 17.6230 | 2150 | 0.0001 | - | | 18.0328 | 2200 | 0.0001 | - | | 18.4426 | 2250 | 0.0001 | - | | 18.8525 | 2300 | 0.0001 | - | | 19.2623 | 2350 | 0.0 | - | | 19.6721 | 2400 | 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} } ```