Text Classification
setfit
Safetensors
sentence-transformers
roberta
generated_from_setfit_trainer
Eval Results (legacy)
text-embeddings-inference
Instructions to use mini1013/master_cate_fd1 with libraries, inference providers, notebooks, and local apps. Follow these links to get started.
- Libraries
- setfit
How to use mini1013/master_cate_fd1 with setfit:
from setfit import SetFitModel model = SetFitModel.from_pretrained("mini1013/master_cate_fd1") preds = model.predict(["i loved the spiderman movie!", "pineapple on pizza is the worst"]) print(preds) - sentence-transformers
How to use mini1013/master_cate_fd1 with sentence-transformers:
from sentence_transformers import SentenceTransformer model = SentenceTransformer("mini1013/master_cate_fd1") 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_fd1: direct link, hf CLI and curl.
- Browser
- Download file 13.6 kB
-
https://huggingface.co/mini1013/master_cate_fd1/resolve/main/README.md
- Command line
-
hf download hf://mini1013/master_cate_fd1/README.md
-
curl -L -o README.md https://huggingface.co/mini1013/master_cate_fd1/resolve/main/README.md
13.6 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: 모어네이처 프리미엄 코엔자임Q10 500mg x 60캡슐 주식회사 템스윈(Tems Win) | |
| - text: 솔가 맥주효모 비타민B12 티아민 250정 맥주효모 250정(80일분) X 2개 꿈 | |
| - text: 닥터스베스트 OptiMSM 함유 MSM 분말 250g(8.8oz) 메트로 나인 | |
| - text: 정관장 홍삼원 6년근 홍삼농축액 50ml 30포 고형분60% 선물세트 쇼핑백포함 주식회사 무한종합상사 | |
| - text: 락토핏 당케어 2g x 60포 (주)레놈 성수지점 | |
| 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.7147122562003371 | |
| 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:** 13 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 | | |
| |:------|:--------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------| | |
| | 2.0 | <ul><li>'콤비타 마누카꿀 UMF10 500g 2개 2.콤비타 마누카꿀 UMF10+ 500g 2개 재인뉴트리셔널'</li><li>'데저트 크릭 로 텍사스 꿀 340g 2개 Desert Creek Honey Raw Unfiltered Texas Honey 누크몰글로벌'</li><li>'한울벌꿀 국내산 아카시아꿀 사양 벌꿀 2.4kg 아카시아꿀 2.4kg 선흥물산'</li></ul> | | |
| | 6.0 | <ul><li>'블루미너스 왕의 맥문동 30포X4박스/국내산 볶은 맥문동 뿌리 가루 맥문동차 사포닌 추천 주식회사 대한종합상사'</li><li>'홍국 발효 구기자 분말 가루 청양구기자 홍국균 500g 홍국발효구기자 분말 500g (1팩) 푸드센스'</li><li>'GNM자연의품격 루테인 지아잔틴 아스타잔틴 500mg x 30캡슐 케이티씨 주식회사'</li></ul> | | |
| | 0.0 | <ul><li>'[3+1 이벤트] 데이풀 호박즙 아르기닌 110ml 1박스 여자아르기닌 쌍수 성형 붓기 늙은호박즙 어반랩스 주식회사'</li><li>'홍삼생알칡즙 망구 에이'</li><li>'국산 아로니아원액 1L 2병 아로니아즙 농업회사법인 청정산들해(주)'</li></ul> | | |
| | 5.0 | <ul><li>'고농축 랩온랩 k2 히말라야 숙취해소제 허브 추출물 1박스 30정 단비'</li><li>'고농축 k2 히말라야 숙취해소제 허브 추출물 1박스 30정 히말라야숙취해소제 (30정) 랩온랩(LAB ON LAB)'</li><li>'히말라야 숙취해소 파티스마트 소프트 츄 10개입 04_파티스마트 2개입 4박스 (주)히말라야코리아'</li></ul> | | |
| | 10.0 | <ul><li>'황성주박사의 마시는 영양식 140ml 24팩 고소한 곡물맛 하얀'</li><li>'뉴케어 고칼슘 영양갱 40g 30입 아르미유'</li><li>'대상웰라이프 마이밀 마이키즈 밀크맛 150ml 24팩 아이간식 +Npay 2000원 대상웰라이프(주)'</li></ul> | | |
| | 3.0 | <ul><li>'Green Foods 그린푸드 마그마 플러스 드링크 믹스 10.6oz 캐주얼'</li><li>'캐나다 영양제 퀄리티랩 프리미엄 퀄리티 로얄제리 1000mg \ufeff200캡슐 바이오 파크(Bio park)'</li><li>'(100매)푸드어홀릭 네이처스킨 오이 마스크팩 (100매)푸드어홀릭 네이처스킨 오이 마스크팩 차일드'</li></ul> | | |
| | 9.0 | <ul><li>'동원 천지인 홍삼절편 수 (15g 8갑 8일분) (주)동방유래'</li><li>'정관장 홍삼차 100포 인삼차 건강차 홍삼차(포장O) 주식회사 앨리스월드'</li><li>'[정기구독]함소아 홍키통키 프리미어 그린 1박스 함소아제약'</li></ul> | | |
| | 8.0 | <ul><li>'우슬 300g 우슬분말 300g 농업회사법인 주식회사 두손애약초'</li><li>'차가버섯 선물세트 1kg 러시아/고급바구니 포장 주식회사 생생드림'</li><li>'산사 열매 국내산 300g 산사자 아가위 나무 산사 300g x5개(10%할인) 농업회사법인 주식회사 두손애약초'</li></ul> | | |
| | 11.0 | <ul><li>'유한m 액티브 셀렌효모 플러스 480정 / 맥주효모 셀레늄 옥타코사놀 헬스피아'</li><li>'효소락 30포 용한약국'</li><li>'여에스더 맥주효모 비오틴 울트라 케어 5200 맥스 국내 최대함량 맥주효모&비오틴 소형환 [30%] 1박스 (14포) 에스더포뮬러 주식회사'</li></ul> | | |
| | 1.0 | <ul><li>'몽글환 차전자피환 4g 30포 우리닥터'</li><li>'국산 여주환 500g 여주환 500g 주식회사 건강중심'</li><li>'마카 아르기닌 야관문 서리태환 남자 활력 모발관리 필수 콩의두감 3병 선물세트 (2+1)야관문 플러스 세트 3개(9병) 주식회사 루토닉스'</li></ul> | | |
| | 4.0 | <ul><li>'암웨이 더블엑스 종합비타민 무기질 리필 칼맥디 프렌즈'</li><li>'종근당 이뮨 듀오 멀티비타맥스 140ml 7병 1박스 늘품서치'</li><li>'네추럴라이즈 멀티비타민 꾸미 2.5g x 60개입 현민예 스토어'</li></ul> | | |
| | 12.0 | <ul><li>'활강원 백만 임산부 발효 자연 곡물 효소 400만 역가수치 효소제 100포 백만효소 x 2박스 (200스틱) 디와이코어'</li><li>'이영애의건강미식 카무트 브랜드 밀 효소 골드 3g x 30포 주식회사 템스윈(Tems Win)'</li><li>'이영애의 건강미식 골드 카무트 효소 1개월 분 카무트 효소 1개 주식회사 네이처라우드'</li></ul> | | |
| | 7.0 | <ul><li>'인삼 도매일번지 난발삼 금산 세척 난발삼_03난발삼 소500g_세척안함 금산인삼 도매 일번지'</li><li>'동우당제약 궁중대보 250g 국내산 인삼 복령 지황 에이치앤지바이오'</li><li>'동우당제약 궁중대보 250g 국내산 인삼 복령 지황 인투'</li></ul> | | |
| ## Evaluation | |
| ### Metrics | |
| | Label | Metric | | |
| |:--------|:-------| | |
| | **all** | 0.7147 | | |
| ## 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_fd1") | |
| # Run inference | |
| preds = model("락토핏 당케어 2g x 60포 (주)레놈 성수지점") | |
| ``` | |
| <!-- | |
| ### 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.8446 | 23 | | |
| | Label | Training Sample Count | | |
| |:------|:----------------------| | |
| | 0.0 | 50 | | |
| | 1.0 | 50 | | |
| | 2.0 | 50 | | |
| | 3.0 | 50 | | |
| | 4.0 | 50 | | |
| | 5.0 | 31 | | |
| | 6.0 | 50 | | |
| | 7.0 | 50 | | |
| | 8.0 | 24 | | |
| | 9.0 | 50 | | |
| | 10.0 | 50 | | |
| | 11.0 | 50 | | |
| | 12.0 | 24 | | |
| ### 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.0110 | 1 | 0.3794 | - | | |
| | 0.5495 | 50 | 0.2808 | - | | |
| | 1.0989 | 100 | 0.1721 | - | | |
| | 1.6484 | 150 | 0.0976 | - | | |
| | 2.1978 | 200 | 0.0646 | - | | |
| | 2.7473 | 250 | 0.0528 | - | | |
| | 3.2967 | 300 | 0.0428 | - | | |
| | 3.8462 | 350 | 0.0128 | - | | |
| | 4.3956 | 400 | 0.0079 | - | | |
| | 4.9451 | 450 | 0.01 | - | | |
| | 5.4945 | 500 | 0.0115 | - | | |
| | 6.0440 | 550 | 0.0002 | - | | |
| | 6.5934 | 600 | 0.0001 | - | | |
| | 7.1429 | 650 | 0.0001 | - | | |
| | 7.6923 | 700 | 0.0001 | - | | |
| | 8.2418 | 750 | 0.0001 | - | | |
| | 8.7912 | 800 | 0.0001 | - | | |
| | 9.3407 | 850 | 0.0001 | - | | |
| | 9.8901 | 900 | 0.0001 | - | | |
| | 10.4396 | 950 | 0.0001 | - | | |
| | 10.9890 | 1000 | 0.0001 | - | | |
| | 11.5385 | 1050 | 0.0001 | - | | |
| | 12.0879 | 1100 | 0.0001 | - | | |
| | 12.6374 | 1150 | 0.0001 | - | | |
| | 13.1868 | 1200 | 0.0001 | - | | |
| | 13.7363 | 1250 | 0.0001 | - | | |
| | 14.2857 | 1300 | 0.0001 | - | | |
| | 14.8352 | 1350 | 0.0 | - | | |
| | 15.3846 | 1400 | 0.0001 | - | | |
| | 15.9341 | 1450 | 0.0 | - | | |
| | 16.4835 | 1500 | 0.0001 | - | | |
| | 17.0330 | 1550 | 0.0 | - | | |
| | 17.5824 | 1600 | 0.0 | - | | |
| | 18.1319 | 1650 | 0.0 | - | | |
| | 18.6813 | 1700 | 0.0 | - | | |
| | 19.2308 | 1750 | 0.0 | - | | |
| | 19.7802 | 1800 | 0.0001 | - | | |
| ### 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.* | |
| --> |