--- 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: 필립스 퍼펙트케어 파워라이프 스팀 다리미 GC3929/68 실크부터 청바지까지 온도 조절 NO! 타지 않는 다림질 웰컴마켓2 - text: 보랄 UV 침구 청소기 침대 소파 진공 BR-V603BC 홈니즈 보랄 UV 침구 진공청소기 더웰 - text: NEW 필립스160 다이나글라이드 열판 건식 전기다리미 제이엘코 - text: DG-TOK 넥밴드 타입 디지털 생활무전기 나노Q3/ nano-Q3 블랙 컴피시스템 (comfy system) - text: ALLNEW29000 파워메이드_그레이(GRAY) 나성민 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.7946213453148402 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:** 18 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 | |:------|:--------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------| | 1 | | | 4 | | | 16 | | | 14 | | | 11 | | | 3 | | | 13 | | | 15 | | | 6 | | | 2 | | | 9 | | | 5 | | | 12 | | | 7 | | | 0 | | | 17 | | | 8 | | | 10 | | ## Evaluation ### Metrics | Label | Metric | |:--------|:-------| | **all** | 0.7946 | ## 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_el11") # Run inference preds = model("ALLNEW29000 파워메이드_그레이(GRAY) 나성민") ``` ## Training Details ### Training Set Metrics | Training set | Min | Median | Max | |:-------------|:----|:-------|:----| | Word count | 3 | 9.3700 | 32 | | Label | Training Sample Count | |:------|:----------------------| | 0 | 50 | | 1 | 50 | | 2 | 50 | | 3 | 50 | | 4 | 50 | | 5 | 50 | | 6 | 50 | | 7 | 50 | | 8 | 5 | | 9 | 50 | | 10 | 3 | | 11 | 50 | | 12 | 50 | | 13 | 50 | | 14 | 50 | | 15 | 50 | | 16 | 50 | | 17 | 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.0079 | 1 | 0.4968 | - | | 0.3937 | 50 | 0.3206 | - | | 0.7874 | 100 | 0.1406 | - | | 1.1811 | 150 | 0.0735 | - | | 1.5748 | 200 | 0.0518 | - | | 1.9685 | 250 | 0.0242 | - | | 2.3622 | 300 | 0.006 | - | | 2.7559 | 350 | 0.0102 | - | | 3.1496 | 400 | 0.0088 | - | | 3.5433 | 450 | 0.0082 | - | | 3.9370 | 500 | 0.0062 | - | | 4.3307 | 550 | 0.012 | - | | 4.7244 | 600 | 0.0021 | - | | 5.1181 | 650 | 0.002 | - | | 5.5118 | 700 | 0.0049 | - | | 5.9055 | 750 | 0.0043 | - | | 6.2992 | 800 | 0.006 | - | | 6.6929 | 850 | 0.0002 | - | | 7.0866 | 900 | 0.0004 | - | | 7.4803 | 950 | 0.0002 | - | | 7.8740 | 1000 | 0.0002 | - | | 8.2677 | 1050 | 0.0002 | - | | 8.6614 | 1100 | 0.0001 | - | | 9.0551 | 1150 | 0.0001 | - | | 9.4488 | 1200 | 0.0002 | - | | 9.8425 | 1250 | 0.0002 | - | | 10.2362 | 1300 | 0.0001 | - | | 10.6299 | 1350 | 0.0001 | - | | 11.0236 | 1400 | 0.0001 | - | | 11.4173 | 1450 | 0.0001 | - | | 11.8110 | 1500 | 0.0001 | - | | 12.2047 | 1550 | 0.0001 | - | | 12.5984 | 1600 | 0.0001 | - | | 12.9921 | 1650 | 0.0001 | - | | 13.3858 | 1700 | 0.0001 | - | | 13.7795 | 1750 | 0.0001 | - | | 14.1732 | 1800 | 0.0001 | - | | 14.5669 | 1850 | 0.0001 | - | | 14.9606 | 1900 | 0.0001 | - | | 15.3543 | 1950 | 0.0001 | - | | 15.7480 | 2000 | 0.0001 | - | | 16.1417 | 2050 | 0.0001 | - | | 16.5354 | 2100 | 0.0001 | - | | 16.9291 | 2150 | 0.0001 | - | | 17.3228 | 2200 | 0.0001 | - | | 17.7165 | 2250 | 0.0001 | - | | 18.1102 | 2300 | 0.0001 | - | | 18.5039 | 2350 | 0.0001 | - | | 18.8976 | 2400 | 0.0001 | - | | 19.2913 | 2450 | 0.0001 | - | | 19.6850 | 2500 | 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} } ```