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 sentence-transformers/all-mpnet-base-v2 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 |
|---|---|
| 1 |
|
| 0 |
|
| 2 |
|
| 3 |
|
| 5 |
|
| 4 |
|
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("tmp/best_model")
# Run inference
preds = model("lets fix the issues")
| Training set | Min | Median | Max |
|---|---|---|---|
| Word count | 1 | 12.3350 | 125 |
| Label | Training Sample Count |
|---|---|
| 0 | 43 |
| 1 | 80 |
| 2 | 88 |
| 3 | 56 |
| 4 | 61 |
| 5 | 84 |
| Epoch | Step | Training Loss | Validation Loss |
|---|---|---|---|
| 0.0032 | 1 | 0.3642 | - |
| 0.0162 | 5 | - | 0.2610 |
| 0.0324 | 10 | - | 0.2849 |
| 0.0485 | 15 | - | 0.2427 |
| 0.0647 | 20 | - | 0.2171 |
| 0.0809 | 25 | - | 0.2144 |
| 0.0971 | 30 | - | 0.1991 |
| 0.1133 | 35 | - | 0.1893 |
| 0.1294 | 40 | - | 0.1862 |
| 0.1456 | 45 | - | 0.1785 |
| 0.1618 | 50 | 0.2183 | 0.1997 |
| 0.1780 | 55 | - | 0.1840 |
| 0.1942 | 60 | - | 0.1802 |
| 0.2104 | 65 | - | 0.1734 |
| 0.2265 | 70 | - | 0.1729 |
| 0.2427 | 75 | - | 0.1806 |
| 0.2589 | 80 | - | 0.1760 |
| 0.2751 | 85 | - | 0.1726 |
| 0.2913 | 90 | - | 0.1713 |
| 0.3074 | 95 | - | 0.1619 |
| 0.3236 | 100 | 0.0666 | 0.1645 |
| 0.3398 | 105 | - | 0.1649 |
| 0.3560 | 110 | - | 0.1538 |
| 0.3722 | 115 | - | 0.1639 |
| 0.3883 | 120 | - | 0.1761 |
| 0.4045 | 125 | - | 0.1702 |
| 0.4207 | 130 | - | 0.1781 |
| 0.4369 | 135 | - | 0.1778 |
@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
sentence-transformers/all-mpnet-base-v2