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-small 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 |
|---|---|
| not toxic |
|
| toxic |
|
| Label | Accuracy |
|---|---|
| all | 0.9785 |
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-1")
# Run inference
preds = model("habits")
| Training set | Min | Median | Max |
|---|---|---|---|
| Word count | 1 | 4.8995 | 81 |
| Label | Training Sample Count |
|---|---|
| not toxic | 8770 |
| toxic | 6322 |
| Epoch | Step | Training Loss | Validation Loss |
|---|---|---|---|
| 0.0000 | 1 | 0.2577 | - |
| 0.0000 | 50 | 0.3826 | - |
| 0.0000 | 100 | 0.4065 | - |
| 0.0000 | 150 | 0.3851 | - |
| 0.0000 | 200 | 0.4038 | - |
| 0.0011 | 1 | 0.3989 | - |
| 0.0530 | 50 | 0.3241 | - |
| 0.1059 | 100 | 0.1508 | - |
| 0.1589 | 150 | 0.0692 | - |
| 0.2119 | 200 | 0.0523 | - |
| 0.2648 | 250 | 0.0351 | - |
| 0.3178 | 300 | 0.0267 | - |
| 0.3708 | 350 | 0.0184 | - |
| 0.4237 | 400 | 0.0187 | - |
| 0.4767 | 450 | 0.0143 | - |
| 0.5297 | 500 | 0.0154 | - |
| 0.5826 | 550 | 0.0117 | - |
| 0.6356 | 600 | 0.0103 | - |
| 0.6886 | 650 | 0.0081 | - |
| 0.7415 | 700 | 0.0075 | - |
| 0.7945 | 750 | 0.0076 | - |
| 0.8475 | 800 | 0.0057 | - |
| 0.9004 | 850 | 0.0041 | - |
| 0.9534 | 900 | 0.0058 | - |
| 1.0 | 944 | - | 0.0380 |
@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-small