Instructions to use koutch/setfit_staqt with libraries, inference providers, notebooks, and local apps. Follow these links to get started.
- Libraries
- sentence-transformers
How to use koutch/setfit_staqt with sentence-transformers:
from sentence_transformers import SentenceTransformer model = SentenceTransformer("koutch/setfit_staqt") 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] - setfit
How to use koutch/setfit_staqt with setfit:
from setfit import SetFitModel model = SetFitModel.from_pretrained("koutch/setfit_staqt") - Notebooks
- Google Colab
- Kaggle
SetFit StaQT
This is a SetFit model that can be used for text classification. The model has been trained using an efficient few-shot learning technique that involves:
- Fine-tuning a Sentence Transformer with contrastive learning.
- Training a classification head with features from the fine-tuned Sentence Transformer.
Usage
To use this model for inference, first install the SetFit library:
python -m pip install setfit
You can then run inference as follows:
from setfit import SetFitModel
# Download from Hub and run inference
model = SetFitModel.from_pretrained("koutch/setfit_staqt")
# Run inference
- Downloads last month
- 1