setfit safetensors roberta sentence-transformers text-classification generated_from_setfit_trainer arxiv:2209.11055 base_model:mini1013/master_domain base_model:finetune:mini1013/master_domain model-index region:us
---
base_model: mini1013/master_domain
library_name: setfit
metrics:
- accuracy
pipeline_tag: text-classification
tags:
- setfit
- sentence-transformers
- text-classification
- generated_from_setfit_trainer
widget:
- text: '[매일유업]요미요미 유기농 쌀떡뻥 시금치와브로콜리30g 한팩골라담기 쌀과자 초록1단계(6개월 이후) 25g 출산/육아 > 아기간식
    > 유아과자'
- text: 팔도 뽀로로 밀크맛 235ml 1개입 대페트_칠성 제로 사이다 1.5L 12개입 출산/육아 > 아기간식 > 유아음료
- text: '[맛있는풍경] 유기농 쌀스틱 떡뻥 요거트볼 유아과자 어린이간식 11. 유기농 요거트 블루베리 출산/육아 > 아기간식 > 유아과자'
- text: 팔도 뽀로로 딸기맛 235ml 12개 팩음료_JARDIN 로얄 헤이즐넛 230ml 20개 출산/육아 > 아기간식 > 유아음료
- text: '[베베당] 유기농 아기과자 아이 간식 떡뻥 쌀과자 롱 스틱 팝 요거트 치즈 과일칩 10+3 10. 유기농 현미스틱 브로콜리30g 출산/육아
    > 아기간식 > 유아과자'
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: accuracy
      value: 0.9978471474703983
      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:** 3 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                                                                                                                                                                                                                                                                          |
|:------|:----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------|
| 2.0   | <ul><li>'팔도 뽀로로 홍삼쏙쏙 오렌지 100ml 20포  출산/육아 > 아기간식 > 유아음료'</li><li>'팔도 뽀로로 음료 어린이 키즈 주스 식혜 홍삼쏙쏙 워터젤리 모음 2.페트음료_사과x12개+블루베리12개 출산/육아 > 아기간식 > 유아음료'</li><li>'[1+1] 학교로 간 어린이주스 아기음료 유아주스 11종 사과즙 배도라지즙 [일반캡] 샤인머스캣 20팩_★안전캡★ 배 20팩_학교로간 10팩(맛&캡타입 랜덤) 출산/육아 > 아기간식 > 유아음료'</li></ul> |
| 0.0   | <ul><li>'[산골이유식] 산골간식 쌀참 떡뻥 과일참 알밤 꿀밤 배도라지즙 퓨레 푸딩 요거트 비타민젤리 어린이김 쌈장 사과퓨레1팩 출산/육아 > 아기간식 > 유아과자'</li><li>'내아이애 아기과자 유기농 떡뻥 백미 08_유기농 떡뻥 양파 출산/육아 > 아기간식 > 유아과자'</li><li>'숲바른 유기농 맑음과자 국내산 아기 과자 유아 간식 떡뻥 스틱 [스틱]단호박 출산/육아 > 아기간식 > 유아과자'</li></ul>                                 |
| 1.0   | <ul><li>'파스퇴르 위드맘 산양 제왕 100일 유아이유식분유 750g × 3개 출산/육아 > 아기간식 > 유아유제품'</li><li>'앱솔루트 킨더밀쉬 200ml  출산/육아 > 아기간식 > 유아유제품'</li><li>'매일유업 상하치즈 유기농 어린이치즈 3단계 60매 아기 간식  출산/육아 > 아기간식 > 유아유제품'</li></ul>                                                                                  |

## Evaluation

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

## 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_bc12")
# Run inference
preds = model("팔도 뽀로로 밀크맛 235ml 1개입 대페트_칠성 제로 사이다 1.5L 12개입 출산/육아 > 아기간식 > 유아음료")
```

<!--
### 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.3381 | 37  |

| Label | Training Sample Count |
|:------|:----------------------|
| 0.0   | 70                    |
| 1.0   | 70                    |
| 2.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.0238  | 1    | 0.4944        | -               |
| 1.1905  | 50   | 0.4153        | -               |
| 2.3810  | 100  | 0.1469        | -               |
| 3.5714  | 150  | 0.0014        | -               |
| 4.7619  | 200  | 0.0001        | -               |
| 5.9524  | 250  | 0.0001        | -               |
| 7.1429  | 300  | 0.0001        | -               |
| 8.3333  | 350  | 0.0           | -               |
| 9.5238  | 400  | 0.0           | -               |
| 10.7143 | 450  | 0.0           | -               |
| 11.9048 | 500  | 0.0           | -               |
| 13.0952 | 550  | 0.0           | -               |
| 14.2857 | 600  | 0.0           | -               |
| 15.4762 | 650  | 0.0           | -               |
| 16.6667 | 700  | 0.0           | -               |
| 17.8571 | 750  | 0.0           | -               |
| 19.0476 | 800  | 0.0           | -               |
| 20.2381 | 850  | 0.0           | -               |
| 21.4286 | 900  | 0.0           | -               |
| 22.6190 | 950  | 0.0           | -               |
| 23.8095 | 1000 | 0.0           | -               |
| 25.0    | 1050 | 0.0           | -               |
| 26.1905 | 1100 | 0.0           | -               |
| 27.3810 | 1150 | 0.0           | -               |
| 28.5714 | 1200 | 0.0           | -               |
| 29.7619 | 1250 | 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.*
-->