mini1013 commited on
Commit
e08a8dd
·
verified ·
1 Parent(s): f292955

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,264 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ ---
2
+ tags:
3
+ - setfit
4
+ - sentence-transformers
5
+ - text-classification
6
+ - generated_from_setfit_trainer
7
+ widget:
8
+ - text: 탑키드 만들기 경찰관 놀이 세트 3인용 가구/인테리어>수예>기타수예
9
+ - text: 일상공방 코 손뜨개 6종세트 인디핑크 421114 가구/인테리어>수예>뜨개질>완제품
10
+ - text: 퀼트가게6마 반폭롤 면 100 20수 도기 프렌즈 WS 792 원단 가구/인테리어>수예>퀼트/펠트>원단
11
+ - text: 펠트 구절초 대 SET 환경꾸미기재료 가구/인테리어>수예>퀼트/펠트>도안
12
+ - text: 광목침구 촬영용 빈티지 플라워 코튼 포플린 드레스 셔츠 섬유 린넨 대폭원단 가구/인테리어>수예>자수>원단
13
+ metrics:
14
+ - accuracy
15
+ pipeline_tag: text-classification
16
+ library_name: setfit
17
+ inference: true
18
+ base_model: mini1013/master_domain
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: accuracy
31
+ value: 1.0
32
+ name: Accuracy
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:** 7 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
+ | 6.0 | <ul><li>'퀼트크로스백 퀼트완제품 가구/인테리어>수예>퀼트/펠트>완제품'</li><li>'현진 글리터토퍼 꽃길만걷자 GFT4-405 152094 가구/인테리어>수예>퀼트/펠트>완제품'</li><li>'스위티퀼트 퀼트 완제품 봄이 필통 파우치 가구/인테리어>수예>퀼트/펠트>완제품'</li></ul> |
66
+ | 4.0 | <ul><li>'쇼파 빈티지 요곤 가죽 질감 재킷 배경 가방 부드러운 안감천 레자원단 가구/인테리어>수예>원단'</li><li>'접착 레자 소파 고무 강력 자동차 인테리 인조 가죽 가구/인테리어>수예>원단'</li><li>'핸드메이드 가죽 소재 하운드투스 Y자 인조 PVC클러치 프린트 캐리어 DIY 가구/인테리어>수예>원단'</li></ul> |
67
+ | 3.0 | <ul><li>'실밥뜯개 실뜯게 제거기 부자재 니퍼 실따개 바느질 마대바늘 모루인형눈 스킬바늘 재단가위 가구/인테리어>수예>수예용품/부자재'</li><li>'diy 가죽공예 세트 왁스실 가죽바늘 7종 가구/인테리어>수예>수예용품/부자재'</li><li>'단추 썬그립 500세트 똑딱이단추 고급 국산 티단추 스냅 선그립 79컬러 가구/인테리어>수예>수예용품/부자재'</li></ul> |
68
+ | 1.0 | <ul><li>'도서 다루마 패턴북 6 가구/인테리어>수예>뜨개질>패키지'</li><li>'뜨개가방손잡이 우드 자연 큰 단단한 나무 잠금 가구/인테리어>수예>뜨개질>완제품'</li><li>'타월 담요 소파 손뜨개 여름 블랭킷 커버 코바늘 가구/인테리어>수예>뜨개질>완제품'</li></ul> |
69
+ | 0.0 | <ul><li>'우돌아트 동물이름표 기린 네임텍 스텐실 도안 1243 가구/인테리어>수예>기타수예'</li><li>'모루 공예 재료 부드러운 모루 - 초��� 가구/인테리어>수예>기타수예'</li><li>'컬러점토 3개입 아모스 가구/인테리어>수예>기타수예'</li></ul> |
70
+ | 5.0 | <ul><li>'OOE 덴마크 꽃실 자수실 510 727 가구/인테리어>수예>자수>실/바늘'</li><li>'데코샌드아트 명화도안 색모래 밤의 별매 중 X 2매입 가구/인테리어>수예>자수>도안'</li><li>'실십자수 동물 왕 사자 가족 대형 십자수 세트 패키지 DIY만들기 30x40 11CT HMA56704 가구/인테리어>수예>자수>패키지'</li></ul> |
71
+ | 2.0 | <ul><li>'누니액자 보석십자수 패브릭형 액자 60x90 프리미엄 클래식실버 가구/인테리어>수예>보석십자수'</li><li>'돈그림 황금돈나무 거실 현관 행운의 풍수 금전운 그-D 40x80 가구/인테리어>수예>보석십자수'</li><li>'보석십자수 빗 가구/인테리어>수예>보석십자수'</li></ul> |
72
+
73
+ ## Evaluation
74
+
75
+ ### Metrics
76
+ | Label | Accuracy |
77
+ |:--------|:---------|
78
+ | **all** | 1.0 |
79
+
80
+ ## Uses
81
+
82
+ ### Direct Use for Inference
83
+
84
+ First install the SetFit library:
85
+
86
+ ```bash
87
+ pip install setfit
88
+ ```
89
+
90
+ Then you can load this model and run inference.
91
+
92
+ ```python
93
+ from setfit import SetFitModel
94
+
95
+ # Download from the 🤗 Hub
96
+ model = SetFitModel.from_pretrained("mini1013/master_cate_fi6")
97
+ # Run inference
98
+ preds = model("탑키드 만들기 경찰관 놀이 세트 3인용 가구/인테리어>수예>기타수예")
99
+ ```
100
+
101
+ <!--
102
+ ### Downstream Use
103
+
104
+ *List how someone could finetune this model on their own dataset.*
105
+ -->
106
+
107
+ <!--
108
+ ### Out-of-Scope Use
109
+
110
+ *List how the model may foreseeably be misused and address what users ought not to do with the model.*
111
+ -->
112
+
113
+ <!--
114
+ ## Bias, Risks and Limitations
115
+
116
+ *What are the known or foreseeable issues stemming from this model? You could also flag here known failure cases or weaknesses of the model.*
117
+ -->
118
+
119
+ <!--
120
+ ### Recommendations
121
+
122
+ *What are recommendations with respect to the foreseeable issues? For example, filtering explicit content.*
123
+ -->
124
+
125
+ ## Training Details
126
+
127
+ ### Training Set Metrics
128
+ | Training set | Min | Median | Max |
129
+ |:-------------|:----|:-------|:----|
130
+ | Word count | 2 | 8.8714 | 24 |
131
+
132
+ | Label | Training Sample Count |
133
+ |:------|:----------------------|
134
+ | 0.0 | 70 |
135
+ | 1.0 | 70 |
136
+ | 2.0 | 70 |
137
+ | 3.0 | 70 |
138
+ | 4.0 | 70 |
139
+ | 5.0 | 70 |
140
+ | 6.0 | 70 |
141
+
142
+ ### Training Hyperparameters
143
+ - batch_size: (256, 256)
144
+ - num_epochs: (30, 30)
145
+ - max_steps: -1
146
+ - sampling_strategy: oversampling
147
+ - num_iterations: 50
148
+ - body_learning_rate: (2e-05, 1e-05)
149
+ - head_learning_rate: 0.01
150
+ - loss: CosineSimilarityLoss
151
+ - distance_metric: cosine_distance
152
+ - margin: 0.25
153
+ - end_to_end: False
154
+ - use_amp: False
155
+ - warmup_proportion: 0.1
156
+ - l2_weight: 0.01
157
+ - seed: 42
158
+ - eval_max_steps: -1
159
+ - load_best_model_at_end: False
160
+
161
+ ### Training Results
162
+ | Epoch | Step | Training Loss | Validation Loss |
163
+ |:-------:|:----:|:-------------:|:---------------:|
164
+ | 0.0104 | 1 | 0.5007 | - |
165
+ | 0.5208 | 50 | 0.4969 | - |
166
+ | 1.0417 | 100 | 0.4332 | - |
167
+ | 1.5625 | 150 | 0.0551 | - |
168
+ | 2.0833 | 200 | 0.0001 | - |
169
+ | 2.6042 | 250 | 0.0 | - |
170
+ | 3.125 | 300 | 0.0 | - |
171
+ | 3.6458 | 350 | 0.0 | - |
172
+ | 4.1667 | 400 | 0.0 | - |
173
+ | 4.6875 | 450 | 0.0 | - |
174
+ | 5.2083 | 500 | 0.0 | - |
175
+ | 5.7292 | 550 | 0.0 | - |
176
+ | 6.25 | 600 | 0.0 | - |
177
+ | 6.7708 | 650 | 0.0 | - |
178
+ | 7.2917 | 700 | 0.0 | - |
179
+ | 7.8125 | 750 | 0.0 | - |
180
+ | 8.3333 | 800 | 0.0 | - |
181
+ | 8.8542 | 850 | 0.0 | - |
182
+ | 9.375 | 900 | 0.0 | - |
183
+ | 9.8958 | 950 | 0.0 | - |
184
+ | 10.4167 | 1000 | 0.0 | - |
185
+ | 10.9375 | 1050 | 0.0 | - |
186
+ | 11.4583 | 1100 | 0.0 | - |
187
+ | 11.9792 | 1150 | 0.0 | - |
188
+ | 12.5 | 1200 | 0.0 | - |
189
+ | 13.0208 | 1250 | 0.0 | - |
190
+ | 13.5417 | 1300 | 0.0 | - |
191
+ | 14.0625 | 1350 | 0.0 | - |
192
+ | 14.5833 | 1400 | 0.0 | - |
193
+ | 15.1042 | 1450 | 0.0 | - |
194
+ | 15.625 | 1500 | 0.0 | - |
195
+ | 16.1458 | 1550 | 0.0 | - |
196
+ | 16.6667 | 1600 | 0.0 | - |
197
+ | 17.1875 | 1650 | 0.0 | - |
198
+ | 17.7083 | 1700 | 0.0 | - |
199
+ | 18.2292 | 1750 | 0.0 | - |
200
+ | 18.75 | 1800 | 0.0 | - |
201
+ | 19.2708 | 1850 | 0.0 | - |
202
+ | 19.7917 | 1900 | 0.0 | - |
203
+ | 20.3125 | 1950 | 0.0 | - |
204
+ | 20.8333 | 2000 | 0.0 | - |
205
+ | 21.3542 | 2050 | 0.0 | - |
206
+ | 21.875 | 2100 | 0.0 | - |
207
+ | 22.3958 | 2150 | 0.0 | - |
208
+ | 22.9167 | 2200 | 0.0 | - |
209
+ | 23.4375 | 2250 | 0.0 | - |
210
+ | 23.9583 | 2300 | 0.0 | - |
211
+ | 24.4792 | 2350 | 0.0 | - |
212
+ | 25.0 | 2400 | 0.0 | - |
213
+ | 25.5208 | 2450 | 0.0 | - |
214
+ | 26.0417 | 2500 | 0.0 | - |
215
+ | 26.5625 | 2550 | 0.0 | - |
216
+ | 27.0833 | 2600 | 0.0 | - |
217
+ | 27.6042 | 2650 | 0.0 | - |
218
+ | 28.125 | 2700 | 0.0 | - |
219
+ | 28.6458 | 2750 | 0.0 | - |
220
+ | 29.1667 | 2800 | 0.0 | - |
221
+ | 29.6875 | 2850 | 0.0 | - |
222
+
223
+ ### Framework Versions
224
+ - Python: 3.10.12
225
+ - SetFit: 1.1.0
226
+ - Sentence Transformers: 3.3.1
227
+ - Transformers: 4.44.2
228
+ - PyTorch: 2.2.0a0+81ea7a4
229
+ - Datasets: 3.2.0
230
+ - Tokenizers: 0.19.1
231
+
232
+ ## Citation
233
+
234
+ ### BibTeX
235
+ ```bibtex
236
+ @article{https://doi.org/10.48550/arxiv.2209.11055,
237
+ doi = {10.48550/ARXIV.2209.11055},
238
+ url = {https://arxiv.org/abs/2209.11055},
239
+ author = {Tunstall, Lewis and Reimers, Nils and Jo, Unso Eun Seo and Bates, Luke and Korat, Daniel and Wasserblat, Moshe and Pereg, Oren},
240
+ keywords = {Computation and Language (cs.CL), FOS: Computer and information sciences, FOS: Computer and information sciences},
241
+ title = {Efficient Few-Shot Learning Without Prompts},
242
+ publisher = {arXiv},
243
+ year = {2022},
244
+ copyright = {Creative Commons Attribution 4.0 International}
245
+ }
246
+ ```
247
+
248
+ <!--
249
+ ## Glossary
250
+
251
+ *Clearly define terms in order to be accessible across audiences.*
252
+ -->
253
+
254
+ <!--
255
+ ## Model Card Authors
256
+
257
+ *Lists the people who create the model card, providing recognition and accountability for the detailed work that goes into its construction.*
258
+ -->
259
+
260
+ <!--
261
+ ## Model Card Contact
262
+
263
+ *Provides a way for people who have updates to the Model Card, suggestions, or questions, to contact the Model Card authors.*
264
+ -->
config.json ADDED
@@ -0,0 +1,29 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ {
2
+ "_name_or_path": "mini1013/master_item_fi",
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.44.2",
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.3.1",
4
+ "transformers": "4.44.2",
5
+ "pytorch": "2.2.0a0+81ea7a4"
6
+ },
7
+ "prompts": {},
8
+ "default_prompt_name": null,
9
+ "similarity_fn_name": "cosine"
10
+ }
config_setfit.json ADDED
@@ -0,0 +1,4 @@
 
 
 
 
 
1
+ {
2
+ "normalize_embeddings": false,
3
+ "labels": null
4
+ }
model.safetensors ADDED
@@ -0,0 +1,3 @@
 
 
 
 
1
+ version https://git-lfs.github.com/spec/v1
2
+ oid sha256:eb81369ef8e01cb75d8f07ee4bb5a8a21fb4d5ac28af2adb96357b5556e15a08
3
+ size 442494816
model_head.pkl ADDED
@@ -0,0 +1,3 @@
 
 
 
 
1
+ version https://git-lfs.github.com/spec/v1
2
+ oid sha256:b10272a9852916bdfd01a301ae6234e7aee4d064784c3f37341593377c2efa88
3
+ size 43935
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