Text Classification
setfit
Safetensors
sentence-transformers
roberta
generated_from_setfit_trainer
Eval Results (legacy)
text-embeddings-inference
Instructions to use mini1013/master_cate_ac0 with libraries, inference providers, notebooks, and local apps. Follow these links to get started.
- Libraries
- setfit
How to use mini1013/master_cate_ac0 with setfit:
from setfit import SetFitModel model = SetFitModel.from_pretrained("mini1013/master_cate_ac0") preds = model.predict(["i loved the spiderman movie!", "pineapple on pizza is the worst"]) print(preds) - sentence-transformers
How to use mini1013/master_cate_ac0 with sentence-transformers:
from sentence_transformers import SentenceTransformer model = SentenceTransformer("mini1013/master_cate_ac0") 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
Push model using huggingface_hub.
Browse filesFiles changed (13)
- 1_Pooling/config.jsonAdded+10
- README.mdAdded+242
- config.jsonAdded+29
- config_sentence_transformers.jsonAdded+10
- config_setfit.jsonAdded+4
- model.safetensorsAdded+3
- model_head.pklAdded+3
- modules.jsonAdded+14
- sentence_bert_config.jsonAdded+4
- special_tokens_map.jsonAdded+51
- tokenizer.jsonAdded
- tokenizer_config.jsonAdded+66
- vocab.txtAdded
12345678910{ "word_embedding_dimension": 768, "pooling_mode_cls_token": false, "pooling_mode_mean_tokens": true, "pooling_mode_max_tokens": false, "pooling_mode_mean_sqrt_len_tokens": false, "pooling_mode_weightedmean_tokens": false, "pooling_mode_lasttoken": false, "include_prompt": true}123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242---base_model: mini1013/master_domainlibrary_name: setfitmetrics:- metricpipeline_tag: text-classificationtags:- setfit- sentence-transformers- text-classification- generated_from_setfit_trainerwidget:- text: '[헤지스ACC]HJBA3F885BK[13인치 노트북 수납가능][KEVIN]블랙 참장식 크로스 겸용 미니 토트백 에이케이에스앤디 (주) AK인터넷쇼핑몰'- text: 마젤란 메신저백 크로스백 슬링백 힙색 힙쌕 학생 여성 남자 캐주얼 크로스 여행용 여권 핸드폰 보조 학원 가방 LKHS-304_B-연핑크(+키홀더) 더블유팝- text: 마젤란 메신저백 크로스백 슬링백 힙색 힙쌕 학생 여성 남자 캐주얼 크로스 여행용 여권 핸드폰 보조 학원 가방 ML-1928_연그레이 더블유팝- text: '[갤러리아] JUBA4E021G2 [MATEO] 그레이 로고프린트 숄더백 JUBA4E021G2 [MATEO] 그레이 로고프린트 숄더백 NS홈쇼핑_NS몰'- text: '[디스커버리](신세계강남점)[23N] 디스커버리 미니 슬링백 (DXSG0043N) IVD 다크 아이보리_F 주식회사 에스에스지닷컴'inference: truemodel-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.8488667448221962 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:** 9 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>'[질스튜어트](광주신세계)블랙 클래식 클러치백 [JUWA2F392BK] 주식회사 에스에스지닷컴'</li><li>'심플 클러치백 EOCFHX257BK/에스콰이아 블랙 롯데쇼핑(주)'</li><li>'[듀퐁] 소프트그레인 파우치 베이지 CG180263CL 베이지 (주)씨제이이엔엠'</li></ul> || 3.0 | <ul><li>'엔지니어드가먼츠 블랙 나일론 토트백 23F1H034BLACK 주식회사 어도어럭스'</li><li>'[가이거] 퀼팅 레더 체인 숄더백 (+플랩지갑) 캐러멜 브라운 (주)우리홈쇼핑'</li><li>'토트 브리프 크로스백 FT8570 블랙 글로리홈'</li></ul> || 4.0 | <ul><li>'여자캔버스 가방 코디 크로스백 남자에코백 신발 BLUE 고앤런'</li><li>'여학생 에코백 아이보리 가방 남녀공용 캐주얼 쇼퍼백 엘케이엠'</li><li>'패션 에코백 데일리 가방 캐주얼 숄더백 브라운 심정'</li></ul> || 7.0 | <ul><li>'[갤러리아] 644040 2BKPI 1000 ONE SIZE 한화갤러리아(주)'</li><li>'[갤러리아] 헤지스핸드백 그린 워싱가죽 크로스 겸용 토트백 HJBA3E301E2(타임월드) 한화갤러리아(주)'</li><li>'[메종키츠네] 로고 프린트 코튼 토트백 블루 LW05102WW0008 BLUE_FREE 신세계몰'</li></ul> || 2.0 | <ul><li>'바버 가죽 코팅 서류 가방 브리프 케이스 UBA0004 NAVY 뉴욕트레이딩'</li><li>'[롯데백화점]에스콰이아 23FW 신상 경량 나일론 노트북 수납 남여 데일리 토트 크로스백 EOCFHX258BK 롯데백화점_'</li><li>'22FW 신상 뉴 포멀 슬림 스퀘어 심플 비즈니스 캐주얼 서류가방 ECBFHX227GY 롯데백화점1관'</li></ul> || 1.0 | <ul><li>'NATIONALGEOGRAPHIC N225USD340 다이브 플러스 V3 BLACK 240 맥스투'</li><li>'레스포삭 보이저 백팩 경량 나일론 보부상 복조리 가방 7839 플라워 행운샵'</li><li>'레스포삭 보이저 백팩 경량 Voyager Backpack 7839 블랙 하하대행'</li></ul> || 0.0 | <ul><li>'[갤러리아] 헤지스핸드백HJBA2F770BK_ 블랙 로고 장식 솔리드 메신져백(타임월드) 한화갤러리아(주)'</li><li>'로아드로아 허쉬 메쉬 포켓 크로스 메신저백 (아이보리) 크로스백 FREE 가방팝'</li><li>'[본사공식] 타프 메신저백 사첼 S EOCBS04 008 롯데아이몰'</li></ul> || 5.0 | <ul><li>'팩세이프 가방 GO 크로스바디 백 2.5L / PACSAFE URBAN 도난방지 유럽 해외 여행 등산 슬링백 크로스백 RFID차단 1. 제트 블랙 (JET BLACK) 시계1위팝워치'</li><li>'샨타코[Chantaco] 레더 크로스백 BB NH3271C53N 000/라코스테 롯데쇼핑(주)'</li><li>'팩세이프 가방 GO 크로스바디 백 2.5L / PACSAFE URBAN 도난방지 유럽 해외 여행 등산 슬링백 크로스백 RFID차단 2. 로즈 (ROSE) 시계1위팝워치'</li></ul> || 8.0 | <ul><li>'[기회공작소] 데일리 슬링백 크로스 힙색 허리가방 스포츠 등산 힙색 허리색 슬링백 보조가방 글로리커머스'</li><li>'구찌 GG 캔버스 투웨이 밸트백 힙색 630915 KY9KN 9886 쏠나인'</li><li>'벨트형 핸드폰 허리가방 남자 벨트백 세로형 가죽 벨트파우치 지갑 허리벨트케이스 브라운 자주구매'</li></ul> |
## Evaluation
### Metrics| Label | Metric ||:--------|:-------|| **all** | 0.8489 |
## Uses
### Direct Use for Inference
First install the SetFit library:
```bashpip install setfit```
Then you can load this model and run inference.
```pythonfrom setfit import SetFitModel
# Download from the 🤗 Hubmodel = SetFitModel.from_pretrained("mini1013/master_cate_ac0")# Run inferencepreds = model("[디스커버리](신세계강남점)[23N] 디스커버리 미니 슬링백 (DXSG0043N) IVD 다크 아이보리_F 주식회사 에스에스지닷컴")```
<!--### 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.2289 | 29 |
| 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 || 7.0 | 50 || 8.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.0141 | 1 | 0.3958 | - || 0.7042 | 50 | 0.3012 | - || 1.4085 | 100 | 0.1811 | - || 2.1127 | 150 | 0.0599 | - || 2.8169 | 200 | 0.0333 | - || 3.5211 | 250 | 0.0169 | - || 4.2254 | 300 | 0.0005 | - || 4.9296 | 350 | 0.0003 | - || 5.6338 | 400 | 0.0002 | - || 6.3380 | 450 | 0.0003 | - || 7.0423 | 500 | 0.0001 | - || 7.7465 | 550 | 0.0001 | - || 8.4507 | 600 | 0.0001 | - || 9.1549 | 650 | 0.0001 | - || 9.8592 | 700 | 0.0001 | - || 10.5634 | 750 | 0.0 | - || 11.2676 | 800 | 0.0001 | - || 11.9718 | 850 | 0.0001 | - || 12.6761 | 900 | 0.0001 | - || 13.3803 | 950 | 0.0 | - || 14.0845 | 1000 | 0.0 | - || 14.7887 | 1050 | 0.0 | - || 15.4930 | 1100 | 0.0 | - || 16.1972 | 1150 | 0.0 | - || 16.9014 | 1200 | 0.0 | - || 17.6056 | 1250 | 0.0 | - || 18.3099 | 1300 | 0.0 | - || 19.0141 | 1350 | 0.0 | - || 19.7183 | 1400 | 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.*-->1234567891011121314151617181920212223242526272829{ "_name_or_path": "mini1013/master_item_ac", "architectures": [ "RobertaModel" ], "attention_probs_dropout_prob": 0.1, "bos_token_id": 0, "classifier_dropout": null, "eos_token_id": 2, "gradient_checkpointing": false, "hidden_act": "gelu", "hidden_dropout_prob": 0.1, "hidden_size": 768, "initializer_range": 0.02, "intermediate_size": 3072, "layer_norm_eps": 1e-05, "max_position_embeddings": 514, "model_type": "roberta", "num_attention_heads": 12, "num_hidden_layers": 12, "pad_token_id": 1, "position_embedding_type": "absolute", "tokenizer_class": "BertTokenizer", "torch_dtype": "float32", "transformers_version": "4.46.1", "type_vocab_size": 1, "use_cache": true, "vocab_size": 32000}12345678910{ "__version__": { "sentence_transformers": "3.1.1", "transformers": "4.46.1", "pytorch": "2.4.0+cu121" }, "prompts": {}, "default_prompt_name": null, "similarity_fn_name": null}1234{ "labels": null, "normalize_embeddings": false}123version https://git-lfs.github.com/spec/v1oid sha256:7e88ab44bc082b46c1974452b1eabbb4d53100dc0341a139ab61094a83659411size 442494816123version https://git-lfs.github.com/spec/v1oid sha256:e059f790897964175c356a1d028cfbca7d089c59fb207912bc1e28a61f1d1eccsize 562551234567891011121314[ { "idx": 0, "name": "0", "path": "", "type": "sentence_transformers.models.Transformer" }, { "idx": 1, "name": "1", "path": "1_Pooling", "type": "sentence_transformers.models.Pooling" }]1234{ "max_seq_length": 512, "do_lower_case": false}123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051{ "bos_token": { "content": "[CLS]", "lstrip": false, "normalized": false, "rstrip": false, "single_word": false }, "cls_token": { "content": "[CLS]", "lstrip": false, "normalized": false, "rstrip": false, "single_word": false }, "eos_token": { "content": "[SEP]", "lstrip": false, "normalized": false, "rstrip": false, "single_word": false }, "mask_token": { "content": "[MASK]", "lstrip": false, "normalized": false, "rstrip": false, "single_word": false }, "pad_token": { "content": "[PAD]", "lstrip": false, "normalized": false, "rstrip": false, "single_word": false }, "sep_token": { "content": "[SEP]", "lstrip": false, "normalized": false, "rstrip": false, "single_word": false }, "unk_token": { "content": "[UNK]", "lstrip": false, "normalized": false, "rstrip": false, "single_word": false }}123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566{ "added_tokens_decoder": { "0": { "content": "[CLS]", "lstrip": false, "normalized": false, "rstrip": false, "single_word": false, "special": true }, "1": { "content": "[PAD]", "lstrip": false, "normalized": false, "rstrip": false, "single_word": false, "special": true }, "2": { "content": "[SEP]", "lstrip": false, "normalized": false, "rstrip": false, "single_word": false, "special": true }, "3": { "content": "[UNK]", "lstrip": false, "normalized": false, "rstrip": false, "single_word": false, "special": true }, "4": { "content": "[MASK]", "lstrip": false, "normalized": false, "rstrip": false, "single_word": false, "special": true } }, "bos_token": "[CLS]", "clean_up_tokenization_spaces": false, "cls_token": "[CLS]", "do_basic_tokenize": true, "do_lower_case": false, "eos_token": "[SEP]", "mask_token": "[MASK]", "max_length": 512, "model_max_length": 512, "never_split": null, "pad_to_multiple_of": null, "pad_token": "[PAD]", "pad_token_type_id": 0, "padding_side": "right", "sep_token": "[SEP]", "stride": 0, "strip_accents": null, "tokenize_chinese_chars": true, "tokenizer_class": "BertTokenizer", "truncation_side": "right", "truncation_strategy": "longest_first", "unk_token": "[UNK]"}1_Pooling/config.jsonAdded+10
README.mdAdded+242
config.jsonAdded+29
config_sentence_transformers.jsonAdded+10
config_setfit.jsonAdded+4
model.safetensorsAdded+3
model_head.pklAdded+3
modules.jsonAdded+14
sentence_bert_config.jsonAdded+4
special_tokens_map.jsonAdded+51
tokenizer.jsonAdded
tokenizer_config.jsonAdded+66
vocab.txtAdded