mini1013 commited on
Commit
8ff3ecc
·
verified ·
1 Parent(s): adc13c1

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,218 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
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: 세이코 SBTR SBTR011 전용 힐링쉴드 시계보호필름 기스방지 유리보호필름 31평면 스타샵
14
+ - text: 시계줄 교체공구 스프링툴바/메탈,가죽밴드 변경도구/시계줄질도구 스프링바툴 멀티형 올리브tree
15
+ - text: 오메가호환 시계줄 스트랩 가죽 시계 체인 12 OMJ-브라운 화이트 라인 + 실버_20mm 더블드래곤(Double dragon)
16
+ - text: Uhgbsd 가죽 스트랩 VC 바쉐론 콘스탄틴 시계 호환 남성 액세서리 19mm 20mm 22mm 1_10 Black Gold Fold
17
+ Bk 시구왕씨
18
+ - text: 디젤 DZ4316 DZ7395 7305 4209 4215 용 스테인레스 스틸 시계 호환용 남성용 메탈 솔리드 밴드 24mm 30mm
19
+ 04 B Black_05 30mm 아이스박스(ICEBOX)
20
+ inference: true
21
+ model-index:
22
+ - name: SetFit with mini1013/master_domain
23
+ results:
24
+ - task:
25
+ type: text-classification
26
+ name: Text Classification
27
+ dataset:
28
+ name: Unknown
29
+ type: unknown
30
+ split: test
31
+ metrics:
32
+ - type: metric
33
+ value: 0.5793723141033988
34
+ name: Metric
35
+ ---
36
+
37
+ # SetFit with mini1013/master_domain
38
+
39
+ 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.
40
+
41
+ The model has been trained using an efficient few-shot learning technique that involves:
42
+
43
+ 1. Fine-tuning a [Sentence Transformer](https://www.sbert.net) with contrastive learning.
44
+ 2. Training a classification head with features from the fine-tuned Sentence Transformer.
45
+
46
+ ## Model Details
47
+
48
+ ### Model Description
49
+ - **Model Type:** SetFit
50
+ - **Sentence Transformer body:** [mini1013/master_domain](https://huggingface.co/mini1013/master_domain)
51
+ - **Classification head:** a [LogisticRegression](https://scikit-learn.org/stable/modules/generated/sklearn.linear_model.LogisticRegression.html) instance
52
+ - **Maximum Sequence Length:** 512 tokens
53
+ - **Number of Classes:** 5 classes
54
+ <!-- - **Training Dataset:** [Unknown](https://huggingface.co/datasets/unknown) -->
55
+ <!-- - **Language:** Unknown -->
56
+ <!-- - **License:** Unknown -->
57
+
58
+ ### Model Sources
59
+
60
+ - **Repository:** [SetFit on GitHub](https://github.com/huggingface/setfit)
61
+ - **Paper:** [Efficient Few-Shot Learning Without Prompts](https://arxiv.org/abs/2209.11055)
62
+ - **Blogpost:** [SetFit: Efficient Few-Shot Learning Without Prompts](https://huggingface.co/blog/setfit)
63
+
64
+ ### Model Labels
65
+ | Label | Examples |
66
+ |:------|:--------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------|
67
+ | 0.0 | <ul><li>'카시오 DW5600 시계 호환 16mm 러버 워치 밴드 실리콘 스트랩 우레탄 시계줄 옐로우 블랙 A_16mm 로움'</li><li>'갤럭시핏2 스트랩 실리콘 밴드 민트 보미헤안랩소디'</li><li>'로이드 어썸픽 소형 메쉬밴드 (2종 택 1) LL2B19611X LL2B19611XMG 로즈골드 세컨드플랜'</li></ul> |
68
+ | 3.0 | <ul><li>'BOBO BIRD 네이비 블루 커플 손목 시계 연인 나무 쿼츠 맞춤형 각인 최고 럭셔리 브랜드 여성용 2.Paper Box 2 Woman 아더월드'</li><li>'캐주얼남녀손목시계 남자시계 폭발적인 벨트 테리어 시계 유럽 및 미국 시계선물 여자시계 Grey 리마113'</li><li>'남녀 커플 시계 SCRRJU 스테인레스 스틸 밴드 방수 연인 Se 패션 캐주얼 손목 선물 09 9 홀릭스'</li></ul> |
69
+ | 4.0 | <ul><li>'[프레드릭콘스탄트](신세계본점) FC-330MC4P6 클래식 문페이즈 주식회사 에스에스지닷컴'</li><li>'[다양한선물]순토 코어 올블랙 레귤러블랙 코어블랙레드 순토5 WHR 모음 시리즈 선택01.SS014279010 순토코어올블랙 스타샵'</li><li>'헬스공부타이머 집중공부타이머 요리 낮잠 여가 시간관리 알람 큐브 SW9EF763 15-60분 화이트 현대몰'</li></ul> |
70
+ | 2.0 | <ul><li>'SUNOEL 3기압 5기압 방수 어린이 초등학생 전자 손목시계 모음 SUNOEL'</li><li>'손목시계쇼핑몰 아동용손목시계(16-5A) 손목시계대량 기프트한국'</li><li>'어린이 손목시계 초등학생 시계 키즈 전자시계 유아 스마트워치 남아 여아 제이에이취'</li></ul> |
71
+ | 1.0 | <ul><li>'제작 빈 핀 버튼 메이커 부품 기계 용품 세트 25mm 32mm 37mm 44mm 50mm 56mm 58mm 50 개 [1]50sets_@#@[7]58mm 캐롤스하우스'</li><li>'무소음 무브먼트 시계 부품 모터 바늘 공예 DIY 선택D시계판_거북이 제이릴'</li><li>'시계공구 기타 야마하 YZF R125 R 125 YZFR125 20082013 바이크 오토바이 핸드가드 실드 핸드 가드 보호대 앞유리 07 Green 유비즈엘'</li></ul> |
72
+
73
+ ## Evaluation
74
+
75
+ ### Metrics
76
+ | Label | Metric |
77
+ |:--------|:-------|
78
+ | **all** | 0.5794 |
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_ac6")
97
+ # Run inference
98
+ preds = model("세이코 SBTR SBTR011 전용 힐링쉴드 시계보호필름 기스방지 유리보호필름 31평면 스타샵")
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 | 3 | 10.9107 | 22 |
131
+
132
+ | Label | Training Sample Count |
133
+ |:------|:----------------------|
134
+ | 0.0 | 50 |
135
+ | 1.0 | 50 |
136
+ | 2.0 | 24 |
137
+ | 3.0 | 50 |
138
+ | 4.0 | 50 |
139
+
140
+ ### Training Hyperparameters
141
+ - batch_size: (512, 512)
142
+ - num_epochs: (20, 20)
143
+ - max_steps: -1
144
+ - sampling_strategy: oversampling
145
+ - num_iterations: 40
146
+ - body_learning_rate: (2e-05, 2e-05)
147
+ - head_learning_rate: 2e-05
148
+ - loss: CosineSimilarityLoss
149
+ - distance_metric: cosine_distance
150
+ - margin: 0.25
151
+ - end_to_end: False
152
+ - use_amp: False
153
+ - warmup_proportion: 0.1
154
+ - seed: 42
155
+ - eval_max_steps: -1
156
+ - load_best_model_at_end: False
157
+
158
+ ### Training Results
159
+ | Epoch | Step | Training Loss | Validation Loss |
160
+ |:-------:|:----:|:-------------:|:---------------:|
161
+ | 0.0286 | 1 | 0.3696 | - |
162
+ | 1.4286 | 50 | 0.1249 | - |
163
+ | 2.8571 | 100 | 0.0114 | - |
164
+ | 4.2857 | 150 | 0.0001 | - |
165
+ | 5.7143 | 200 | 0.0001 | - |
166
+ | 7.1429 | 250 | 0.0001 | - |
167
+ | 8.5714 | 300 | 0.0001 | - |
168
+ | 10.0 | 350 | 0.0001 | - |
169
+ | 11.4286 | 400 | 0.0 | - |
170
+ | 12.8571 | 450 | 0.0001 | - |
171
+ | 14.2857 | 500 | 0.0 | - |
172
+ | 15.7143 | 550 | 0.0 | - |
173
+ | 17.1429 | 600 | 0.0 | - |
174
+ | 18.5714 | 650 | 0.0 | - |
175
+ | 20.0 | 700 | 0.0 | - |
176
+
177
+ ### Framework Versions
178
+ - Python: 3.10.12
179
+ - SetFit: 1.1.0.dev0
180
+ - Sentence Transformers: 3.1.1
181
+ - Transformers: 4.46.1
182
+ - PyTorch: 2.4.0+cu121
183
+ - Datasets: 2.20.0
184
+ - Tokenizers: 0.20.0
185
+
186
+ ## Citation
187
+
188
+ ### BibTeX
189
+ ```bibtex
190
+ @article{https://doi.org/10.48550/arxiv.2209.11055,
191
+ doi = {10.48550/ARXIV.2209.11055},
192
+ url = {https://arxiv.org/abs/2209.11055},
193
+ author = {Tunstall, Lewis and Reimers, Nils and Jo, Unso Eun Seo and Bates, Luke and Korat, Daniel and Wasserblat, Moshe and Pereg, Oren},
194
+ keywords = {Computation and Language (cs.CL), FOS: Computer and information sciences, FOS: Computer and information sciences},
195
+ title = {Efficient Few-Shot Learning Without Prompts},
196
+ publisher = {arXiv},
197
+ year = {2022},
198
+ copyright = {Creative Commons Attribution 4.0 International}
199
+ }
200
+ ```
201
+
202
+ <!--
203
+ ## Glossary
204
+
205
+ *Clearly define terms in order to be accessible across audiences.*
206
+ -->
207
+
208
+ <!--
209
+ ## Model Card Authors
210
+
211
+ *Lists the people who create the model card, providing recognition and accountability for the detailed work that goes into its construction.*
212
+ -->
213
+
214
+ <!--
215
+ ## Model Card Contact
216
+
217
+ *Provides a way for people who have updates to the Model Card, suggestions, or questions, to contact the Model Card authors.*
218
+ -->
config.json ADDED
@@ -0,0 +1,29 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ {
2
+ "_name_or_path": "mini1013/master_item_ac",
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:282470a63d12b6a9e6b4a750875da4d320bfa2eb7a3e4264256c6146b5763314
3
+ size 442494816
model_head.pkl ADDED
@@ -0,0 +1,3 @@
 
 
 
 
1
+ version https://git-lfs.github.com/spec/v1
2
+ oid sha256:25797cd634da94477c1f497ff494bfdf55dbef6374c63d19b5b496a115bd4d98
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