Text Classification
setfit
Safetensors
sentence-transformers
roberta
generated_from_setfit_trainer
Eval Results (legacy)
text-embeddings-inference
Instructions to use mini1013/master_cate_fd14 with libraries, inference providers, notebooks, and local apps. Follow these links to get started.
- Libraries
- setfit
How to use mini1013/master_cate_fd14 with setfit:
from setfit import SetFitModel model = SetFitModel.from_pretrained("mini1013/master_cate_fd14") preds = model.predict(["i loved the spiderman movie!", "pineapple on pizza is the worst"]) print(preds) - sentence-transformers
How to use mini1013/master_cate_fd14 with sentence-transformers:
from sentence_transformers import SentenceTransformer model = SentenceTransformer("mini1013/master_cate_fd14") 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_fd14: direct link, hf CLI and curl.
- Browser
- Download file 13.4 kB
-
https://huggingface.co/mini1013/master_cate_fd14/resolve/main/README.md
- Command line
-
hf download hf://mini1013/master_cate_fd14/README.md
-
curl -L -o README.md https://huggingface.co/mini1013/master_cate_fd14/resolve/main/README.md
13.4 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: 네스프레소 버츄오 캡슐 머그 멜로지오 1Box (10캡슐) 아이스 라떼 03. 알티시오 제이유 | |
| - text: 맥심 티오피 스위트 아메리카노 200ml (주)디에이치솔루션 | |
| - text: 굿라이프365 스피아민트 삼각티백 50개입 익모초 삼각티백 50개입 주식회사 굿라이프365 | |
| - text: 칠성사이다 제로 ECO 무라벨 300ml 20pet [음료] 커피음료_맥심티오피심플리스무스로스티라떼360mlx20개 옐로우로켓 | |
| - text: 동서식품 kanu 미니 마일드 로스트 아메리카노 0.9g 카누디카페인 0.9g 100+20(120개입) 강유팩토리 | |
| 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.6535632816801699 | |
| 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:** 12 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 | | |
| |:------|:-----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------| | |
| | 10.0 | <ul><li>'라인바싸 탄산수 레몬 500ml 20개 자몽 500ml 20개 에이치앤제이원'</li><li>'라인바싸 탄산수 파인애플 500ml 20입 1박스 (추가)+ 플레인 1박스 동아오츠카주식회사'</li><li>'코카콜라 씨그램 레몬 350mlx24페트 탄산수모음 15_트레비 라임 355mlx24CAN 주식회사대성에프앤비'</li></ul> | | |
| | 8.0 | <ul><li>'맥심 아이스 커피믹스 110T +커피믹스 스틱 2T 콤부차_다농원 콤부차 세븐베리 20T+보틀 주식회사 경일종합식품 케이마트몰'</li><li>'[카누]카누 디카페인 미니 0.9g x 120개입 - 1개 HN 다크 로스트 0.9g 100+텀블러(사은품) 하나엔피그먼트'</li><li>'프렌치카페 카페믹스 스테비아 디카페인 10.3g x 100개입 대은상사'</li></ul> | | |
| | 1.0 | <ul><li>'매일유업 매일우유 매일두유 99.9 190ml 12개 12개 테켄종합상사'</li><li>'매일유업 마이너피겨스 유기농 오트밀크 1L 주식회사 지룩'</li><li>'아몬드 브리즈 뉴트리플러스 프로틴 190ml 48개 스타일바이맘'</li></ul> | | |
| | 6.0 | <ul><li>'이제부터 무가당 무설탕 생강진액 생강차 생강즙 생강청 1L ★이벤트★ 3+1(생강청)-박스없음_소비자가 태후자연식품영농조합법인'</li><li>'티젠 콤부차 파인애플 5g x 30개입 샤인머스켓(30개입) 엠비알글로벌'</li><li>'[오설록](신세계 본점)세작 80 g(잎차) 주식회사 에스에스지닷컴'</li></ul> | | |
| | 5.0 | <ul><li>'파낙스 참다음 매실 원액 1.5L/6배희석 로쏘 레몬음료 베이스 1L (주) 이카루스'</li><li>'동원 덴마크 푸르티 포도 주스 120mL x 24개 블라썸플라워'</li><li>'썬업 과일야채샐러드 그린 200ml x 24팩 과일야채 샐러드 레드 200ml x 24팩 하니컴퍼니'</li></ul> | | |
| | 9.0 | <ul><li>'허쉬 코코아 가루 분말 226g W-00652_허쉬코코아파우더226g(파손) 월푸드'</li><li>'기라델리 프리미엄 핫코코아믹스 초콜렛 907g X 1박스(4개) 고고커피'</li><li>'Nestle Hot Cocoa 핫 코코아 믹스 30개 0.28온스 207799 무설탕 무지방_2개들이 팩 더블스토어'</li></ul> | | |
| | 4.0 | <ul><li>'코카콜라 태양의 식후비법 W차 500ml (주)디에이치솔루션'</li><li>'광동 힘찬하루 헛개차 1.5L 1개 대패트_게토레이 레몬 1.5L 12개 대영상사'</li><li>'웰그린 스위츠 복숭아 녹차 음료 340ml 티트라 레몬그린티 제로 500mlX24PET 브론스코리아(주)'</li></ul> | | |
| | 0.0 | <ul><li>'레드불 에너지 드링크 355ml (6개) 카페인 타우린 비타민 알프스 워터 대량 구매 노건'</li><li>'청정원 홍초 석류 1.5L 홍초 블루베리 1.5L (주) 이카루스'</li><li>'청정원 홍초 자몽 900ml 아이스티_티오 아이스티 레몬맛40T 주식회사 경일종합식품 케이마트몰'</li></ul> | | |
| | 7.0 | <ul><li>'동서 티오 아이스티 복숭아 70T +커피믹스 스틱 2T 콤부차_다농원 콤부차 리치 20T+보틀 주식회사 경일종합식품 케이마트몰'</li><li>'립톤 아이스티 복숭아 770g 레몬 770g_자몽 아이스티 키트(2개입) 유니레버코리아 (주)'</li><li>'술픽 하이트진로 토닉워터 600ml 대용량 술벙커 주식회사 농업회사법인 이천지점'</li></ul> | | |
| | 11.0 | <ul><li>'포모나 블루베리스무디 2kg 블루베리농축액 (주)제이제이푸드시스템'</li><li>'베오베 오곡 파우더 1kg 라떼 곡물 미숫가루 분말 티에이치커피 티에이치커피'</li><li>'타코 복숭아 아이스티 /선택 08.블루베리라떼870g 주식회사 커피바바'</li></ul> | | |
| | 3.0 | <ul><li>'[매니저배송] MPRO 장&면역+피부 (5개입) (주)에치와이'</li><li>'요플레 닥터캡슐 베리믹스 130mLx4개/1000배/냉장무배 대명유통'</li><li>'매일바이오 알로에 120g 12개_냉장 매일유업 주식회사'</li></ul> | | |
| | 2.0 | <ul><li>'화인바이오 지리산 물하나 2L X 6개 글로벌웨이브'</li><li>'하이트 천연광천수 미네랄 석수 무라벨 500ml 20pet ◇ 석수 무라벨 500ml 20pet 주식회사 부산종합유통'</li><li>'아이시스8.0 300ml x 1BOX(20PET) 생수 아이시스8.0 200ml(40p) (주)하나유통'</li></ul> | | |
| ## Evaluation | |
| ### Metrics | |
| | Label | Metric | | |
| |:--------|:-------| | |
| | **all** | 0.6536 | | |
| ## 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_fd14") | |
| # Run inference | |
| preds = model("맥심 티오피 스위트 아메리카노 200ml (주)디에이치솔루션") | |
| ``` | |
| <!-- | |
| ### 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 | 4 | 9.805 | 20 | | |
| | 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 | | |
| ### 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.0106 | 1 | 0.3763 | - | | |
| | 0.5319 | 50 | 0.3216 | - | | |
| | 1.0638 | 100 | 0.1166 | - | | |
| | 1.5957 | 150 | 0.0863 | - | | |
| | 2.1277 | 200 | 0.0548 | - | | |
| | 2.6596 | 250 | 0.0559 | - | | |
| | 3.1915 | 300 | 0.0323 | - | | |
| | 3.7234 | 350 | 0.0301 | - | | |
| | 4.2553 | 400 | 0.0191 | - | | |
| | 4.7872 | 450 | 0.0127 | - | | |
| | 5.3191 | 500 | 0.0059 | - | | |
| | 5.8511 | 550 | 0.0003 | - | | |
| | 6.3830 | 600 | 0.0002 | - | | |
| | 6.9149 | 650 | 0.0001 | - | | |
| | 7.4468 | 700 | 0.0001 | - | | |
| | 7.9787 | 750 | 0.0001 | - | | |
| | 8.5106 | 800 | 0.0001 | - | | |
| | 9.0426 | 850 | 0.0001 | - | | |
| | 9.5745 | 900 | 0.0001 | - | | |
| | 10.1064 | 950 | 0.0001 | - | | |
| | 10.6383 | 1000 | 0.0001 | - | | |
| | 11.1702 | 1050 | 0.0001 | - | | |
| | 11.7021 | 1100 | 0.0001 | - | | |
| | 12.2340 | 1150 | 0.0001 | - | | |
| | 12.7660 | 1200 | 0.0001 | - | | |
| | 13.2979 | 1250 | 0.0 | - | | |
| | 13.8298 | 1300 | 0.0001 | - | | |
| | 14.3617 | 1350 | 0.0001 | - | | |
| | 14.8936 | 1400 | 0.0001 | - | | |
| | 15.4255 | 1450 | 0.0 | - | | |
| | 15.9574 | 1500 | 0.0 | - | | |
| | 16.4894 | 1550 | 0.0 | - | | |
| | 17.0213 | 1600 | 0.0 | - | | |
| | 17.5532 | 1650 | 0.0 | - | | |
| | 18.0851 | 1700 | 0.0 | - | | |
| | 18.6170 | 1750 | 0.0 | - | | |
| | 19.1489 | 1800 | 0.0 | - | | |
| | 19.6809 | 1850 | 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.* | |
| --> |