mini1013 commited on
Commit
4936439
·
verified ·
1 Parent(s): ba859c2

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,236 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
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: 한끼스토리 딸기드레싱 500g 10개 한울마켓
14
+ - text: 맷돌표 뉴슈가 60g/ 20개 (주)디엔제이
15
+ - text: 하회마을 쌈장 14kg 업소용 대용량 물레푸드
16
+ - text: 화가장가평발효과학 국산콩청국장 120g16팩 화가장 주식회사
17
+ - text: 춘장(삼화 300g) 4개 식자재 업소용 대용량 더착한컴퍼니
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.8727670433831571
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:** 9 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
+ | 8.0 | <ul><li>'아이스티음료 복숭아음료 립톤 음료 베이스 가루 업소 대용량 907g 온달이'</li><li>'죽순캔(진양 400g)X4 진양 400g)X4 프렌들리 컴퍼니'</li><li>'커피믹스(맥심 2.04k) X6 모카골드 오구오구(5959)'</li></ul> |
66
+ | 0.0 | <ul><li>'청정원 장아찌 간장소스 1.7L 착한사람들'</li><li>'몽고 송표 골드 간장 1.5L 몽고식품(주)창원1공장'</li><li>'샘표 맛간장 조림볶음용 보니따엠'</li></ul> |
67
+ | 3.0 | <ul><li>'으뜸 낫또 제주콩 생나또 53 g 특허기술로 만든 생 청국장 실이많은 생낫또 24 팩 혼합구성_생낫또 18 개 + 하나또 18 개 (주)으뜸엘엔에스'</li><li>'국산콩100g 12개 일본장인전수 수제 가정생낫또 나또 사또 검정콩 쥐눈이 대용량 검정콩100g 10개_간장360ml 가정생청국장'</li><li>'청정 제주콩 생 낫또 36개 주식회사 네오넥스글로벌'</li></ul> |
68
+ | 4.0 | <ul><li>'CJ 해찬들 그대로 된장찌개양념 450gx3 고깃집 된장찌개용 차돌 조개 코스트코 1021460 4 바지락꽃게 3개 까까아일랜드'</li><li>'[2+1] 해찬들 물로만 끓여도 차돌 된장찌개 양념 450G 물로만 끓여도 차돌 된장찌개 450Gx3 메가글로벌001'</li><li>'[샘표]샘표 토장 900g 티디티유통'</li></ul> |
69
+ | 1.0 | <ul><li>'안동제비원 고추장 담그기 세트 (약7kg)[33628066] (주)엔에스쇼핑'</li><li>'CJ 해찬들 태양초 알찬 고추장 6.5kg 리브웨이'</li><li>'청정원순창 현미 태양초 찰고추장, 2kg, 1개 2kg × 1개 2kg x 1개 카리스광클'</li></ul> |
70
+ | 6.0 | <ul><li>'샘표 쌈토장 450g 대성상사'</li><li>'참고을 신선한 쌈장 14kg 맛있는 쌈장 대용량 업소용 쌈장 지함 순창궁 양념 쌈장 14kg 우성수산'</li><li>'청정원 순창 쌈장골드 4.8kg 주식회사 푸드공공칠'</li></ul> |
71
+ | 5.0 | <ul><li>'콩마실 국산 메주 가루 (1kg 국산콩100%, 고추장용) 콩마실'</li><li>'고령 국산 메주 전통 국산콩메주 세트 5kg 장현식품'</li><li>'100%국산콩으로 만든 순창 전통메주 1덩이 1.2kg내외 열정농부'</li></ul> |
72
+ | 7.0 | <ul><li>'고추명가 비빔냉면 소스 2kg 냉면 양념장 비냉 비빔장 국수 양념 다대기 식당업소용 대용량 이도'</li><li>'CJ 손맛 다담 안동찜닭 양념 220g 분식 식당 식자재 감칠맛 풍미 맛다시 제이지무역'</li><li>'연안식당 부추꼬막장 150g 앙념 비빔장 꼬막비빔밥 밥도둑 꼬막장 넉넉한 2인분 주식회사 디딤'</li></ul> |
73
+ | 2.0 | <ul><li>'오뚜기 가쓰오부시 장국 360ml 외 7종 01_가쓰오부시 장국 360ml 주식회사 삼부'</li><li>'면사랑 프리미엄 메밀장국 1.8L 모밀 소바 육수 장국 국수 찌개 만능 다시 문화벙커'</li><li>'뽕보감 조청 1000g 철원군농업기술센터'</li></ul> |
74
+
75
+ ## Evaluation
76
+
77
+ ### Metrics
78
+ | Label | Metric |
79
+ |:--------|:-------|
80
+ | **all** | 0.8728 |
81
+
82
+ ## Uses
83
+
84
+ ### Direct Use for Inference
85
+
86
+ First install the SetFit library:
87
+
88
+ ```bash
89
+ pip install setfit
90
+ ```
91
+
92
+ Then you can load this model and run inference.
93
+
94
+ ```python
95
+ from setfit import SetFitModel
96
+
97
+ # Download from the 🤗 Hub
98
+ model = SetFitModel.from_pretrained("mini1013/master_cate_fd15")
99
+ # Run inference
100
+ preds = model("맷돌표 뉴슈가 60g/ 20개 (주)디엔제이")
101
+ ```
102
+
103
+ <!--
104
+ ### Downstream Use
105
+
106
+ *List how someone could finetune this model on their own dataset.*
107
+ -->
108
+
109
+ <!--
110
+ ### Out-of-Scope Use
111
+
112
+ *List how the model may foreseeably be misused and address what users ought not to do with the model.*
113
+ -->
114
+
115
+ <!--
116
+ ## Bias, Risks and Limitations
117
+
118
+ *What are the known or foreseeable issues stemming from this model? You could also flag here known failure cases or weaknesses of the model.*
119
+ -->
120
+
121
+ <!--
122
+ ### Recommendations
123
+
124
+ *What are recommendations with respect to the foreseeable issues? For example, filtering explicit content.*
125
+ -->
126
+
127
+ ## Training Details
128
+
129
+ ### Training Set Metrics
130
+ | Training set | Min | Median | Max |
131
+ |:-------------|:----|:-------|:----|
132
+ | Word count | 3 | 9.8578 | 26 |
133
+
134
+ | Label | Training Sample Count |
135
+ |:------|:----------------------|
136
+ | 0.0 | 50 |
137
+ | 1.0 | 50 |
138
+ | 2.0 | 50 |
139
+ | 3.0 | 50 |
140
+ | 4.0 | 50 |
141
+ | 5.0 | 22 |
142
+ | 6.0 | 50 |
143
+ | 7.0 | 50 |
144
+ | 8.0 | 50 |
145
+
146
+ ### Training Hyperparameters
147
+ - batch_size: (512, 512)
148
+ - num_epochs: (20, 20)
149
+ - max_steps: -1
150
+ - sampling_strategy: oversampling
151
+ - num_iterations: 40
152
+ - body_learning_rate: (2e-05, 2e-05)
153
+ - head_learning_rate: 2e-05
154
+ - loss: CosineSimilarityLoss
155
+ - distance_metric: cosine_distance
156
+ - margin: 0.25
157
+ - end_to_end: False
158
+ - use_amp: False
159
+ - warmup_proportion: 0.1
160
+ - seed: 42
161
+ - eval_max_steps: -1
162
+ - load_best_model_at_end: False
163
+
164
+ ### Training Results
165
+ | Epoch | Step | Training Loss | Validation Loss |
166
+ |:-------:|:----:|:-------------:|:---------------:|
167
+ | 0.0152 | 1 | 0.3728 | - |
168
+ | 0.7576 | 50 | 0.2769 | - |
169
+ | 1.5152 | 100 | 0.1245 | - |
170
+ | 2.2727 | 150 | 0.0532 | - |
171
+ | 3.0303 | 200 | 0.0532 | - |
172
+ | 3.7879 | 250 | 0.0385 | - |
173
+ | 4.5455 | 300 | 0.0052 | - |
174
+ | 5.3030 | 350 | 0.0025 | - |
175
+ | 6.0606 | 400 | 0.0004 | - |
176
+ | 6.8182 | 450 | 0.0004 | - |
177
+ | 7.5758 | 500 | 0.0005 | - |
178
+ | 8.3333 | 550 | 0.0007 | - |
179
+ | 9.0909 | 600 | 0.0002 | - |
180
+ | 9.8485 | 650 | 0.0002 | - |
181
+ | 10.6061 | 700 | 0.0001 | - |
182
+ | 11.3636 | 750 | 0.0001 | - |
183
+ | 12.1212 | 800 | 0.0001 | - |
184
+ | 12.8788 | 850 | 0.0001 | - |
185
+ | 13.6364 | 900 | 0.0001 | - |
186
+ | 14.3939 | 950 | 0.0001 | - |
187
+ | 15.1515 | 1000 | 0.0001 | - |
188
+ | 15.9091 | 1050 | 0.0001 | - |
189
+ | 16.6667 | 1100 | 0.0001 | - |
190
+ | 17.4242 | 1150 | 0.0001 | - |
191
+ | 18.1818 | 1200 | 0.0001 | - |
192
+ | 18.9394 | 1250 | 0.0 | - |
193
+ | 19.6970 | 1300 | 0.0001 | - |
194
+
195
+ ### Framework Versions
196
+ - Python: 3.10.12
197
+ - SetFit: 1.1.0.dev0
198
+ - Sentence Transformers: 3.1.1
199
+ - Transformers: 4.46.1
200
+ - PyTorch: 2.4.0+cu121
201
+ - Datasets: 2.20.0
202
+ - Tokenizers: 0.20.0
203
+
204
+ ## Citation
205
+
206
+ ### BibTeX
207
+ ```bibtex
208
+ @article{https://doi.org/10.48550/arxiv.2209.11055,
209
+ doi = {10.48550/ARXIV.2209.11055},
210
+ url = {https://arxiv.org/abs/2209.11055},
211
+ author = {Tunstall, Lewis and Reimers, Nils and Jo, Unso Eun Seo and Bates, Luke and Korat, Daniel and Wasserblat, Moshe and Pereg, Oren},
212
+ keywords = {Computation and Language (cs.CL), FOS: Computer and information sciences, FOS: Computer and information sciences},
213
+ title = {Efficient Few-Shot Learning Without Prompts},
214
+ publisher = {arXiv},
215
+ year = {2022},
216
+ copyright = {Creative Commons Attribution 4.0 International}
217
+ }
218
+ ```
219
+
220
+ <!--
221
+ ## Glossary
222
+
223
+ *Clearly define terms in order to be accessible across audiences.*
224
+ -->
225
+
226
+ <!--
227
+ ## Model Card Authors
228
+
229
+ *Lists the people who create the model card, providing recognition and accountability for the detailed work that goes into its construction.*
230
+ -->
231
+
232
+ <!--
233
+ ## Model Card Contact
234
+
235
+ *Provides a way for people who have updates to the Model Card, suggestions, or questions, to contact the Model Card authors.*
236
+ -->
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:5e90795d7601ec124b58137b442c55ba5f369ddc861cca407914cd0457e357db
3
+ size 442494816
model_head.pkl ADDED
@@ -0,0 +1,3 @@
 
 
 
 
1
+ version https://git-lfs.github.com/spec/v1
2
+ oid sha256:2e34fea22d2503495d7f4f12fff908f380f2599932e8f8f91a8875d4b28754ab
3
+ size 56255
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