Text Classification
setfit
Safetensors
sentence-transformers
roberta
generated_from_setfit_trainer
Eval Results (legacy)
text-embeddings-inference
Instructions to use mini1013/master_cate_sl4 with libraries, inference providers, notebooks, and local apps. Follow these links to get started.
- Libraries
- setfit
How to use mini1013/master_cate_sl4 with setfit:
from setfit import SetFitModel model = SetFitModel.from_pretrained("mini1013/master_cate_sl4") preds = model.predict(["i loved the spiderman movie!", "pineapple on pizza is the worst"]) print(preds) - sentence-transformers
How to use mini1013/master_cate_sl4 with sentence-transformers:
from sentence_transformers import SentenceTransformer model = SentenceTransformer("mini1013/master_cate_sl4") sentences = [ "The weather is lovely today.", "It's so sunny outside!", "He drove to the stadium." ] embeddings = model.encode(sentences) similarities = model.similarity(embeddings, embeddings) print(similarities.shape) # [3, 3] - Notebooks
- Google Colab
- Kaggle
|
Download README.md from mini1013/master_cate_sl4: direct link, hf CLI and curl.
- Browser
- Download file 13.7 kB
-
https://huggingface.co/mini1013/master_cate_sl4/resolve/main/README.md
- Command line
-
hf download hf://mini1013/master_cate_sl4/README.md
-
curl -L -o README.md https://huggingface.co/mini1013/master_cate_sl4/resolve/main/README.md
13.7 kB
| tags: | |
| - setfit | |
| - sentence-transformers | |
| - text-classification | |
| - generated_from_setfit_trainer | |
| widget: | |
| - text: 가퍼 스포츠 낚시 벨트 어깨 하 해상 스탠드업 물고기 싸움 로드 홀더 스포츠/레저>낚시>낚시의류/잡화>힙커버/힙가드 | |
| - text: 낚시 태클박스 36리터 세트8 초경량 멀티 테이블 의자 받침대 루어 민물 바다 케리어 BSS158-3 스포츠/레저>낚시>낚시용품>태클박스 | |
| - text: 메이저 크래프트 자이언트 킬링 Major Craft GK5SJ-B663 스포츠/레저>낚시>루어낚시>루어낚시세트 | |
| - text: 갸프 낚싯대 용골 핸들 땀 흡수 스트랩 미끄럼 방지 절연 라켓 손잡이 커버 스포츠/레저>낚시>낚시용품>가프 | |
| - 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 | |
| <!-- - **Training Dataset:** [Unknown](https://huggingface.co/datasets/unknown) --> | |
| <!-- - **Language:** Unknown --> | |
| <!-- - **License:** Unknown --> | |
| ### 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 | | |
| |:------|:----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------| | |
| | 7.0 | <ul><li>'다이와 DAIWA 한국다이와정공 소품케이스 클리어 파우치 S C 스포츠/레저>낚시>바다낚시>찌케이스'</li><li>'갓포스 고급 루어 낚시가방 루어대 원투대 하드 로드케이스 낚시대수납 단품 112CM-157CM 스포츠/레저>낚시>바다낚시>바다낚시가방'</li><li>'다이와 포터블 휴대용 로드케이스 B 140R 스포츠/레저>낚시>바다낚시>바다낚시가방'</li></ul> | | |
| | 3.0 | <ul><li>'이공조구 원 포인트 바다루어낚싯대 S180 스포츠/레저>낚시>낚싯대>바다루어낚싯대'</li><li>'엔에스 블랙 매직아이 슬로우피치 바다루어낚싯대 B-592H3MF 스포츠/레저>낚시>낚싯대>바다루어낚싯대'</li><li>'은성 실스타 DHC 명파S 민물낚싯대 30칸 스포츠/레저>낚시>낚싯대>민물낚싯대'</li></ul> | | |
| | 1.0 | <ul><li>'메이호 태클박스 루어케이스 도구통 지그통 VS-388DD 스포츠/레저>낚시>낚시용품>태클박스'</li><li>'다이와 쿨라인 알파 3 펄 TS2000 스포츠/레저>낚시>낚시용품>쿨백'</li><li>'슬라이드 낚시 쪽가위 라인커터기 합사가위 T74464474 스포츠/레저>낚시>낚시공구>가위/라인커터/핀온릴'</li></ul> | | |
| | 5.0 | <ul><li>'다미끼 맘바2 러버지그-배스 루어 민물루어 1 2oz 스포츠/레저>낚시>루어낚시>하드베이트'</li><li>'루어 낚시 가물치 배스 5pcs 개구리 세트 프로그 스포츠/레저>낚시>루어낚시>루어낚시세트'</li><li>'KFP 미노우 KS01 하드베이트 싱킹타입 루어 포퍼 웜 크랭크 프로팅 싱킹 배스 미끼 농어 베이트 스포츠/레저>낚시>루어낚시>하드베이트'</li></ul> | | |
| | 0.0 | <ul><li>'다이와 레브로스 스피닝릴 LT2500D-XH 스포츠/레저>낚시>낚시릴>스피닝릴'</li><li>'바낙스 LJ100x 장구통릴 티탄 스포츠/레저>낚시>낚시릴>베이트릴'</li><li>'시마노 FX 1000 스피닝릴 스포츠/레저>낚시>낚시릴>스피닝릴'</li></ul> | | |
| | 4.0 | <ul><li>'가마라 쇼크리더 카본 목줄 50m 6호 GFLUORO506 스포츠/레저>낚시>낚싯줄>카본라인'</li><li>'선라인 토네이도 마츠다 스페셜 블랙 스트림 낚싯줄 70m 1.75호 스포츠/레저>낚시>낚싯줄>카본라인'</li><li>'선라인 슈터 FC 스나이퍼 100m 4.5LB 스포츠/레저>낚시>낚싯줄>카본라인'</li></ul> | | |
| | 2.0 | <ul><li>'다이와 낚시화 부츠 운동화 스파이크 슈즈 DAIWA 일본직구 DS-2150CD 스포츠/레저>낚시>낚시의류/잡화>낚시신발'</li><li>'HDF 해동 피나투라 올컷 방한 덮개장갑 낚시장갑 스포츠/레저>낚시>낚시의류/잡화>낚시장갑'</li><li>'가마가츠 낚시 코듀라 힙가드 로우백 타입 단일사이즈 GM3727 스포츠/레저>낚시>낚시의류/잡화>힙커버/힙가드'</li></ul> | | |
| | 6.0 | <ul><li>'루웍스 빙어 초릿대 23cm 스포츠/레저>낚시>민물낚시>얼음낚시'</li><li>'바다 민물 고기 낚시대 보관 수납 가방 하드케이스 스포츠/레저>낚시>민물낚시>민물낚시가방'</li><li>'고급 내림찌케이스 대형찌보관함 플로팅 보관박스 스포츠/레저>낚시>민물낚시>찌케이스'</li></ul> | | |
| ## 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_sl4") | |
| # Run inference | |
| preds = model("송어베이스 루어 세트 스푼 미끼 스피너 보빈 인공 스포츠/레저>낚시>루어낚시>루어낚시세트") | |
| ``` | |
| <!-- | |
| ### Downstream Use | |
| *List how someone could finetune this model on their own dataset.* | |
| --> | |
| <!-- | |
| ### Out-of-Scope Use | |
| *List how the model may foreseeably be misused and address what users ought not to do with the model.* | |
| --> | |
| <!-- | |
| ## Bias, Risks and Limitations | |
| *What are the known or foreseeable issues stemming from this model? You could also flag here known failure cases or weaknesses of the model.* | |
| --> | |
| <!-- | |
| ### Recommendations | |
| *What are recommendations with respect to the foreseeable issues? For example, filtering explicit content.* | |
| --> | |
| ## Training Details | |
| ### Training Set Metrics | |
| | Training set | Min | Median | Max | | |
| |:-------------|:----|:-------|:----| | |
| | Word count | 2 | 7.8018 | 19 | | |
| | Label | Training Sample Count | | |
| |:------|:----------------------| | |
| | 0.0 | 70 | | |
| | 1.0 | 70 | | |
| | 2.0 | 70 | | |
| | 3.0 | 70 | | |
| | 4.0 | 70 | | |
| | 5.0 | 70 | | |
| | 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.0091 | 1 | 0.4946 | - | | |
| | 0.4545 | 50 | 0.5017 | - | | |
| | 0.9091 | 100 | 0.2322 | - | | |
| | 1.3636 | 150 | 0.0559 | - | | |
| | 1.8182 | 200 | 0.0182 | - | | |
| | 2.2727 | 250 | 0.0165 | - | | |
| | 2.7273 | 300 | 0.0018 | - | | |
| | 3.1818 | 350 | 0.0001 | - | | |
| | 3.6364 | 400 | 0.0001 | - | | |
| | 4.0909 | 450 | 0.0001 | - | | |
| | 4.5455 | 500 | 0.0 | - | | |
| | 5.0 | 550 | 0.0 | - | | |
| | 5.4545 | 600 | 0.0 | - | | |
| | 5.9091 | 650 | 0.0 | - | | |
| | 6.3636 | 700 | 0.0 | - | | |
| | 6.8182 | 750 | 0.0 | - | | |
| | 7.2727 | 800 | 0.0 | - | | |
| | 7.7273 | 850 | 0.0 | - | | |
| | 8.1818 | 900 | 0.0 | - | | |
| | 8.6364 | 950 | 0.0 | - | | |
| | 9.0909 | 1000 | 0.0 | - | | |
| | 9.5455 | 1050 | 0.0 | - | | |
| | 10.0 | 1100 | 0.0 | - | | |
| | 10.4545 | 1150 | 0.0 | - | | |
| | 10.9091 | 1200 | 0.0 | - | | |
| | 11.3636 | 1250 | 0.0 | - | | |
| | 11.8182 | 1300 | 0.0 | - | | |
| | 12.2727 | 1350 | 0.0 | - | | |
| | 12.7273 | 1400 | 0.0 | - | | |
| | 13.1818 | 1450 | 0.0 | - | | |
| | 13.6364 | 1500 | 0.0 | - | | |
| | 14.0909 | 1550 | 0.0 | - | | |
| | 14.5455 | 1600 | 0.0 | - | | |
| | 15.0 | 1650 | 0.0 | - | | |
| | 15.4545 | 1700 | 0.0 | - | | |
| | 15.9091 | 1750 | 0.0 | - | | |
| | 16.3636 | 1800 | 0.0 | - | | |
| | 16.8182 | 1850 | 0.0 | - | | |
| | 17.2727 | 1900 | 0.0 | - | | |
| | 17.7273 | 1950 | 0.0 | - | | |
| | 18.1818 | 2000 | 0.0 | - | | |
| | 18.6364 | 2050 | 0.0 | - | | |
| | 19.0909 | 2100 | 0.0 | - | | |
| | 19.5455 | 2150 | 0.0 | - | | |
| | 20.0 | 2200 | 0.0 | - | | |
| | 20.4545 | 2250 | 0.0 | - | | |
| | 20.9091 | 2300 | 0.0 | - | | |
| | 21.3636 | 2350 | 0.0 | - | | |
| | 21.8182 | 2400 | 0.0 | - | | |
| | 22.2727 | 2450 | 0.0 | - | | |
| | 22.7273 | 2500 | 0.0 | - | | |
| | 23.1818 | 2550 | 0.0 | - | | |
| | 23.6364 | 2600 | 0.0 | - | | |
| | 24.0909 | 2650 | 0.0 | - | | |
| | 24.5455 | 2700 | 0.0 | - | | |
| | 25.0 | 2750 | 0.0 | - | | |
| | 25.4545 | 2800 | 0.0 | - | | |
| | 25.9091 | 2850 | 0.0 | - | | |
| | 26.3636 | 2900 | 0.0 | - | | |
| | 26.8182 | 2950 | 0.0 | - | | |
| | 27.2727 | 3000 | 0.0 | - | | |
| | 27.7273 | 3050 | 0.0 | - | | |
| | 28.1818 | 3100 | 0.0 | - | | |
| | 28.6364 | 3150 | 0.0 | - | | |
| | 29.0909 | 3200 | 0.0 | - | | |
| | 29.5455 | 3250 | 0.0 | - | | |
| | 30.0 | 3300 | 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} | |
| } | |
| ``` | |
| <!-- | |
| ## Glossary | |
| *Clearly define terms in order to be accessible across audiences.* | |
| --> | |
| <!-- | |
| ## Model Card Authors | |
| *Lists the people who create the model card, providing recognition and accountability for the detailed work that goes into its construction.* | |
| --> | |
| <!-- | |
| ## Model Card Contact | |
| *Provides a way for people who have updates to the Model Card, suggestions, or questions, to contact the Model Card authors.* | |
| --> |