SetFit with BAAI/bge-base-en-v1.5
This is a SetFit model that can be used for Text Classification. This SetFit model uses BAAI/bge-base-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-base-en-v1.5
- Classification head: a LogisticRegression instance
- Maximum Sequence Length: 512 tokens
- Number of Classes: 2 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 |
---|---|
1 |
|
0 |
|
Evaluation
Metrics
Label | Accuracy |
---|---|
all | 0.6667 |
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("Netta1994/setfit_baai_wix_qa_gpt-4o_improved-cot-instructions_chat_few_shot_generated_remove_fi")
# Run inference
preds = model("Reasoning:
The answer provided is detailed and outlines the steps to block off time slots in the Wix Booking Calendar. However, the question specifically asks about removing the time from showing on the booking button, not about blocking off time slots. The instructions given do not address the question directly. The document also does not mention any method for removing the time from the booking button, so the answer lacks context grounding and relevance to both the question and the document.
Evaluation:")
Training Details
Training Set Metrics
Training set | Min | Median | Max |
---|---|---|---|
Word count | 33 | 91.9544 | 289 |
Label | Training Sample Count |
---|---|
0 | 335 |
1 | 345 |
Training Hyperparameters
- batch_size: (16, 16)
- num_epochs: (2, 2)
- max_steps: -1
- sampling_strategy: oversampling
- num_iterations: 20
- 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
- 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.0006 | 1 | 0.2534 | - |
0.0294 | 50 | 0.2576 | - |
0.0588 | 100 | 0.256 | - |
0.0882 | 150 | 0.2569 | - |
0.1176 | 200 | 0.2488 | - |
0.1471 | 250 | 0.2107 | - |
0.1765 | 300 | 0.1824 | - |
0.2059 | 350 | 0.1642 | - |
0.2353 | 400 | 0.1422 | - |
0.2647 | 450 | 0.1194 | - |
0.2941 | 500 | 0.073 | - |
0.3235 | 550 | 0.0671 | - |
0.3529 | 600 | 0.0236 | - |
0.3824 | 650 | 0.0198 | - |
0.4118 | 700 | 0.0199 | - |
0.4412 | 750 | 0.0094 | - |
0.4706 | 800 | 0.0101 | - |
0.5 | 850 | 0.0118 | - |
0.5294 | 900 | 0.0055 | - |
0.5588 | 950 | 0.0091 | - |
0.5882 | 1000 | 0.0109 | - |
0.6176 | 1050 | 0.0063 | - |
0.6471 | 1100 | 0.0016 | - |
0.6765 | 1150 | 0.0026 | - |
0.7059 | 1200 | 0.0051 | - |
0.7353 | 1250 | 0.0057 | - |
0.7647 | 1300 | 0.0018 | - |
0.7941 | 1350 | 0.0014 | - |
0.8235 | 1400 | 0.0021 | - |
0.8529 | 1450 | 0.0013 | - |
0.8824 | 1500 | 0.0012 | - |
0.9118 | 1550 | 0.001 | - |
0.9412 | 1600 | 0.0011 | - |
0.9706 | 1650 | 0.001 | - |
1.0 | 1700 | 0.0011 | - |
1.0294 | 1750 | 0.0011 | - |
1.0588 | 1800 | 0.0011 | - |
1.0882 | 1850 | 0.001 | - |
1.1176 | 1900 | 0.001 | - |
1.1471 | 1950 | 0.001 | - |
1.1765 | 2000 | 0.001 | - |
1.2059 | 2050 | 0.001 | - |
1.2353 | 2100 | 0.001 | - |
1.2647 | 2150 | 0.001 | - |
1.2941 | 2200 | 0.001 | - |
1.3235 | 2250 | 0.001 | - |
1.3529 | 2300 | 0.0009 | - |
1.3824 | 2350 | 0.0009 | - |
1.4118 | 2400 | 0.0009 | - |
1.4412 | 2450 | 0.0017 | - |
1.4706 | 2500 | 0.0009 | - |
1.5 | 2550 | 0.0009 | - |
1.5294 | 2600 | 0.0009 | - |
1.5588 | 2650 | 0.0009 | - |
1.5882 | 2700 | 0.0009 | - |
1.6176 | 2750 | 0.0009 | - |
1.6471 | 2800 | 0.0009 | - |
1.6765 | 2850 | 0.0009 | - |
1.7059 | 2900 | 0.0008 | - |
1.7353 | 2950 | 0.0008 | - |
1.7647 | 3000 | 0.0008 | - |
1.7941 | 3050 | 0.0008 | - |
1.8235 | 3100 | 0.0008 | - |
1.8529 | 3150 | 0.0008 | - |
1.8824 | 3200 | 0.0009 | - |
1.9118 | 3250 | 0.0008 | - |
1.9412 | 3300 | 0.0008 | - |
1.9706 | 3350 | 0.0009 | - |
2.0 | 3400 | 0.0008 | - |
Framework Versions
- Python: 3.10.14
- SetFit: 1.1.0
- Sentence Transformers: 3.1.1
- Transformers: 4.44.0
- PyTorch: 2.4.0+cu121
- Datasets: 3.0.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
- 4
This model does not have enough activity to be deployed to Inference API (serverless) yet. Increase its social
visibility and check back later, or deploy to Inference Endpoints (dedicated)
instead.
Model tree for Netta1994/setfit_baai_wix_qa_gpt-4o_improved-cot-instructions_chat_few_shot_generated_remove_fi
Base model
BAAI/bge-base-en-v1.5