mini1013 commited on
Commit
ee0bcef
1 Parent(s): 50a4d54

Push model using huggingface_hub.

Browse files
1_Pooling/config.json ADDED
@@ -0,0 +1,10 @@
 
 
 
 
 
 
 
 
 
 
 
1
+ {
2
+ "word_embedding_dimension": 768,
3
+ "pooling_mode_cls_token": false,
4
+ "pooling_mode_mean_tokens": true,
5
+ "pooling_mode_max_tokens": false,
6
+ "pooling_mode_mean_sqrt_len_tokens": false,
7
+ "pooling_mode_weightedmean_tokens": false,
8
+ "pooling_mode_lasttoken": false,
9
+ "include_prompt": true
10
+ }
README.md ADDED
@@ -0,0 +1,213 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ ---
2
+ base_model: mini1013/master_domain
3
+ library_name: setfit
4
+ metrics:
5
+ - metric
6
+ pipeline_tag: text-classification
7
+ tags:
8
+ - setfit
9
+ - sentence-transformers
10
+ - text-classification
11
+ - generated_from_setfit_trainer
12
+ widget:
13
+ - text: JCP 애플 펜슬 1세대 USB-C Apple Pencil 어뎁터 포함 (MQLY3KH/A) 주식회사 제이씨엠컴퍼니
14
+ - text: 힐링쉴드 갤럭시탭S9 울트라 ARAG 고화질 저반사 액정보호필름1매 후면1매 (주) 힐링쉴드코리아
15
+ - text: 다이아큐브 아이패드 프로 13 M4 (2024) 9H PET 슬림강화유리 깨지지않는 액정보호필름, 간편부착 2매 6H 고투명 방탄 2매
16
+ 뷰티코리아(Beauti korea)
17
+ - text: 뷰씨 갤럭시탭S6 라이트 10.4인치 강화유리필름(2매) 강화유리필름(2매구성) 주식회사 오토스마트
18
+ - text: 갤럭시탭A9 슈페리어 저반사 액정보호필름 (주) 폰트리
19
+ inference: true
20
+ model-index:
21
+ - name: SetFit with mini1013/master_domain
22
+ results:
23
+ - task:
24
+ type: text-classification
25
+ name: Text Classification
26
+ dataset:
27
+ name: Unknown
28
+ type: unknown
29
+ split: test
30
+ metrics:
31
+ - type: metric
32
+ value: 0.9694656488549618
33
+ name: Metric
34
+ ---
35
+
36
+ # SetFit with mini1013/master_domain
37
+
38
+ 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.
39
+
40
+ The model has been trained using an efficient few-shot learning technique that involves:
41
+
42
+ 1. Fine-tuning a [Sentence Transformer](https://www.sbert.net) with contrastive learning.
43
+ 2. Training a classification head with features from the fine-tuned Sentence Transformer.
44
+
45
+ ## Model Details
46
+
47
+ ### Model Description
48
+ - **Model Type:** SetFit
49
+ - **Sentence Transformer body:** [mini1013/master_domain](https://huggingface.co/mini1013/master_domain)
50
+ - **Classification head:** a [LogisticRegression](https://scikit-learn.org/stable/modules/generated/sklearn.linear_model.LogisticRegression.html) instance
51
+ - **Maximum Sequence Length:** 512 tokens
52
+ - **Number of Classes:** 4 classes
53
+ <!-- - **Training Dataset:** [Unknown](https://huggingface.co/datasets/unknown) -->
54
+ <!-- - **Language:** Unknown -->
55
+ <!-- - **License:** Unknown -->
56
+
57
+ ### Model Sources
58
+
59
+ - **Repository:** [SetFit on GitHub](https://github.com/huggingface/setfit)
60
+ - **Paper:** [Efficient Few-Shot Learning Without Prompts](https://arxiv.org/abs/2209.11055)
61
+ - **Blogpost:** [SetFit: Efficient Few-Shot Learning Without Prompts](https://huggingface.co/blog/setfit)
62
+
63
+ ### Model Labels
64
+ | Label | Examples |
65
+ |:------|:----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------|
66
+ | 3 | <ul><li>'와콤 KP-501E 표준그립펜 인튜어스 프로 펜 와콤펜 에이엠스토어'</li><li>'Apple 애플 펜슬 2세대 미국정품 MU8F2KH/A (3-5일배송) 굿웍스코리아 유한책임회사'</li><li>'교체형 갤탭 볼펜심 펜촉 탭S7 펜슬 S펜 라미 (G428) 블랙 몽실왕자A'</li></ul> |
67
+ | 0 | <ul><li>'코끼리리빙 아이패드 갤럭시탭S 마그네틱 드로잉 필기 스탠드 거치대 P2WA-3419 12.9(2018/2020/2021/2022)_그레이 주식회사예스대현'</li><li>'뷰씨 갤럭시탭 아이패드 태블릿 거치대 침대 책상 틈새 고정 블랙 주식회사 오토스마트'</li><li>'알파플랜 휴대용 태블릿 거치대 스탠드 갤럭시탭 아이패드 ATH01 매트블랙 주식회사 로리스토어'</li></ul> |
68
+ | 2 | <ul><li>'뷰씨 아이패드 에어 6세대 11인치 M2 종이 질감 저반사 액정 보호 필름 에어6세대 11인치 (저반사)종이질감필름 제이포레스트'</li><li>'아이패드 에어 6세대 11 종이질감 Light 액정보호필름1매 후면1매 주식회사 스마트'</li><li>'아이패드 프로 3세대 12.9인치 지문방지 종이질감 액정보호필름 아이패드 프로 3세대 12.9_종이질감 액정보호필름 1매 주식회사 제이앤에이'</li></ul> |
69
+ | 1 | <ul><li>'Apple 아이패드 에어 스마트 폴리오 (iPad Air 4,5세대용) - 다크 체리 (MNA43FE/A) 다크 체리 MNA43FE/A (주)블루박스 (Blue Box Co., Ltd)'</li><li>'[N페이적립+커피쿠폰] ESR 아이패드 프로13 폴리오 케이스 프로13_네이비 EC587 주식회사 샘빌'</li><li>'뷰씨 갤럭시탭 S8플러스 / S7플러스 / S7 FE 12.4인치 보디가드 투명범퍼 케이스 갤럭시탭S8+/S7+/S7 FE(공용)_보디가드ㅣ투명 광주스마트폰친구 아이폰 사설수리센터점'</li></ul> |
70
+
71
+ ## Evaluation
72
+
73
+ ### Metrics
74
+ | Label | Metric |
75
+ |:--------|:-------|
76
+ | **all** | 0.9695 |
77
+
78
+ ## Uses
79
+
80
+ ### Direct Use for Inference
81
+
82
+ First install the SetFit library:
83
+
84
+ ```bash
85
+ pip install setfit
86
+ ```
87
+
88
+ Then you can load this model and run inference.
89
+
90
+ ```python
91
+ from setfit import SetFitModel
92
+
93
+ # Download from the 🤗 Hub
94
+ model = SetFitModel.from_pretrained("mini1013/master_cate_el22")
95
+ # Run inference
96
+ preds = model("갤럭시탭A9 슈페리어 저반사 액정보호필름 (주) 폰트리")
97
+ ```
98
+
99
+ <!--
100
+ ### Downstream Use
101
+
102
+ *List how someone could finetune this model on their own dataset.*
103
+ -->
104
+
105
+ <!--
106
+ ### Out-of-Scope Use
107
+
108
+ *List how the model may foreseeably be misused and address what users ought not to do with the model.*
109
+ -->
110
+
111
+ <!--
112
+ ## Bias, Risks and Limitations
113
+
114
+ *What are the known or foreseeable issues stemming from this model? You could also flag here known failure cases or weaknesses of the model.*
115
+ -->
116
+
117
+ <!--
118
+ ### Recommendations
119
+
120
+ *What are recommendations with respect to the foreseeable issues? For example, filtering explicit content.*
121
+ -->
122
+
123
+ ## Training Details
124
+
125
+ ### Training Set Metrics
126
+ | Training set | Min | Median | Max |
127
+ |:-------------|:----|:-------|:----|
128
+ | Word count | 6 | 12.075 | 34 |
129
+
130
+ | Label | Training Sample Count |
131
+ |:------|:----------------------|
132
+ | 0 | 50 |
133
+ | 1 | 50 |
134
+ | 2 | 50 |
135
+ | 3 | 50 |
136
+
137
+ ### Training Hyperparameters
138
+ - batch_size: (512, 512)
139
+ - num_epochs: (20, 20)
140
+ - max_steps: -1
141
+ - sampling_strategy: oversampling
142
+ - num_iterations: 40
143
+ - body_learning_rate: (2e-05, 2e-05)
144
+ - head_learning_rate: 2e-05
145
+ - loss: CosineSimilarityLoss
146
+ - distance_metric: cosine_distance
147
+ - margin: 0.25
148
+ - end_to_end: False
149
+ - use_amp: False
150
+ - warmup_proportion: 0.1
151
+ - seed: 42
152
+ - eval_max_steps: -1
153
+ - load_best_model_at_end: False
154
+
155
+ ### Training Results
156
+ | Epoch | Step | Training Loss | Validation Loss |
157
+ |:-------:|:----:|:-------------:|:---------------:|
158
+ | 0.0312 | 1 | 0.4959 | - |
159
+ | 1.5625 | 50 | 0.0683 | - |
160
+ | 3.125 | 100 | 0.0002 | - |
161
+ | 4.6875 | 150 | 0.0001 | - |
162
+ | 6.25 | 200 | 0.0001 | - |
163
+ | 7.8125 | 250 | 0.0 | - |
164
+ | 9.375 | 300 | 0.0 | - |
165
+ | 10.9375 | 350 | 0.0 | - |
166
+ | 12.5 | 400 | 0.0 | - |
167
+ | 14.0625 | 450 | 0.0 | - |
168
+ | 15.625 | 500 | 0.0 | - |
169
+ | 17.1875 | 550 | 0.0 | - |
170
+ | 18.75 | 600 | 0.0 | - |
171
+
172
+ ### Framework Versions
173
+ - Python: 3.10.12
174
+ - SetFit: 1.1.0.dev0
175
+ - Sentence Transformers: 3.1.1
176
+ - Transformers: 4.46.1
177
+ - PyTorch: 2.4.0+cu121
178
+ - Datasets: 2.20.0
179
+ - Tokenizers: 0.20.0
180
+
181
+ ## Citation
182
+
183
+ ### BibTeX
184
+ ```bibtex
185
+ @article{https://doi.org/10.48550/arxiv.2209.11055,
186
+ doi = {10.48550/ARXIV.2209.11055},
187
+ url = {https://arxiv.org/abs/2209.11055},
188
+ author = {Tunstall, Lewis and Reimers, Nils and Jo, Unso Eun Seo and Bates, Luke and Korat, Daniel and Wasserblat, Moshe and Pereg, Oren},
189
+ keywords = {Computation and Language (cs.CL), FOS: Computer and information sciences, FOS: Computer and information sciences},
190
+ title = {Efficient Few-Shot Learning Without Prompts},
191
+ publisher = {arXiv},
192
+ year = {2022},
193
+ copyright = {Creative Commons Attribution 4.0 International}
194
+ }
195
+ ```
196
+
197
+ <!--
198
+ ## Glossary
199
+
200
+ *Clearly define terms in order to be accessible across audiences.*
201
+ -->
202
+
203
+ <!--
204
+ ## Model Card Authors
205
+
206
+ *Lists the people who create the model card, providing recognition and accountability for the detailed work that goes into its construction.*
207
+ -->
208
+
209
+ <!--
210
+ ## Model Card Contact
211
+
212
+ *Provides a way for people who have updates to the Model Card, suggestions, or questions, to contact the Model Card authors.*
213
+ -->
config.json ADDED
@@ -0,0 +1,29 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ {
2
+ "_name_or_path": "mini1013/master_item_el",
3
+ "architectures": [
4
+ "RobertaModel"
5
+ ],
6
+ "attention_probs_dropout_prob": 0.1,
7
+ "bos_token_id": 0,
8
+ "classifier_dropout": null,
9
+ "eos_token_id": 2,
10
+ "gradient_checkpointing": false,
11
+ "hidden_act": "gelu",
12
+ "hidden_dropout_prob": 0.1,
13
+ "hidden_size": 768,
14
+ "initializer_range": 0.02,
15
+ "intermediate_size": 3072,
16
+ "layer_norm_eps": 1e-05,
17
+ "max_position_embeddings": 514,
18
+ "model_type": "roberta",
19
+ "num_attention_heads": 12,
20
+ "num_hidden_layers": 12,
21
+ "pad_token_id": 1,
22
+ "position_embedding_type": "absolute",
23
+ "tokenizer_class": "BertTokenizer",
24
+ "torch_dtype": "float32",
25
+ "transformers_version": "4.46.1",
26
+ "type_vocab_size": 1,
27
+ "use_cache": true,
28
+ "vocab_size": 32000
29
+ }
config_sentence_transformers.json ADDED
@@ -0,0 +1,10 @@
 
 
 
 
 
 
 
 
 
 
 
1
+ {
2
+ "__version__": {
3
+ "sentence_transformers": "3.1.1",
4
+ "transformers": "4.46.1",
5
+ "pytorch": "2.4.0+cu121"
6
+ },
7
+ "prompts": {},
8
+ "default_prompt_name": null,
9
+ "similarity_fn_name": null
10
+ }
config_setfit.json ADDED
@@ -0,0 +1,4 @@
 
 
 
 
 
1
+ {
2
+ "labels": null,
3
+ "normalize_embeddings": false
4
+ }
model.safetensors ADDED
@@ -0,0 +1,3 @@
 
 
 
 
1
+ version https://git-lfs.github.com/spec/v1
2
+ oid sha256:58373aabf79e71806e537cde4cd84056705070aa066e20b692578854d2788acd
3
+ size 442494816
model_head.pkl ADDED
@@ -0,0 +1,3 @@
 
 
 
 
1
+ version https://git-lfs.github.com/spec/v1
2
+ oid sha256:6a922a1aca6b366db692741c5e8ec86fa5d41c882223e023c46f3dc0c02732e0
3
+ size 25479
modules.json ADDED
@@ -0,0 +1,14 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ [
2
+ {
3
+ "idx": 0,
4
+ "name": "0",
5
+ "path": "",
6
+ "type": "sentence_transformers.models.Transformer"
7
+ },
8
+ {
9
+ "idx": 1,
10
+ "name": "1",
11
+ "path": "1_Pooling",
12
+ "type": "sentence_transformers.models.Pooling"
13
+ }
14
+ ]
sentence_bert_config.json ADDED
@@ -0,0 +1,4 @@
 
 
 
 
 
1
+ {
2
+ "max_seq_length": 512,
3
+ "do_lower_case": false
4
+ }
special_tokens_map.json ADDED
@@ -0,0 +1,51 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ {
2
+ "bos_token": {
3
+ "content": "[CLS]",
4
+ "lstrip": false,
5
+ "normalized": false,
6
+ "rstrip": false,
7
+ "single_word": false
8
+ },
9
+ "cls_token": {
10
+ "content": "[CLS]",
11
+ "lstrip": false,
12
+ "normalized": false,
13
+ "rstrip": false,
14
+ "single_word": false
15
+ },
16
+ "eos_token": {
17
+ "content": "[SEP]",
18
+ "lstrip": false,
19
+ "normalized": false,
20
+ "rstrip": false,
21
+ "single_word": false
22
+ },
23
+ "mask_token": {
24
+ "content": "[MASK]",
25
+ "lstrip": false,
26
+ "normalized": false,
27
+ "rstrip": false,
28
+ "single_word": false
29
+ },
30
+ "pad_token": {
31
+ "content": "[PAD]",
32
+ "lstrip": false,
33
+ "normalized": false,
34
+ "rstrip": false,
35
+ "single_word": false
36
+ },
37
+ "sep_token": {
38
+ "content": "[SEP]",
39
+ "lstrip": false,
40
+ "normalized": false,
41
+ "rstrip": false,
42
+ "single_word": false
43
+ },
44
+ "unk_token": {
45
+ "content": "[UNK]",
46
+ "lstrip": false,
47
+ "normalized": false,
48
+ "rstrip": false,
49
+ "single_word": false
50
+ }
51
+ }
tokenizer.json ADDED
The diff for this file is too large to render. See raw diff
 
tokenizer_config.json ADDED
@@ -0,0 +1,66 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ {
2
+ "added_tokens_decoder": {
3
+ "0": {
4
+ "content": "[CLS]",
5
+ "lstrip": false,
6
+ "normalized": false,
7
+ "rstrip": false,
8
+ "single_word": false,
9
+ "special": true
10
+ },
11
+ "1": {
12
+ "content": "[PAD]",
13
+ "lstrip": false,
14
+ "normalized": false,
15
+ "rstrip": false,
16
+ "single_word": false,
17
+ "special": true
18
+ },
19
+ "2": {
20
+ "content": "[SEP]",
21
+ "lstrip": false,
22
+ "normalized": false,
23
+ "rstrip": false,
24
+ "single_word": false,
25
+ "special": true
26
+ },
27
+ "3": {
28
+ "content": "[UNK]",
29
+ "lstrip": false,
30
+ "normalized": false,
31
+ "rstrip": false,
32
+ "single_word": false,
33
+ "special": true
34
+ },
35
+ "4": {
36
+ "content": "[MASK]",
37
+ "lstrip": false,
38
+ "normalized": false,
39
+ "rstrip": false,
40
+ "single_word": false,
41
+ "special": true
42
+ }
43
+ },
44
+ "bos_token": "[CLS]",
45
+ "clean_up_tokenization_spaces": false,
46
+ "cls_token": "[CLS]",
47
+ "do_basic_tokenize": true,
48
+ "do_lower_case": false,
49
+ "eos_token": "[SEP]",
50
+ "mask_token": "[MASK]",
51
+ "max_length": 512,
52
+ "model_max_length": 512,
53
+ "never_split": null,
54
+ "pad_to_multiple_of": null,
55
+ "pad_token": "[PAD]",
56
+ "pad_token_type_id": 0,
57
+ "padding_side": "right",
58
+ "sep_token": "[SEP]",
59
+ "stride": 0,
60
+ "strip_accents": null,
61
+ "tokenize_chinese_chars": true,
62
+ "tokenizer_class": "BertTokenizer",
63
+ "truncation_side": "right",
64
+ "truncation_strategy": "longest_first",
65
+ "unk_token": "[UNK]"
66
+ }
vocab.txt ADDED
The diff for this file is too large to render. See raw diff