File size: 15,024 Bytes
a904db2
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
225
226
227
228
229
230
231
232
233
234
235
236
237
238
239
240
241
242
243
244
245
246
247
248
249
250
251
252
253
254
255
256
257
258
259
260
261
262
263
264
265
266
267
268
269
---
tags:
- setfit
- sentence-transformers
- text-classification
- generated_from_setfit_trainer
widget:
- text: u자 바디필로우 임산부 인형 극세사 쿠션 보호 01 01 출산/육아 > 임산부용품 > 임산부바디필로우
- text: V크로스  임산부 팬티 랜덤 3종1세트(M-XXL) 204830 L 출산/육아 > 임산부용품 > 기타임산부용품
- text: 1+1/2+2 코르셋 밴딩 올인원 속옷 3 IN 1 올인원 속옷 민소매 뱃살보정 일체형 속옷 L(65-70kg)_살구색 X 1+블랙
    X 1 출산/육아 > 임산부용품 > 태교용품 > 태교용구
- text: u자베개 바디필로우 죽부인베개 임신베개 U자 배게 플래티넘 출산/육아 > 임산부용품 > 임산부바디필로우
- text: 임산부 손목 산모 산후 보호대 아대 패드 핑크 출산/육아 > 임산부용품 > 임산부보호대
metrics:
- accuracy
pipeline_tag: text-classification
library_name: setfit
inference: true
base_model: mini1013/master_domain
model-index:
- name: SetFit with mini1013/master_domain
  results:
  - task:
      type: text-classification
      name: Text Classification
    dataset:
      name: Unknown
      type: unknown
      split: test
    metrics:
    - type: accuracy
      value: 1.0
      name: Accuracy
---

# SetFit with mini1013/master_domain

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.

The model has been trained using an efficient few-shot learning technique that involves:

