mini1013 commited on
Commit
a991749
·
verified ·
1 Parent(s): 0a17b9d

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,237 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
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: '[본죽]5첩반상 5종(진미채+멸치+연근+콩자반+깻잎) 5팩+5팩 외 밑반찬 5종 5팩+5팩 메가글로벌001'
14
+ - text: 싸고 맛있고 영양까지 풍부한 110가지 우리집반찬/우리홈메이드푸드 도토리묵/양념 홈메이드 푸드
15
+ - text: 샘표 쓱쓱싹싹밥도둑 반찬 9봉 골라담기 / 장조림 오징어채볶음 멸치볶음 2. 고추장 멸치볶음 3봉_4. 쇠고기 장조림 3봉_6. 돼지고기
16
+ 장조림 3봉 샘표식품 주식회사
17
+ - text: 본죽 쇠고기 장조림 170g x 4 마이엘(Maiel)
18
+ - text: 국산 고추장멸치볶음 500g 조림 반찬 국산 오복채 1kg 사계절반찬
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.9101876675603218
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:** 9 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
+ | 6.0 | <ul><li>'본죽 미니장조림 2박스 70gx5개입x2 셜크'</li><li>'[본죽]쇠고기 장조림 300g (냉장 소고기 반찬 점심 저녁 도시락 어린이 아기반찬) 순수본 주식회사'</li><li>'본죽 쇠고기 장조림 170g x 4 5. 비비고 육개장 500g x 5개 감성주머니'</li></ul> |
67
+ | 1.0 | <ul><li>'일가집 일미 쫄깃 치자 단무지 1kg 두부 날치알 피클 일가집 일미 고추지 1kg 고추절임 고추장아찌 머치바잉'</li><li>'일가집 일미 쫄깃 치자 단무지 1kg 두부 날치알 피클 일가집 일미 깐마늘 1kg 양파 다진마늘 청양 머치바잉'</li><li>'참 맛좋은 하진 반달 단무지 2.5kg 농업회사법인 봉농주식회사'</li></ul> |
68
+ | 5.0 | <ul><li>'진 명이나물(실속형) 10kg 대용량 업소용 식당 반찬 장아찌 05 유림 명이나물 10kg (유) 협동맛사랑식품'</li><li>'단풍콩잎 500g 양념 장아찌 국내제조 콩잎김치 삭힌 국산 갈치속젓 500g 사계절반찬'</li><li>'군산 울외장아찌 2kg 나라즈케 나라스케 술지게미 2.무 장아찌 2kg 주식회사 백년부엌'</li></ul> |
69
+ | 2.0 | <ul><li>'마늘쫑무침 4kg 대용량 식당 업소용 반찬 무침 장아찌 (유) 협동맛사랑식품'</li><li>'[서울,성남 ] 푸릇푸릇 시금치무침 300g [암사 우리집반찬] 주식회사 프레시멘토'</li><li>'[주문폭주] 농가살리기 30년 전통 통영할매 원조 생굴무침 330g 생굴무침 330g 1통 주식회사 청년농부들'</li></ul> |
70
+ | 8.0 | <ul><li>'일본식 반찬대용 츠쿠다니 김조림 180g 서울타임즈'</li><li>'오뚜기 고등어갈치조림양념120g 제이디(JD)'</li><li>'청우식품 이음식 스지사태조림 200g 푸드뱅크(주)'</li></ul> |
71
+ | 4.0 | <ul><li>'[종가집]종가집 오징어채볶음 60g 에스케이스토아주식회사'</li><li>'[반찬가게 찬장]신선한재료 당일제조 배송 고사리볶음 가정식 반찬 집밥 나물/무침/볶음 배달 밑반찬_건파래무침 주식회사 찬장에프에스대전'</li><li>'청정원 종가집 견과류 멸치볶음 60G 조은마켓'</li></ul> |
72
+ | 7.0 | <ul><li>'종가집 옛맛 무말랭이 1kg x 2개 더빈(THE BIN)'</li><li>'반찬단지 마늘쫑무침 1kg 아삭 마늘장아찌 반찬거리 와이엘플래닛'</li><li>'가을무를 말려 쫄깃하고 달큰한 국산 무말랭이 1kg 1. 국산 무말랭이 1kg 주식회사 태극인 농업회사법인'</li></ul> |
73
+ | 0.0 | <ul><li>'씨제이 비비고 오징어채 볶음 55g 아이스박스 포장 (주)씨티케이이비전코리아'</li><li>'매운 고추부각 튀각 30g 6봉 티각태각 속초 명품 특산물 김부각30g 6봉 엠앤엠컴퍼니'</li><li>'대구 반고개 무침회 똘똘이식당 납작만두 오징어 회무침 캠핑 밀키트 무침회세트(중)_보통맛 대구 똘똘이 무침회'</li></ul> |
74
+ | 3.0 | <ul><li>'미자언니네 밑반찬 하얀콩강정 120g 1팩 미자언니네 하얀콩강정 에센셜키친'</li><li>'[메인반찬 국 찌개 김치 세트] 건강한 반찬 이기는면역찬 메인반찬_계란말이 이기는면역찬(서초점)'</li><li>'[본죽] 밑반찬 5종 세트(진미채볶음 멸치볶음 깻잎무침 무말랭이 궁채절임) 메가글로벌001'</li></ul> |
75
+
76
+ ## Evaluation
77
+
78
+ ### Metrics
79
+ | Label | Metric |
80
+ |:--------|:-------|
81
+ | **all** | 0.9102 |
82
+
83
+ ## Uses
84
+
85
+ ### Direct Use for Inference
86
+
87
+ First install the SetFit library:
88
+
89
+ ```bash
90
+ pip install setfit
91
+ ```
92
+
93
+ Then you can load this model and run inference.
94
+
95
+ ```python
96
+ from setfit import SetFitModel
97
+
98
+ # Download from the 🤗 Hub
99
+ model = SetFitModel.from_pretrained("mini1013/master_cate_fd9")
100
+ # Run inference
101
+ preds = model("본죽 쇠고기 장조림 170g x 4 마이엘(Maiel)")
102
+ ```
103
+
104
+ <!--
105
+ ### Downstream Use
106
+
107
+ *List how someone could finetune this model on their own dataset.*
108
+ -->
109
+
110
+ <!--
111
+ ### Out-of-Scope Use
112
+
113
+ *List how the model may foreseeably be misused and address what users ought not to do with the model.*
114
+ -->
115
+
116
+ <!--
117
+ ## Bias, Risks and Limitations
118
+
119
+ *What are the known or foreseeable issues stemming from this model? You could also flag here known failure cases or weaknesses of the model.*
120
+ -->
121
+
122
+ <!--
123
+ ### Recommendations
124
+
125
+ *What are recommendations with respect to the foreseeable issues? For example, filtering explicit content.*
126
+ -->
127
+
128
+ ## Training Details
129
+
130
+ ### Training Set Metrics
131
+ | Training set | Min | Median | Max |
132
+ |:-------------|:----|:--------|:----|
133
+ | Word count | 3 | 10.1981 | 21 |
134
+
135
+ | Label | Training Sample Count |
136
+ |:------|:----------------------|
137
+ | 0.0 | 50 |
138
+ | 1.0 | 42 |
139
+ | 2.0 | 22 |
140
+ | 3.0 | 50 |
141
+ | 4.0 | 50 |
142
+ | 5.0 | 50 |
143
+ | 6.0 | 50 |
144
+ | 7.0 | 50 |
145
+ | 8.0 | 50 |
146
+
147
+ ### Training Hyperparameters
148
+ - batch_size: (512, 512)
149
+ - num_epochs: (20, 20)
150
+ - max_steps: -1
151
+ - sampling_strategy: oversampling
152
+ - num_iterations: 40
153
+ - body_learning_rate: (2e-05, 2e-05)
154
+ - head_learning_rate: 2e-05
155
+ - loss: CosineSimilarityLoss
156
+ - distance_metric: cosine_distance
157
+ - margin: 0.25
158
+ - end_to_end: False
159
+ - use_amp: False
160
+ - warmup_proportion: 0.1
161
+ - seed: 42
162
+ - eval_max_steps: -1
163
+ - load_best_model_at_end: False
164
+
165
+ ### Training Results
166
+ | Epoch | Step | Training Loss | Validation Loss |
167
+ |:-------:|:----:|:-------------:|:---------------:|
168
+ | 0.0154 | 1 | 0.4845 | - |
169
+ | 0.7692 | 50 | 0.2975 | - |
170
+ | 1.5385 | 100 | 0.0992 | - |
171
+ | 2.3077 | 150 | 0.0418 | - |
172
+ | 3.0769 | 200 | 0.0246 | - |
173
+ | 3.8462 | 250 | 0.0358 | - |
174
+ | 4.6154 | 300 | 0.0185 | - |
175
+ | 5.3846 | 350 | 0.0123 | - |
176
+ | 6.1538 | 400 | 0.0121 | - |
177
+ | 6.9231 | 450 | 0.0008 | - |
178
+ | 7.6923 | 500 | 0.0003 | - |
179
+ | 8.4615 | 550 | 0.0002 | - |
180
+ | 9.2308 | 600 | 0.0001 | - |
181
+ | 10.0 | 650 | 0.0001 | - |
182
+ | 10.7692 | 700 | 0.0001 | - |
183
+ | 11.5385 | 750 | 0.0002 | - |
184
+ | 12.3077 | 800 | 0.0001 | - |
185
+ | 13.0769 | 850 | 0.0001 | - |
186
+ | 13.8462 | 900 | 0.0001 | - |
187
+ | 14.6154 | 950 | 0.0001 | - |
188
+ | 15.3846 | 1000 | 0.0001 | - |
189
+ | 16.1538 | 1050 | 0.0001 | - |
190
+ | 16.9231 | 1100 | 0.0001 | - |
191
+ | 17.6923 | 1150 | 0.0001 | - |
192
+ | 18.4615 | 1200 | 0.0001 | - |
193
+ | 19.2308 | 1250 | 0.0001 | - |
194
+ | 20.0 | 1300 | 0.0001 | - |
195
+
196
+ ### Framework Versions
197
+ - Python: 3.10.12
198
+ - SetFit: 1.1.0.dev0
199
+ - Sentence Transformers: 3.1.1
200
+ - Transformers: 4.46.1
201
+ - PyTorch: 2.4.0+cu121
202
+ - Datasets: 2.20.0
203
+ - Tokenizers: 0.20.0
204
+
205
+ ## Citation
206
+
207
+ ### BibTeX
208
+ ```bibtex
209
+ @article{https://doi.org/10.48550/arxiv.2209.11055,
210
+ doi = {10.48550/ARXIV.2209.11055},
211
+ url = {https://arxiv.org/abs/2209.11055},
212
+ author = {Tunstall, Lewis and Reimers, Nils and Jo, Unso Eun Seo and Bates, Luke and Korat, Daniel and Wasserblat, Moshe and Pereg, Oren},
213
+ keywords = {Computation and Language (cs.CL), FOS: Computer and information sciences, FOS: Computer and information sciences},
214
+ title = {Efficient Few-Shot Learning Without Prompts},
215
+ publisher = {arXiv},
216
+ year = {2022},
217
+ copyright = {Creative Commons Attribution 4.0 International}
218
+ }
219
+ ```
220
+
221
+ <!--
222
+ ## Glossary
223
+
224
+ *Clearly define terms in order to be accessible across audiences.*
225
+ -->
226
+
227
+ <!--
228
+ ## Model Card Authors
229
+
230
+ *Lists the people who create the model card, providing recognition and accountability for the detailed work that goes into its construction.*
231
+ -->
232
+
233
+ <!--
234
+ ## Model Card Contact
235
+
236
+ *Provides a way for people who have updates to the Model Card, suggestions, or questions, to contact the Model Card authors.*
237
+ -->
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:2ca5ff86d1fa84c3998d976d93311590174000ecb0ee932b0f1e03c618b58869
3
+ size 442494816
model_head.pkl ADDED
@@ -0,0 +1,3 @@
 
 
 
 
1
+ version https://git-lfs.github.com/spec/v1
2
+ oid sha256:5f8a4b422465fae85b121a497af70a96c9026bd6b0f24ff74df9e208a89d7083
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