SetFit with sentence-transformers/paraphrase-multilingual-mpnet-base-v2

This is a SetFit model that can be used for Text Classification. This SetFit model uses sentence-transformers/paraphrase-multilingual-mpnet-base-v2 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
Administrative
  • 'Bookkeeper'
  • 'Koordinerende sagsbehandler'
  • 'Center Management'
Other
  • 'Strategy & Investments'
  • 'Corporate Auditor'
  • 'Professor'
Marketing
  • 'Marketing Manager'
  • 'Global Marketing Director, Nonwovens'
  • 'Brand Strategist'
Purchasing
  • 'Program Purchasing Leader / Program / Acquisition Buyer'
  • 'Senior Category Manager'
  • 'Fachreferent MatWerk'
Information Technology
  • 'Business Analyst'
  • 'Systemadministrator Clientservices'
  • 'IT Program Manager – Information Security'
Consulting
  • 'Managementberater IT- und Governance'
  • 'Berater'
  • 'Manager Risk Advisory'
Project Management
  • 'Senior Project Manager'
  • 'Responsable développement projets'
  • 'Leiter Projektmanagement / Projektleiter'
Sales
  • 'Federal Account Manager'
  • 'Commercial Director On Trade'
  • 'Sales Manager'
Human Resources
  • 'SVP People & Culture Management and Services; CEO METRO Campus Services GmbH'
  • 'Gruppenleiter HR KPI & Reporting'
  • 'Personalreferent'
Business Development
  • 'Director, Digital Services Business'
  • 'Chief Growth Officer'
  • 'Business Development & Key Account Manager'
Customer Support
  • 'Sr. Customer Support spec.'
  • 'OM/Customer Success Manager'
  • 'Customer Executive & Member of Management Northern Europe'

Evaluation

Metrics

Label Accuracy
all 0.7343

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("Luu200/department-classifier-v2")
# Run inference
preds = model("Managing Director")

Training Details

Training Set Metrics

Training set Min Median Max
Word count 1 2.7229 12
Label Training Sample Count
Administrative 12
Business Development 5
Consulting 18
Customer Support 5
Human Resources 10
Information Technology 28
Marketing 13
Other 169
Project Management 18
Purchasing 10
Sales 26

Training Hyperparameters

  • batch_size: (16, 16)
  • num_epochs: (1, 1)
  • max_steps: -1
  • sampling_strategy: oversampling
  • 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
  • evaluation_strategy: epoch
  • eval_max_steps: -1
  • load_best_model_at_end: False

Training Results

Epoch Step Training Loss Validation Loss
0.0002 1 0.3802 -
0.0119 50 0.2604 -
0.0237 100 0.2071 -
0.0356 150 0.1352 -
0.0475 200 0.0718 -
0.0594 250 0.0334 -
0.0712 300 0.0377 -
0.0831 350 0.0221 -
0.0950 400 0.0162 -
0.1069 450 0.0097 -
0.1187 500 0.015 -
0.1306 550 0.0082 -
0.1425 600 0.0119 -
0.1544 650 0.0122 -
0.1662 700 0.0052 -
0.1781 750 0.0085 -
0.1900 800 0.0046 -
0.2019 850 0.0027 -
0.2137 900 0.0073 -
0.2256 950 0.0066 -
0.2375 1000 0.0044 -
0.2493 1050 0.0037 -
0.2612 1100 0.0051 -
0.2731 1150 0.0045 -
0.2850 1200 0.0056 -
0.2968 1250 0.0017 -
0.3087 1300 0.0049 -
0.3206 1350 0.0057 -
0.3325 1400 0.0046 -
0.3443 1450 0.0033 -
0.3562 1500 0.0023 -
0.3681 1550 0.002 -
0.3800 1600 0.0018 -
0.3918 1650 0.003 -
0.4037 1700 0.004 -
0.4156 1750 0.0056 -
0.4275 1800 0.0051 -
0.4393 1850 0.004 -
0.4512 1900 0.0038 -
0.4631 1950 0.0035 -
0.4749 2000 0.0026 -
0.4868 2050 0.0026 -
0.4987 2100 0.0045 -
0.5106 2150 0.0006 -
0.5224 2200 0.0036 -
0.5343 2250 0.0015 -
0.5462 2300 0.0004 -
0.5581 2350 0.0016 -
0.5699 2400 0.0025 -
0.5818 2450 0.0025 -
0.5937 2500 0.0024 -
0.6056 2550 0.0014 -
0.6174 2600 0.0035 -
0.6293 2650 0.0026 -
0.6412 2700 0.0036 -
0.6531 2750 0.0003 -
0.6649 2800 0.0042 -
0.6768 2850 0.0039 -
0.6887 2900 0.0026 -
0.7005 2950 0.0042 -
0.7124 3000 0.0056 -
0.7243 3050 0.003 -
0.7362 3100 0.0027 -
0.7480 3150 0.0025 -
0.7599 3200 0.0003 -
0.7718 3250 0.0019 -
0.7837 3300 0.0033 -
0.7955 3350 0.0004 -
0.8074 3400 0.0019 -
0.8193 3450 0.0025 -
0.8312 3500 0.0037 -
0.8430 3550 0.0037 -
0.8549 3600 0.0035 -
0.8668 3650 0.003 -
0.8787 3700 0.0032 -
0.8905 3750 0.0014 -
0.9024 3800 0.0034 -
0.9143 3850 0.0042 -
0.9261 3900 0.0014 -
0.9380 3950 0.0023 -
0.9499 4000 0.0018 -
0.9618 4050 0.0032 -
0.9736 4100 0.0061 -
0.9855 4150 0.0022 -
0.9974 4200 0.0035 -
1.0 4211 - 0.2137

Framework Versions

  • Python: 3.12.12
  • SetFit: 1.1.3
  • Sentence Transformers: 5.2.0
  • Transformers: 4.57.3
  • PyTorch: 2.9.0+cu126
  • Datasets: 4.0.0
  • Tokenizers: 0.22.2

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
18
Safetensors
Model size
0.3B params
Tensor type
F32
·
Inference Providers NEW
This model isn't deployed by any Inference Provider. 🙋 Ask for provider support

Model tree for Luu200/department-classifier-v2

Paper for Luu200/department-classifier-v2

Evaluation results