1. Fine-tuning a [Sentence Transformer](https://www.sbert.net) with contrastive learning.
2. Training a classification head with features from the fine-tuned Sentence Transformer.

## Model Details

### Model Description
- **Model Type:** SetFit
- **Sentence Transformer body:** [mini1013/master_domain](https://huggingface.co/mini1013/master_domain)
- **Classification head:** a [LogisticRegression](https://scikit-learn.org/stable/modules/generated/sklearn.linear_model.LogisticRegression.html) instance
- **Maximum Sequence Length:** 512 tokens
- **Number of Classes:** 8 classes
<!-- - **Training Dataset:** [Unknown](https://huggingface.co/datasets/unknown) -->
<!-- - **Language:** Unknown -->
<!-- - **License:** Unknown -->

### Model Sources

- **Repository:** [SetFit on GitHub](https://github.com/huggingface/setfit)
- **Paper:** [Efficient Few-Shot Learning Without Prompts](https://arxiv.org/abs/2209.11055)
- **Blogpost:** [SetFit: Efficient Few-Shot Learning Without Prompts](https://huggingface.co/blog/setfit)

### Model Labels
| Label | Examples                                                                                                                                                                                                                                                                                                                       |
|:------|:-------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------|
| 4.0   | <ul><li>'임산부복대 임부 허리 보호 지지대 산모 산전 10.얇은 심리스 임산부 복대_블랙XL 출산/육아 > 임산부용품 > 임산부보호대'</li><li>'프라하우스 임산부 산모 손목보호대(2개입) 원플러스원 세트 사이즈조절 메쉬 사계절보호대 손목보호대+발목보호대세트_선택4 손목 (스킨) + 발목 (블랙) 출산/육아 > 임산부용품 > 임산부보호대'</li><li>'임산부복대 임부 허리 보호 지지대 산모 산전 09.매쉬 산전산후겸용 벨트형_블랙XL 출산/육아 > 임산부용품 > 임산부보호대'</li></ul>                                |
| 2.0   | <ul><li>'메모리 방석 산모 임산부 원형 폼 상품선택_핑크 출산/육아 > 임산부용품 > 산모방석'</li><li>'[솔라히팅시트] 도넛방석 회음부 임산부산모 치루 원적외선방석 [명화]별이빛나는밤에_추가 시트커버(그레이) 출산/육아 > 임산부용품 > 산모방석'</li><li>'3D 메모리폼 회음부 엉덩이 쿠션 산모 도넛 방석 선택01)3D 남성용 메모리폼 방석_C.극세사 브라운 출산/육아 > 임산부용품 > 산모방석'</li></ul>                                                                         |
| 5.0   | <ul><li>'비오템 비오베르제뛰르 튼살 크림 400ml 비오템튼살크림 +비오템 바디밀크 75ml ×2 출산/육아 > 임산부용품 > 임산부화장품'</li><li>'아기자기랩 양배추 가슴팩 28g 8매입 8매입 출산/육아 > 임산부용품 > 임산부화장품'</li><li>'베비루미 마더 케어 크림 200ml  출산/육아 > 임산부용품 > 임산부화장품'</li></ul>                                                                                                                  |
| 0.0   | <ul><li>'[매장발송] 탑텐키즈 아동) 독도의 날 캠페인 플리스 셋업 (MKC4IP3001) LCO_120 출산/육아 > 임산부용품 > 기타임산부용품'</li><li>'BODDYSIZE 여성용 임산부 반소매 브이넥 러플 맥시 불규칙한 롱 드레스, 블랙. Medium Black Medium_Pink 출산/육아 > 임산부용품 > 기타임산부용품'</li><li>'임밍아웃 이벤트 현관문 레터링 자유문구 남편 임신 알리기 서프라이즈 부모님 카드 축하선물 아빠가된걸축하해_8.화이트/어마어마한신랑_6.응애응애 출산/육아 > 임산부용품 > 기타임산부용품'</li></ul> |
| 3.0   | <ul><li>'아망떼 꿀잠 바디필로우 등쿠션 안고자는 베개 모음 31.코튼벨 등쿠션_커버_솜포함 노블핑크 출산/육아 > 임산부용품 > 임산부바디필로우'</li><li>'임산부바디필로우 배개 새로운 전신 수유 임신 베개 U 자형 출산 이동식 코튼 커버 70x130CM Gray S 출산/육아 > 임산부용품 > 임산부바디필로우'</li><li>'임산부 바디필로우 허리보호 임신 배받침 수면 쿠션 복부 지지대 블루 출산/육아 > 임산부용품 > 임산부바디필로우'</li></ul>                                                      |
| 7.0   | <ul><li>'남성 전술 바지 방수 긁힘 방지 폴라폴리스 팬츠 기모 전술바지 3XL_그린 출산/육아 > 임산부용품 > 태교용품 > 태교음반/DVD'</li><li>'도플러 태아심음측정기 초음파 우리 아기 심장 소리 심장 체크 화이트 JST-T501 블루 출산/육아 > 임산부용품 > 태교용품 > 태교용구'</li><li>'알루미늄 합금 주방 압력 조리기, 스토브 요리, 에너지 절약 안전 보호, 야외 캠 155550 18CM 3L 155550 20CM 4L 출산/육아 > 임산부용품 > 태교용품 > 태교용구'</li></ul>                        |
| 1.0   | <ul><li>'매일유업 맘스 앱솔루트 식이섬유 주스 오렌지200ml 24팩 오렌지쥬스24팩 출산/육아 > 임산부용품 > 모유수유차'</li><li>'맘스 앱솔루트 식이섬유주스 오렌지 200ml x 24팩 이중포장 매일유업 앱솔맘 맘스앱솔루트 식이섬유주스 오렌지x24팩 출산/육아 > 임산부용품 > 모유수유차'</li><li>'모유 차 맘라떼모아30포 + 유기농 스틸티 락타티20t 세트  출산/육아 > 임산부용품 > 모유수유차'</li></ul>                                                                     |
| 6.0   | <ul><li>'유주글로벌 전자파차단담요 방사선방지천 전자파차단앞치마 전자파방지복대 임신출산축하 은회색 2겹(무료 테스트 펜) 출산/육아 > 임산부용품 > 전자파차단앞치마'</li><li>'이지스바디 전기장완화 카페 바리스타 임산부 방수 이쁜 고급 앞치마 에이프런 워크웨어 선물 차콜그레이_베이지 출산/육아 > 임산부용품 > 전자파차단앞치마'</li><li>'전자파 방사선 차단 속옷 임신 선물 란제리 임부복 핑크 고양이+테스트 펜 M 출산/육아 > 임산부용품 > 전자파차단앞치마'</li></ul>                                        |

## Evaluation

### Metrics
| Label   | Accuracy |
|:--------|:---------|
| **all** | 1.0      |

## Uses

### Direct Use for Inference

First install the SetFit library:

```bash
pip install setfit
```

Then you can load this model and run inference.

```python
from setfit import SetFitModel

# Download from the 🤗 Hub
model = SetFitModel.from_pretrained("mini1013/master_cate_bc28")
# Run inference
preds = model("임산부 손목 산모 산후 보호대 아대 패드 핑크 출산/육아 > 임산부용품 > 임산부보호대")
```

<!--
### Downstream Use

*List how someone could finetune this model on their own dataset.*
-->

<!--
### Out-of-Scope Use

*List how the model may foreseeably be misused and address what users ought not to do with the model.*
-->

<!--
## Bias, Risks and Limitations

*What are the known or foreseeable issues stemming from this model? You could also flag here known failure cases or weaknesses of the model.*
-->

<!--
### Recommendations

*What are recommendations with respect to the foreseeable issues? For example, filtering explicit content.*
-->

## Training Details

### Training Set Metrics
| Training set | Min | Median  | Max |
|:-------------|:----|:--------|:----|
| Word count   | 7   | 15.0119 | 28  |

| Label | Training Sample Count |
|:------|:----------------------|
| 0.0   | 70                    |
| 1.0   | 15                    |
| 2.0   | 70                    |
| 3.0   | 70                    |
| 4.0   | 70                    |
| 5.0   | 70                    |
| 6.0   | 70                    |
| 7.0   | 70                    |

### Training Hyperparameters
- batch_size: (256, 256)
- num_epochs: (30, 30)
- max_steps: -1
- sampling_strategy: oversampling
- num_iterations: 50
- body_learning_rate: (2e-05, 1e-05)
- head_learning_rate: 0.01
- loss: CosineSimilarityLoss
- distance_metric: cosine_distance
- margin: 0.25
- end_to_end: False
- use_amp: False
- warmup_proportion: 0.1
- l2_weight: 0.01
- seed: 42
- eval_max_steps: -1
- load_best_model_at_end: False

### Training Results
| Epoch   | Step | Training Loss | Validation Loss |
|:-------:|:----:|:-------------:|:---------------:|
| 0.0101  | 1    | 0.4772        | -               |
| 0.5051  | 50   | 0.4978        | -               |
| 1.0101  | 100  | 0.2919        | -               |
| 1.5152  | 150  | 0.0498        | -               |
| 2.0202  | 200  | 0.019         | -               |
| 2.5253  | 250  | 0.0011        | -               |
| 3.0303  | 300  | 0.0001        | -               |
| 3.5354  | 350  | 0.0001        | -               |
| 4.0404  | 400  | 0.0001        | -               |
| 4.5455  | 450  | 0.0           | -               |
| 5.0505  | 500  | 0.0           | -               |
| 5.5556  | 550  | 0.0           | -               |
| 6.0606  | 600  | 0.0           | -               |
| 6.5657  | 650  | 0.0           | -               |
| 7.0707  | 700  | 0.0           | -               |
| 7.5758  | 750  | 0.0           | -               |
| 8.0808  | 800  | 0.0           | -               |
| 8.5859  | 850  | 0.0           | -               |
| 9.0909  | 900  | 0.0           | -               |
| 9.5960  | 950  | 0.0           | -               |
| 10.1010 | 1000 | 0.0           | -               |
| 10.6061 | 1050 | 0.0           | -               |
| 11.1111 | 1100 | 0.0           | -               |
| 11.6162 | 1150 | 0.0           | -               |
| 12.1212 | 1200 | 0.0           | -               |
| 12.6263 | 1250 | 0.0           | -               |
| 13.1313 | 1300 | 0.0           | -               |
| 13.6364 | 1350 | 0.0           | -               |
| 14.1414 | 1400 | 0.0           | -               |
| 14.6465 | 1450 | 0.0           | -               |
| 15.1515 | 1500 | 0.0           | -               |
| 15.6566 | 1550 | 0.0           | -               |
| 16.1616 | 1600 | 0.0           | -               |
| 16.6667 | 1650 | 0.0           | -               |
| 17.1717 | 1700 | 0.0           | -               |
| 17.6768 | 1750 | 0.0           | -               |
| 18.1818 | 1800 | 0.0           | -               |
| 18.6869 | 1850 | 0.0           | -               |
| 19.1919 | 1900 | 0.0           | -               |
| 19.6970 | 1950 | 0.0           | -               |
| 20.2020 | 2000 | 0.0           | -               |
| 20.7071 | 2050 | 0.0           | -               |
| 21.2121 | 2100 | 0.0           | -               |
| 21.7172 | 2150 | 0.0           | -               |
| 22.2222 | 2200 | 0.0           | -               |
| 22.7273 | 2250 | 0.0           | -               |
| 23.2323 | 2300 | 0.0           | -               |
| 23.7374 | 2350 | 0.0           | -               |
| 24.2424 | 2400 | 0.0           | -               |
| 24.7475 | 2450 | 0.0           | -               |
| 25.2525 | 2500 | 0.0           | -               |
| 25.7576 | 2550 | 0.0           | -               |
| 26.2626 | 2600 | 0.0           | -               |
| 26.7677 | 2650 | 0.0           | -               |
| 27.2727 | 2700 | 0.0           | -               |
| 27.7778 | 2750 | 0.0           | -               |
| 28.2828 | 2800 | 0.0           | -               |
| 28.7879 | 2850 | 0.0           | -               |
| 29.2929 | 2900 | 0.0           | -               |
| 29.7980 | 2950 | 0.0           | -               |

### Framework Versions
- Python: 3.10.12
- SetFit: 1.1.0
- Sentence Transformers: 3.3.1
- Transformers: 4.44.2
- PyTorch: 2.2.0a0+81ea7a4
- Datasets: 3.2.0
- Tokenizers: 0.19.1

## Citation

### BibTeX
```bibtex
@article{https://doi.org/10.48550/arxiv.2209.11055,
    doi = {10.48550/ARXIV.2209.11055},
    url = {https://arxiv.org/abs/2209.11055},
    author = {Tunstall, Lewis and Reimers, Nils and Jo, Unso Eun Seo and Bates, Luke and Korat, Daniel and Wasserblat, Moshe and Pereg, Oren},
    keywords = {Computation and Language (cs.CL), FOS: Computer and information sciences, FOS: Computer and information sciences},
    title = {Efficient Few-Shot Learning Without Prompts},
    publisher = {arXiv},
    year = {2022},
    copyright = {Creative Commons Attribution 4.0 International}
}
```

<!--
## Glossary

*Clearly define terms in order to be accessible across audiences.*
-->

<!--
## Model Card Authors

*Lists the people who create the model card, providing recognition and accountability for the detailed work that goes into its construction.*
-->

<!--
## Model Card Contact

*Provides a way for people who have updates to the Model Card, suggestions, or questions, to contact the Model Card authors.*
-->