Text Classification
setfit
Safetensors
sentence-transformers
roberta
generated_from_setfit_trainer
Eval Results (legacy)
text-embeddings-inference
Instructions to use mini1013/master_cate_fd5 with libraries, inference providers, notebooks, and local apps. Follow these links to get started.
- Libraries
- setfit
How to use mini1013/master_cate_fd5 with setfit:
from setfit import SetFitModel model = SetFitModel.from_pretrained("mini1013/master_cate_fd5") preds = model.predict(["i loved the spiderman movie!", "pineapple on pizza is the worst"]) print(preds) - sentence-transformers
How to use mini1013/master_cate_fd5 with sentence-transformers:
from sentence_transformers import SentenceTransformer model = SentenceTransformer("mini1013/master_cate_fd5") 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_fd5: direct link, hf CLI and curl.
- Browser
- Download file 10.5 kB
-
https://huggingface.co/mini1013/master_cate_fd5/resolve/main/README.md
- Command line
-
hf download hf://mini1013/master_cate_fd5/README.md
-
curl -L -o README.md https://huggingface.co/mini1013/master_cate_fd5/resolve/main/README.md
10.5 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: 맑은농산 리얼넛츠 베리앤요거트 하루건강견과 20g x 25개입 비트리 | |
| - text: 23년 햅쌀 골든퀸3호 수향미 특등급 10kg / 순차출고 상상리허설 | |
| - text: 산과들에 원데이오리지널 20g x 50개입 선물세트 동의 제이엠세일즈 | |
| - text: 구운아몬드 1kg 견과류 에이케이에스앤디 (주) AK인터넷쇼핑몰 | |
| - text: 필리핀 세부 건망고 80g 10개-쫀득한망고 말린망고 말린과일 대신유통 | |
| 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.894413407821229 | |
| 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>'[채울농산] 국산 장수상황버섯(baumii 최상품) 1개월분 (100g) 1개월분 채울농산'</li><li>'명이나물 2kg 산마늘잎 생명이나물 산나물 생채 명이장아찌 강원도 산마늘 명이 장아찌 2kg 토종농장'</li><li>'풀무원 한끼연두부 오리엔탈유자 (118gX2EA) (주)풀무원'</li></ul> | | |
| | 2.0 | <ul><li>'커클랜드 건 블루베리 567g 몸에 좋은 건과일 샐러드나 베이킹에 활용 코스트코 마인드 트레이드(mind trade)'</li><li>'웰프레쉬 냉동 블루베리 미국산 1kg 배동바지몰'</li><li>'커클랜드 냉동 블루베리 2.27kg 코스트코 아이스박스 요거트 과일 베리 라미의잡화점'</li></ul> | | |
| | 5.0 | <ul><li>'2022년산 국산 서리태 2kg 검은콩 속청 전남 구례산 볶은 서리태가루 1kg 농업회사법인(주)한결유통'</li><li>'국산 서리태 2kg 검은콩 속청 전남 구례산 국산 서리태(특A) 1kg 농업회사법인(주)한결유통'</li><li>'잔다리마을 특허받은 공법으로 로스팅한 검은콩 서리태 볶음콩 250g / 영양 간식 주식회사 패스트뷰'</li></ul> | | |
| | 0.0 | <ul><li>'Sol Simple 태양열 건조 망고 6온스(1팩)_파인애플 시이부동'</li><li>'[푸드] KUNNA 쿤나 건망고 75g 3개 부담없이 젤리 망고 마른 과일 태국 간식 사무실 탕비실 건조과일 말린 망고 에스디지컴퍼니'</li><li>'너츠브라더 촉촉한 건망고 200g 건망고 1kg (주)조하'</li></ul> | | |
| | 4.0 | <ul><li>'[카무트] 고대곡물 카무트 쌀 밀 500g 이푸른(주)'</li><li>'23년 국산 현미 쌀눈 2kg 주식회사 건강중심'</li><li>'[예약구매 할인] 저당 파로 800g 이탈리아 고대곡물 바비조아 저당밥 시리즈 특허공법 저항성전분 주식회사 바비조아'</li></ul> | | |
| | 1.0 | <ul><li>'맛있는家 너트리 캘리포니아 생아몬드 500g x 2개 (주)씨제이이엔엠'</li><li>'길림양행 탐스팜 쿠키앤크림 아몬드 190g 바이트리스'</li><li>'머거본 커피땅콩 130g 6개/ 견과류 마른안주 주전부리 보마스'</li></ul> | | |
| | 3.0 | <ul><li>'웰루츠 A등급 냉동 블루베리 1kg 냉동과일 웰루츠 냉동 키위 다이스(중국) 1kg 웰루츠'</li><li>'뉴뜨레 냉동 블루베리 홀 1kg+1kg 무가당 세척블루베리 과일 모음 다이스 퓨레 뉴뜨레 냉동 그린키위 1kg x 2봉 주식회사 보금푸드'</li><li>'코스트코 커클랜드 냉동 블루베리 2.27kg / 아이스박스 포장발송 아이스팩 + 드라이아이스 발송 남들과 다르게'</li></ul> | | |
| ## Evaluation | |
| ### Metrics | |
| | Label | Metric | | |
| |:--------|:-------| | |
| | **all** | 0.8944 | | |
| ## 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_fd5") | |
| # Run inference | |
| preds = model("구운아몬드 1kg 견과류 에이케이에스앤디 (주) AK인터넷쇼핑몰") | |
| ``` | |
| <!-- | |
| ### 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 | 10.0886 | 25 | | |
| | 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.4119 | - | | |
| | 0.9091 | 50 | 0.2564 | - | | |
| | 1.8182 | 100 | 0.0407 | - | | |
| | 2.7273 | 150 | 0.0157 | - | | |
| | 3.6364 | 200 | 0.014 | - | | |
| | 4.5455 | 250 | 0.0 | - | | |
| | 5.4545 | 300 | 0.0 | - | | |
| | 6.3636 | 350 | 0.0 | - | | |
| | 7.2727 | 400 | 0.0 | - | | |
| | 8.1818 | 450 | 0.0001 | - | | |
| | 9.0909 | 500 | 0.0 | - | | |
| | 10.0 | 550 | 0.0 | - | | |
| | 10.9091 | 600 | 0.0 | - | | |
| | 11.8182 | 650 | 0.0 | - | | |
| | 12.7273 | 700 | 0.0 | - | | |
| | 13.6364 | 750 | 0.0 | - | | |
| | 14.5455 | 800 | 0.0 | - | | |
| | 15.4545 | 850 | 0.0 | - | | |
| | 16.3636 | 900 | 0.0 | - | | |
| | 17.2727 | 950 | 0.0 | - | | |
| | 18.1818 | 1000 | 0.0 | - | | |
| | 19.0909 | 1050 | 0.0 | - | | |
| | 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.* | |
| --> |