Text Classification
setfit
Safetensors
sentence-transformers
roberta
generated_from_setfit_trainer
Eval Results (legacy)
text-embeddings-inference
Instructions to use mini1013/master_cate_bc28 with libraries, inference providers, notebooks, and local apps. Follow these links to get started.
- Libraries
- setfit
How to use mini1013/master_cate_bc28 with setfit:
from setfit import SetFitModel model = SetFitModel.from_pretrained("mini1013/master_cate_bc28") preds = model.predict(["i loved the spiderman movie!", "pineapple on pizza is the worst"]) print(preds) - sentence-transformers
How to use mini1013/master_cate_bc28 with sentence-transformers:
from sentence_transformers import SentenceTransformer model = SentenceTransformer("mini1013/master_cate_bc28") 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_bc28: direct link, hf CLI and curl.
- Browser
- Download file 15 kB
-
https://huggingface.co/mini1013/master_cate_bc28/resolve/main/README.md
- Command line
-
hf download hf://mini1013/master_cate_bc28/README.md
-
curl -L -o README.md https://huggingface.co/mini1013/master_cate_bc28/resolve/main/README.md
15 kB
| tags: | |
| - setfit | |
| - sentence-transformers | |
| - text-classification | |
| - generated_from_setfit_trainer | |
| widget: | |
| - text: u자 바디필로우 임산부 인형 극세사 쿠션 보호 01 01 출산/육아 > 임산부용품 > 임산부바디필로우 | |
| - text: V크로스 쿨 임산부 팬티 랜덤 3종1세트(M-XXL) 204830 L 출산/육아 > 임산부용품 > 기타임산부용품 | |
| - text: 1+1/2+2 코르셋 밴딩 올인원 속옷 3 IN 1 올인원 속옷 민소매 뱃살보정 일체형 속옷 L(65-70kg)_살구색 X 1+블랙 | |
| X 1 출산/육아 > 임산부용품 > 태교용품 > 태교용구 | |
| - text: u자베개 바디필로우 죽부인베개 임신베개 U자 배게 플래티넘 출산/육아 > 임산부용품 > 임산부바디필로우 | |
| - 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>'임산부복대 임부 허리 보호 지지대 산모 산전 10.얇은 심리스 임산부 복대_블랙XL 출산/육아 > 임산부용품 > 임산부보호대'</li><li>'프라하우스 임산부 산모 손목보호대(2개입) 원플러스원 세트 사이즈조절 메쉬 사계절보호대 손목보호대+발목보호대세트_선택4 손목 (스킨) + 발목 (블랙) 출산/육아 > 임산부용품 > 임산부보호대'</li><li>'임산부복대 임부 허리 보호 지지대 산모 산전 09.매쉬 산전산후겸용 벨트형_블랙XL 출산/육아 > 임산부용품 > 임산부보호대'</li></ul> | | |
| | 2.0 | <ul><li>'메모리 방석 산모 임산부 원형 폼 상품선택_핑크 출산/육아 > 임산부용품 > 산모방석'</li><li>'[솔라히팅시트] 도넛방석 회음부 임산부산모 치루 원적외선방석 [명화]별이빛나는밤에_추가 시트커버(그레이) 출산/육아 > 임산부용품 > 산모방석'</li><li>'3D 메모리폼 회음부 엉덩이 쿠션 산모 도넛 방석 선택01)3D 남성용 메모리폼 방석_C.극세사 브라운 출산/육아 > 임산부용품 > 산모방석'</li></ul> | | |
| | 5.0 | <ul><li>'비오템 비오베르제뛰르 튼살 크림 400ml 비오템튼살크림 +비오템 바디밀크 75ml ×2 출산/육아 > 임산부용품 > 임산부화장품'</li><li>'아기자기랩 양배추 가슴팩 28g 8매입 8매입 출산/육아 > 임산부용품 > 임산부화장품'</li><li>'베비루미 마더 케어 크림 200ml 출산/육아 > 임산부용품 > 임산부화장품'</li></ul> | | |
| | 0.0 | <ul><li>'[매장발송] 탑텐키즈 아동) 독도의 날 캠페인 플리스 셋업 (MKC4IP3001) LCO_120 출산/육아 > 임산부용품 > 기타임산부용품'</li><li>'BODDYSIZE 여성용 임산부 반소매 브이넥 러플 맥시 불규칙한 롱 드레스, 블랙. Medium Black Medium_Pink 출산/육아 > 임산부용품 > 기타임산부용품'</li><li>'임밍아웃 이벤트 현관문 레터링 자유문구 남편 임신 알리기 서프라이즈 부모님 카드 축하선물 아빠가된걸축하해_8.화이트/어마어마한신랑_6.응애응애 출산/육아 > 임산부용품 > 기타임산부용품'</li></ul> | | |
| | 3.0 | <ul><li>'아망떼 꿀잠 바디필로우 등쿠션 안고자는 베개 모음 31.코튼벨 등쿠션_커버_솜포함 노블핑크 출산/육아 > 임산부용품 > 임산부바디필로우'</li><li>'임산부바디필로우 배개 새로운 전신 수유 임신 베개 U 자형 출산 이동식 코튼 커버 70x130CM Gray S 출산/육아 > 임산부용품 > 임산부바디필로우'</li><li>'임산부 바디필로우 허리보호 임신 배받침 수면 쿠션 복부 지지대 블루 출산/육아 > 임산부용품 > 임산부바디필로우'</li></ul> | | |
| | 7.0 | <ul><li>'남성 전술 바지 방수 긁힘 방지 폴라폴리스 팬츠 기모 전술바지 3XL_그린 출산/육아 > 임산부용품 > 태교용품 > 태교음반/DVD'</li><li>'도플러 태아심음측정기 초음파 우리 아기 심장 소리 심장 체크 화이트 JST-T501 블루 출산/육아 > 임산부용품 > 태교용품 > 태교용구'</li><li>'알루미늄 합금 주방 압력 조리기, 스토브 요리, 에너지 절약 안전 보호, 야외 캠 155550 18CM 3L 155550 20CM 4L 출산/육아 > 임산부용품 > 태교용품 > 태교용구'</li></ul> | | |
| | 1.0 | <ul><li>'매일유업 맘스 앱솔루트 식이섬유 주스 오렌지200ml 24팩 오렌지쥬스24팩 출산/육아 > 임산부용품 > 모유수유차'</li><li>'맘스 앱솔루트 식이섬유주스 오렌지 200ml x 24팩 이중포장 매일유업 앱솔맘 맘스앱솔루트 식이섬유주스 오렌지x24팩 출산/육아 > 임산부용품 > 모유수유차'</li><li>'모유 차 맘라떼모아30포 + 유기농 스틸티 락타티20t 세트 출산/육아 > 임산부용품 > 모유수유차'</li></ul> | | |
| | 6.0 | <ul><li>'유주글로벌 전자파차단담요 방사선방지천 전자파차단앞치마 전자파방지복대 임신출산축하 은회색 2겹(무료 테스트 펜) 출산/육아 > 임산부용품 > 전자파차단앞치마'</li><li>'이지스바디 전기장완화 카페 바리스타 임산부 방수 이쁜 고급 앞치마 에이프런 워크웨어 선물 차콜그레이_베이지 출산/육아 > 임산부용품 > 전자파차단앞치마'</li><li>'전자파 방사선 차단 속옷 임신 선물 란제리 임부복 핑크 고양이+테스트 펜 M 출산/육아 > 임산부용품 > 전자파차단앞치마'</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_bc28") | |
| # Run inference | |
| preds = model("임산부 손목 산모 산후 보호대 아대 패드 핑크 출산/육아 > 임산부용품 > 임산부보호대") | |
| ``` | |
| <!-- | |
| ### 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 | 7 | 15.0119 | 28 | | |
| | Label | Training Sample Count | | |
| |:------|:----------------------| | |
| | 0.0 | 70 | | |
| | 1.0 | 15 | | |
| | 2.0 | 70 | | |
| | 3.0 | 70 | | |
| | 4.0 | 70 | | |
| | 5.0 | 70 | | |
| | 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.4978 | - | | |
| | 1.0101 | 100 | 0.2919 | - | | |
| | 1.5152 | 150 | 0.0498 | - | | |
| | 2.0202 | 200 | 0.019 | - | | |
| | 2.5253 | 250 | 0.0011 | - | | |
| | 3.0303 | 300 | 0.0001 | - | | |
| | 3.5354 | 350 | 0.0001 | - | | |
| | 4.0404 | 400 | 0.0001 | - | | |
| | 4.5455 | 450 | 0.0 | - | | |
| | 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.* | |
| --> |