mini1013 commited on
Commit
cdabd80
·
verified ·
1 Parent(s): d6ff780

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,197 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ ---
2
+ tags:
3
+ - setfit
4
+ - sentence-transformers
5
+ - text-classification
6
+ - generated_from_setfit_trainer
7
+ widget:
8
+ - text: 템퍼 컴포트 에어 베개 소프트 NEW 가구/인테리어>베개>메모리폼베개
9
+ - text: 메이슬립 메모리폼 경추 베개 거북목 일자목 목이편한 숙면 편하베개 가구/인테리어>베개>계절베개
10
+ - text: 다니카 다니카 프리미엄 3D 경추 메모리폼 베개 캠핑베개 휴대용 배개 크림 언니 베게 가구/인테리어>베개>메모리폼베개
11
+ - text: 스트라이프 자카드 술 베개 커버 장식 코튼 리넨 원사 염색 쿠션 북유럽 홈 케이스 가구/인테리어>베개>베개커버세트
12
+ - text: 아망떼 뉴데이즈 베개커버 40x60 2장 가구/인테리어>베개>베개커버
13
+ metrics:
14
+ - accuracy
15
+ pipeline_tag: text-classification
16
+ library_name: setfit
17
+ inference: true
18
+ base_model: mini1013/master_domain
19
+ ---
20
+
21
+ # SetFit with mini1013/master_domain
22
+
23
+ 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.
24
+
25
+ The model has been trained using an efficient few-shot learning technique that involves:
26
+
27
+ 1. Fine-tuning a [Sentence Transformer](https://www.sbert.net) with contrastive learning.
28
+ 2. Training a classification head with features from the fine-tuned Sentence Transformer.
29
+
30
+ ## Model Details
31
+
32
+ ### Model Description
33
+ - **Model Type:** SetFit
34
+ - **Sentence Transformer body:** [mini1013/master_domain](https://huggingface.co/mini1013/master_domain)
35
+ - **Classification head:** a [LogisticRegression](https://scikit-learn.org/stable/modules/generated/sklearn.linear_model.LogisticRegression.html) instance
36
+ - **Maximum Sequence Length:** 512 tokens
37
+ - **Number of Classes:** 5 classes
38
+ <!-- - **Training Dataset:** [Unknown](https://huggingface.co/datasets/unknown) -->
39
+ <!-- - **Language:** Unknown -->
40
+ <!-- - **License:** Unknown -->
41
+
42
+ ### Model Sources
43
+
44
+ - **Repository:** [SetFit on GitHub](https://github.com/huggingface/setfit)
45
+ - **Paper:** [Efficient Few-Shot Learning Without Prompts](https://arxiv.org/abs/2209.11055)
46
+ - **Blogpost:** [SetFit: Efficient Few-Shot Learning Without Prompts](https://huggingface.co/blog/setfit)
47
+
48
+ ### Model Labels
49
+ | Label | Examples |
50
+ |:------|:------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------|
51
+ | 3.0 | <ul><li>'에이트룸 뱀부 프릴 시어서커 베개커버 50X70 가구/인테리어>베개>베개커버'</li><li>'파르페by알레르망 휴비스 듀라론 냉감 베개커버 방석 바디필로우 쇼파패드 냉감패드 쿨매트 4인 75x240 가구/인테리어>베개>베개커버'</li><li>'마틸라 NEW컬러 미드센추리 빈티지맨션 60수 고밀도순면 베개커버-11컬러 가구/인테리어>베개>베개커버'</li></ul> |
52
+ | 4.0 | <ul><li>'마스터유닛2 - 소프트 가구/인테리어>베개>베개커버세트'</li><li>'제이앤우 기절베개 홈랩 오리지널 기절베개 속통 세트구성 파인애플 베개 릴렉스 필로우 베개커버 통세탁 진드기차단 가구/인테리어>베개>베개커버세트'</li><li>'제이앤우 기절베개 오리지널 기절베개 세트구성 호텔식 베개 통세탁가능 가구/인테리어>베개>베개커버세트'</li></ul> |
53
+ | 0.0 | <ul><li>'즐잠 메밀베개 편백나무 경추베개 목디스크 거북목 일자목 목침 가구/인테리어>베개>계절베개'</li><li>'조은잠 특허받은 허리베개 요추베개 다용도 교정베개 가구/인테리어>베개>계절베개'</li><li>'메이슬립 메모리폼 경추 베개 거북목 일자목 목이편한 숙면 편하베개 가구/인테리어>베개>계절베개'</li></ul> |
54
+ | 2.0 | <ul><li>'스패로우 스프링 필로우 메모리폼 베개 가구/인테리어>베개>메모리폼베개'</li><li>'템퍼 템퍼베개 오리지날 베개 S 가구/인테리어>베개>메모리폼베개'</li><li>'템퍼 밀레니엄 베개 SmartCool 가구/인테리어>베개>메모리폼베개'</li></ul> |
55
+ | 1.0 | <ul><li>'3D와플 경추 견인 베개 메모리폼 라텍스 베게 배게 가구/인테리어>베개>라텍스베개'</li><li>'일자목 안락 낮은 베개 거북목 목 보호 라텍스 숙면 -6cm 진드기 방지 베갯잇 가구/인테리어>베개>라텍스베개'</li><li>'성형 베개 뒤척임 방지 수술 후 코 양악 리프팅 가슴 눈 주름 윤곽 관리 베개 13종 가구/인테리어>베개>라텍스베개'</li></ul> |
56
+
57
+ ## Uses
58
+
59
+ ### Direct Use for Inference
60
+
61
+ First install the SetFit library:
62
+
63
+ ```bash
64
+ pip install setfit
65
+ ```
66
+
67
+ Then you can load this model and run inference.
68
+
69
+ ```python
70
+ from setfit import SetFitModel
71
+
72
+ # Download from the 🤗 Hub
73
+ model = SetFitModel.from_pretrained("mini1013/master_cate_fi2")
74
+ # Run inference
75
+ preds = model("템퍼 컴포트 에어 베개 소프트 NEW 가구/인테리어>베개>메모리폼베개")
76
+ ```
77
+
78
+ <!--
79
+ ### Downstream Use
80
+
81
+ *List how someone could finetune this model on their own dataset.*
82
+ -->
83
+
84
+ <!--
85
+ ### Out-of-Scope Use
86
+
87
+ *List how the model may foreseeably be misused and address what users ought not to do with the model.*
88
+ -->
89
+
90
+ <!--
91
+ ## Bias, Risks and Limitations
92
+
93
+ *What are the known or foreseeable issues stemming from this model? You could also flag here known failure cases or weaknesses of the model.*
94
+ -->
95
+
96
+ <!--
97
+ ### Recommendations
98
+
99
+ *What are recommendations with respect to the foreseeable issues? For example, filtering explicit content.*
100
+ -->
101
+
102
+ ## Training Details
103
+
104
+ ### Training Set Metrics
105
+ | Training set | Min | Median | Max |
106
+ |:-------------|:----|:-------|:----|
107
+ | Word count | 3 | 8.7293 | 17 |
108
+
109
+ | Label | Training Sample Count |
110
+ |:------|:----------------------|
111
+ | 0.0 | 37 |
112
+ | 1.0 | 22 |
113
+ | 2.0 | 23 |
114
+ | 3.0 | 34 |
115
+ | 4.0 | 17 |
116
+
117
+ ### Training Hyperparameters
118
+ - batch_size: (256, 256)
119
+ - num_epochs: (30, 30)
120
+ - max_steps: -1
121
+ - sampling_strategy: oversampling
122
+ - num_iterations: 50
123
+ - body_learning_rate: (2e-05, 1e-05)
124
+ - head_learning_rate: 0.01
125
+ - loss: CosineSimilarityLoss
126
+ - distance_metric: cosine_distance
127
+ - margin: 0.25
128
+ - end_to_end: False
129
+ - use_amp: False
130
+ - warmup_proportion: 0.1
131
+ - l2_weight: 0.01
132
+ - seed: 42
133
+ - eval_max_steps: -1
134
+ - load_best_model_at_end: False
135
+
136
+ ### Training Results
137
+ | Epoch | Step | Training Loss | Validation Loss |
138
+ |:-------:|:----:|:-------------:|:---------------:|
139
+ | 0.0385 | 1 | 0.4798 | - |
140
+ | 1.9231 | 50 | 0.2701 | - |
141
+ | 3.8462 | 100 | 0.0001 | - |
142
+ | 5.7692 | 150 | 0.0001 | - |
143
+ | 7.6923 | 200 | 0.0 | - |
144
+ | 9.6154 | 250 | 0.0 | - |
145
+ | 11.5385 | 300 | 0.0 | - |
146
+ | 13.4615 | 350 | 0.0 | - |
147
+ | 15.3846 | 400 | 0.0 | - |
148
+ | 17.3077 | 450 | 0.0 | - |
149
+ | 19.2308 | 500 | 0.0 | - |
150
+ | 21.1538 | 550 | 0.0 | - |
151
+ | 23.0769 | 600 | 0.0 | - |
152
+ | 25.0 | 650 | 0.0 | - |
153
+ | 26.9231 | 700 | 0.0 | - |
154
+ | 28.8462 | 750 | 0.0 | - |
155
+
156
+ ### Framework Versions
157
+ - Python: 3.10.12
158
+ - SetFit: 1.1.0
159
+ - Sentence Transformers: 3.3.1
160
+ - Transformers: 4.44.2
161
+ - PyTorch: 2.2.0a0+81ea7a4
162
+ - Datasets: 3.2.0
163
+ - Tokenizers: 0.19.1
164
+
165
+ ## Citation
166
+
167
+ ### BibTeX
168
+ ```bibtex
169
+ @article{https://doi.org/10.48550/arxiv.2209.11055,
170
+ doi = {10.48550/ARXIV.2209.11055},
171
+ url = {https://arxiv.org/abs/2209.11055},
172
+ author = {Tunstall, Lewis and Reimers, Nils and Jo, Unso Eun Seo and Bates, Luke and Korat, Daniel and Wasserblat, Moshe and Pereg, Oren},
173
+ keywords = {Computation and Language (cs.CL), FOS: Computer and information sciences, FOS: Computer and information sciences},
174
+ title = {Efficient Few-Shot Learning Without Prompts},
175
+ publisher = {arXiv},
176
+ year = {2022},
177
+ copyright = {Creative Commons Attribution 4.0 International}
178
+ }
179
+ ```
180
+
181
+ <!--
182
+ ## Glossary
183
+
184
+ *Clearly define terms in order to be accessible across audiences.*
185
+ -->
186
+
187
+ <!--
188
+ ## Model Card Authors
189
+
190
+ *Lists the people who create the model card, providing recognition and accountability for the detailed work that goes into its construction.*
191
+ -->
192
+
193
+ <!--
194
+ ## Model Card Contact
195
+
196
+ *Provides a way for people who have updates to the Model Card, suggestions, or questions, to contact the Model Card authors.*
197
+ -->
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:de7ecf79b75d9b829143db748f7b14fb04e5adf2ff488417658d6677bbaa6de1
3
+ size 442494816
model_head.pkl ADDED
@@ -0,0 +1,3 @@
 
 
 
 
1
+ version https://git-lfs.github.com/spec/v1
2
+ oid sha256:b02111944271395d9af7adb47d1107219edf898b7b0780db314314cfd5973bff
3
+ size 31615
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