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.1876 | 125 |
| Label | Training Sample Count |
|---|---|
| 0 | 43 |
| 1 | 80 |
| 2 | 92 |
| 3 | 56 |
| 4 | 64 |
| 5 | 86 |
| Epoch | Step | Training Loss | Validation Loss |
|---|---|---|---|
| 0.0009 | 1 | 0.5659 | - |
| 0.0199 | 21 | - | 0.3639 |
| 0.0399 | 42 | - | 0.3283 |
| 0.0475 | 50 | 0.3801 | - |
| 0.0598 | 63 | - | 0.2766 |
| 0.0798 | 84 | - | 0.2404 |
| 0.0950 | 100 | 0.2667 | - |
| 0.0997 | 105 | - | 0.2395 |
| 0.1197 | 126 | - | 0.2435 |
| 0.1396 | 147 | - | 0.2417 |
| 0.1425 | 150 | 0.2294 | - |
| 0.1595 | 168 | - | 0.2307 |
| 0.1795 | 189 | - | 0.2256 |
| 0.1899 | 200 | 0.2286 | - |
| 0.1994 | 210 | - | 0.2173 |
| 0.2194 | 231 | - | 0.2139 |
| 0.2374 | 250 | 0.1829 | - |
| 0.2393 | 252 | - | 0.2084 |
| 0.2593 | 273 | - | 0.2046 |
| 0.2792 | 294 | - | 0.2073 |
| 0.2849 | 300 | 0.1566 | - |
| 0.2991 | 315 | - | 0.2012 |
| 0.3191 | 336 | - | 0.1938 |
| 0.3324 | 350 | 0.1502 | - |
| 0.3390 | 357 | - | 0.1934 |
| 0.3590 | 378 | - | 0.1972 |
| 0.3789 | 399 | - | 0.2028 |
| 0.3799 | 400 | 0.1041 | - |
| 0.3989 | 420 | - | 0.2001 |
| 0.4188 | 441 | - | 0.1981 |
| 0.4274 | 450 | 0.1118 | - |
| 0.4387 | 462 | - | 0.1863 |
| 0.4587 | 483 | - | 0.1767 |
| 0.4748 | 500 | 0.0876 | - |
| 0.4786 | 504 | - | 0.1746 |
| 0.4986 | 525 | - | 0.1724 |
| 0.5185 | 546 | - | 0.1731 |
| 0.5223 | 550 | 0.0575 | - |
| 0.5385 | 567 | - | 0.1706 |
| 0.5584 | 588 | - | 0.1743 |
| 0.5698 | 600 | 0.0524 | - |
| 0.5783 | 609 | - | 0.1683 |
| 0.5983 | 630 | - | 0.1635 |
| 0.6173 | 650 | 0.0401 | - |
| 0.6182 | 651 | - | 0.1691 |
| 0.6382 | 672 | - | 0.1659 |
| 0.6581 | 693 | - | 0.1625 |
| 0.6648 | 700 | 0.0214 | - |
| 0.6781 | 714 | - | 0.1649 |
| 0.6980 | 735 | - | 0.1577 |
| 0.7123 | 750 | 0.0164 | - |
| 0.7179 | 756 | - | 0.1595 |
| 0.7379 | 777 | - | 0.1589 |
| 0.7578 | 798 | - | 0.1517 |
| 0.7597 | 800 | 0.0178 | - |
| 0.7778 | 819 | - | 0.1563 |
| 0.7977 | 840 | - | 0.1547 |
| 0.8072 | 850 | 0.0128 | - |
| 0.8177 | 861 | - | 0.1531 |
| 0.8376 | 882 | - | 0.1528 |
| 0.8547 | 900 | 0.0073 | - |
| 0.8575 | 903 | - | 0.1524 |
@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