Text Classification
setfit
Safetensors
sentence-transformers
roberta
generated_from_setfit_trainer
Eval Results (legacy)
text-embeddings-inference
Instructions to use mini1013/master_cate_fi7 with libraries, inference providers, notebooks, and local apps. Follow these links to get started.
- Libraries
- setfit
How to use mini1013/master_cate_fi7 with setfit:
from setfit import SetFitModel model = SetFitModel.from_pretrained("mini1013/master_cate_fi7") preds = model.predict(["i loved the spiderman movie!", "pineapple on pizza is the worst"]) print(preds) - sentence-transformers
How to use mini1013/master_cate_fi7 with sentence-transformers:
from sentence_transformers import SentenceTransformer model = SentenceTransformer("mini1013/master_cate_fi7") 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_fi7: direct link, hf CLI and curl.
- Browser
- Download file 19.2 kB
-
https://huggingface.co/mini1013/master_cate_fi7/resolve/main/README.md
- Command line
-
hf download hf://mini1013/master_cate_fi7/README.md
-
curl -L -o README.md https://huggingface.co/mini1013/master_cate_fi7/resolve/main/README.md
19.2 kB
| tags: | |
| - setfit | |
| - sentence-transformers | |
| - text-classification | |
| - generated_from_setfit_trainer | |
| widget: | |
| - text: 침대안전가드 침대 안전바 낙상방지 손잡이 난간 난간대 노인 복지용구 장애인 임신부 선물 가구/인테리어>아동/주니어가구>소품가구 | |
| - text: 침대 안전 가드 면 보호 랩 물린 가장자리 아기 레일 범퍼 케어 베이비 제품범퍼 울타리 가구/인테리어>아동/주니어가구>소품가구 | |
| - text: 일하 안전 영아 교구장 장난감정리함 선반 유아책장 수납함 가구/인테리어>아동/주니어가구>책꽂이 | |
| - text: 오운 어린이 침대 프레임 SS 가구/인테리어>아동/주니어가구>침대>일반침대 | |
| - text: 시몬스 로피 N32 하드 침대 SS 가구/인테리어>아동/주니어가구>침대>일반침대 | |
| 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:** 14 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 | | |
| |:------|:------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------| | |
| | 5.0 | <ul><li>'LASSEM 앙드레 키큰 베이비장 주니어 아동 옷장 C1800 IH0929 가구/인테리어>아동/주니어가구>옷장'</li><li>'삼익가구 코코 800 키큰 주니어 베이비 겸용 일반형 옷장 가구/인테리어>아동/주니어가구>옷장'</li><li>'한샘 샘키즈 낮은 오픈옷장 600 가구/인테리어>아동/주니어가구>옷장'</li></ul> | | |
| | 13.0 | <ul><li>'행거 옷걸이 호랑이 행거 아동 옷걸이 수납 철제 아기옷 키즈 유아 가구/인테리어>아동/주니어가구>행거'</li><li>'아이방 옷방 주니어장 옷걸이 행거 공간활용 옷수납 드레스룸 원룸 옷정리 자취방 매장용 좁은집 스탠드 가구/인테리어>아동/주니어가구>행거'</li><li>'행거 옷걸이 이동식 옷가게 행거 튼튼한 의류매장 진열대 아동복 가구/인테리어>아동/주니어가구>행거'</li></ul> | | |
| | 1.0 | <ul><li>'가죽 소파 더블 팔걸이 싱글 시트 레저 의자 발 작은 라 15182N4911370 가구/인테리어>아동/주니어가구>소파'</li><li>'어린이 소파 독서각 캐릭터 소파 독서의자 어린이 세척 다다미 쇼파 시트 동물 곰돌이 가구/인테리어>아동/주니어가구>소파'</li><li>'모찌 양털의자 키즈카페 미니 쇼파 가구/인테리어>아동/주니어가구>소파'</li></ul> | | |
| | 11.0 | <ul><li>'비앙스 VONI 전면 회전책장 4단 가구/인테리어>아동/주니어가구>책장'</li><li>'리바트 톨 키즈 4단 책장 가구/인테리어>아동/주니어가구>책장'</li><li>'일룸 에디키즈 코너장 세트코너장 + 책장 + PL수납장 가구/인테리어>아동/주니어가구>책장'</li></ul> | | |
| | 2.0 | <ul><li>'침대안전바 침대 안전 가드 낙상방지 난간 아이 펜스 가구/인테리어>아동/주니어가구>소품가구'</li><li>'노루페인트 컬러플러스 홈페인트 방문가구 1L 칼라메이트 4인치 도구세트 쉐인 SP4100 가구/인테리어>아동/주니어가구>소품가구'</li><li>'한샘 샘베딩 스테디 도어 6단(높이194cm) 40cm [몸통미포함] 가구/인테리어>아동/주니어가구>소품가구'</li></ul> | | |
| | 3.0 | <ul><li>'한샘 샘키즈 낮은 장난감정리함 870 가구/인테리어>아동/주니어가구>수납장'</li><li>'한샘 샘키즈 1단 미니박스 수납책장 870 가구/인테리어>아동/주니어가구>수납장'</li><li>'한샘 샘키즈 코너장 가구/인테리어>아동/주니어가구>수납장'</li></ul> | | |
| | 6.0 | <ul><li>'이케아 스툴 가구/인테리어>아동/주니어가구>의자'</li><li>'이케아 AGAM 아감 어린이 의자 가구/인테리어>아동/주니어가구>의자'</li><li>'하이솔로몬 팡팡 의자 가구/인테리어>아동/주니어가구>의자'</li></ul> | | |
| | 7.0 | <ul><li>'히트 400 학원 상담실 전면 책꽂이 낮은 책장 엄마표학습 가구/인테리어>아동/주니어가구>책꽂이'</li><li>'회전식 책꽂이 만화책 도서 사물함 그림책 360도 선반 가구/인테리어>아동/주니어가구>책꽂이'</li><li>'책 거치대 아이방 도서관 서점 그림책 원목 진열대 가구/인테리어>아동/주니어가구>책꽂이'</li></ul> | | |
| | 0.0 | <ul><li>'자작 1000 와이드 6단 서랍장 가구/인테리어>아동/주니어가구>서랍장'</li><li>'소르니아 카이 와이드 침실 4단 서랍장 가구/인테리어>아동/주니어가구>서랍장'</li><li>'일룸 링키플러스 3단 책상서랍 가구/인테리어>아동/주니어가구>서랍장'</li></ul> | | |
| | 10.0 | <ul><li>'일루일루 프로스 어린이 책상세트 스퀘어형의자 책상1개 의자2개 가구/인테리어>아동/주니어가구>책상의자세트'</li><li>'휴대용 출장책상의자 여행책상의자 발 선반 해먹 편한 발그네 TWB978A80 가구/인테리어>아동/주니어가구>책상의자세트'</li><li>'유아책상의자세트 어린이 공부방 학원 책상 세트-대형 70x50 1인세트 - ver2 가구/인테리어>아동/주니어가구>책상의자세트'</li></ul> | | |
| | 8.0 | <ul><li>'이케아 MAMMUT 마무트 어린이 사각 테이블 가구/인테리어>아동/주니어가구>책상'</li><li>'한샘 티오 그로우 일반책상세트 5단 120x75cm 가구/인테리어>아동/주니어가구>책상'</li><li>'아이엔지홈 에디 어린이 각도조절 책상 가구/인테리어>아동/주니어가구>책상'</li></ul> | | |
| | 4.0 | <ul><li>'UNKNOWN 대관령한우 스페셜 5호 1 8kg 가구/인테리어>아동/주니어가구>아동침실세트'</li><li>'Paperboard Suitcases Vintage Suitcase Portable Composite Wood Map Pattern Design Vintage Storage Ch 가구/인테리어>아동/주니어가구>아동침실세트'</li><li>'키드존 피셔프라이스 범보의자 세트 가구/인테리어>아동/주니어가구>아동침실세트'</li></ul> | | |
| | 12.0 | <ul><li>'골든스트릿 베스트 리프팅 수납계단형 움직이는 벙커침대 프레임 SS 가구/인테리어>아동/주니어가구>침대>벙커침대'</li><li>'레이디가구 레브 기능성 패브릭 데이베드 볼드헤드 침대 SS + 포그니 22 가구/인테리어>아동/주니어가구>침대>일반침대'</li><li>'슬로우알레 코이 저상형 키즈 침대 원목 데이베드 SS 가구/인테리어>아동/주니어가구>침대>일반침대'</li></ul> | | |
| | 9.0 | <ul><li>'CASHL 바퀴달린의자 허리 보조 회전의자 이동식 낮은 가구/인테리어>아동/주니어가구>책상의자'</li><li>'UNKNOWN A 책상의자 공부의자 학생용 편한 강의실 메쉬의자 a10 바퀴의자 가구/인테리어>아동/주니어가구>책상의자'</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_fi7") | |
| # Run inference | |
| preds = model("오운 어린이 침대 프레임 SS 가구/인테리어>아동/주니어가구>침대>일반침대") | |
| ``` | |
| <!-- | |
| ### 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 | 3 | 8.3744 | 18 | | |
| | Label | Training Sample Count | | |
| |:------|:----------------------| | |
| | 0.0 | 65 | | |
| | 1.0 | 70 | | |
| | 2.0 | 70 | | |
| | 3.0 | 70 | | |
| | 4.0 | 37 | | |
| | 5.0 | 70 | | |
| | 6.0 | 21 | | |
| | 7.0 | 70 | | |
| | 8.0 | 70 | | |
| | 9.0 | 70 | | |
| | 10.0 | 70 | | |
| | 11.0 | 70 | | |
| | 12.0 | 70 | | |
| | 13.0 | 69 | | |
| ### 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.0057 | 1 | 0.5123 | - | | |
| | 0.2857 | 50 | 0.5012 | - | | |
| | 0.5714 | 100 | 0.3699 | - | | |
| | 0.8571 | 150 | 0.1028 | - | | |
| | 1.1429 | 200 | 0.0304 | - | | |
| | 1.4286 | 250 | 0.0147 | - | | |
| | 1.7143 | 300 | 0.012 | - | | |
| | 2.0 | 350 | 0.009 | - | | |
| | 2.2857 | 400 | 0.0074 | - | | |
| | 2.5714 | 450 | 0.0033 | - | | |
| | 2.8571 | 500 | 0.004 | - | | |
| | 3.1429 | 550 | 0.0036 | - | | |
| | 3.4286 | 600 | 0.0036 | - | | |
| | 3.7143 | 650 | 0.0036 | - | | |
| | 4.0 | 700 | 0.0036 | - | | |
| | 4.2857 | 750 | 0.0027 | - | | |
| | 4.5714 | 800 | 0.0034 | - | | |
| | 4.8571 | 850 | 0.004 | - | | |
| | 5.1429 | 900 | 0.0016 | - | | |
| | 5.4286 | 950 | 0.0001 | - | | |
| | 5.7143 | 1000 | 0.0 | - | | |
| | 6.0 | 1050 | 0.0 | - | | |
| | 6.2857 | 1100 | 0.0 | - | | |
| | 6.5714 | 1150 | 0.0 | - | | |
| | 6.8571 | 1200 | 0.0 | - | | |
| | 7.1429 | 1250 | 0.0 | - | | |
| | 7.4286 | 1300 | 0.0 | - | | |
| | 7.7143 | 1350 | 0.0 | - | | |
| | 8.0 | 1400 | 0.0 | - | | |
| | 8.2857 | 1450 | 0.0 | - | | |
| | 8.5714 | 1500 | 0.0 | - | | |
| | 8.8571 | 1550 | 0.0 | - | | |
| | 9.1429 | 1600 | 0.0 | - | | |
| | 9.4286 | 1650 | 0.0 | - | | |
| | 9.7143 | 1700 | 0.0 | - | | |
| | 10.0 | 1750 | 0.0 | - | | |
| | 10.2857 | 1800 | 0.0 | - | | |
| | 10.5714 | 1850 | 0.0 | - | | |
| | 10.8571 | 1900 | 0.0 | - | | |
| | 11.1429 | 1950 | 0.0 | - | | |
| | 11.4286 | 2000 | 0.0 | - | | |
| | 11.7143 | 2050 | 0.0 | - | | |
| | 12.0 | 2100 | 0.0 | - | | |
| | 12.2857 | 2150 | 0.0 | - | | |
| | 12.5714 | 2200 | 0.0 | - | | |
| | 12.8571 | 2250 | 0.0 | - | | |
| | 13.1429 | 2300 | 0.0 | - | | |
| | 13.4286 | 2350 | 0.0 | - | | |
| | 13.7143 | 2400 | 0.0 | - | | |
| | 14.0 | 2450 | 0.0 | - | | |
| | 14.2857 | 2500 | 0.0 | - | | |
| | 14.5714 | 2550 | 0.0 | - | | |
| | 14.8571 | 2600 | 0.0 | - | | |
| | 15.1429 | 2650 | 0.0 | - | | |
| | 15.4286 | 2700 | 0.0 | - | | |
| | 15.7143 | 2750 | 0.0 | - | | |
| | 16.0 | 2800 | 0.0 | - | | |
| | 16.2857 | 2850 | 0.0 | - | | |
| | 16.5714 | 2900 | 0.0 | - | | |
| | 16.8571 | 2950 | 0.0 | - | | |
| | 17.1429 | 3000 | 0.0 | - | | |
| | 17.4286 | 3050 | 0.0 | - | | |
| | 17.7143 | 3100 | 0.0 | - | | |
| | 18.0 | 3150 | 0.0 | - | | |
| | 18.2857 | 3200 | 0.0 | - | | |
| | 18.5714 | 3250 | 0.0 | - | | |
| | 18.8571 | 3300 | 0.0 | - | | |
| | 19.1429 | 3350 | 0.0 | - | | |
| | 19.4286 | 3400 | 0.0 | - | | |
| | 19.7143 | 3450 | 0.0 | - | | |
| | 20.0 | 3500 | 0.0 | - | | |
| | 20.2857 | 3550 | 0.0 | - | | |
| | 20.5714 | 3600 | 0.0 | - | | |
| | 20.8571 | 3650 | 0.0 | - | | |
| | 21.1429 | 3700 | 0.0 | - | | |
| | 21.4286 | 3750 | 0.0 | - | | |
| | 21.7143 | 3800 | 0.0 | - | | |
| | 22.0 | 3850 | 0.0 | - | | |
| | 22.2857 | 3900 | 0.0 | - | | |
| | 22.5714 | 3950 | 0.0 | - | | |
| | 22.8571 | 4000 | 0.0 | - | | |
| | 23.1429 | 4050 | 0.0 | - | | |
| | 23.4286 | 4100 | 0.0 | - | | |
| | 23.7143 | 4150 | 0.0 | - | | |
| | 24.0 | 4200 | 0.0 | - | | |
| | 24.2857 | 4250 | 0.0 | - | | |
| | 24.5714 | 4300 | 0.0 | - | | |
| | 24.8571 | 4350 | 0.0 | - | | |
| | 25.1429 | 4400 | 0.0 | - | | |
| | 25.4286 | 4450 | 0.0 | - | | |
| | 25.7143 | 4500 | 0.0 | - | | |
| | 26.0 | 4550 | 0.0 | - | | |
| | 26.2857 | 4600 | 0.0 | - | | |
| | 26.5714 | 4650 | 0.0 | - | | |
| | 26.8571 | 4700 | 0.0 | - | | |
| | 27.1429 | 4750 | 0.0 | - | | |
| | 27.4286 | 4800 | 0.0 | - | | |
| | 27.7143 | 4850 | 0.0 | - | | |
| | 28.0 | 4900 | 0.0 | - | | |
| | 28.2857 | 4950 | 0.0 | - | | |
| | 28.5714 | 5000 | 0.0 | - | | |
| | 28.8571 | 5050 | 0.0 | - | | |
| | 29.1429 | 5100 | 0.0 | - | | |
| | 29.4286 | 5150 | 0.0 | - | | |
| | 29.7143 | 5200 | 0.0 | - | | |
| | 30.0 | 5250 | 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.* | |
| --> |