Text Classification
setfit
Safetensors
sentence-transformers
roberta
generated_from_setfit_trainer
Eval Results (legacy)
text-embeddings-inference
Instructions to use mini1013/master_cate_lh21 with libraries, inference providers, notebooks, and local apps. Follow these links to get started.
- Libraries
- setfit
How to use mini1013/master_cate_lh21 with setfit:
from setfit import SetFitModel model = SetFitModel.from_pretrained("mini1013/master_cate_lh21") preds = model.predict(["i loved the spiderman movie!", "pineapple on pizza is the worst"]) print(preds) - sentence-transformers
How to use mini1013/master_cate_lh21 with sentence-transformers:
from sentence_transformers import SentenceTransformer model = SentenceTransformer("mini1013/master_cate_lh21") 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_lh21: direct link, hf CLI and curl.
- Browser
- Download file 10.7 kB
-
https://huggingface.co/mini1013/master_cate_lh21/resolve/main/README.md
- Command line
-
hf download hf://mini1013/master_cate_lh21/README.md
-
curl -L -o README.md https://huggingface.co/mini1013/master_cate_lh21/resolve/main/README.md
10.7 kB
| 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: 폭스밸리 프리미엄 자세교정밴드 말린 어깨 목 굽은등 라운드숄더 일자 바른 체형 교정기 M+L 폭스밸리 | |
| - text: 올그린 무릎 보조기 MCL 니케이지 인대 연골 보호대 수술후 의료용 니케이지_블루_XL 올그린 | |
| - text: 통풍형 목보호대 쿨링 경추 목디스크 목쿠션 거북목 여성용 hilala115 | |
| - text: THEPURE 목보호대 거북목 자세교정기 보조기 지지대 봄여름가을겨울 02. UIS-03_S 48CM 선셋 | |
| - text: 필라델피아 목보호대 SM-001 사이즈선택 경추보호대 릴렉스 목해먹 목스트레칭 목견인기 일자목 디아 | |
| 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.8887880986937591 | |
| 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:** 7 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 | | |
| |:------|:---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------| | |
| | 6.0 | <ul><li>'반깁스 반기브스 다리보조기 골절 다리 수술 고정 오른발 ㅡ 기본 모델 올바른해외직구샵'</li><li>'아오스 의료용 무릎보호대 124 MCL [0002]S 왼쪽용 CJONSTYLE'</li><li>'원코어 발보조기 끌림방지 보호대 재활 장비 발목보조기 발지지대 왼발_L 키위프'</li></ul> | | |
| | 2.0 | <ul><li>'이화 밸포밴드 팔걸이 견지대 성인용 21061458 M 비앤비(best & BEST)'</li><li>'허리보조기 허리 척추 보호 의료용 AOS-460 여_XXL 링쿠'</li><li>'울트라슬링 어깨보호대 팔걸이 어깨수술 울트라실링 팔깁스 K 타입 디엘아이'</li></ul> | | |
| | 5.0 | <ul><li>'전동기립기 하반신 경사 스탠딩 편마비 침대 보조기 수동 높이 조절 + 사륜 + 식탁 쇼핑의품격001'</li><li>'물리치료기계 재활기 가정용 근육 도수 허리 승모근 단일 모델 에오인'</li><li>'환자 전동 침대 의료용 가정용 병원 전동기립기 보조 화이트 97cmx45cmx202cm 연림스토어'</li></ul> | | |
| | 0.0 | <ul><li>'미제 재활 고무찰흙 퓨티 (살색/노랑/빨강/초록/파랑) 초록 텔레그라프'</li><li>'손가락 재활 장갑 편마비 손재활 운동 로봇 기구 주황색 미러링된 왼손 M 구구상회'</li><li>'건강누리 말렛핑거스프린트 리필(Mallet Finger Splint Refill) 오픈형7호 단위:팩(5개) (주)엠디오씨'</li></ul> | | |
| | 4.0 | <ul><li>'통증바이 남녀공용 바른 자세밴드 3XL (허리둘레 ... 1개 XL (허리둘레 30~32인치) × 1개 이위에'</li><li>'굽은어깨 굽은등 어깨 허리 바른 자세 밴드 라운드숄더 펴주는 XXXL 아이엠어굿맨'</li><li>'(발음교정기 돌돌이) 스카이블루 학생용 영어 국어 발음연습 발음교정 하드(스카이블루) (주)애니덴'</li></ul> | | |
| | 1.0 | <ul><li>'[의료기기](반값딜) 넥가디언 거북목 디스크 교정기 쿠션형 견인기 단독 (밤색) 852헤르츠'</li><li>'바른 목 미라클 고급형 보호대 밴드 젬마줌마'</li><li>'[OFLP1Q84]허리E UP 통기성 에어메디칼 견인요 S 27인치이하/FREE sellerhub'</li></ul> | | |
| | 3.0 | <ul><li>'도고 렉스타 허벅지형 205 압박용밴드 의료용 압박스타킹 혈액순환 다리붓기 개선 의료기기 중압 (4)265발트임_살색_XL (주)도고메디칼'</li><li>'[GIN383R]종아리 압박밴드 스타킹 다리 간호사 수면 관리 블랙/FREE sellerhub'</li><li>'Duomed Advantage, 15-20 mmHg, 종아리 높이, 오픈 토 Small_Almond 수 스토리(SU STORY)'</li></ul> | | |
| ## Evaluation | |
| ### Metrics | |
| | Label | Metric | | |
| |:--------|:-------| | |
| | **all** | 0.8888 | | |
| ## 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_lh21") | |
| # Run inference | |
| preds = model("통풍형 목보호대 쿨링 경추 목디스크 목쿠션 거북목 여성용 hilala115") | |
| ``` | |
| <!-- | |
| ### 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 | 9.96 | 21 | | |
| | 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 | | |
| ### 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.0182 | 1 | 0.4265 | - | | |
| | 0.9091 | 50 | 0.3097 | - | | |
| | 1.8182 | 100 | 0.0765 | - | | |
| | 2.7273 | 150 | 0.0638 | - | | |
| | 3.6364 | 200 | 0.0434 | - | | |
| | 4.5455 | 250 | 0.0035 | - | | |
| | 5.4545 | 300 | 0.0002 | - | | |
| | 6.3636 | 350 | 0.0001 | - | | |
| | 7.2727 | 400 | 0.0001 | - | | |
| | 8.1818 | 450 | 0.0001 | - | | |
| | 9.0909 | 500 | 0.0001 | - | | |
| | 10.0 | 550 | 0.0001 | - | | |
| | 10.9091 | 600 | 0.0001 | - | | |
| | 11.8182 | 650 | 0.0001 | - | | |
| | 12.7273 | 700 | 0.0001 | - | | |
| | 13.6364 | 750 | 0.0001 | - | | |
| | 14.5455 | 800 | 0.0001 | - | | |
| | 15.4545 | 850 | 0.0001 | - | | |
| | 16.3636 | 900 | 0.0 | - | | |
| | 17.2727 | 950 | 0.0 | - | | |
| | 18.1818 | 1000 | 0.0 | - | | |
| | 19.0909 | 1050 | 0.0001 | - | | |
| | 20.0 | 1100 | 0.0 | - | | |
| ### 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} | |
| } | |
| ``` | |
| <!-- | |
| ## 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.* | |
| --> |