Text Classification
setfit
Safetensors
sentence-transformers
roberta
generated_from_setfit_trainer
Eval Results (legacy)
text-embeddings-inference
Instructions to use mini1013/master_cate_el1 with libraries, inference providers, notebooks, and local apps. Follow these links to get started.
- Libraries
- setfit
How to use mini1013/master_cate_el1 with setfit:
from setfit import SetFitModel model = SetFitModel.from_pretrained("mini1013/master_cate_el1") preds = model.predict(["i loved the spiderman movie!", "pineapple on pizza is the worst"]) print(preds) - sentence-transformers
How to use mini1013/master_cate_el1 with sentence-transformers:
from sentence_transformers import SentenceTransformer model = SentenceTransformer("mini1013/master_cate_el1") 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_el1: direct link, hf CLI and curl.
- Browser
- Download file 11.7 kB
-
https://huggingface.co/mini1013/master_cate_el1/resolve/main/README.md
- Command line
-
hf download hf://mini1013/master_cate_el1/README.md
-
curl -L -o README.md https://huggingface.co/mini1013/master_cate_el1/resolve/main/README.md
11.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: 넥스트 USB 3.0 2포트 PCI Express 카드 (NEXT-212U3) YNMI-NK0431 윤 미디어 | |
| - text: 앱코 NCORE G30 트루포스 (블랙) 미들타워 컴퓨터 케이스 오케이 바이오 | |
| - text: APC SMC1500I-2U Smart UPS 900W/1500VA 무정전 전원공급장치 교체배터리 전원백업장치 (DHCNC) 주식회사 | |
| 대현씨앤씨 | |
| - text: 이지넷 카드리더기 NEXT-8603TCU3 블랙 [KF] 주식회사 케이에프컴퍼니 | |
| - text: 다크플래쉬 darkFlash DS900 ARGB 강화유리 컴퓨터 PC 케이스 (블랙) 주식회사 아크런 (Akrun Co., Ltd.) | |
| 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.9098343017000216 | |
| 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:** 10 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 | | |
| |:------|:------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------| | |
| | 9 | <ul><li>'APC BK500EI UPS배터리 무정전전원장치 300W 500VA 다피(dappy)'</li><li>'리안리 SP750 80PLUS GOLD (WHITE) 주식회사 브라보세컨즈'</li><li>'APC Smart UPS C 2000VA Tower 무정전전원장치 - smc2000ic 주식회사 파인인프라'</li></ul> | | |
| | 2 | <ul><li>'3RSYS R200 RGB (블랙) 미들타워 컴온씨앤씨(주)'</li><li>'DAVEN AQUA (블랙) 주식회사 꿈누리'</li><li>'w 대원TMT DW-H1200 허브랙 (H1200×D800×W600/25U/회색) (착불배송) (주)원영씨앤씨'</li></ul> | | |
| | 0 | <ul><li>'인텔 코어i7-13세대 13700K 랩터레이크 정품 에어캡배송 (주)신우밀루유떼'</li><li>'AMD 라이젠5-4세대 5600X (버미어)벌크포장 AS 3년 태성에프앤비(주)'</li><li>'[INTEL] 코어10세대 i7-10700 벌크 병행 쿨러미포함 (코멧레이크) (주)컴퓨존'</li></ul> | | |
| | 4 | <ul><li>'SAPPHIRE 라데온 RX 7900 GRE PURE D6 16GB 주식회사 꿈누리'</li><li>'ASRock 라데온 RX 7900 XTX Phantom Gaming OC D6 24GB 대원씨티에스 주식회사 에스씨엠인포텍'</li><li>'[HY] INNO3D 지포스 GT1030 D5 2GB LP 무소음 (주)제이케이존'</li></ul> | | |
| | 8 | <ul><li>'잘만 ZM-STC10 (2g) 주식회사 피씨사자'</li><li>'3RSYS APB BAR 35 (주)컴퓨존'</li><li>'LP30 ARGB PSU 커버 화이트 주식회사보성닷컴'</li></ul> | | |
| | 6 | <ul><li>'NEXTU NEXT-206NEC EX 에스앤와이'</li><li>'LANstar PCI-E 내부 SATA3 4포트 카드/LS-PCIE-4SATA/PC 내부에 SATA3 4포트 생성/발열 방지용 방열판/LP 브라켓 포함 디피시스템'</li><li>'NEXTU NEXT-405NEC LP 에스앤와이'</li></ul> | | |
| | 3 | <ul><li>'V-Color BLACK DDR5-5200 CL42 STANDARD 벌크 (8GB) (주)가이드컴'</li><li>'TEAMGROUP T-Force DDR5 6000 CL38 Delta RGB 화이트 패키지 32GB(16Gx2) (주)서린씨앤아이'</li><li>'ADATA DDR5-5600 CL46 (16GB)/정품판매점/하이닉스A다이/언락/평생 제한 보증/R 주식회사 에이알씨앤아이'</li></ul> | | |
| | 5 | <ul><li>'ASRock H510M-HDV/M.2 SE 에즈윈 주식회사디케이'</li><li>'DK ASRock B760M PG Riptide D5 에즈윈 주식회사디케이'</li><li>'[ ] GIGABYTE B650 AORUS ELITE AX ICE 제이씨현 뉴비시스템즈'</li></ul> | | |
| | 7 | <ul><li>'아틱 P14 PWM PST 블랙 VALUE 5팩 (주)서린씨앤아이'</li><li>'앱코 타이폰 120X5 CPU 쿨러 알루미늄 방열판 주식회사 지디스엠알오'</li><li>'Thermalright Peerless Assassin 120 SE 서린 태성에프앤비(주)'</li></ul> | | |
| | 1 | <ul><li>'엠비에프 CAT.7 SFTP 금도금 UTP 3중 쉴드 패치코드 기가비트 랜케이블 0.5M (MBF-U705G) 주식회사 아크런 (Akrun Co., Ltd.)'</li><li>'MBF-C5E305R 305M 레드 BOX CAT.5E UTP 랜케이블 컴샷정보'</li><li>'엠비에프 CAT.5e UTP 제작형 랜케이블 박스 MBF-C5E305Y 옐로우 305m (주)아토닉스'</li></ul> | | |
| ## Evaluation | |
| ### Metrics | |
| | Label | Metric | | |
| |:--------|:-------| | |
| | **all** | 0.9098 | | |
| ## 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_el1") | |
| # Run inference | |
| preds = model("앱코 NCORE G30 트루포스 (블랙) 미들타워 컴퓨터 케이스 오케이 바이오") | |
| ``` | |
| <!-- | |
| ### 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.206 | 18 | | |
| | Label | Training Sample Count | | |
| |:------|:----------------------| | |
| | 0 | 50 | | |
| | 1 | 50 | | |
| | 2 | 50 | | |
| | 3 | 50 | | |
| | 4 | 50 | | |
| | 5 | 50 | | |
| | 6 | 50 | | |
| | 7 | 50 | | |
| | 8 | 50 | | |
| | 9 | 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.0127 | 1 | 0.4969 | - | | |
| | 0.6329 | 50 | 0.2753 | - | | |
| | 1.2658 | 100 | 0.0677 | - | | |
| | 1.8987 | 150 | 0.014 | - | | |
| | 2.5316 | 200 | 0.0023 | - | | |
| | 3.1646 | 250 | 0.0001 | - | | |
| | 3.7975 | 300 | 0.0001 | - | | |
| | 4.4304 | 350 | 0.0001 | - | | |
| | 5.0633 | 400 | 0.0001 | - | | |
| | 5.6962 | 450 | 0.0 | - | | |
| | 6.3291 | 500 | 0.0001 | - | | |
| | 6.9620 | 550 | 0.0001 | - | | |
| | 7.5949 | 600 | 0.0 | - | | |
| | 8.2278 | 650 | 0.0 | - | | |
| | 8.8608 | 700 | 0.0 | - | | |
| | 9.4937 | 750 | 0.0 | - | | |
| | 10.1266 | 800 | 0.0 | - | | |
| | 10.7595 | 850 | 0.0 | - | | |
| | 11.3924 | 900 | 0.0 | - | | |
| | 12.0253 | 950 | 0.0 | - | | |
| | 12.6582 | 1000 | 0.0 | - | | |
| | 13.2911 | 1050 | 0.0 | - | | |
| | 13.9241 | 1100 | 0.0 | - | | |
| | 14.5570 | 1150 | 0.0 | - | | |
| | 15.1899 | 1200 | 0.0 | - | | |
| | 15.8228 | 1250 | 0.0 | - | | |
| | 16.4557 | 1300 | 0.0 | - | | |
| | 17.0886 | 1350 | 0.0 | - | | |
| | 17.7215 | 1400 | 0.0 | - | | |
| | 18.3544 | 1450 | 0.0 | - | | |
| | 18.9873 | 1500 | 0.0 | - | | |
| | 19.6203 | 1550 | 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.* | |
| --> |