Efficient Few-Shot Learning Without Prompts
Paper
•
2209.11055
•
Published
•
4
This is a SetFit model that can be used for Text Classification. This SetFit model uses intfloat/multilingual-e5-base 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:
| Label | Examples |
|---|---|
| toxic |
|
| not toxic |
|
| Label | Accuracy |
|---|---|
| all | 0.9985 |
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("johnpaulbin/toxicity-setfit-7-norm")
# Run inference
preds = model("cooked him")
| Training set | Min | Median | Max |
|---|---|---|---|
| Word count | 1 | 4.6068 | 81 |
| Label | Training Sample Count |
|---|---|
| not toxic | 8689 |
| toxic | 4512 |
| Epoch | Step | Training Loss | Validation Loss |
|---|---|---|---|
| 0.0004 | 1 | 0.3528 | - |
| 0.0202 | 50 | 0.3183 | - |
| 0.0404 | 100 | 0.2297 | - |
| 0.0606 | 150 | 0.1218 | - |
| 0.0808 | 200 | 0.0752 | - |
| 0.1010 | 250 | 0.0624 | - |
| 0.1212 | 300 | 0.049 | - |
| 0.1414 | 350 | 0.0389 | - |
| 0.1616 | 400 | 0.0334 | - |
| 0.1817 | 450 | 0.0244 | - |
| 0.2019 | 500 | 0.0248 | - |
| 0.2221 | 550 | 0.0212 | - |
| 0.2423 | 600 | 0.0196 | - |
| 0.2625 | 650 | 0.0177 | - |
| 0.2827 | 700 | 0.018 | - |
| 0.3029 | 750 | 0.0137 | - |
| 0.3231 | 800 | 0.0154 | - |
| 0.3433 | 850 | 0.014 | - |
| 0.3635 | 900 | 0.0134 | - |
| 0.3837 | 950 | 0.0103 | - |
| 0.4039 | 1000 | 0.0128 | - |
| 0.4241 | 1050 | 0.0124 | - |
| 0.4443 | 1100 | 0.0115 | - |
| 0.4645 | 1150 | 0.0111 | - |
| 0.4847 | 1200 | 0.0124 | - |
| 0.5048 | 1250 | 0.0118 | - |
| 0.5250 | 1300 | 0.0109 | - |
| 0.5452 | 1350 | 0.0104 | - |
| 0.5654 | 1400 | 0.0105 | - |
| 0.5856 | 1450 | 0.0103 | - |
| 0.6058 | 1500 | 0.0097 | - |
| 0.6260 | 1550 | 0.0096 | - |
| 0.6462 | 1600 | 0.0098 | - |
| 0.6664 | 1650 | 0.008 | - |
| 0.6866 | 1700 | 0.0082 | - |
| 0.7068 | 1750 | 0.0084 | - |
| 0.7270 | 1800 | 0.0065 | - |
| 0.7472 | 1850 | 0.0069 | - |
| 0.7674 | 1900 | 0.0088 | - |
| 0.7876 | 1950 | 0.0075 | - |
| 0.8078 | 2000 | 0.0058 | - |
| 0.8279 | 2050 | 0.0077 | - |
| 0.8481 | 2100 | 0.0055 | - |
| 0.8683 | 2150 | 0.0053 | - |
| 0.8885 | 2200 | 0.0072 | - |
| 0.9087 | 2250 | 0.0079 | - |
| 0.9289 | 2300 | 0.0074 | - |
| 0.9491 | 2350 | 0.0065 | - |
| 0.9693 | 2400 | 0.0072 | - |
| 0.9895 | 2450 | 0.0061 | - |
| 1.0 | 2476 | - | 0.0028 |
@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}
}
Base model
intfloat/multilingual-e5-base