SetFit with BAAI/bge-small-en-v1.5
This is a SetFit model that can be used for Text Classification. This SetFit model uses BAAI/bge-small-en-v1.5 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:
- Fine-tuning a Sentence Transformer with contrastive learning.
- Training a classification head with features from the fine-tuned Sentence Transformer.
Model Details
Model Description
- Model Type: SetFit
- Sentence Transformer body: BAAI/bge-small-en-v1.5
- Classification head: a LogisticRegression instance
- Maximum Sequence Length: 512 tokens
- Number of Classes: 3 classes
Model Sources
- Repository: SetFit on GitHub
- Paper: Efficient Few-Shot Learning Without Prompts
- Blogpost: SetFit: Efficient Few-Shot Learning Without Prompts
Model Labels
Label | Examples |
---|---|
0 |
|
2 |
|
1 |
|
Evaluation
Metrics
Label | Accuracy |
---|---|
all | 0.9977 |
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("Gopal2002/SERVICE_LARGE_MODEL_ZEON")
# Run inference
preds = model("
TOTAL
11
- wl et
SUPERVI
SOR
7 ce
nly
AIN|A ale
Sale
lale ld
So
:
9 wij im
aes 3513
sIB|e
alg
alg
NTN
a 2 3 ; 3
gle
o
ri
")
Training Details
Training Set Metrics
Training set | Min | Median | Max |
---|---|---|---|
Word count | 1 | 225.8451 | 1106 |
Label | Training Sample Count |
---|---|
0 | 267 |
1 | 74 |
2 | 85 |
Training Hyperparameters
- batch_size: (32, 32)
- num_epochs: (2, 2)
- 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
- seed: 42
- eval_max_steps: -1
- load_best_model_at_end: False
Training Results
Epoch | Step | Training Loss | Validation Loss |
---|---|---|---|
0.0003 | 1 | 0.3001 | - |
0.0164 | 50 | 0.2586 | - |
0.0328 | 100 | 0.1809 | - |
0.0492 | 150 | 0.0534 | - |
0.0656 | 200 | 0.0285 | - |
0.0820 | 250 | 0.0144 | - |
0.0985 | 300 | 0.0045 | - |
0.1149 | 350 | 0.0281 | - |
0.1313 | 400 | 0.0432 | - |
0.1477 | 450 | 0.0045 | - |
0.1641 | 500 | 0.0023 | - |
0.1805 | 550 | 0.0022 | - |
0.1969 | 600 | 0.0011 | - |
0.2133 | 650 | 0.0008 | - |
0.2297 | 700 | 0.0226 | - |
0.2461 | 750 | 0.0009 | - |
0.2626 | 800 | 0.0008 | - |
0.2790 | 850 | 0.001 | - |
0.2954 | 900 | 0.001 | - |
0.3118 | 950 | 0.001 | - |
0.3282 | 1000 | 0.0007 | - |
0.3446 | 1050 | 0.0012 | - |
0.3610 | 1100 | 0.0008 | - |
0.3774 | 1150 | 0.0008 | - |
0.3938 | 1200 | 0.0008 | - |
0.4102 | 1250 | 0.0034 | - |
0.4266 | 1300 | 0.0007 | - |
0.4431 | 1350 | 0.0007 | - |
0.4595 | 1400 | 0.0008 | - |
0.4759 | 1450 | 0.0007 | - |
0.4923 | 1500 | 0.0004 | - |
0.5087 | 1550 | 0.0005 | - |
0.5251 | 1600 | 0.0007 | - |
0.5415 | 1650 | 0.0005 | - |
0.5579 | 1700 | 0.0005 | - |
0.5743 | 1750 | 0.0004 | - |
0.5907 | 1800 | 0.0009 | - |
0.6072 | 1850 | 0.0025 | - |
0.6236 | 1900 | 0.0003 | - |
0.6400 | 1950 | 0.0023 | - |
0.6564 | 2000 | 0.0004 | - |
0.6728 | 2050 | 0.0045 | - |
0.6892 | 2100 | 0.0005 | - |
0.7056 | 2150 | 0.0109 | - |
0.7220 | 2200 | 0.0003 | - |
0.7384 | 2250 | 0.0021 | - |
0.7548 | 2300 | 0.0005 | - |
0.7713 | 2350 | 0.0004 | - |
0.7877 | 2400 | 0.0118 | - |
0.8041 | 2450 | 0.0003 | - |
0.8205 | 2500 | 0.0003 | - |
0.8369 | 2550 | 0.0126 | - |
0.8533 | 2600 | 0.0004 | - |
0.8697 | 2650 | 0.0162 | - |
0.8861 | 2700 | 0.0003 | - |
0.9025 | 2750 | 0.0004 | - |
0.9189 | 2800 | 0.0005 | - |
0.9353 | 2850 | 0.0004 | - |
0.9518 | 2900 | 0.0032 | - |
0.9682 | 2950 | 0.0003 | - |
0.9846 | 3000 | 0.0004 | - |
1.0010 | 3050 | 0.0003 | - |
1.0174 | 3100 | 0.0003 | - |
1.0338 | 3150 | 0.0019 | - |
1.0502 | 3200 | 0.0194 | - |
1.0666 | 3250 | 0.0003 | - |
1.0830 | 3300 | 0.0004 | - |
1.0994 | 3350 | 0.01 | - |
1.1159 | 3400 | 0.0002 | - |
1.1323 | 3450 | 0.0003 | - |
1.1487 | 3500 | 0.0004 | - |
1.1651 | 3550 | 0.0004 | - |
1.1815 | 3600 | 0.0002 | - |
1.1979 | 3650 | 0.0005 | - |
1.2143 | 3700 | 0.0002 | - |
1.2307 | 3750 | 0.0019 | - |
1.2471 | 3800 | 0.0003 | - |
1.2635 | 3850 | 0.0048 | - |
1.2799 | 3900 | 0.013 | - |
1.2964 | 3950 | 0.0031 | - |
1.3128 | 4000 | 0.0002 | - |
1.3292 | 4050 | 0.0024 | - |
1.3456 | 4100 | 0.0002 | - |
1.3620 | 4150 | 0.0003 | - |
1.3784 | 4200 | 0.0003 | - |
1.3948 | 4250 | 0.0002 | - |
1.4112 | 4300 | 0.003 | - |
1.4276 | 4350 | 0.0002 | - |
1.4440 | 4400 | 0.0002 | - |
1.4605 | 4450 | 0.0022 | - |
1.4769 | 4500 | 0.0002 | - |
1.4933 | 4550 | 0.0078 | - |
1.5097 | 4600 | 0.0027 | - |
1.5261 | 4650 | 0.0002 | - |
1.5425 | 4700 | 0.0002 | - |
1.5589 | 4750 | 0.0002 | - |
1.5753 | 4800 | 0.0002 | - |
1.5917 | 4850 | 0.0002 | - |
1.6081 | 4900 | 0.0118 | - |
1.6245 | 4950 | 0.0002 | - |
1.6410 | 5000 | 0.0002 | - |
1.6574 | 5050 | 0.0003 | - |
1.6738 | 5100 | 0.0003 | - |
1.6902 | 5150 | 0.0068 | - |
1.7066 | 5200 | 0.0003 | - |
1.7230 | 5250 | 0.0112 | - |
1.7394 | 5300 | 0.0002 | - |
1.7558 | 5350 | 0.0002 | - |
1.7722 | 5400 | 0.0003 | - |
1.7886 | 5450 | 0.0002 | - |
1.8051 | 5500 | 0.0002 | - |
1.8215 | 5550 | 0.0002 | - |
1.8379 | 5600 | 0.0002 | - |
1.8543 | 5650 | 0.0003 | - |
1.8707 | 5700 | 0.0047 | - |
1.8871 | 5750 | 0.0121 | - |
1.9035 | 5800 | 0.0003 | - |
1.9199 | 5850 | 0.013 | - |
1.9363 | 5900 | 0.005 | - |
1.9527 | 5950 | 0.0001 | - |
1.9691 | 6000 | 0.0002 | - |
1.9856 | 6050 | 0.0003 | - |
Framework Versions
- Python: 3.10.12
- SetFit: 1.0.3
- Sentence Transformers: 2.2.2
- Transformers: 4.35.2
- PyTorch: 2.1.0+cu121
- Datasets: 2.16.1
- Tokenizers: 0.15.0
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
- 3
Inference Providers
NEW
This model is not currently available via any of the supported third-party Inference Providers, and
the model is not deployed on the HF Inference API.
Model tree for Gopal2002/SERVICE_LARGE_MODEL_ZEON
Base model
BAAI/bge-small-en-v1.5