Efficient Few-Shot Learning Without Prompts
Paper • 2209.11055 • Published • 6
How to use beethogedeon/financial-sentiment-Qwen3-4B-fp16 with setfit:
from setfit import SetFitModel
model = SetFitModel.from_pretrained("beethogedeon/financial-sentiment-Qwen3-4B-fp16")How to use beethogedeon/financial-sentiment-Qwen3-4B-fp16 with sentence-transformers:
from sentence_transformers import SentenceTransformer
model = SentenceTransformer("beethogedeon/financial-sentiment-Qwen3-4B-fp16")
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 Qwen/Qwen3-Embedding-4B 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 |
|---|---|
| neutral |
|
| negative |
|
| positive |
|
| Label | Accuracy |
|---|---|
| all | 0.7518 |
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("beethogedeon/financial-sentiment-Qwen3-4B-fp16")
# Run inference
preds = model("Officials did not disclose the contract value .")
| Training set | Min | Median | Max |
|---|---|---|---|
| Word count | 3 | 23.6836 | 62 |
| Label | Training Sample Count |
|---|---|
| negative | 301 |
| neutral | 1488 |
| positive | 793 |
| Epoch | Step | Training Loss | Validation Loss |
|---|---|---|---|
| 0.002 | 1 | 0.3897 | - |
| 0.1 | 50 | 0.2758 | - |
| 0.2 | 100 | 0.2867 | - |
| 0.3 | 150 | 0.2856 | - |
| 0.4 | 200 | 0.256 | - |
| 0.5 | 250 | 0.2632 | - |
| 0.6 | 300 | 0.2514 | - |
| 0.7 | 350 | 0.2366 | - |
| 0.8 | 400 | 0.2422 | - |
| 0.9 | 450 | 0.2514 | - |
| 1.0 | 500 | 0.2614 | - |
@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}
}