File size: 10,943 Bytes
979a1cb
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
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
---
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: 코스트코 수지스 그릴드 닭가슴살 1.8kg 수비드 페퍼콘 허브 그릴드 닭가슴살 1.8kg (스테디) 리반태닝
- text: 에쓰푸드 전지베이컨(1.9mm 슬라이스) 500g(기름기가 적고 담백한 베이컨)  금정푸드
- text: 849967 동원 퀴진 통등심 돈까스 480g 3  4 1)돈까스(통등심) 480g 1)돈까스(통등심) 480g_4)생선커틀렛
    400g_4)생선커틀렛 400g 시드웰쓰파트너스
- text: 돼지 뒷다리살 수육용 제육볶음고기 찌개용 ★핫딜대전★ 한돈 뒷다리살 1kg_보쌈용덩어리 주식회사 삼형제월드
- text: 송이 불닭발 280gX10팩/국내산, 원앙, 닭발, 매운  (주)천지농산
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.6435236614085759
      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:** 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                                                                                                                                                                                                             |
|:------|:---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------|
| 7.0   | <ul><li>'남도전통 우리맛 토종순대 천연돈장 1kg 4인분 우리맛 토종순대 1kg+1kg (2개) 주식회사 금호비앤디'</li><li>'코스트코 커클랜드 시그니춰 크럼블스 베이컨 567g  최고의수준'</li><li>'하림 아이로운 닭가슴살 팝콘치킨500g 1봉+1봉  팔레스티'</li></ul>                                            |
| 2.0   | <ul><li>'청정원 안주야 매운곱창볶음 160g 4개  (주) 이카루스'</li><li>'삼치기 쫄여먹는 쫄갈비 300g 1-2인분 물갈비 캠핑요리 음식 밀키트 고기 양념돼지갈비 쫄여먹는 쫄갈비 300g(1~2인분) 삼치기'</li><li>'파티큐 귀족 통돼지바베큐 (5-10인분) 만화고기 캠핑음식 집들이 출장 부천종합버스터미널_1/6상체 주식회사 파티큐'</li></ul> |
| 6.0   | <ul><li>'송화단(화풍60g x10) 8개 식자재 업소용 대용량  일흥상회'</li><li>'오리로스500gx4팩 고추오리불고기500gx1팩 선물용  마이다스'</li><li>'춘천달갈비 국내산 즉석조리식품 안동 순살 찜닭 1kg / 3-4인분  주식회사 에프앤에프커머스'</li></ul>                                                |
| 0.0   | <ul><li>'Espuna 스페인 전통 하몽 초리초슬라이스100g1개jamon  밀도상점'</li><li>'목우촌 버터구이 치킨 봉 500gX2개  팔레스티몰'</li><li>'우리맛 모듬국밥 머리고기+내장 2인분 (440g) 모듬국밥 4pack (800g) 주식회사 금호비앤디'</li></ul>                                              |
| 5.0   | <ul><li>'[호주산] 양등뼈 1kg  cj거성푸드'</li><li>'양의나라 유기농 양고기 양갈비 양꼬치 프렌치렉 숄더랙 캠핑 냉장 냉동  양의 나라'</li><li>'하이마블 프렌치랙 프랜치랙 양갈비 양고기 450g 램 미니 토마호크 프렌치랙  450g (냉동) 주식회사 하이마블'</li></ul>                                          |
| 1.0   | <ul><li>'하림 치킨너겟(Ⅱ) 1kg 텐더스틱 1kg 주식회사 미담'</li><li>'이종하작가 비법매실먹은 춘천닭갈비 올인원세트 3인분 (닭갈비 + 야채+떡+치즈 포함) 통다리살 간장바베큐 4개(1kg) 춘천맛식품'</li><li>'국물닭발 700g 2팩 튤립 숯불 오돌뼈 술안주 혼술 야식 국내산 매운맛 제육볶음 오돌뼈 250g 2팩 주식회사 바르'</li></ul>   |
| 3.0   | <ul><li>'미트홀 부채살 찹스테이크 부채 큐브 스테이크 1kg(200gX5팩) 짜파구리  미트홀'</li><li>'[도착보장] 올반 소불고기 전골세트 (소불고기 4팩 + 전골육수 2팩) 저녁 국 탕 찌개 반찬 간편식 밀키트 소불고기 4팩+전골육수2팩 (주)신세계푸드'</li><li>'에스푸드 바싹 불고기 1kg  주식회사 클릭몰'</li></ul>               |
| 4.0   | <ul><li>'흥생농장 반숙란40구 촉촉한 부드러운 반숙계란  흥생농장'</li><li>'에그트리 특란 90구 HACCP농장직송 날계란  에그트리농장'</li><li>'중국 염장 오리알 야단 372g 유황 찐오리알 6개입  오너트리'</li></ul>                                                                        |

## Evaluation

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

## 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_fd20")
# Run inference
preds = model("송이 불닭발 280gX10팩/국내산, 원앙, 닭발, 매운  (주)천지농산")
```

<!--
### 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   | 10.0318 | 24  |

| Label | Training Sample Count |
|:------|:----------------------|
| 0.0   | 50                    |
| 1.0   | 50                    |
| 2.0   | 50                    |
| 3.0   | 50                    |
| 4.0   | 19                    |
| 5.0   | 27                    |
| 6.0   | 50                    |
| 7.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.4004        | -               |
| 0.9091  | 50   | 0.238         | -               |
| 1.8182  | 100  | 0.1002        | -               |
| 2.7273  | 150  | 0.0799        | -               |
| 3.6364  | 200  | 0.063         | -               |
| 4.5455  | 250  | 0.0301        | -               |
| 5.4545  | 300  | 0.0261        | -               |
| 6.3636  | 350  | 0.0128        | -               |
| 7.2727  | 400  | 0.0054        | -               |
| 8.1818  | 450  | 0.008         | -               |
| 9.0909  | 500  | 0.004         | -               |
| 10.0    | 550  | 0.0001        | -               |
| 10.9091 | 600  | 0.002         | -               |
| 11.8182 | 650  | 0.002         | -               |
| 12.7273 | 700  | 0.0058        | -               |
| 13.6364 | 750  | 0.0039        | -               |
| 14.5455 | 800  | 0.0016        | -               |
| 15.4545 | 850  | 0.0001        | -               |
| 16.3636 | 900  | 0.0001        | -               |
| 17.2727 | 950  | 0.0001        | -               |
| 18.1818 | 1000 | 0.0001        | -               |
| 19.0909 | 1050 | 0.0           | -               |
| 20.0    | 1100 | 0.0001        | -               |

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