File size: 10,715 Bytes
3c5d900
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
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
---
base_model: mini1013/master_domain
library_name: setfit
metrics:
- metric
pipeline_tag: text-classification
tags:
- setfit
- sentence-transformers
- text-classification
- generated_from_setfit_trainer
widget:
- text: 폭스밸리 프리미엄 자세교정밴드 말린 어깨  굽은등 라운드숄더 일자 바른 체형 교정기 M+L 폭스밸리
- text: 올그린 무릎 보조기 MCL 니케이지 인대 연골 보호대 수술후 의료용 니케이지_블루_XL 올그린
- text: 통풍형 목보호대 쿨링 경추 목디스크 목쿠션 거북목 여성용 hilala115
- text: THEPURE 목보호대 거북목 자세교정기 보조기 지지대 봄여름가을겨울 02. UIS-03_S 48CM 선셋
- text: 필라델피아 목보호대 SM-001 사이즈선택 경추보호대 릴렉스 목해먹 목스트레칭 목견인기 일자목 디아
inference: true
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: metric
      value: 0.8887880986937591
      name: Metric
---

# 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:** 7 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                                                                                                                                                                                                                                           |
|:------|:---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------|
| 6.0   | <ul><li>'반깁스 반기브스 다리보조기 골절 다리 수술 고정 오른발 ㅡ 기본 모델 올바른해외직구샵'</li><li>'아오스 의료용 무릎보호대 124 MCL [0002]S 왼쪽용 CJONSTYLE'</li><li>'원코어 발보조기 끌림방지 보호대 재활 장비 발목보조기 발지지대 왼발_L 키위프'</li></ul>                                                                    |
| 2.0   | <ul><li>'이화 밸포밴드 팔걸이 견지대 성인용 21061458 M 비앤비(best & BEST)'</li><li>'허리보조기 허리 척추 보호 의료용 AOS-460 여_XXL 링쿠'</li><li>'울트라슬링 어깨보호대 팔걸이 어깨수술 울트라실링 팔깁스 K 타입 디엘아이'</li></ul>                                                                               |
| 5.0   | <ul><li>'전동기립기 하반신 경사 스탠딩 편마비 침대 보조기 수동 높이 조절 + 사륜 + 식탁 쇼핑의품격001'</li><li>'물리치료기계 재활기 가정용 근육 도수 허리 승모근 단일 모델 에오인'</li><li>'환자 전동 침대 의료용 가정용 병원 전동기립기 보조 화이트 97cmx45cmx202cm 연림스토어'</li></ul>                                                       |
| 0.0   | <ul><li>'미제 재활 고무찰흙 퓨티 (살색/노랑/빨강/초록/파랑) 초록 텔레그라프'</li><li>'손가락 재활 장갑 편마비 손재활 운동 로봇 기구 주황색 미러링된 왼손 M 구구상회'</li><li>'건강누리 말렛핑거스프린트 리필(Mallet Finger Splint Refill) 오픈형7호 단위:팩(5개)  (주)엠디오씨'</li></ul>                                                |
| 4.0   | <ul><li>'통증바이 남녀공용 바른 자세밴드 3XL (허리둘레 ... 1개 XL (허리둘레 30~32인치) × 1개 이위에'</li><li>'굽은어깨 굽은등 어깨 허리 바른 자세 밴드 라운드숄더 펴주는 XXXL 아이엠어굿맨'</li><li>'(발음교정기 돌돌이) 스카이블루 학생용 영어 국어 발음연습 발음교정 하드(스카이블루) (주)애니덴'</li></ul>                                         |
| 1.0   | <ul><li>'[의료기기](반값딜) 넥가디언 거북목 디스크 교정기 쿠션형 견인기 단독 (밤색) 852헤르츠'</li><li>'바른 목 미라클 고급형 보호대 밴드  젬마줌마'</li><li>'[OFLP1Q84]허리E UP 통기성 에어메디칼 견인요 S 27인치이하/FREE sellerhub'</li></ul>                                                                       |
| 3.0   | <ul><li>'도고 렉스타 허벅지형 205 압박용밴드 의료용 압박스타킹 혈액순환 다리붓기 개선 의료기기 중압 (4)265발트임_살색_XL (주)도고메디칼'</li><li>'[GIN383R]종아리 압박밴드 스타킹 다리 간호사 수면 관리 블랙/FREE sellerhub'</li><li>'Duomed Advantage, 15-20 mmHg, 종아리 높이, 오픈 토 Small_Almond 수 스토리(SU STORY)'</li></ul> |

## Evaluation

### Metrics
| Label   | Metric |
|:--------|:-------|
| **all** | 0.8888 |

## 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_lh21")
# Run inference
preds = model("통풍형 목보호대 쿨링 경추 목디스크 목쿠션 거북목 여성용 hilala115")
```

<!--
### 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   | 3   | 9.96   | 21  |

| Label | Training Sample Count |
|:------|:----------------------|
| 0.0   | 50                    |
| 1.0   | 50                    |
| 2.0   | 50                    |
| 3.0   | 50                    |
| 4.0   | 50                    |
| 5.0   | 50                    |
| 6.0   | 50                    |

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

### Training Results
| Epoch   | Step | Training Loss | Validation Loss |
|:-------:|:----:|:-------------:|:---------------:|
| 0.0182  | 1    | 0.4265        | -               |
| 0.9091  | 50   | 0.3097        | -               |
| 1.8182  | 100  | 0.0765        | -               |
| 2.7273  | 150  | 0.0638        | -               |
| 3.6364  | 200  | 0.0434        | -               |
| 4.5455  | 250  | 0.0035        | -               |
| 5.4545  | 300  | 0.0002        | -               |
| 6.3636  | 350  | 0.0001        | -               |
| 7.2727  | 400  | 0.0001        | -               |
| 8.1818  | 450  | 0.0001        | -               |
| 9.0909  | 500  | 0.0001        | -               |
| 10.0    | 550  | 0.0001        | -               |
| 10.9091 | 600  | 0.0001        | -               |
| 11.8182 | 650  | 0.0001        | -               |
| 12.7273 | 700  | 0.0001        | -               |
| 13.6364 | 750  | 0.0001        | -               |
| 14.5455 | 800  | 0.0001        | -               |
| 15.4545 | 850  | 0.0001        | -               |
| 16.3636 | 900  | 0.0           | -               |
| 17.2727 | 950  | 0.0           | -               |
| 18.1818 | 1000 | 0.0           | -               |
| 19.0909 | 1050 | 0.0001        | -               |
| 20.0    | 1100 | 0.0           | -               |

### Framework Versions
- Python: 3.10.12
- SetFit: 1.1.0.dev0
- Sentence Transformers: 3.1.1
- Transformers: 4.46.1
- PyTorch: 2.4.0+cu121
- Datasets: 2.20.0
- Tokenizers: 0.20.0

## 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.*
-->