mini1013 commited on
Commit
e576dce
1 Parent(s): edfa55c

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,244 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
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: 넥스트 USB 3.0 2포트 PCI Express 카드 (NEXT-212U3) YNMI-NK0431 윤 미디어
14
+ - text: 앱코 NCORE G30 트루포스 (블랙) 미들타워 컴퓨터 케이스 오케이 바이오
15
+ - text: APC SMC1500I-2U Smart UPS 900W/1500VA 무정전 전원공급장치 교체배터리 전원백업장치 (DHCNC) 주식회사
16
+ 대현씨앤씨
17
+ - text: 이지넷 카드리더기 NEXT-8603TCU3 블랙 [KF] 주식회사 케이에프컴퍼니
18
+ - text: 다크플래쉬 darkFlash DS900 ARGB 강화유리 컴퓨터 PC 케이스 (블랙) 주식회사 아크런 (Akrun Co., Ltd.)
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.9098343017000216
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:** 10 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
+ | 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> |
67
+ | 2 | <ul><li>'3RSYS R200 RGB (블랙) 미들타워 컴온씨앤씨(주)'</li><li>'DAVEN AQUA (블랙) 주식회사 꿈누리'</li><li>'w 대원TMT DW-H1200 허브랙 (H1200×D800×W600/25U/회색) (착불배송) (주)원영씨앤씨'</li></ul> |
68
+ | 0 | <ul><li>'인텔 코어i7-13세대 13700K 랩터레이크 정품 에어캡배송 (주)신우밀루유떼'</li><li>'AMD 라이젠5-4세대 5600X (버미어)벌크포장 AS 3년 태성에프앤비(주)'</li><li>'[INTEL] 코어10세대 i7-10700 벌크 병행 쿨러미포함 (코멧레이크) (주)컴퓨존'</li></ul> |
69
+ | 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> |
70
+ | 8 | <ul><li>'잘만 ZM-STC10 (2g) 주식회사 피씨사자'</li><li>'3RSYS APB BAR 35 (주)컴퓨존'</li><li>'LP30 ARGB PSU 커버 화이트 주식회사보성닷컴'</li></ul> |
71
+ | 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> |
72
+ | 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> |
73
+ | 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> |
74
+ | 7 | <ul><li>'아틱 P14 PWM PST 블랙 VALUE 5팩 (주)서린씨앤아이'</li><li>'앱코 타이폰 120X5 CPU 쿨러 알루미늄 방열판 주식회사 지디스엠알오'</li><li>'Thermalright Peerless Assassin 120 SE 서린 태성에프앤비(주)'</li></ul> |
75
+ | 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> |
76
+
77
+ ## Evaluation
78
+
79
+ ### Metrics
80
+ | Label | Metric |
81
+ |:--------|:-------|
82
+ | **all** | 0.9098 |
83
+
84
+ ## Uses
85
+
86
+ ### Direct Use for Inference
87
+
88
+ First install the SetFit library:
89
+
90
+ ```bash
91
+ pip install setfit
92
+ ```
93
+
94
+ Then you can load this model and run inference.
95
+
96
+ ```python
97
+ from setfit import SetFitModel
98
+
99
+ # Download from the 🤗 Hub
100
+ model = SetFitModel.from_pretrained("mini1013/master_cate_el1")
101
+ # Run inference
102
+ preds = model("앱코 NCORE G30 트루포스 (블랙) 미들타워 컴퓨터 케이스 오케이 바이오")
103
+ ```
104
+
105
+ <!--
106
+ ### Downstream Use
107
+
108
+ *List how someone could finetune this model on their own dataset.*
109
+ -->
110
+
111
+ <!--
112
+ ### Out-of-Scope Use
113
+
114
+ *List how the model may foreseeably be misused and address what users ought not to do with the model.*
115
+ -->
116
+
117
+ <!--
118
+ ## Bias, Risks and Limitations
119
+
120
+ *What are the known or foreseeable issues stemming from this model? You could also flag here known failure cases or weaknesses of the model.*
121
+ -->
122
+
123
+ <!--
124
+ ### Recommendations
125
+
126
+ *What are recommendations with respect to the foreseeable issues? For example, filtering explicit content.*
127
+ -->
128
+
129
+ ## Training Details
130
+
131
+ ### Training Set Metrics
132
+ | Training set | Min | Median | Max |
133
+ |:-------------|:----|:-------|:----|
134
+ | Word count | 4 | 9.206 | 18 |
135
+
136
+ | Label | Training Sample Count |
137
+ |:------|:----------------------|
138
+ | 0 | 50 |
139
+ | 1 | 50 |
140
+ | 2 | 50 |
141
+ | 3 | 50 |
142
+ | 4 | 50 |
143
+ | 5 | 50 |
144
+ | 6 | 50 |
145
+ | 7 | 50 |
146
+ | 8 | 50 |
147
+ | 9 | 50 |
148
+
149
+ ### Training Hyperparameters
150
+ - batch_size: (512, 512)
151
+ - num_epochs: (20, 20)
152
+ - max_steps: -1
153
+ - sampling_strategy: oversampling
154
+ - num_iterations: 40
155
+ - body_learning_rate: (2e-05, 2e-05)
156
+ - head_learning_rate: 2e-05
157
+ - loss: CosineSimilarityLoss
158
+ - distance_metric: cosine_distance
159
+ - margin: 0.25
160
+ - end_to_end: False
161
+ - use_amp: False
162
+ - warmup_proportion: 0.1
163
+ - seed: 42
164
+ - eval_max_steps: -1
165
+ - load_best_model_at_end: False
166
+
167
+ ### Training Results
168
+ | Epoch | Step | Training Loss | Validation Loss |
169
+ |:-------:|:----:|:-------------:|:---------------:|
170
+ | 0.0127 | 1 | 0.4969 | - |
171
+ | 0.6329 | 50 | 0.2753 | - |
172
+ | 1.2658 | 100 | 0.0677 | - |
173
+ | 1.8987 | 150 | 0.014 | - |
174
+ | 2.5316 | 200 | 0.0023 | - |
175
+ | 3.1646 | 250 | 0.0001 | - |
176
+ | 3.7975 | 300 | 0.0001 | - |
177
+ | 4.4304 | 350 | 0.0001 | - |
178
+ | 5.0633 | 400 | 0.0001 | - |
179
+ | 5.6962 | 450 | 0.0 | - |
180
+ | 6.3291 | 500 | 0.0001 | - |
181
+ | 6.9620 | 550 | 0.0001 | - |
182
+ | 7.5949 | 600 | 0.0 | - |
183
+ | 8.2278 | 650 | 0.0 | - |
184
+ | 8.8608 | 700 | 0.0 | - |
185
+ | 9.4937 | 750 | 0.0 | - |
186
+ | 10.1266 | 800 | 0.0 | - |
187
+ | 10.7595 | 850 | 0.0 | - |
188
+ | 11.3924 | 900 | 0.0 | - |
189
+ | 12.0253 | 950 | 0.0 | - |
190
+ | 12.6582 | 1000 | 0.0 | - |
191
+ | 13.2911 | 1050 | 0.0 | - |
192
+ | 13.9241 | 1100 | 0.0 | - |
193
+ | 14.5570 | 1150 | 0.0 | - |
194
+ | 15.1899 | 1200 | 0.0 | - |
195
+ | 15.8228 | 1250 | 0.0 | - |
196
+ | 16.4557 | 1300 | 0.0 | - |
197
+ | 17.0886 | 1350 | 0.0 | - |
198
+ | 17.7215 | 1400 | 0.0 | - |
199
+ | 18.3544 | 1450 | 0.0 | - |
200
+ | 18.9873 | 1500 | 0.0 | - |
201
+ | 19.6203 | 1550 | 0.0 | - |
202
+
203
+ ### Framework Versions
204
+ - Python: 3.10.12
205
+ - SetFit: 1.1.0.dev0
206
+ - Sentence Transformers: 3.1.1
207
+ - Transformers: 4.46.1
208
+ - PyTorch: 2.4.0+cu121
209
+ - Datasets: 2.20.0
210
+ - Tokenizers: 0.20.0
211
+
212
+ ## Citation
213
+
214
+ ### BibTeX
215
+ ```bibtex
216
+ @article{https://doi.org/10.48550/arxiv.2209.11055,
217
+ doi = {10.48550/ARXIV.2209.11055},
218
+ url = {https://arxiv.org/abs/2209.11055},
219
+ author = {Tunstall, Lewis and Reimers, Nils and Jo, Unso Eun Seo and Bates, Luke and Korat, Daniel and Wasserblat, Moshe and Pereg, Oren},
220
+ keywords = {Computation and Language (cs.CL), FOS: Computer and information sciences, FOS: Computer and information sciences},
221
+ title = {Efficient Few-Shot Learning Without Prompts},
222
+ publisher = {arXiv},
223
+ year = {2022},
224
+ copyright = {Creative Commons Attribution 4.0 International}
225
+ }
226
+ ```
227
+
228
+ <!--
229
+ ## Glossary
230
+
231
+ *Clearly define terms in order to be accessible across audiences.*
232
+ -->
233
+
234
+ <!--
235
+ ## Model Card Authors
236
+
237
+ *Lists the people who create the model card, providing recognition and accountability for the detailed work that goes into its construction.*
238
+ -->
239
+
240
+ <!--
241
+ ## Model Card Contact
242
+
243
+ *Provides a way for people who have updates to the Model Card, suggestions, or questions, to contact the Model Card authors.*
244
+ -->
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:fa94e327aaab408c12870bf8e711ba91145a56ebcfd17b42a2b59d1f813b7e84
3
+ size 442494816
model_head.pkl ADDED
@@ -0,0 +1,3 @@
 
 
 
 
1
+ version https://git-lfs.github.com/spec/v1
2
+ oid sha256:aab1c8c5a61c936dd382aab83f717038a09f50b3badc549907550c951ec6ec6c
3
+ size 62439
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