mini1013 commited on
Commit
b3bb6e1
1 Parent(s): 2cd852f

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,242 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
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: 백설 찰밀가루 3Kg 에프엠에스인터내셔널 주식회사
14
+ - text: 퀘이커 마시는오트밀 그래인 50g 20개 오트&봄딸기50gx10개_오트&우리쌀 50gx10개 (주)태풍
15
+ - text: CJ제일제당 백설 강력밀가루 2.5kg 둘레푸드
16
+ - text: 이츠웰 맛있는 튀김가루 1kg / CJ프레시웨이 청신호
17
+ - text: 피플스 퀵오트밀 500gx2 (1kg) 귀리 07.퀵오트500g+뮤즐리500g 피플스(Peoples)
18
+ inference: true
19
+ model-index:
20
+ - name: SetFit with mini1013/master_domain
21
+ results:
22
+ - task:
23
+ type: text-classification
24
+ name: Text Classification
25
+ dataset:
26
+ name: Unknown
27
+ type: unknown
28
+ split: test
29
+ metrics:
30
+ - type: metric
31
+ value: 0.9629787234042553
32
+ name: Metric
33
+ ---
34
+
35
+ # SetFit with mini1013/master_domain
36
+
37
+ 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.
38
+
39
+ The model has been trained using an efficient few-shot learning technique that involves:
40
+
41
+ 1. Fine-tuning a [Sentence Transformer](https://www.sbert.net) with contrastive learning.
42
+ 2. Training a classification head with features from the fine-tuned Sentence Transformer.
43
+
44
+ ## Model Details
45
+
46
+ ### Model Description
47
+ - **Model Type:** SetFit
48
+ - **Sentence Transformer body:** [mini1013/master_domain](https://huggingface.co/mini1013/master_domain)
49
+ - **Classification head:** a [LogisticRegression](https://scikit-learn.org/stable/modules/generated/sklearn.linear_model.LogisticRegression.html) instance
50
+ - **Maximum Sequence Length:** 512 tokens
51
+ - **Number of Classes:** 11 classes
52
+ <!-- - **Training Dataset:** [Unknown](https://huggingface.co/datasets/unknown) -->
53
+ <!-- - **Language:** Unknown -->
54
+ <!-- - **License:** Unknown -->
55
+
56
+ ### Model Sources
57
+
58
+ - **Repository:** [SetFit on GitHub](https://github.com/huggingface/setfit)
59
+ - **Paper:** [Efficient Few-Shot Learning Without Prompts](https://arxiv.org/abs/2209.11055)
60
+ - **Blogpost:** [SetFit: Efficient Few-Shot Learning Without Prompts](https://huggingface.co/blog/setfit)
61
+
62
+ ### Model Labels
63
+ | Label | Examples |
64
+ |:------|:--------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------|
65
+ | 7.0 | <ul><li>'[플라하반] 유기농 포리지 500g 외 2종 롤드오트 압착귀리 유기농 포리지 280g 주식회사 수성인터내셔널'</li><li>'포스트 화이버 오트밀 오리지날 350g 다복상사'</li><li>'오트밀(식사용) 1kg/이든타운/오트밀/오트밀죽/oatmeal/압착귀리/곡류/곡물/시리얼/씨리얼/후레이크/생식/선식/건강식/두유/우유/제과/제빵/쿠키/재료/식사대용/요거트 드랍쉽'</li></ul> |
66
+ | 0.0 | <ul><li>'볶은 검은깨 분말 가루 국내산 300g 검정깨 블랙푸드 검은콩청국장환 200g 농업회사법인 주식회사 두손애약초'</li><li>'볶은 검은깨 분말 가루 국내산 300g 검정깨 블랙푸드 검은콩검은깨환 210g 농업회사법인 주식회사 두손애약초'</li><li>'국산 냉풍건조 아로니아분말 500g [분말]아로니아분말 500g x 2팩 농업회사법인 청정산들해(주)'</li></ul> |
67
+ | 1.0 | <ul><li>'뚜레반 17곡 미숫가루 1kg B_청정원 홍초 자몽900ml 무한상사'</li><li>'뚜레반 17곡 미숫가루 1kg C_뚜레반 콩국수용 콩가루850g 무한상사'</li><li>'뚜레반 17곡 미숫가루A+1kg 주식회사 삼부'</li></ul> |
68
+ | 3.0 | <ul><li>'[대한제분]곰표부침가루1kg / 곰표튀김가루1kg 감사 곰표부침가루1kg 동아식품'</li><li>'오뚜기 나눔7호 직원 거래처 명절준비 선물세트 제이엔팩토리'</li><li>'큐원 쫄깃한 참 부침 가루 1kg 가정 업소 호박 파 전 전가네TMG'</li></ul> |
69
+ | 6.0 | <ul><li>'프리미엄 아몬드가루 1kg 95% 아몬드분말 아몬드파우더 프리미엄 아몬드분말(95%) 1kg 대륙유통'</li><li>'너츠빌 캘리포니아 아몬드 분말 가루 파우더 1kg 아몬드 슬라이스 1kg (주)엠디에프앤'</li><li>'너츠빌 캘리포니아 아몬드 분말 가루 파우더 1kg 아몬드 분말 100% 1kg (주)엠디에프앤'</li></ul> |
70
+ | 8.0 | <ul><li>'사조해표 찹쌀가루 350g 건우푸드'</li><li>'사조 해표 찹쌀가루 350g 감자전분 350g 주식회사 더 골든트리'</li><li>'해표 찹쌀가루 350g-1개 에이치엠몰(HM mall)'</li></ul> |
71
+ | 10.0 | <ul><li>'해표 튀김가루 1kg/부침요리/전 해표 튀김가루 1kg 단비마켓'</li><li>'CJ제일제당 백설 치킨 튀김가루 1kg 바름푸드'</li><li>'CJ제일제당 백설 튀김가루 1kg 1)튀김가루 태성유통'</li></ul> |
72
+ | 4.0 | <ul><li>'신일 냉동 골드빵가루 2kg (주)우주식품디씨오피'</li><li>'오뚜기 빵가루 1KG 자취 대용량 식자재 선물 튀김 제사 명절 부침개 간식 하나칭구'</li><li>'오뚜기 빵가루 200g 이고지고'</li></ul> |
73
+ | 2.0 | <ul><li>'백설 박력밀가루 1kg (박력분) 주식회사 몬즈컴퍼니'</li><li>'아티장 밀가루 T55 20KG 백설 베이킹스타'</li><li>'박력밀가루(큐원 1K) 썬샤인웍스'</li></ul> |
74
+ | 5.0 | <ul><li>'[대두식품] 강력쌀가루(국산) 15kg (주)대두식품서울지점'</li><li>'싸리재 유기농 습식 쌀가루 [ 백미 멥쌀가루 1kg ] 떡만들기 베이킹 비건요리 무염백미찹쌀가루 1kg 농업회사법인콩사랑유한회사'</li><li>'햇쌀마루 박력쌀가루 3kg 이캔유통'</li></ul> |
75
+ | 9.0 | <ul><li>'뚜레반 날콩가루 1kg (주)울산팡'</li><li>'복만네 콩국수용 콩가루 850g 05.해늘이볶은콩가루1kg 바른에프에스'</li><li>'[복만네] 콩국수용 콩가루 850g / 콩국 선식 (주)유영유통'</li></ul> |
76
+
77
+ ## Evaluation
78
+
79
+ ### Metrics
80
+ | Label | Metric |
81
+ |:--------|:-------|
82
+ | **all** | 0.9630 |
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_fd0")
101
+ # Run inference
102
+ preds = model("CJ제일제당 백설 강력밀가루 2.5kg 둘레푸드")
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 | 8.9308 | 24 |
135
+
136
+ | Label | Training Sample Count |
137
+ |:------|:----------------------|
138
+ | 0.0 | 50 |
139
+ | 1.0 | 22 |
140
+ | 2.0 | 50 |
141
+ | 3.0 | 50 |
142
+ | 4.0 | 50 |
143
+ | 5.0 | 32 |
144
+ | 6.0 | 18 |
145
+ | 7.0 | 50 |
146
+ | 8.0 | 26 |
147
+ | 9.0 | 50 |
148
+ | 10.0 | 50 |
149
+
150
+ ### Training Hyperparameters
151
+ - batch_size: (512, 512)
152
+ - num_epochs: (20, 20)
153
+ - max_steps: -1
154
+ - sampling_strategy: oversampling
155
+ - num_iterations: 40
156
+ - body_learning_rate: (2e-05, 2e-05)
157
+ - head_learning_rate: 2e-05
158
+ - loss: CosineSimilarityLoss
159
+ - distance_metric: cosine_distance
160
+ - margin: 0.25
161
+ - end_to_end: False
162
+ - use_amp: False
163
+ - warmup_proportion: 0.1
164
+ - seed: 42
165
+ - eval_max_steps: -1
166
+ - load_best_model_at_end: False
167
+
168
+ ### Training Results
169
+ | Epoch | Step | Training Loss | Validation Loss |
170
+ |:-------:|:----:|:-------------:|:---------------:|
171
+ | 0.0143 | 1 | 0.4619 | - |
172
+ | 0.7143 | 50 | 0.2999 | - |
173
+ | 1.4286 | 100 | 0.1066 | - |
174
+ | 2.1429 | 150 | 0.0721 | - |
175
+ | 2.8571 | 200 | 0.0457 | - |
176
+ | 3.5714 | 250 | 0.03 | - |
177
+ | 4.2857 | 300 | 0.0045 | - |
178
+ | 5.0 | 350 | 0.002 | - |
179
+ | 5.7143 | 400 | 0.004 | - |
180
+ | 6.4286 | 450 | 0.002 | - |
181
+ | 7.1429 | 500 | 0.0077 | - |
182
+ | 7.8571 | 550 | 0.002 | - |
183
+ | 8.5714 | 600 | 0.006 | - |
184
+ | 9.2857 | 650 | 0.0019 | - |
185
+ | 10.0 | 700 | 0.0001 | - |
186
+ | 10.7143 | 750 | 0.0001 | - |
187
+ | 11.4286 | 800 | 0.0001 | - |
188
+ | 12.1429 | 850 | 0.0 | - |
189
+ | 12.8571 | 900 | 0.0 | - |
190
+ | 13.5714 | 950 | 0.0 | - |
191
+ | 14.2857 | 1000 | 0.0 | - |
192
+ | 15.0 | 1050 | 0.0 | - |
193
+ | 15.7143 | 1100 | 0.0 | - |
194
+ | 16.4286 | 1150 | 0.0 | - |
195
+ | 17.1429 | 1200 | 0.0 | - |
196
+ | 17.8571 | 1250 | 0.0 | - |
197
+ | 18.5714 | 1300 | 0.0 | - |
198
+ | 19.2857 | 1350 | 0.0 | - |
199
+ | 20.0 | 1400 | 0.0 | - |
200
+
201
+ ### Framework Versions
202
+ - Python: 3.10.12
203
+ - SetFit: 1.1.0.dev0
204
+ - Sentence Transformers: 3.1.1
205
+ - Transformers: 4.46.1
206
+ - PyTorch: 2.4.0+cu121
207
+ - Datasets: 2.20.0
208
+ - Tokenizers: 0.20.0
209
+
210
+ ## Citation
211
+
212
+ ### BibTeX
213
+ ```bibtex
214
+ @article{https://doi.org/10.48550/arxiv.2209.11055,
215
+ doi = {10.48550/ARXIV.2209.11055},
216
+ url = {https://arxiv.org/abs/2209.11055},
217
+ author = {Tunstall, Lewis and Reimers, Nils and Jo, Unso Eun Seo and Bates, Luke and Korat, Daniel and Wasserblat, Moshe and Pereg, Oren},
218
+ keywords = {Computation and Language (cs.CL), FOS: Computer and information sciences, FOS: Computer and information sciences},
219
+ title = {Efficient Few-Shot Learning Without Prompts},
220
+ publisher = {arXiv},
221
+ year = {2022},
222
+ copyright = {Creative Commons Attribution 4.0 International}
223
+ }
224
+ ```
225
+
226
+ <!--
227
+ ## Glossary
228
+
229
+ *Clearly define terms in order to be accessible across audiences.*
230
+ -->
231
+
232
+ <!--
233
+ ## Model Card Authors
234
+
235
+ *Lists the people who create the model card, providing recognition and accountability for the detailed work that goes into its construction.*
236
+ -->
237
+
238
+ <!--
239
+ ## Model Card Contact
240
+
241
+ *Provides a way for people who have updates to the Model Card, suggestions, or questions, to contact the Model Card authors.*
242
+ -->
config.json ADDED
@@ -0,0 +1,29 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ {
2
+ "_name_or_path": "mini1013/master_item_fd",
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:c9b76c9a5ce627fedfa27e1db745190d9c7a3dff1300ad6d1f8ad1ad04c6cb06
3
+ size 442494816
model_head.pkl ADDED
@@ -0,0 +1,3 @@
 
 
 
 
1
+ version https://git-lfs.github.com/spec/v1
2
+ oid sha256:6370a7700c51211d969ddd3808e6fba68035eb4f5958d702c097982dc4d0075d
3
+ size 68575
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