SetFit with mini1013/master_domain

This is a SetFit model that can be used for Text Classification. This SetFit model uses mini1013/master_domain as the Sentence Transformer embedding model. A LogisticRegression 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 with contrastive learning.
  2. Training a classification head with features from the fine-tuned Sentence Transformer.

Model Details

Model Description

Model Sources

Model Labels

Label Examples
2.0
  • '팔도 뽀로로 홍삼쏙쏙 오렌지 100ml 20포 출산/육아 > 아기간식 > 유아음료'
  • '팔도 뽀로로 음료 어린이 키즈 주스 식혜 홍삼쏙쏙 워터젤리 모음 2.페트음료_사과x12개+블루베리12개 출산/육아 > 아기간식 > 유아음료'
  • '[1+1] 학교로 간 어린이주스 아기음료 유아주스 11종 사과즙 배도라지즙 [일반캡] 샤인머스캣 20팩_★안전캡★ 배 20팩_학교로간 10팩(맛&캡타입 랜덤) 출산/육아 > 아기간식 > 유아음료'
0.0
  • '[산골이유식] 산골간식 쌀참 떡뻥 과일참 알밤 꿀밤 배도라지즙 퓨레 푸딩 요거트 비타민젤리 어린이김 쌈장 사과퓨레1팩 출산/육아 > 아기간식 > 유아과자'
  • '내아이애 아기과자 유기농 떡뻥 백미 08_유기농 떡뻥 양파 출산/육아 > 아기간식 > 유아과자'
  • '숲바른 유기농 맑음과자 국내산 아기 과자 유아 간식 떡뻥 스틱 [스틱]단호박 출산/육아 > 아기간식 > 유아과자'
1.0
  • '파스퇴르 위드맘 산양 제왕 100일 유아이유식분유 750g × 3개 출산/육아 > 아기간식 > 유아유제품'
  • '앱솔루트 킨더밀쉬 200ml 출산/육아 > 아기간식 > 유아유제품'
  • '매일유업 상하치즈 유기농 어린이치즈 3단계 60매 아기 간식 출산/육아 > 아기간식 > 유아유제품'

Evaluation

Metrics

Label Accuracy
all 0.9978

Uses

Direct Use for Inference

First install the SetFit library:

pip install setfit

Then you can load this model and run inference.

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개입 출산/육아 > 아기간식 > 유아음료")

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

@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}
}
Downloads last month
435
Safetensors
Model size
111M params
Tensor type
F32
·
Inference Providers NEW
This model is not currently available via any of the supported Inference Providers.

Model tree for mini1013/master_cate_bc12

Base model

klue/roberta-base
Finetuned
(213)
this model

Evaluation results