--- 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: glowjin 차량용커피포트 주전자 가열 휴대용 여행 무광 블랙(12v24v 차량용) 업그레이드USB 무광블랙(12v24v 차량용) 글로우진(glowjin) - text: 카프트 디자인 코일매트 카매트 자동차 발 매트 전차종 베이지 톰B 라인 1열 브라운_M라인_트렁크매트 안녕하십니카 - text: 아임반 자동차 사각 허깅 쿠션 차량용 다용도 허그 쿠션 피칸브라운 주식회사 아임반 - text: 초보운전 스티커 자석 탈부착 고휘도 반사 초보운전 가로사각 M 미디엄 01 스마일 [임산부가타고있어요]_정사각_02.임산부가 운전해요-핑크 퍼즈 - text: 겨울철 환절기 건조 차량용가습기 독일 차량 탑재 가습 01 1_10 플러그인 모델 라벤더 아로마테 플러스라인 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.56449056059951 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:** 15 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 | |:------|:---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------| | 0.0 | | | 8.0 | | | 4.0 | | | 11.0 | | | 13.0 | | | 10.0 | | | 12.0 | | | 1.0 | | | 3.0 | | | 14.0 | | | 7.0 | | | 9.0 | | | 2.0 | | | 5.0 | | | 6.0 | | ## Evaluation ### Metrics | Label | Metric | |:--------|:-------| | **all** | 0.5645 | ## 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_lh20") # Run inference preds = model("아임반 자동차 사각 허깅 쿠션 차량용 다용도 허그 쿠션 피칸브라운 주식회사 아임반") ``` ## Training Details ### Training Set Metrics | Training set | Min | Median | Max | |:-------------|:----|:-------|:----| | Word count | 3 | 11.108 | 30 | | Label | Training Sample Count | |:------|:----------------------| | 0.0 | 50 | | 1.0 | 50 | | 2.0 | 50 | | 3.0 | 50 | | 4.0 | 50 | | 5.0 | 50 | | 6.0 | 50 | | 7.0 | 50 | | 8.0 | 50 | | 9.0 | 50 | | 10.0 | 50 | | 11.0 | 50 | | 12.0 | 50 | | 13.0 | 50 | | 14.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.0085 | 1 | 0.3868 | - | | 0.4237 | 50 | 0.3164 | - | | 0.8475 | 100 | 0.2453 | - | | 1.2712 | 150 | 0.1471 | - | | 1.6949 | 200 | 0.0782 | - | | 2.1186 | 250 | 0.0675 | - | | 2.5424 | 300 | 0.0429 | - | | 2.9661 | 350 | 0.0257 | - | | 3.3898 | 400 | 0.019 | - | | 3.8136 | 450 | 0.0175 | - | | 4.2373 | 500 | 0.0275 | - | | 4.6610 | 550 | 0.0118 | - | | 5.0847 | 600 | 0.0068 | - | | 5.5085 | 650 | 0.0046 | - | | 5.9322 | 700 | 0.0067 | - | | 6.3559 | 750 | 0.0041 | - | | 6.7797 | 800 | 0.0044 | - | | 7.2034 | 850 | 0.0025 | - | | 7.6271 | 900 | 0.0004 | - | | 8.0508 | 950 | 0.0002 | - | | 8.4746 | 1000 | 0.0001 | - | | 8.8983 | 1050 | 0.0002 | - | | 9.3220 | 1100 | 0.0001 | - | | 9.7458 | 1150 | 0.0001 | - | | 10.1695 | 1200 | 0.0001 | - | | 10.5932 | 1250 | 0.0001 | - | | 11.0169 | 1300 | 0.0001 | - | | 11.4407 | 1350 | 0.0001 | - | | 11.8644 | 1400 | 0.0001 | - | | 12.2881 | 1450 | 0.0001 | - | | 12.7119 | 1500 | 0.0001 | - | | 13.1356 | 1550 | 0.0001 | - | | 13.5593 | 1600 | 0.0001 | - | | 13.9831 | 1650 | 0.0001 | - | | 14.4068 | 1700 | 0.0001 | - | | 14.8305 | 1750 | 0.0001 | - | | 15.2542 | 1800 | 0.0001 | - | | 15.6780 | 1850 | 0.0001 | - | | 16.1017 | 1900 | 0.0001 | - | | 16.5254 | 1950 | 0.0001 | - | | 16.9492 | 2000 | 0.0001 | - | | 17.3729 | 2050 | 0.0001 | - | | 17.7966 | 2100 | 0.0001 | - | | 18.2203 | 2150 | 0.0001 | - | | 18.6441 | 2200 | 0.0 | - | | 19.0678 | 2250 | 0.0 | - | | 19.4915 | 2300 | 0.0001 | - | | 19.9153 | 2350 | 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} } ```