--- tags: - setfit - sentence-transformers - text-classification - generated_from_setfit_trainer widget: - text: 전동 스케이트보드 원격제어 4륜 롱보드 성인 스포츠/레저>스케이트/보드/롤러>스케이트보드 - text: 핑거 서핑보드 장난감 손가락 지판 미니 생일 파티 스포츠/레저>스케이트/보드/롤러>핑거보드 - text: CCS 로고크루저 스케이트보드데크 27 x 8 00 스포츠/레저>스케이트/보드/롤러>스케이트보드 - text: 롤러블레이드 Rollerblade Zetrablade 여성용 성인 피트니스 인라인 스케이트 라이트 여성용 스포츠/레저>인라인스케이트>성인용 - 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 | | | 1.0 | | | 0.0 | | | 3.0 | | | 2.0 | | | 7.0 | | | 5.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_sl17") # Run inference preds = model("전동 스케이트보드 원격제어 4륜 롱보드 성인 스포츠/레저>스케이트/보드/롤러>스케이트보드") ``` ## Training Details ### Training Set Metrics | Training set | Min | Median | Max | |:-------------|:----|:-------|:----| | Word count | 2 | 9.5663 | 23 | | Label | Training Sample Count | |:------|:----------------------| | 0.0 | 70 | | 1.0 | 70 | | 2.0 | 70 | | 3.0 | 70 | | 4.0 | 70 | | 5.0 | 15 | | 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.4694 | - | | 1.0101 | 100 | 0.2249 | - | | 1.5152 | 150 | 0.0726 | - | | 2.0202 | 200 | 0.0074 | - | | 2.5253 | 250 | 0.0004 | - | | 3.0303 | 300 | 0.0001 | - | | 3.5354 | 350 | 0.0 | - | | 4.0404 | 400 | 0.0 | - | | 4.5455 | 450 | 0.0001 | - | | 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} } ```