rohithbojja/labelled_bank_support_dataset
Viewer • Updated • 6.88k • 49
How to use rohithbojja/ft-intent-bank with setfit:
from setfit import SetFitModel
model = SetFitModel.from_pretrained("rohithbojja/ft-intent-bank")How to use rohithbojja/ft-intent-bank with sentence-transformers:
from sentence_transformers import SentenceTransformer
model = SentenceTransformer("rohithbojja/ft-intent-bank")
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 trained on the rbojja/labelled_bank_support_dataset dataset that can be used for Text Classification. This SetFit model uses BAAI/bge-small-en-v1.5 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 |
|
| 2 |
|
| 3 |
|
| 10 |
|
| 9 |
|
| 4 |
|
| 7 |
|
| 6 |
|
| 0 |
|
| 8 |
|
| Label | Accuracy |
|---|---|
| all | 0.8641 |
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("rbojja/ft-intent-bank")
# Run inference
preds = model("I need to know the outstanding amount on my education loan.")
| Training set | Min | Median | Max |
|---|---|---|---|
| Word count | 7 | 15.322 | 31 |
| Label | Training Sample Count |
|---|---|
| 0 | 7 |
| 1 | 797 |
| 2 | 29 |
| 3 | 18 |
| 4 | 1 |
| 6 | 15 |
| 7 | 7 |
| 8 | 6 |
| 9 | 63 |
| 10 | 57 |
| Epoch | Step | Training Loss | Validation Loss |
|---|---|---|---|
| 0.0003 | 1 | 0.2179 | - |
| 0.0145 | 50 | 0.2598 | - |
| 0.0290 | 100 | 0.2349 | - |
| 0.0435 | 150 | 0.2019 | - |
| 0.0580 | 200 | 0.1686 | - |
| 0.0725 | 250 | 0.1375 | - |
| 0.0870 | 300 | 0.1265 | - |
| 0.1014 | 350 | 0.0954 | - |
| 0.1159 | 400 | 0.0794 | - |
| 0.1304 | 450 | 0.065 | - |
| 0.1449 | 500 | 0.0731 | - |
| 0.1594 | 550 | 0.0547 | - |
| 0.1739 | 600 | 0.043 | - |
| 0.1884 | 650 | 0.0327 | - |
| 0.2029 | 700 | 0.027 | - |
| 0.2174 | 750 | 0.0285 | - |
| 0.2319 | 800 | 0.0201 | - |
| 0.2464 | 850 | 0.0151 | - |
| 0.2609 | 900 | 0.0131 | - |
| 0.2754 | 950 | 0.0076 | - |
| 0.2899 | 1000 | 0.0147 | - |
| 0.3043 | 1050 | 0.0122 | - |
| 0.3188 | 1100 | 0.0109 | - |
| 0.3333 | 1150 | 0.0126 | - |
| 0.3478 | 1200 | 0.0108 | - |
| 0.3623 | 1250 | 0.009 | - |
| 0.3768 | 1300 | 0.0072 | - |
| 0.3913 | 1350 | 0.0051 | - |
| 0.4058 | 1400 | 0.0057 | - |
| 0.4203 | 1450 | 0.0056 | - |
| 0.4348 | 1500 | 0.0079 | - |
| 0.4493 | 1550 | 0.0076 | - |
| 0.4638 | 1600 | 0.0029 | - |
| 0.4783 | 1650 | 0.0039 | - |
| 0.4928 | 1700 | 0.003 | - |
| 0.5072 | 1750 | 0.0037 | - |
| 0.5217 | 1800 | 0.0022 | - |
| 0.5362 | 1850 | 0.0032 | - |
| 0.5507 | 1900 | 0.0034 | - |
| 0.5652 | 1950 | 0.006 | - |
| 0.5797 | 2000 | 0.0046 | - |
| 0.5942 | 2050 | 0.0026 | - |
| 0.6087 | 2100 | 0.0031 | - |
| 0.6232 | 2150 | 0.0041 | - |
| 0.6377 | 2200 | 0.0049 | - |
| 0.6522 | 2250 | 0.0015 | - |
| 0.6667 | 2300 | 0.0053 | - |
| 0.6812 | 2350 | 0.0033 | - |
| 0.6957 | 2400 | 0.0055 | - |
| 0.7101 | 2450 | 0.0044 | - |
| 0.7246 | 2500 | 0.0036 | - |
| 0.7391 | 2550 | 0.0038 | - |
| 0.7536 | 2600 | 0.0038 | - |
| 0.7681 | 2650 | 0.0027 | - |
| 0.7826 | 2700 | 0.0028 | - |
| 0.7971 | 2750 | 0.0038 | - |
| 0.8116 | 2800 | 0.0033 | - |
| 0.8261 | 2850 | 0.0035 | - |
| 0.8406 | 2900 | 0.002 | - |
| 0.8551 | 2950 | 0.0034 | - |
| 0.8696 | 3000 | 0.0053 | - |
| 0.8841 | 3050 | 0.0035 | - |
| 0.8986 | 3100 | 0.0016 | - |
| 0.9130 | 3150 | 0.0021 | - |
| 0.9275 | 3200 | 0.0021 | - |
| 0.9420 | 3250 | 0.005 | - |
| 0.9565 | 3300 | 0.0031 | - |
| 0.9710 | 3350 | 0.0038 | - |
| 0.9855 | 3400 | 0.0029 | - |
| 1.0 | 3450 | 0.0019 | - |
@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
BAAI/bge-small-en-v1.5