Efficient Few-Shot Learning Without Prompts
Paper • 2209.11055 • Published • 7
How to use mini1013/master_cate_el16 with setfit:
from setfit import SetFitModel
model = SetFitModel.from_pretrained("mini1013/master_cate_el16")How to use mini1013/master_cate_el16 with sentence-transformers:
from sentence_transformers import SentenceTransformer
model = SentenceTransformer("mini1013/master_cate_el16")
sentences = [
"The weather is lovely today.",
"It's so sunny outside!",
"He drove to the stadium."
]
embeddings = model.encode(sentences)
similarities = model.similarity(embeddings, embeddings)
print(similarities.shape)
# [3, 3]This is a SetFit model that can be used for Text Classification. This SetFit model uses mini1013/master_domain 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 |
|---|---|
| 3 |
|
| 1 |
|
| 0 |
|
| 4 |
|
| 6 |
|
| 11 |
|
| 2 |
|
| 5 |
|
| 9 |
|
| 8 |
|
| 10 |
|
| 7 |
|
| Label | Metric |
|---|---|
| all | 0.7786 |
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("mini1013/master_cate_el16")
# Run inference
preds = model("이지넷 NEXT-350U3 3.5 외장케이스/USB3.0 하드미포함 레알몰")
| Training set | Min | Median | Max |
|---|---|---|---|
| Word count | 4 | 9.6059 | 20 |
| Label | Training Sample Count |
|---|---|
| 0 | 50 |
| 1 | 50 |
| 2 | 50 |
| 3 | 50 |
| 4 | 50 |
| 5 | 50 |
| 6 | 50 |
| 7 | 3 |
| 8 | 50 |
| 9 | 50 |
| 10 | 7 |
| 11 | 50 |
| Epoch | Step | Training Loss | Validation Loss |
|---|---|---|---|
| 0.0125 | 1 | 0.497 | - |
| 0.625 | 50 | 0.2348 | - |
| 1.25 | 100 | 0.0733 | - |
| 1.875 | 150 | 0.0254 | - |
| 2.5 | 200 | 0.0165 | - |
| 3.125 | 250 | 0.0122 | - |
| 3.75 | 300 | 0.0021 | - |
| 4.375 | 350 | 0.0024 | - |
| 5.0 | 400 | 0.001 | - |
| 5.625 | 450 | 0.0019 | - |
| 6.25 | 500 | 0.0002 | - |
| 6.875 | 550 | 0.0007 | - |
| 7.5 | 600 | 0.0009 | - |
| 8.125 | 650 | 0.0002 | - |
| 8.75 | 700 | 0.0002 | - |
| 9.375 | 750 | 0.0003 | - |
| 10.0 | 800 | 0.0002 | - |
| 10.625 | 850 | 0.0002 | - |
| 11.25 | 900 | 0.0002 | - |
| 11.875 | 950 | 0.0001 | - |
| 12.5 | 1000 | 0.0001 | - |
| 13.125 | 1050 | 0.0001 | - |
| 13.75 | 1100 | 0.0001 | - |
| 14.375 | 1150 | 0.0001 | - |
| 15.0 | 1200 | 0.0001 | - |
| 15.625 | 1250 | 0.0001 | - |
| 16.25 | 1300 | 0.0001 | - |
| 16.875 | 1350 | 0.0001 | - |
| 17.5 | 1400 | 0.0001 | - |
| 18.125 | 1450 | 0.0001 | - |
| 18.75 | 1500 | 0.0001 | - |
| 19.375 | 1550 | 0.0001 | - |
| 20.0 | 1600 | 0.0001 | - |
@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}
}