Text Classification
setfit
Safetensors
sentence-transformers
roberta
generated_from_setfit_trainer
Eval Results (legacy)
text-embeddings-inference
Instructions to use mini1013/master_cate_fd0 with libraries, inference providers, notebooks, and local apps. Follow these links to get started.
- Libraries
- setfit
How to use mini1013/master_cate_fd0 with setfit:
from setfit import SetFitModel model = SetFitModel.from_pretrained("mini1013/master_cate_fd0") preds = model.predict(["i loved the spiderman movie!", "pineapple on pizza is the worst"]) print(preds) - sentence-transformers
How to use mini1013/master_cate_fd0 with sentence-transformers:
from sentence_transformers import SentenceTransformer model = SentenceTransformer("mini1013/master_cate_fd0") 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_fd0: direct link, hf CLI and curl.
- Browser
- Download file 12.2 kB
-
https://huggingface.co/mini1013/master_cate_fd0/resolve/main/README.md
- Command line
-
hf download hf://mini1013/master_cate_fd0/README.md
-
curl -L -o README.md https://huggingface.co/mini1013/master_cate_fd0/resolve/main/README.md
12.2 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: 백설 찰밀가루 3Kg 에프엠에스인터내셔널 주식회사 | |
| - text: 퀘이커 마시는오트밀 그래인 50g 20개 오트&봄딸기50gx10개_오트&우리쌀 50gx10개 (주)태풍 | |
| - text: CJ제일제당 백설 강력밀가루 2.5kg 둘레푸드 | |
| - text: 이츠웰 맛있는 튀김가루 1kg / CJ프레시웨이 청신호 | |
| - text: 피플스 퀵오트밀 500gx2 (1kg) 귀리 07.퀵오트500g+뮤즐리500g 피플스(Peoples) | |
| 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.9629787234042553 | |
| 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:** 11 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>'[플라하반] 유기농 포리지 500g 외 2종 롤드오트 압착귀리 유기농 포리지 280g 주식회사 수성인터내셔널'</li><li>'포스트 화이버 오트밀 오리지날 350g 다복상사'</li><li>'오트밀(식사용) 1kg/이든타운/오트밀/오트밀죽/oatmeal/압착귀리/곡류/곡물/시리얼/씨리얼/후레이크/생식/선식/건강식/두유/우유/제과/제빵/쿠키/재료/식사대용/요거트 드랍쉽'</li></ul> | | |
| | 0.0 | <ul><li>'볶은 검은깨 분말 가루 국내산 300g 검정깨 블랙푸드 검은콩청국장환 200g 농업회사법인 주식회사 두손애약초'</li><li>'볶은 검은깨 분말 가루 국내산 300g 검정깨 블랙푸드 검은콩검은깨환 210g 농업회사법인 주식회사 두손애약초'</li><li>'국산 냉풍건조 아로니아분말 500g [분말]아로니아분말 500g x 2팩 농업회사법인 청정산들해(주)'</li></ul> | | |
| | 1.0 | <ul><li>'뚜레반 17곡 미숫가루 1kg B_청정원 홍초 자몽900ml 무한상사'</li><li>'뚜레반 17곡 미숫가루 1kg C_뚜레반 콩국수용 콩가루850g 무한상사'</li><li>'뚜레반 17곡 미숫가루A+1kg 주식회사 삼부'</li></ul> | | |
| | 3.0 | <ul><li>'[대한제분]곰표부침가루1kg / 곰표튀김가루1kg 감사 곰표부침가루1kg 동아식품'</li><li>'오뚜기 나눔7호 직원 거래처 명절준비 선물세트 제이엔팩토리'</li><li>'큐원 쫄깃한 참 부침 가루 1kg 가정 업소 호박 파 전 전가네TMG'</li></ul> | | |
| | 6.0 | <ul><li>'프리미엄 아몬드가루 1kg 95% 아몬드분말 아몬드파우더 프리미엄 아몬드분말(95%) 1kg 대륙유통'</li><li>'너츠빌 캘리포니아 아몬드 분말 가루 파우더 1kg 아몬드 슬라이스 1kg (주)엠디에프앤'</li><li>'너츠빌 캘리포니아 아몬드 분말 가루 파우더 1kg 아몬드 분말 100% 1kg (주)엠디에프앤'</li></ul> | | |
| | 8.0 | <ul><li>'사조해표 찹쌀가루 350g 건우푸드'</li><li>'사조 해표 찹쌀가루 350g 감자전분 350g 주식회사 더 골든트리'</li><li>'해표 찹쌀가루 350g-1개 에이치엠몰(HM mall)'</li></ul> | | |
| | 10.0 | <ul><li>'해표 튀김가루 1kg/부침요리/전 해표 튀김가루 1kg 단비마켓'</li><li>'CJ제일제당 백설 치킨 튀김가루 1kg 바름푸드'</li><li>'CJ제일제당 백설 튀김가루 1kg 1)튀김가루 태성유통'</li></ul> | | |
| | 4.0 | <ul><li>'신일 냉동 골드빵가루 2kg (주)우주식품디씨오피'</li><li>'오뚜기 빵가루 1KG 자취 대용량 식자재 선물 튀김 제사 명절 부침개 간식 하나칭구'</li><li>'오뚜기 빵가루 200g 이고지고'</li></ul> | | |
| | 2.0 | <ul><li>'백설 박력밀가루 1kg (박력분) 주식회사 몬즈컴퍼니'</li><li>'아티장 밀가루 T55 20KG 백설 베이킹스타'</li><li>'박력밀가루(큐원 1K) 썬샤인웍스'</li></ul> | | |
| | 5.0 | <ul><li>'[대두식품] 강력쌀가루(국산) 15kg (주)대두식품서울지점'</li><li>'싸리재 유기농 습식 쌀가루 [ 백미 멥쌀가루 1kg ] 떡만들기 베이킹 비건요리 무염백미찹쌀가루 1kg 농업회사법인콩사랑유한회사'</li><li>'햇쌀마루 박력쌀가루 3kg 이캔유통'</li></ul> | | |
| | 9.0 | <ul><li>'뚜레반 날콩가루 1kg (주)울산팡'</li><li>'복만네 콩국수용 콩가루 850g 05.해늘이볶은콩가루1kg 바른에프에스'</li><li>'[복만네] 콩국수용 콩가루 850g / 콩국 선식 (주)유영유통'</li></ul> | | |
| ## Evaluation | |
| ### Metrics | |
| | Label | Metric | | |
| |:--------|:-------| | |
| | **all** | 0.9630 | | |
| ## 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_fd0") | |
| # Run inference | |
| preds = model("CJ제일제당 백설 강력밀가루 2.5kg 둘레푸드") | |
| ``` | |
| <!-- | |
| ### 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 | 8.9308 | 24 | | |
| | Label | Training Sample Count | | |
| |:------|:----------------------| | |
| | 0.0 | 50 | | |
| | 1.0 | 22 | | |
| | 2.0 | 50 | | |
| | 3.0 | 50 | | |
| | 4.0 | 50 | | |
| | 5.0 | 32 | | |
| | 6.0 | 18 | | |
| | 7.0 | 50 | | |
| | 8.0 | 26 | | |
| | 9.0 | 50 | | |
| | 10.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.0143 | 1 | 0.4619 | - | | |
| | 0.7143 | 50 | 0.2999 | - | | |
| | 1.4286 | 100 | 0.1066 | - | | |
| | 2.1429 | 150 | 0.0721 | - | | |
| | 2.8571 | 200 | 0.0457 | - | | |
| | 3.5714 | 250 | 0.03 | - | | |
| | 4.2857 | 300 | 0.0045 | - | | |
| | 5.0 | 350 | 0.002 | - | | |
| | 5.7143 | 400 | 0.004 | - | | |
| | 6.4286 | 450 | 0.002 | - | | |
| | 7.1429 | 500 | 0.0077 | - | | |
| | 7.8571 | 550 | 0.002 | - | | |
| | 8.5714 | 600 | 0.006 | - | | |
| | 9.2857 | 650 | 0.0019 | - | | |
| | 10.0 | 700 | 0.0001 | - | | |
| | 10.7143 | 750 | 0.0001 | - | | |
| | 11.4286 | 800 | 0.0001 | - | | |
| | 12.1429 | 850 | 0.0 | - | | |
| | 12.8571 | 900 | 0.0 | - | | |
| | 13.5714 | 950 | 0.0 | - | | |
| | 14.2857 | 1000 | 0.0 | - | | |
| | 15.0 | 1050 | 0.0 | - | | |
| | 15.7143 | 1100 | 0.0 | - | | |
| | 16.4286 | 1150 | 0.0 | - | | |
| | 17.1429 | 1200 | 0.0 | - | | |
| | 17.8571 | 1250 | 0.0 | - | | |
| | 18.5714 | 1300 | 0.0 | - | | |
| | 19.2857 | 1350 | 0.0 | - | | |
| | 20.0 | 1400 | 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.* | |
| --> |