Text Classification
setfit
Safetensors
sentence-transformers
roberta
generated_from_setfit_trainer
Eval Results (legacy)
text-embeddings-inference
Instructions to use mini1013/master_cate_sl17 with libraries, inference providers, notebooks, and local apps. Follow these links to get started.
- Libraries
- setfit
How to use mini1013/master_cate_sl17 with setfit:
from setfit import SetFitModel model = SetFitModel.from_pretrained("mini1013/master_cate_sl17") preds = model.predict(["i loved the spiderman movie!", "pineapple on pizza is the worst"]) print(preds) - sentence-transformers
How to use mini1013/master_cate_sl17 with sentence-transformers:
from sentence_transformers import SentenceTransformer model = SentenceTransformer("mini1013/master_cate_sl17") 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_sl17: direct link, hf CLI and curl.
- Browser
- Download file 13.8 kB
-
https://huggingface.co/mini1013/master_cate_sl17/resolve/main/README.md
- Command line
-
hf download hf://mini1013/master_cate_sl17/README.md
-
curl -L -o README.md https://huggingface.co/mini1013/master_cate_sl17/resolve/main/README.md
13.8 kB
| tags: | |
| - setfit | |
| - sentence-transformers | |
| - text-classification | |
| - generated_from_setfit_trainer | |
| widget: | |
| - text: 전동 스케이트보드 원격제어 4륜 롱보드 성인 스포츠/레저>스케이트/보드/롤러>스케이트보드 | |
| - text: 핑거 서핑보드 장난감 손가락 지판 미니 생일 파티 스포츠/레저>스케이트/보드/롤러>핑거보드 | |
| - text: CCS 로고크루저 스케이트보드데크 27 x 8 00 스포츠/레저>스케이트/보드/롤러>스케이트보드 | |
| - text: 롤러블레이드 Rollerblade Zetrablade 여성용 성인 피트니스 인라인 스케이트 라이트 여성용 스포츠/레저>인라인스케이트>성인용 | |
| - text: 전기 스케이트 보드 초보 초보자 입문용 전동 크루져 취미 출퇴근 스포츠/레저>스케이트/보드/롤러>스케이트보드 | |
| metrics: | |
| - accuracy | |
| pipeline_tag: text-classification | |
| library_name: setfit | |
| inference: true | |
| base_model: mini1013/master_domain | |
| 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: accuracy | |
| value: 1.0 | |
| name: Accuracy | |
| # 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:** 8 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 | | |
| |:------|:--------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------| | |
| | 4.0 | <ul><li>'휠라 어린이 인라인 스케이트 롤러 브레이드 스포츠/레저>인라인스케이트>주니어'</li><li>'O휠러스 글리터링 롤러스케이트 WR120 스포츠/레저>인라인스케이트>성인용'</li><li>'아동 롤러블레이드 초등학생 인라인스케이트 사이즈조절형 스포츠/레저>인라인스케이트>주니어'</li></ul> | | |
| | 1.0 | <ul><li>'전동롱보드 초보 스케이드 성인용 크루저 전기 스포츠/레저>스케이트/보드/롤러>스케이트보드'</li><li>'롱보드 샵 스케이트 초보자 휠 댄스 스트리트 전문 성인 4륜 스포츠/레저>스케이트/보드/롤러>스케이트보드'</li><li>'스네이크보드 보드 S 슬라이드 입문용 어린이 연습용 성인용 스포츠/레저>스케이트/보드/롤러>스네이크보드'</li></ul> | | |
| | 0.0 | <ul><li>'전동 휠리스 플래시 바퀴달린 롤러 스케이트 불빛 신발 킥보드 4륜 스포츠/레저>스케이트/보드/롤러>롤러슈즈'</li><li>'성인 발광 롤러스케이트 플래시 캔버스 남녀공용 휠 바퀴 스포츠/레저>스케이트/보드/롤러>롤러슈즈'</li><li>'인라인스케이트 성인용 어린이용 롤러슈즈 힐리스 운동화 바퀴달린신발 휠리스 신발 스포츠/레저>스케이트/보드/롤러>롤러슈즈'</li></ul> | | |
| | 3.0 | <ul><li>'Skaboots Walkable 하키 스케이트 가드 - 라지 사이즈 5-9 5 최대 블레이드 길이 28 11 129365 스포츠/레저>스케이트/보드/롤러>아이스스케이트'</li><li>'피겨스케이트 커버 소프트 보호커버 동물 소커 털날집 블레이드 스포츠/레저>스케이트/보드/롤러>아이스스케이트'</li><li>'아이스하키 장비 성인 가방 스포츠/레저>스케이트/보드/롤러>아이스스케이트'</li></ul> | | |
| | 2.0 | <ul><li>'FREEDARE 스케이트보드 휠 83a 베어링 스페이서 크루저 휠 4개입 스포츠/레저>스케이트/보드/롤러>스케이트보드용품'</li><li>'스케이트보드 진열대 거치대 양면 보드 스탠드 행거 스포츠/레저>스케이트/보드/롤러>스케이트보드용품'</li><li>'48V 36V 충전기 XLR 소켓 4핀 전기 자전거 킥보드 항공 헤드 출력 42V 36V2A 스포츠/레저>스케이트/보드/롤러>스케이트보드용품'</li></ul> | | |
| | 7.0 | <ul><li>'핑거보드 연습장 트랙 손가락 스케이트 소품 스포츠/레저>스케이트/보드/롤러>핑거보드'</li><li>'핑거보드 데크 트랙 키트 미끄럼 전문가용 손가락 블랙리버 스래셔 내추럴스테인 스포츠/레저>스케이트/보드/롤러>핑거보드'</li><li>'핑거보드판 슬로프 장소 미니 손가락 기물 세트 스케이트 장난감 꾸미기 스포츠/레저>스케이트/보드/롤러>핑거보드'</li></ul> | | |
| | 5.0 | <ul><li>'롤러블레이드 어그레시브 초보 전문가용 사이즈조절 스포츠/레저>스케이트/보드/롤러>인라인용품'</li><li>'스나이퍼코리아 발로타 불바퀴 씽씽카 발광바퀴 자전거 퀵보드 키즈바이크 보조바퀴 킥보드 LED바퀴 스포츠/레저>스케이트/보드/롤러>인라인용품'</li><li>'휠러스 롤러스케이트 바퀴 끈 커스텀 매장정품 161561 스포츠/레저>스케이트/보드/롤러>인라인용품'</li></ul> | | |
| | 6.0 | <ul><li>'10 적립홀리 접이식 듀얼브레이크 트라이더 W-3000 스포츠/레저>스케이트/보드/롤러>트라이스키'</li><li>'이브살로몽 YVES SALOMON 벨티드 스키 수트 여성 P00867207 스포츠/레저>스케이트/보드/롤러>트라이스키'</li><li>'K2 토크백 88 스키 2022 여자 160 스포츠/레저>스케이트/보드/롤러>트라이스키'</li></ul> | | |
| ## Evaluation | |
| ### Metrics | |
| | Label | Accuracy | | |
| |:--------|:---------| | |
| | **all** | 1.0 | | |
| ## 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_sl17") | |
| # Run inference | |
| preds = model("전동 스케이트보드 원격제어 4륜 롱보드 성인 스포츠/레저>스케이트/보드/롤러>스케이트보드") | |
| ``` | |
| <!-- | |
| ### 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 | 2 | 9.5663 | 23 | | |
| | Label | Training Sample Count | | |
| |:------|:----------------------| | |
| | 0.0 | 70 | | |
| | 1.0 | 70 | | |
| | 2.0 | 70 | | |
| | 3.0 | 70 | | |
| | 4.0 | 70 | | |
| | 5.0 | 15 | | |
| | 6.0 | 70 | | |
| | 7.0 | 70 | | |
| ### Training Hyperparameters | |
| - batch_size: (256, 256) | |
| - num_epochs: (30, 30) | |
| - max_steps: -1 | |
| - sampling_strategy: oversampling | |
| - num_iterations: 50 | |
| - body_learning_rate: (2e-05, 1e-05) | |
| - head_learning_rate: 0.01 | |
| - loss: CosineSimilarityLoss | |
| - distance_metric: cosine_distance | |
| - margin: 0.25 | |
| - end_to_end: False | |
| - use_amp: False | |
| - warmup_proportion: 0.1 | |
| - l2_weight: 0.01 | |
| - seed: 42 | |
| - eval_max_steps: -1 | |
| - load_best_model_at_end: False | |
| ### Training Results | |
| | Epoch | Step | Training Loss | Validation Loss | | |
| |:-------:|:----:|:-------------:|:---------------:| | |
| | 0.0101 | 1 | 0.4772 | - | | |
| | 0.5051 | 50 | 0.4694 | - | | |
| | 1.0101 | 100 | 0.2249 | - | | |
| | 1.5152 | 150 | 0.0726 | - | | |
| | 2.0202 | 200 | 0.0074 | - | | |
| | 2.5253 | 250 | 0.0004 | - | | |
| | 3.0303 | 300 | 0.0001 | - | | |
| | 3.5354 | 350 | 0.0 | - | | |
| | 4.0404 | 400 | 0.0 | - | | |
| | 4.5455 | 450 | 0.0001 | - | | |
| | 5.0505 | 500 | 0.0 | - | | |
| | 5.5556 | 550 | 0.0 | - | | |
| | 6.0606 | 600 | 0.0 | - | | |
| | 6.5657 | 650 | 0.0 | - | | |
| | 7.0707 | 700 | 0.0 | - | | |
| | 7.5758 | 750 | 0.0 | - | | |
| | 8.0808 | 800 | 0.0 | - | | |
| | 8.5859 | 850 | 0.0 | - | | |
| | 9.0909 | 900 | 0.0 | - | | |
| | 9.5960 | 950 | 0.0 | - | | |
| | 10.1010 | 1000 | 0.0 | - | | |
| | 10.6061 | 1050 | 0.0 | - | | |
| | 11.1111 | 1100 | 0.0 | - | | |
| | 11.6162 | 1150 | 0.0 | - | | |
| | 12.1212 | 1200 | 0.0 | - | | |
| | 12.6263 | 1250 | 0.0 | - | | |
| | 13.1313 | 1300 | 0.0 | - | | |
| | 13.6364 | 1350 | 0.0 | - | | |
| | 14.1414 | 1400 | 0.0 | - | | |
| | 14.6465 | 1450 | 0.0 | - | | |
| | 15.1515 | 1500 | 0.0 | - | | |
| | 15.6566 | 1550 | 0.0 | - | | |
| | 16.1616 | 1600 | 0.0 | - | | |
| | 16.6667 | 1650 | 0.0 | - | | |
| | 17.1717 | 1700 | 0.0 | - | | |
| | 17.6768 | 1750 | 0.0 | - | | |
| | 18.1818 | 1800 | 0.0 | - | | |
| | 18.6869 | 1850 | 0.0 | - | | |
| | 19.1919 | 1900 | 0.0 | - | | |
| | 19.6970 | 1950 | 0.0 | - | | |
| | 20.2020 | 2000 | 0.0 | - | | |
| | 20.7071 | 2050 | 0.0 | - | | |
| | 21.2121 | 2100 | 0.0 | - | | |
| | 21.7172 | 2150 | 0.0 | - | | |
| | 22.2222 | 2200 | 0.0 | - | | |
| | 22.7273 | 2250 | 0.0 | - | | |
| | 23.2323 | 2300 | 0.0 | - | | |
| | 23.7374 | 2350 | 0.0 | - | | |
| | 24.2424 | 2400 | 0.0 | - | | |
| | 24.7475 | 2450 | 0.0 | - | | |
| | 25.2525 | 2500 | 0.0 | - | | |
| | 25.7576 | 2550 | 0.0 | - | | |
| | 26.2626 | 2600 | 0.0 | - | | |
| | 26.7677 | 2650 | 0.0 | - | | |
| | 27.2727 | 2700 | 0.0 | - | | |
| | 27.7778 | 2750 | 0.0 | - | | |
| | 28.2828 | 2800 | 0.0 | - | | |
| | 28.7879 | 2850 | 0.0 | - | | |
| | 29.2929 | 2900 | 0.0 | - | | |
| | 29.7980 | 2950 | 0.0 | - | | |
| ### Framework Versions | |
| - Python: 3.10.12 | |
| - SetFit: 1.1.0 | |
| - Sentence Transformers: 3.3.1 | |
| - Transformers: 4.44.2 | |
| - PyTorch: 2.2.0a0+81ea7a4 | |
| - Datasets: 3.2.0 | |
| - Tokenizers: 0.19.1 | |
| ## 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.* | |
| --> |