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 jhu-clsp/mmBERT-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.9970 |
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-5-large")
# Run inference
preds = model("cooked him")
| Training set | Min | Median | Max |
|---|---|---|---|
| Word count | 1 | 4.6067 | 81 |
| Label | Training Sample Count |
|---|---|
| not toxic | 8689 |
| toxic | 4512 |
| Epoch | Step | Training Loss | Validation Loss |
|---|---|---|---|
| 0.0004 | 1 | 0.3044 | - |
| 0.0202 | 50 | 0.2803 | - |
| 0.0404 | 100 | 0.2355 | - |
| 0.0606 | 150 | 0.1607 | - |
| 0.0808 | 200 | 0.0911 | - |
| 0.1010 | 250 | 0.0694 | - |
| 0.1212 | 300 | 0.0532 | - |
| 0.1414 | 350 | 0.0391 | - |
| 0.1616 | 400 | 0.0343 | - |
| 0.1817 | 450 | 0.0296 | - |
| 0.2019 | 500 | 0.0264 | - |
| 0.2221 | 550 | 0.022 | - |
| 0.2423 | 600 | 0.0201 | - |
| 0.2625 | 650 | 0.0127 | - |
| 0.2827 | 700 | 0.0165 | - |
| 0.3029 | 750 | 0.0097 | - |
| 0.3231 | 800 | 0.0093 | - |
| 0.3433 | 850 | 0.0098 | - |
| 0.3635 | 900 | 0.009 | - |
| 0.3837 | 950 | 0.0076 | - |
| 0.4039 | 1000 | 0.0073 | - |
| 0.4241 | 1050 | 0.0076 | - |
| 0.4443 | 1100 | 0.0058 | - |
| 0.4645 | 1150 | 0.0049 | - |
| 0.4847 | 1200 | 0.0066 | - |
| 0.5048 | 1250 | 0.0044 | - |
| 0.5250 | 1300 | 0.0052 | - |
| 0.5452 | 1350 | 0.0041 | - |
| 0.5654 | 1400 | 0.0061 | - |
| 0.5856 | 1450 | 0.0033 | - |
| 0.6058 | 1500 | 0.0051 | - |
| 0.6260 | 1550 | 0.0029 | - |
| 0.6462 | 1600 | 0.0039 | - |
| 0.6664 | 1650 | 0.0046 | - |
| 0.6866 | 1700 | 0.0028 | - |
| 0.7068 | 1750 | 0.0037 | - |
| 0.7270 | 1800 | 0.0022 | - |
| 0.7472 | 1850 | 0.0032 | - |
| 0.7674 | 1900 | 0.0025 | - |
| 0.7876 | 1950 | 0.0027 | - |
| 0.8078 | 2000 | 0.0024 | - |
| 0.8279 | 2050 | 0.0031 | - |
| 0.8481 | 2100 | 0.0024 | - |
| 0.8683 | 2150 | 0.0033 | - |
| 0.8885 | 2200 | 0.0039 | - |
| 0.9087 | 2250 | 0.0028 | - |
| 0.9289 | 2300 | 0.0029 | - |
| 0.9491 | 2350 | 0.0023 | - |
| 0.9693 | 2400 | 0.0022 | - |
| 0.9895 | 2450 | 0.0027 | - |
| 1.0 | 2476 | - | 0.0046 |
@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
jhu-clsp/mmBERT-base